New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PropertyInfo] Support union types through PhpDoc #45903
Comments
Isn't it already supported, as highlighted by this test? |
It doesn't seems to be supported in collections. Nor is there any test I could find. |
Thank you for this suggestion. |
Hello? This issue is about to be closed if nobody replies. |
Would still be useful. |
Do you have time to submit a PR to add this, @alex-dev ? |
I opened #48238 with basic support for union types. It's a bit tricky, since cases that the phpstan extractor can differ can't be differentiated via the docblock types. That's why we had to unify cases $b and $c from the |
Description
Currently,
symfony/property-info
supports union types throughReflectionExtractor
andPhpStanExtractor
.phpDocumentor/reflection
also supports union type values (both as a type and in collection key/value).If
PhpDocExtractor
is not deprecated, it should be updated to detect union type properly especially in collections.The text was updated successfully, but these errors were encountered: