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
Problem with @return static #3523
Comments
For some reason the PHPDoc isn't inherited but should be: https://phpstan.org/r/d965bee2-214a-494f-b2ea-1fb3fe973443 |
@ondrejmirtes After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
-18: Method Foo::deserialize() should return static(Foo) but returns Foo.
+16: Return type (Foo) of method Foo::deserialize() should be covariant with return type (static(FooInterface)) of method FooInterface::deserialize() Full report
|
@ondrejmirtes Are you sure this is fixed? I would expect my playground snippet to not have any errors, but it still does. |
Your playground no longer has errors: https://phpstan.org/r/22531cbe-e58b-406d-b4d3-e04abcaeb545 (the bot does not comment on closed issues) |
The original one does: https://phpstan.org/r/98a3d03f-add8-407f-ac45-69ac58dbba7e (I would expect the |
@MidnightDesign There's a big button that says "This result is out of date. Show the latest result". |
Wasn't big enough for my shitty eyes. I'm sorry and thanks for the quick response! |
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. |
See https://phpstan.org/r/98a3d03f-add8-407f-ac45-69ac58dbba7e
Expected behavior:
No errors
Actual behavior:
I get the error
The text was updated successfully, but these errors were encountered: