-
Notifications
You must be signed in to change notification settings - Fork 661
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
Erroneous return type matched when using multiple interfaces using self
as return type
#2102
Comments
Ah... this is a PHP 7.4 thing, my bad. Working on bleeding edge spoiled me. |
… false positive The method `InvocationMocker#will()` is LSP-compliant with the parent types, but a bug in psalm reports it as a false positive. Ref: vimeo/psalm#2102
Yeah I'll disable this when Psalm detects it's running on 7.4 |
I have other features (e.g. arrow functions) ready to ship, but I don't want to bump the upstream dependency ( |
@muglug Can you put arrow functions support in master or fork? I would really like to get rid of errors like this: |
@zmitic a bit of patience: PHP 7.4 isn't even out yet :-) |
@Ocramius I know, I know... but I love it 😄 Above example is just one small thing. More complex are coming tomorrow when I put entity accessors: https://github.com/hitechcoding/strict-form-mapper-bundle/blob/master/docs/accessors.md Arrow functions really makes these things easier. |
@zmitic the branch ( I'll add Psalm compatibility about a week before PHP's 7.4 release date. |
@muglug Thank you, a lot! My errors are gone now. |
See https://psalm.dev/r/8170d89c39:
Reports:
Even simpler in https://psalm.dev/r/494e02869f:
Reports:
Related: sebastianbergmann/phpunit#3120
The text was updated successfully, but these errors were encountered: