Skip to content

Conversation

@iluuu1994
Copy link
Contributor

No description provided.

@ondrejmirtes ondrejmirtes merged commit f23cd3d into phpstan:master Dec 8, 2018
@ondrejmirtes
Copy link
Member

I'm too eager at merging today :D

@iluuu1994 iluuu1994 deleted the feature/ignore-method-signature-errors branch December 8, 2018 22:49
@iluuu1994
Copy link
Contributor Author

@ondrejmirtes Good for me 😆 I'll create another pull request for phpstan to remove the parameter and ignore any remaining errors.

@iluuu1994
Copy link
Contributor Author

So, apparently there's one more bug when resolving phpDocs from a method in a nested trait. I'll take a look at that tomorrow.

@ondrejmirtes
Copy link
Member

BTW: 90% real-world problems at my job's codebase the rule found (with reportMaybes false) is about overriding parent return type void with something specific. I think we could relax this a bit, because I think it doesn't break LSP - when the parent interface is typehinted, the user code doesn't read the result, so it isn't bothered when a child implementation returns something there...

@iluuu1994
Copy link
Contributor Author

@ondrejmirtes True. I can adjust that tomorrow.

@ondrejmirtes
Copy link
Member

One more thing I'm realizing - the rule should probably be switched off for static methods. Yes, it can be invoked like $foo::doSomething() and LSP applies there, but that's pretty uncommon.

@ondrejmirtes
Copy link
Member

I did the proposed changes on phpstan/phpstan master, please check them out :)

@iluuu1994
Copy link
Contributor Author

Nice, thank you 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants