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
Invalid return type error for interface and class methods with return $this #2278
Comments
This bug report is missing a link to reproduction on phpstan.org. |
This is fixed on master, not in 0.11.x. That's why you can't reproduce it. 0.11.10 added support for |
Okay thanks. Would be a good idea to show the phpstan version number on PHPStan playground. |
Will the issue be fixed in next |
No, I've taken advantage of some refactoring to do the fix, that's why it's not in 0.11.x. Sorry. |
That's quite unfortunate. This bug shows 34 invalid errors in our CakePHP codebase and now someone has to spend time ignoring them through |
@ADmad OK, I will backport the fix, it might not be that hard. Please stay tuned, I'll do it ASAP. |
Please test |
It works! Thank you very much. |
I just tagged 0.11.12 :) |
Bug report
Since phpstan
0.11.10
the code example below generates error like:Code snippet that reproduces the problem
Expected output
No errors.
I am unable to reproduce the issue on https://phpstan.org. Is it using the latest phpstan version?
The text was updated successfully, but these errors were encountered: