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
php type resource hidden by class Resource #10399
Comments
Hi, yeah, this doesn't have a great solution because PHPDoc types need to be case-insensitive and there's already a class in the same namespace, leaving Fortunately there's I just also added |
thanks for the quick answer. i created a pull request to clarify this in the documentation. |
adjust phpdoc annotations to work around phpstan/phpstan#10399
adjust phpdoc annotations to work around phpstan/phpstan#10399
adjust phpdoc annotations to work around phpstan/phpstan#10399
adjust phpdoc annotations to work around phpstan/phpstan#10399
adjust phpdoc annotations to work around phpstan/phpstan#10399
adjust phpdoc annotations to work around phpstan/phpstan#10399
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Bug report
the doc states that phpstan will assume
resource
to mean the php typeresource
unless the FQN is used.however, current versions seem to do the opposite
when i have a class
Resource
in the same namespace, i can't specifyresource
and get an error that the case is incorrect. i tried\resource
as well, but that givesParameter $data of method Foo\HelloWorld::sayHello() has invalid type resource.
Code snippet that reproduces the problem
https://phpstan.org/r/67bc0abd-313b-41ca-ae65-7833ff531f35
Expected output
Did PHPStan help you today? Did it make you happy in any way?
❤️
The text was updated successfully, but these errors were encountered: