diff --git a/src/Symfony/Component/PropertyInfo/Util/PhpDocTypeHelper.php b/src/Symfony/Component/PropertyInfo/Util/PhpDocTypeHelper.php index 27b9c7cb9d710..820402d9d2da4 100644 --- a/src/Symfony/Component/PropertyInfo/Util/PhpDocTypeHelper.php +++ b/src/Symfony/Component/PropertyInfo/Util/PhpDocTypeHelper.php @@ -64,6 +64,11 @@ public function getTypes(DocType $varType): array continue; } + if ($type instanceof Nullable) { + $nullable = true; + $type = $type->getActualType(); + } + $varTypes[] = $type; }