8000 minor #46727 [DoctrineBridge] Fix value type for simple_array (Gigino… · symfony/symfony@189e7a4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 189e7a4

Browse files
minor #46727 [DoctrineBridge] Fix value type for simple_array (Gigino Chianese)
This PR was merged into the 5.4 branch. Discussion ---------- [DoctrineBridge] Fix value type for simple_array | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Fix for wrong collection value type on `simple_array` after merging the type guessing changes (#46676) into 5.4 branch. Commits ------- 6375990 [DoctrineBridge] Fix value type for simple_array
2 parents b6835dd + 6375990 commit 189e7a4

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)
0