Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Ignore error from strict method signature rule #56

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

Conversation

@iluuu1994
Copy link
Contributor

@iluuu1994 iluuu1994 commented Dec 8, 2018

No description provided.

@ondrejmirtes ondrejmirtes merged commit f23cd3d into phpstan:master Dec 8, 2018
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
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.

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.

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...

Copy link
Contributor Author

@ondrejmirtes True. I can adjust that tomorrow.

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.

Copy link
Member

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

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /