New Features π₯³
- [dx] [experimental] Prepend command name automatically if only paths are passed (#6759)
# before
vendor/bin/rector process src
# now - default command is run, no need to write the sole main command manually
vendor/bin/rector src
- [Configuration] [experimental] Add ability to specify file path without extension (#6839)
- [type-declaration] Add AddClosureParamArrayWhereDimFetchRector (#6815)
- [dx] add test to check that a rule is not applied if it does not change the code (#6794), Thanks @carlos-granados!
- [renaming Add enum support to rename method (#6832)
- [Php83] Make configurable to allow add #[\Override] on override empty method on AddOverrideAttributeToOverriddenMethodsRector (#6831)
- [Transform] Follow parent construct before add new param on StaticCallToMethodCallRector (#6854)
Bugfixes π
- Skip DateTime from property type to property renaming to keep code readable (#6812)
- Add a hint how to upgrade custom
SetListInterface
to Rector 2.0 (#6816), Thanks @alexander-schranz!
- Return if var type has changed in PhpDocTypeChanger (#6813), Thanks @carlos-granados!
- fix: RenamePropertyToMatchTypeRector renames DateTimeInterface (#6814), Thanks @tony-stark-eth!
- [TypeDeclaration] ReturnTypeFromStrictNewArrayRector support list (#6820), Thanks @staabm!
- [Php80] Handle null value on AnnotationToAttributeRector (#6821)
- [DeadCode] Handle crash on no stmts on ReplaceBlockToItsStmtsRector (#6824)
- [type-declaration] Override existing wrong type on TypedPropertyFromCreateMockAssignRector (#6826)
- [TypeDeclaration] Skip already typed with PHPUnit\Framework\MockObject\MockObject on TypedPropertyFromCreateMockAssignRector (#6827)
- [NodeTypeResolver] Pass null on 2nd arg on ReflectionProvider->getFunction() to ensure get correct function (#6829)
- [Php80] Handle aliased with multi properties on AnnotationToAttributeRector (#6838)
- [Configuration] Fix root standalone registered rules verify on RectorConfigBuilder (#6840)
- [Php73] Fix escaped single quote on RegexDashEscapeRector (#6843)
- [Php80] Handle crash on @testdoc with rector-phpunit AnnotationWithValueToAttributeRector (#6846)
- Fix scoped error on ClassConstFetchAnnotationToAttributeMapper (#6848)
- [PhpAttribute] Handle multi double colon on AnnotationWithValueToAttributeRector (#6851)
- [Transform] Follow empty parent construct parameters on StaticCallToMethodCallRector (#6855)
- [TypeDeclaration] Skip with closure inside on AddArrowFunctionParamArrayWhereDimFetchRector (#6817)
- [Php71] Skip replaced native function on RemoveExtraParametersRector (#6828)
- [DeadCode] Skip switch break not unreachable on RemoveUnreachableStatementRector (#6837)
rectorphp/rector-symfony π΅
- Clean up #[RunClassInSeparateProcess] tweak (#721)
- [CodeQuality] Handle crash on no extensions on StringExtensionToConfigBuilderRector (#717)
- add ampersand support (#716)
- [code-quality] Add SplitAndSecurityAttributeToIsGrantedRector (#715)
- [code-quality] Add SecurityAttributeToIsGrantedRector (#714)
- [code-quality] Add attribute-existance check to SecurityAttributeToIsGrantedAttributeRector, add to code-quality set (#713)
- Skip excluded tag in container (#710), Thanks @Myks92
rectorphp/rector-doctrine π
- [NodeAnalyzer] Handle no repositoryClass on RepositoryClassResolver (#379)
- Fix ImproveDoctrineCollectionDocTypeInEntityRector (#378), Thanks @carlos-granados
- Fix YamlToAttributeDoctrineMappingRector (#377), Thanks @carlos-granados
rectorphp/rector-phpunit π’
- [PHPUnit100] Skip already key = null on RemoveNamedArgsInDataProviderRector (#475)
- [PHPUnit90] Handle crash on different object without second arg on SpecificAssertContainsWithoutIdentityRector (#474)
- add test fixture (#473)
- Fix RemoveNamedArgsInDataProviderRector so that it is not applied if no change is made (#472), Thanks @carlos-granados
- [CodeQuality] fix assertInstanceOf casing (#471), Thanks @staabm
- [CodeQuality] Handle crash on multiple assert cause undefined variable on AddInstanceofAssertForNullableInstanceRector (#470)