Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ef43ea9

Browse files
Merge branch '6.0' into 6.1
* 6.0: [DoctrineBridge] Fix value type for simple_array
2 parents 1041cb0 + 29639d8 commit ef43ea9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public function getTypes(string $class, string $property, array $context = []):
180180
return [new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true)];
181181

182182
case Types::SIMPLE_ARRAY:
183-
return [new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_STRING))];
183+
return [new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, new Type(Type::BUILTIN_TYPE_INT), $enumType ?? new Type(Type::BUILTIN_TYPE_STRING))];
184184
}
185185
break;
186186
case Type::BUILTIN_TYPE_INT:

0 commit comments

Comments
 (0)