New Features 🎉
- [CodeQuality] Add TernaryFalseExpressionToIfRector (#2590)
- [TypeDeclaration] Add ReturnTypeFromStrictScalarReturnExprRector (#2601)
- [EarlyReturn] Add ReturnEarlyIfVariableRector (#2609)
- [Php54] Add ArrayToShortArrayRector (#2615), Thanks @edsrzf!
- [DeadCode] Add RemoveJustVariableAssignRector (#2618)
- [TypeDeclaration] Add TypedPropertyFromStrictSetUpRector (#2636)
Bugfixes 🐛
- [DeadCode] Handle always terminated Switch_ on RemoveUnreachableStatementRector (#2591)
- [DeadCode] Handle collection of Case_ on RemoveUnreachableStatementRector (#2593)
- [DeadCode] Handle anonymous and arrow function uses in RemoveJustPropertyFetchRector (#2592), Thanks @kick-the-bucket!
- [Naming] Skip used in arrow function args on RenameVariableToMatchMethodCallReturnTypeRector (#2599)
- [TypeDeclaration] Skip AddArrayReturnDocTypeRector on custom phpstan type (#2608)
- [DeadCode] Handle edge cases on RemoveJustVariableAssignRector (#2621)
- [Php71] Skip First Class Callable on RemoveExtraParametersRector (#2622)
- [CodeQuality] Fix CompactToVariablesRector to resolve values when the compact() is called (#2627)
- [DX] Improve direct return of Stmt arrays in Rector rules, remove NodesToAddCollector from AbstractRector (#2623)
- [CodingStyle] Handle VarConstantCommentRector+NewlineAfterStatementRector (#2629)
- [Php80] Skip no default on case collection assign on ChangeSwitchToMatchRector (#2631)
- [DeadCode] Do not remove first class callable VariadicPlaceholder arg on RemoveUnusedPrivateMethodParameterRector (#2634)
- [TypeDeclaration] Do not change more detailed return doc on ReturnTypeFromStrictNewArrayRector (#2638)
Removed 🗑️
- Remove RemoveOverriddenValuesRector as flow of control is not reliable and could cause invalid removal (#2614)
- [CodeQuality] Remove DateTimeToDateTimeInterfaceRector as mostly opinionated and way too much generics (#2598)
- [EarlyReturn] Remove ReturnAfterToEarlyOnBreakRector as risky and turning around next/previous nodes (#2624)
- [Transform] Remove CallableInMethodCallToVariableRector as very narrow use case and sensitive to wrong change (#2625)