Skip to content

Commit de624d5

Browse files
committed
Fix no collection in extract default value
1 parent 2b206ff commit de624d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,9 @@ private function extractFromDefaultValue(string $class, string $property): ?arra
477477
}
478478

479479
$type = \gettype($defaultValue);
480+
$type = static::MAP_TYPES[$type] ?? $type;
480481

481-
return [new Type(static::MAP_TYPES[$type] ?? $type)];
482+
return [new Type($type, null, null, $type === Type::BUILTIN_TYPE_ARRAY)];
482483
}
483484

484485
private function extractFromReflectionType(\ReflectionType $reflectionType, \ReflectionClass $declaringClass): array

0 commit comments

Comments
 (0)