New Features and Changes 🥳
- [exp] Add
RemoveReturnThisFromSetterClassMethodRector(#7624) - [exp] Add
FluentSettersToStandaloneCallMethodRector(#7625) - [dead-code] Add
RemoveNextSameValueConditionRector(#7525) - Update PHP upgrade support to version 8.5 (#7644), Thanks @guilheb!
- [stmts-aware] Deprecate
StmtsAwareInterfaceinterface and replace with meta-type + groups (#7679) - How to upgrade?
Bugfixes 🐛
- Improve parent call fixture in Php4ConstructorRector not to use KEY constant (#7642)
- Improve ClassPropertyAssignToConstructorPromotionRector not to use STMT_KEY attribute value (#7645)
- [TypeDeclaration] Handle crash on combine union types on AddClosureParamTypeForArrayReduceRector (#7636)
- [TypeDeclaration] Skip no key generic object return on NarrowObjectReturnTypeRector (#7623)
- [CodingStyle] Do not use FullyQualified on "self" on
ClosureFromCallableToFirstClassCallableRector(#7632), Thanks @devnix! - [Php80] Handle mix still annotation and already attribute on AnnotationToAttributeRector (#7639), Thanks @acoulton!
- cleanup RemoveUnsuedPrivateMethodRector (#7643)
- re-index changed nodes only (#7651)
- avoid
spl_object_id()if no change in AbstractRector (#7653) - Refine bug report template formatting (#7655), Thanks @u01jmg3!
- [Php85] Skip inside expression assign on ArrayFirstLastRector (#7657)
- Rename SymplifyQuoteEscapeRector to SimplifyQuoteEscapeRector (#7658), Thanks @VincentLanglet!
- docs: fix typos in deprecation notice (#7666), Thanks @sir-kain!
- [Dep] Ignore unknown class error on build/config/config-downgrade.php on shipmonk/composer-dependency-analyser to 1.8.4 (#7668)
- [dx] Make registration of custom NodeVisitor is easier (#7669)
- raise deps (rectorphp/rector-src@440d6d7)
- [Experiment][Printer] Move AlwaysRememberedExpr tweak logic to separate service after a Match_ found (#7654)
- Narrow object return type v2 (#7618), Thanks @Orest-Divintari!
- [Php80] Handle OpenApi\Attributes\Property example to keep numeric string on AnnotationToAttributeRector (#7677)
- keep file without namespace implementing interface to alling with other nodes (#7679)
- [EarlyReturn] Handle If, elseIf, else all returned on RemoveAlwaysElseRector (#7659)
- [DeadCode] skip Ds\Map::get() on RemoveNullArgOnNullDefaultParamRector (#7665)
Removed 💀
- [DeadCode] Skip used from property fetch reference on loop on RemoveUnusedVariableAssignRector (#7635)
- [internal] Extract ImmutableNodeTraverser from vendor, to remove patch and keep using cache for node types (#7634)
- Deprecated STMT_KEY and remove its set attribute value (#7647)
- [attribute] Remove unused AttributeKey::REPRINT_RAW_VALUE (#7664)
rectorphp/rector-symfony 🎵
- [stmts-aware] Use NodeGroup::STMTS_AWARE over StmtsAwareInterface (#886)
- Fix rule when method is __invoke (#884), Thanks @wilfi00
- [CodeQuality] Do not replace variable assign on ControllerMethodInjectionToConstructorRector (#883)
- Handle Doctrine constraints in ConstraintOptionsToNamedArgumentsRector (#882), Thanks @johndodev
- [CodeQuality] Skip FOS\RestBundle ParamFetcher on ControllerMethodInjectionToConstructorRector (#881)
- [CodeQuality] Skip autowire() method via @required and Required attribute (#880)
- Fix scoped \ cleared on single quote string on ControllerMethodInjectionToConstructorRector (#879)
- [CodeQuality] Skip Common Entity contains subnamespaces on ControllerMethodInjectionToConstructorRector (#878)
- [CodeQuality] Skip from route path /edit/{id} on ControllerMethodInjectionToConstructorRector (#877)
- handle use var (#875)
- Remove STMT_KEY from rules (#874)
- Remove stmt key from LogoutHandlerToLogoutEventSubscriberRector (#870)
- Fix build of prefixed SymfonyFunctionName::REF and SymfonyFunctionName::SERVICE usage (#869)
- [config] Fix couple config autowire rules (#868)
- Fix unit test (#867)
- skip constructor in ControllerMethodInjectionToConstructorRector (#866)
- [code-quality] Add ControllerMethodInjectionToConstructorRector (#865)
rectorphp/rector-phpunit 🟢
- [CodeQuality] Skip Generator on AssertCompareOnCountableWithMethodToAssertCountRector (#591)
- remove stmt key from ConstructClassMethodToSetUpTestCaseRector (#590)
- Remove stmt key from TestListenerToHooksRector (#589)
- fix phpunit covers default class with short covers methods (#588), Thanks @irosner
- [CodeQuality] Do not use FullyQualified on "self" on WithCallbackIdenticalToStandaloneAssertsRector (#587)
- [phpunit 10] Improve PropertyExistsWithoutAssertRector coverage (#586)
- [depre] Deprecate AssertPropertyExistsRector as method was removed in PHPUnit 10 (#585)
- [depre] Deprecate RemoveDataProviderParamKeysRector as the keys can be useful to improve test readability (#584), Thanks @MacDada
- [CodeQuality] Handle on without namespace on DeclareStrictTypesTestsRector (#583)