We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Subtypes appears to be not supported https://www.php.net/manual/en/class.reflectiontype.php
To Reproduce
<?php $reflectionClass = new \ReflectionClass($this); $reflectionMethods = $reflectionClass->getMethods(); $reflectionMethod = \current($reflectionMethods); $reflectionParameters = $reflectionMethod->getParameters(); $reflectionParameter = \current($reflectionParameters); $reflectionType = $reflectionParameter->getType(); $reflectionType->getName();
Expected behavior $reflectionType should be typed hinted to \ReflectionNamedType|\ReflectionUnionType|null, not \ReflectionType|null
$reflectionType
\ReflectionNamedType|\ReflectionUnionType|null
\ReflectionType|null
Screenshots
Platform and version
The text was updated successfully, but these errors were encountered:
The manual seems to type hint ?ReflectionType. I believe intelephense uses that information.
?ReflectionType
Sorry, something went wrong.
Closing as I think it is the same as #2094 . There's a bug here determining return types for specific php versions.
No branches or pull requests
Describe the bug
Subtypes appears to be not supported
https://www.php.net/manual/en/class.reflectiontype.php
To Reproduce
Expected behavior
$reflectionType
should be typed hinted to\ReflectionNamedType|\ReflectionUnionType|null
, not\ReflectionType|null
Screenshots
![image](https://user-images.githubusercontent.com/717869/151129743-ed9dfb60-43da-47b1-a98e-152f940e7112.png)
Platform and version
The text was updated successfully, but these errors were encountered: