-
-
Notifications
You must be signed in to change notification settings - Fork 728
Use require string argument in constructor rule #5623
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
Use require string argument in constructor rule #5623
Conversation
It's better to test Symplify rule first, before tagging. We discovered many bugs before letting them out :) Using |
@TomasVotruba Done, do you agree that these should be fixed?
|
That was point of the rule, right? 👍 |
@TomasVotruba Yes, but I mean, are there no false positives? I know I'll have to manually change them and that's fine. |
Not sure. I trust your jugment. Which cases would you exclude and why? |
7ce3fda
to
44535c4
Compare
Updated the PR! |
Good 👍 I'm gonna release new patch Simplify today CI is failing on PHP 7.3 |
How to fix 7.3? As it doesn't have the type hints. Ignore the rule for that file? |
44535c4
to
b0ef475
Compare
b0ef475
to
a415e1f
Compare
@TomasVotruba 2 more errors left:
ignore them? Or please merge this PR so that at least some work is fixed already... master is now broken. |
Better fix them, if it's not a problem. Green CI is easy for me to merge ✔️ |
I understand, but the 2 errors that are reported I don't know how to fix. It's happening because of changes in Maybe @samsonasik can have a look at it? |
Understood, this will happen in the future as we test symplify/phpstan-rules here. Most of them were based on needs for Rector code, so we might also use Symplify dev version just to confirm they work correctly. I usually fix it that I look for "Regex must use string named capture groups instead of numeric" string with PHPStorm. It shows |
I've upgraded to Symplify and fixes static reports in #5655 After it's automerged, I'll process this PR too, so we got it finished 🤗 |
Cherry picked in #5656 |
rectorphp/rector-src@7cd56d8 RectorConfigBuilder: skip and rules can be called multiple times (#5623)
Waiting on new tagged release for Symplify PHPStan Rules now that deprecated-packages/symplify#2968 is merged.
This PR is a reminder for that.
It should prevent #5596 from happening again.