Description
Description
This is the main issue to list and track all the efforts planned or done to modernize Symfony code to the lowest php version required (currently 8.1 on 6.2) using automated tools.
The scope is to upgrade the current code base. Not to introduce an automated way to check or upgrade new code through CI, this could be discussed in another issue.
This is also a way to start a discussion on whether symfony should use this modern code or not and make new conventions around those.
Each modernization suggested must be focused on a single type of change (e.g. switch case to match expression) and have their related PRs.
Discussion whether a listed modernization is relevant and should be considered are meant to be held in the PR. This is because it's mostly an automated process, so closing a PR because the modernization is eventually deemed irrelevant is OK. No significant amount of effort will be wasted because the relevance wasn't discussed in an issue before. However having actual code to argue about can contribute to a more thoughtful decision.
I'm planning to tackle all of them at some point but if you would like to help, feel free to ping me here with the modernization you would like to be in charge of or new ones you find appropriate.
Rector
- NullCoalescingOperatorRector | PR: Add a few more ??= #47649 | Owner: @tigitz
- ChangeSwitchToMatchRector | PR: Convert switch cases to match expression #47654 | Owner: @tigitz
- ReturnNeverTypeRector | PR: | Owner:
- ClosureToArrowFunctionRector | PR: Leverage arrow function syntax for closure #48793 | Owner: @tigitz
- FirstClassCallableRector | PR: Leverage First-class callable syntax #47672 | Owner: @tigitz
- ClassPropertyAssignToConstructorPromotionRector| PR: | Owner:
- ClassOnObjectRector | PR: Leverage class name literal on object #47752 | Owner: @tigitz