-
Notifications
You must be signed in to change notification settings - Fork 504
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
Trigger errors for unresolvable parameters #1319
Trigger errors for unresolvable parameters #1319
Conversation
@@ -268,6 +268,18 @@ public function check( | |||
))->line($argumentLine)->build(); | |||
} | |||
|
|||
if ($this->unresolvableTypeHelper->containsUnresolvableType($parameterType)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These contributions make me drool! So good 😊 But it should be reported only with bleedingEdge enabled (by adding new featureToggles parameter), who knows what's it gonna unleash in real codebases 😊
The one test failure is a BC break for a non- |
@rvanvelzen I think it's fine. It's my fault to use non- |
@canvural Maybe I suggested to you myself to use FunctionCallParametersCheck so I'm sorry about it :) There should be a way in Larastan to do it nicer, just an idea: allow custom rule developer to invoke their own virtual nodes. You could invoke a custom But for now, feel free to prepare a new Larastan release that requires PHPStan ^1.7 (after this PR is merged), we can then coordinate the release together :) |
Or pass the extra argument to FunctionCallParametersCheck, ignore PHPStan error for now, release it (and not change the PHPStan requirements), and clean it up after 1.7 is releaased :) |
@rvanvelzen Just one more thing - have you looked into the failures before the new check was behind a feature toggle?
It'd be good to fix them now since it's a valuable piece of feedback about the new check :) |
@ondrejmirtes yeah, I fixed most of them in f3c5928. There's one left that I'll try to fix. |
fc3ef9b
to
adc4f93
Compare
Thank you! |
I went the optional way as that avoids all of the headaches: a114a3f |
No description provided.