bug #33626 [PropertyInfo] ensure compatibility with type resolver 0.5 (xabbuh)

This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyInfo] ensure compatibility with type resolver 0.5

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

same as #33588 but for the `3.4` branch

Commits
-------

2d708b3e60 ensure compatibility with type resolver 0.5
This commit is contained in:
Fabien Potencier 2019-09-18 16:55:47 +02:00
commit 6fad4f1215

View File

@ -55,7 +55,14 @@ final class PhpDocTypeHelper
$varTypes = [];
for ($typeIndex = 0; $varType->has($typeIndex); ++$typeIndex) {
$varTypes[] = (string) $varType->get($typeIndex);
$nestedVarType = $varType->get($typeIndex);
if ($nestedVarType instanceof Nullable) {
$varTypes[] = (string) $nestedVarType->getActualType();
$nullable = true;
} else {
$varTypes[] = (string) $nestedVarType;
}
}
// If null is present, all types are nullable