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
Support get_parent_class() in type specifier #5552
Comments
Supporting anything with |
ohh thats a interessting pointer. I had a look in our private codebases and also some phpstan type-specifying logic.. In our legacy world most code is still using I agree with the general statement that we should prefer I hope you are still welcoming for this specific issue here, I would try to support |
The way forward is to code everything in |
@staabm After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
- 7: Method HelloWorld::sayHello() has parameter $o with no typehint specified.
+ 7: Method HelloWorld::sayHello() has parameter $o with no type specified.
10: Expected type A, actual: mixed Full report
|
Implemented by phpstan/phpstan-src#1383 |
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. |
Feature request
similar to phpstan/phpstan-src@df27a12
https://phpstan.org/r/ef2f0c50-62c8-480e-bfa6-cbe19dc1199a
more relevant testcases can be inspired from https://github.com/phpstan/phpstan-src/blob/579b075806f32076dfaf55a4f2c913f55ed14a5c/tests/PHPStan/Analyser/data/generic-class-string.php
Did PHPStan help you today? Did it make you happy in any way?
The text was updated successfully, but these errors were encountered: