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
Interface method reported to not exist in spite of manual check #6147
Comments
This bug report is missing a link to reproduction on phpstan.org. It will most likely be closed after manual review. |
This bug is not reproducible on phpstan.org which doesn't report the interface method error even without the |
Hi, i copied your example to phpstan.org and reproduced it: https://phpstan.org/r/44085bd5-ecf5-45e7-8700-f8f0a5c4e39c |
Sorry - forgot the PHP tags... duh. Thank you! |
@ondrejmirtes After the latest push in 1.9.x, PHPStan now reports different result with your code snippet: @@ @@
-13: Call to an undefined static method ControllerInterface::methodPost().
+No errors |
Fixing bugs by refactoring 🎉 /cc @staabm regression test please |
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
Currently using phpstan 1.2.0, analysis on Level 6
Methods not specifically defined in a type-hinted interface, but which are specifically checked for, are flagged by PHPStan.
Code snippet that reproduces the problem
Expected output
No error is expected because the method's existence is specifically checked and verified.
Did PHPStan help you today? Did it make you happy in any way?
Yes! Thank you for everything you've done to make our lives as developers better.
The text was updated successfully, but these errors were encountered: