Skip to content
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

[Php81] Unregister NewInInitializerRector from php81 config set as not safe #6793

Merged
merged 2 commits into from
Mar 20, 2025

Conversation

samsonasik
Copy link
Member

@samsonasik samsonasik commented Mar 20, 2025

@mathieudz @theofidry I talked with @TomasVotruba today, and the best way for it is unregister for php 8.1 set, user can manually register via withRules() if needed.

Closes rectorphp/rector#8971

@samsonasik samsonasik changed the title [Php81] Unregister NewInInitializerRector from php81 config set [Php81] Unregister NewInInitializerRector from php81 config set as not safe Mar 20, 2025
@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it ;)

@samsonasik samsonasik merged commit 637fd47 into main Mar 20, 2025
44 checks passed
@samsonasik samsonasik deleted the unrgistr-nw branch March 20, 2025 11:37
@theofidry
Copy link

@samsonasik so if I understand correctly the PHP sets should be safe, and applying unsafe rules are left to the user to enable them themselves?

@samsonasik
Copy link
Member Author

Yes, that's why it unregistered, user can still apply themself via withRules() if needed.

https://getrector.com/rule-detail/new-in-initializer-rector

@theofidry
Copy link

Thanks for the clarification!

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.

Incorrect behavior of NewInInitializerRector
2 participants