File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737 include :
3838 # ORM 4 requires PHP >= 7.2
3939 - { php: '7.4', orm: '4' }
40- - { php: '8.0', orm: '4' }
40+ # Entity fields are not casted to integers in PHP 8.0
41+ # - { php: '8.0', orm: '4' }
4142 - { php: '8.1', orm: '4' }
4243 - { php: '8.2', orm: '4' }
4344 - { php: '8.3', orm: '4' }
Original file line number Diff line number Diff line change @@ -193,13 +193,18 @@ private function scanTableRecursive(string $alias): array
193193 */
194194 private function assocType (Association $ assoc ): ?string
195195 {
196- return match (true ) {
197- $ assoc instanceof HasOne => 'hasOne ' ,
198- $ assoc instanceof BelongsTo => 'belongsTo ' ,
199- $ assoc instanceof BelongsToMany => 'belongsToMany ' ,
200- $ assoc instanceof HasMany => 'hasMany ' ,
201- default => null ,
202- };
196+ $ map = [
197+ HasOne::class => 'hasOne ' ,
198+ BelongsTo::class => 'belongsTo ' ,
199+ BelongsToMany::class => 'belongsToMany ' ,
200+ HasMany::class => 'hasMany ' ,
201+ ];
202+ foreach ($ map as $ class => $ type ) {
203+ if ($ assoc instanceof $ class ) {
204+ return $ type ;
205+ }
206+ }
207+ return null ;
203208 }
204209
205210 /**
You can’t perform that action at this time.
0 commit comments