-
-
Notifications
You must be signed in to change notification settings - Fork 42
[Demo] Add "Tips" config to demonstrate rule on specific PHP version #3057
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
samsonasik
commented
May 22, 2025
@TomasVotruba ready for review 👍 |
I like the idea 👍 This could be better in the config itself, like rules and sets. |
@TomasVotruba sure, moved to config 301317f |
Ready to merge 👍 |
|
||
return RectorConfig::configure() | ||
// A. whole set | ||
->withPreparedSets(typeDeclarations: true) | ||
// B. or few rules | ||
->withRules([ | ||
TypedPropertyFromAssignsRector::class | ||
]); | ||
]) | ||
->withPhpVersion(PhpVersion::PHP_82); |
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.
I think the 8.4 would be better, as this one would disable all the new rules.
Why should we have this option here? It's rarely used in practice. I'd like to avoid spreading configuration, that's only for hackers 😁
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.
sure, updated to php 8.4 👍 c0dcb1c
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.
The reason config here is when people try php 8.3+ rule, while our server still on php 8.2, we don't have composer.json included in demo page, so defined config may needed.
upgrading to latest php 8.4 on server will currently a little bit challenging imo, last time I upgraded to php 8.2, it took some time to up correctly.