Skip to content

chore(deps): bump rector/rector from 1.2.10 to v2 (main) #11208

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 28, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
rector/rector (source) ^1.2.10 -> ^2.0.17 age adoption passing confidence

Release Notes

rectorphp/rector (rector/rector)

v2.0.17: Released: Rector 2.0.17

Compare Source

New Features 🥳

  • [Php85] Add ArrayFirstLastRector (#​6900)
  • Use active voice and add markdown style for code blocks (#​6897), Thanks @​simonschaufi!
  • [Php83] Add ReadOnlyAnonymousClassRector (#​6916)
  • [Php83] Add DynamicClassConstFetchRector (#​6922)
  • [Test] Add test for crash after reprint Stmt (#​6924)
  • [Command] Fix to make additionalAutoloader->autoloadPaths() works on both parallel and non-parallel proccess (#​6927)
  • [Alternative] Add EnumCaseToPascalCaseRector with use of DynamicSourceLocatorProvider (#​6899)

Bugfixes 🐛

  • Directly use isNames() in rector rules (#​6896)
  • [StrContainsRector] also replace multibyte functions fro strpos and strstr (#​6901), Thanks @​JohJohan!
  • [DeadCode] IsClassMethodUsedAnalyzer needs to use Scope from Class_ level (#​6910)
  • [Php84] Skip with parentheses on class on NewMethodCallWithoutParenthesesRector (#​6911)
  • [CodeQuality] Skip Assign Op on ternary on SimplifyUselessVariableRector (#​6913)
  • Rectify to trigger latest build (#​6914)
  • [Php82] Handle implicit public readonly on ReadOnlyClassRector (#​6919)
  • Use dynamic check on last on ClassConstManipulator (#​6921)
  • bump (rectorphp/rector-src@695228f)
  • [Naming] Re-use repetitive DateTimeInterface object type check on services into PropertyNaming service (#​6926)
  • [AutoImport] Skip conflict aliased with docblock on auto import (#​6929)
  • [AutoImport] Skip reserved class names on auto import (#​6933)
  • [AutoImport] Fix empty uses on auto import + rename class on no namespaced file (#​6935)
  • [Php83] Fix invalid constant use READONLY_CLASS -> READONLY_ANONYMOUS_CLASS on ReadOnlyAnonymousClassRector (#​6936)
  • fix: RenameMethodRector does not rename trait methods (#​6928), Thanks @​LordSimal!
  • [CodeQuality] Skip late static binding use on CompleteDynamicPropertiesRector (#​6938)
  • [dx] report false skipped rules in more nicer way (#​6941)
  • [PHP84] Deprecated annotation to Deprecated attribute (#​6923), Thanks @​peterfox!
  • [Renaming] Allow rename method in trait itself on RenameMethodRector (#​6942)
  • [Renaming] Handle rename caller on trait on RenameMethodRector (#​6944)
  • [TypeDeclaration] Fix crash on already return static on AddReturnTypeDeclarationRector (#​6940)
  • [TypeDeclaration] Handle crash on return different over static on AddReturnTypeDeclarationRector-a (#​6943)

Removed 💀

  • Use active voice and remove note about PHPUnit (#​6907), Thanks @​simonschaufi!
  • [DeadCode] Skip used by Array callable on RemoveEmptyClassMethodRector (#​6908)
  • [DeadCode] Use IsClassMethodUsedAnalyzer service on RemoveEmptyClassMethodRector (#​6909)
  • [DeadCode] Handle called by static call on RemoveUnusedPrivateMethodParameterRector (#​6912)
  • [DeadCode] Skip used by $this on RemoveUnusedPrivateClassConstantRector (#​6920)



rectorphp/rector-symfony 🎵

  • Update to use ramsey/composer-install@v2 (#​782)
  • [Symfony 7.3] Make __invoke() public in InvokableCommandInputAttributeRector (#​779), Thanks @​mickverm
  • Fix ClassConstFetch use on InvokableCommandInputAttributeRector (#​778)
  • [Symfony 7.3] handle name from constant on InvokableCommandInputAttributeRector (#​777)
  • [Symfony 7.3] Remove Argument argument: mode on InvokableCommandInputAttributeRector (#​776), Thanks @​mickverm
  • [Symfony 7.3] Make nullable argument param type on Optional InputArgument::OPTIONAL on InvokableCommandInputAttributeRector (#​775)
  • [Symfony 7.3] Keep $output param on InvokableCommandInputAttributeRector (#​774)
  • [Symfony 7.3] Add Argument arguments: name, mode, description on InvokableCommandInputAttributeRector (#​773)
  • [Symfony 7.3] Handle with #[\Override] on InvokableCommandInputAttributeRector (#​772)

rectorphp/rector-doctrine 🟠

  • skip default param array, to respect colleciton type (#​408)
  • Add array<> support to /NarrowParamUnionToCollectionRector (#​407)
  • [typed-collections] Add CollectionSetterParamNativeTypeRector (#​406)
  • only remove new array collection to a new property (#​405)
  • Update to use ramsey/composer-install@v2 (#​404)
  • [typed-collections] Add embed many support InitializeCollectionInConstructorRector (#​403)
  • Add static call support to setter array collection wrap (#​402)
  • [typed-collections] Decouple RemoveIsArrayOnCollectionRector (#​401)
  • [typed-collections] Allow new array in tests for RemoveNewArrayCollectionOutsideConstructorRector (#​400)
  • [typed-collections] Allow new array in tests for RemoveNewArrayCollectionOutsideConstructorRector (#​399)
  • [typed-collections] Add nullable support to array wrapper rule (#​398)
  • [TypedCollections] Use directly param->type->type assign on RemoveNullFromNullableCollectionTypeRector (#​397)
  • [typed-collections] Add RemoveNullFromNullableCollectionTypeRector rule (#​396)
  • Typed collections fixes (#​395)
  • [typed-collections] remove DefaultNewArrayCollectionRector as duplicate of InitializeCollectionInConstructorRector (#​394)
  • Fix scoper Doctrine class in use statement prefixed with RectorPrefix (#​393)
  • [typed-collections] Add dozens of rules to handle doctrine collection types (#​392)
  • Rename ExplicitRelationCollectionRector to InitializeCollectionInConstructorRector (#​391)
  • [typed-collections] Make TypedPropertyFromToManyRelationTypeRector work only for native types, docblocks are handled in another rule (#​390)
  • [typed-collections] Decouple new namespace and move 4 rules there (#​389)
  • Directly use isName(s) and getName() on rector rules (#​388)
  • Add mapped superclass case to ToManyRelationPropertyTypeResolver (#​387)
  • Remove array on collection in TypedPropertyFromToManyRelationTypeRector (#​386)
  • Remove default null value in TypedPropertyFromToManyRelationTypeRector (#​384)

rectorphp/rector-phpunit 🟢

  • [code-quality] Add additional non-static methods to NonAssertNonStaticMethods (#​497), Thanks @​philiprabbett
  • [CodeQuality] Skip in static arrow function on PreferPHPUnitThisCallRector (#​496)
  • Update to use ramsey/composer-install@v2 (#​495)
  • Only remove @​covers when target exists (#​494)
  • PHPUnit 10/11 Only set attribute when target attribute class exists on CoversAnnotationWithValueToAttributeRector (#​493)
  • [AnnotationsToAttributes] Apply to class level on @​uses on AnnotationWithValueToAttributeRector (#​492)
  • [PHPUnit 12] Add RemoveOverrideFinalConstructTestCaseRector (#​491)
  • [CodeQuality] Skip with if else condition result on AddInstanceofAssertForNullableInstanceRector (#​489)

v2.0.16: Released Rector 2.0.16

Compare Source

New Features 🥳

  • [dx] add symfonyRoute and symfonyValidator option to ->withAttributesSets() to ease upgrade (#​6882)
  • [nette/utils] [4.0] Add upgrade set to handle named args in Json class (#​6884)

Bugfixes 🐛

  • [TypeDeclaration] Skip __destruct() from add return type based on parent on AddReturnTypeDeclarationBasedOnParentClassMethodRector (#​6883)
  • [CodeQuality] Skip with init non empty dynamic array on ForeachItemsAssignToEmptyArrayToAssignRector (#​6881)
  • UseIdenticalOverEqualWithSameTypeRector should not trust phpdoc (#​6880), Thanks @​staabm!
  • [Php70] Handle class named Pool on Php4ConstructorRector (#​6887)
  • [Php73] Handle key() called multiple times on ArrayKeyFirstLastRector (#​6888)
  • Clean up repetitive recursive call and flag on ArrayKeyFirstLastRector (#​6889)
  • [Config] Handle config realpath() actually has asterisk, not pattern (#​6891)
  • [Php82] Handle implicit "public" on construtor promotion on ReadOnlyClassRector (#​6895)



rectorphp/rector-symfony 🎵

  • [Symfony73] Skip different object on GetFunctionsToAsTwigFunctionAttributeRector (#​767)
  • skip magic first class callable (#​766)
  • [symfony 7.2] AddPushRequestToRequestStackConstructorRector (#​765)
  • [Symfony 7.3] kick off GetFunctionsToAsTwigFunctionAttributeRector (#​764)
  • [Symfony 7.3] Handle first class callable on GetFiltersToAsTwigFilterAttributeRector (#​763)
  • Register symfony73-twig-bundle into Symfony7SetProvider (#​762)
  • [symfony 7.3] Add GetFiltersToAsTwigFilterAttributeRector to migrate #[TwigFilter] (#​761)
  • [code-quality] Improve TemplateAnnotationToThisRenderRector to keep ternary types (#​758)
  • Keep JsonResponse type (#​757)
  • Remove array shape return in TemplateAnnotationToThisRenderRector as no longer used (#​755)
  • Add attribute support to TemplateAnnotationToThisRenderRector (#​754)
  • [7.3] Update InvokableCommandRector to InvokableCommandInputAttributeRector to improve discoverability (#​743)

rectorphp/rector-doctrine 🟠

  • Remove array on collection in TypedPropertyFromToManyRelationTypeRector (#​386)
  • Remove default null value in TypedPropertyFromToManyRelationTypeRector (#​384)
  • [collection] Add embed many annotation support to TypedPropertyFromToManyRelationTypeRector (#​383)
  • Fix #[AsListener] attribute location to doctrine bundle 2.8, deprecate doctrine constants and refer to composer based sets (#​382)

rectorphp/rector-phpunit 🟢

  • Detect Test Attribute in TestsNodeAnalyzer::isTestClassMethod (#​486), Thanks @​Levivb
  • [code-quality] Skip ctor to setup in ConstructClassMethodToSetUpTestCaseRector for non-test classes, e.g. helpers (#​485)
  • [phpunit 10] Add ParentTestClassConstructorRector (#​484)

v2.0.15: Released Rector 2.0.15

Compare Source

New features and changes 🎉

  • [parallel] bump default threads from 16 to 32 to keep up with modern technology (#​6877)

Bugfixes 🐛

  • [TypeDeclaration] Reduce repetitive new ObjectType() on each properties on TypedPropertyFromCreateMockAssignRector (#​6869)
  • [CodeQuality] Handle with parentheses on SimplifyIfReturnBoolRector (#​6871)
  • [Naming] Skip protected property on non-final class on RenamePropertyToMatchTypeRector (#​6872)
  • [PHPStan 2.1.14] Fix resolve __toString() parent non builtin method without return type (#​6879)
  • [phpstan] prefer isName() from abstract class over protected service (#​6875)
  • [DeadCode] Skip value from docblock on RemoveFilterVarOnExactTypeRector (#​6873)



rectorphp/rector-symfony 🎵

  • [symfony 6.2] Fix attribute adding on abstract class in MessageHandlerInterfaceToAttributeRector (#​724)

rectorphp/rector-phpunit 🟢

  • [depre] Remove deprecated AssertCountWithZeroToAssertEmptyRector (#​483)
  • Ensure that rule PreferPHPUnitSelfCall refactor call only for static methods, not any (#​482), Thanks @​andrew-demb
  • [tests] add test fixture for double instanceof check (#​481)
  • [PhpUnit] Skip different object on PreferPHPUnit(This/Self)CallRector (#​480)

v2.0.14: Released Rector 2.0.14

Compare Source

Bugfixes 🐛

  • [EarlyReturn] Skip re-assign in loop on PreparedValueToEarlyReturnRector (#​6867)
  • [EarlyReturn] Only check on loop when initialAssign is set on PreparedValueToEarlyReturnRector (#​6868)

v2.0.13: Released Rector 2.0.13

Compare Source

Bugfixes 🐛

  • [naming] Skip public properties in RenamePropertyToMatchTypeRector to avoid external code conflicts (#​6860)
  • feat: handle edge cases of DateFuncCallToCarbonRector (#​6822), Thanks @​tony-stark-eth!
  • [CodeQuality] Skip ArrayDimFetch on IssetOnPropertyObjectToPropertyExistsRector (#​6862)
  • [type-declaration] Skip intersection type on TypedPropertyFromCreateMockAssignRector (#​6863)
  • [Configuration] Fix composer resolver with custom vendor-dir (#​6864), Thanks @​maxime-vf!
  • Ensure pass string on PathNormalizer::normalize() on InstalledPackageResolver (#​6865)

rectorphp/rector-symfony 🎵

  • [Symfony 7.3] add constant and test for 7.3 and test help to attribute #​718 (#​722), Thanks @​JohJohan
  • Update fixture on parent construct empty usage (#​719)

rectorphp/rector-doctrine 🟠

  • improve add generics annotation to repository to code quality doctrine set (#​380)

v2.0.12: Released Rector 2.0.12

Compare Source

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 🟠


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)

v2.0.11: Released Rector 2.0.11

Compare Source

New Features 🎉

  • [TypeDeclaration] Handle nested method crashes on AddParamTypeBasedOnPHPUnitDataProviderRector (#​6772)
  • [TypeDeclaration] Skip void return on callback docblock in AddArrowFunctionReturnTypeRector (#​6780)
  • [Php84] Add AddEscapeArgumentRector (#​6782)
    (#​6790)
  • [dead-code] Add RemoveFilterVarOnExactTypeRector (#​6792)
    @​carlos-granados!
  • [Php84] Add NewMethodCallWithoutParenthesesRector (#​6802)
  • [CodingStyle] Add FunctionLikeToFirstClassCallableRector (#​6667), Thanks @​peterfox!
  • [Rector Rule] Replace date, strtotime, and time calls with Carbon equivalents (#​6749), Thanks @​gollumeo!

Bugfixes 🐛


Removed & Deprecations 🗑️

  • [deprecation] Add explicit warning to deprecated withPhpPolyfill() method and error on withPhpSets() misuse on PHP 7.4- projects
  • [DeadCode] Skip used-by-property hook on RemoveUnusedPromotedPropertyRector (#​6765)
  • [DeadCode] Skip side-effect cases on RemoveDeadLoopRector (#​6770)
  • [deprecated] Remove deprecated AbstractScopeAwareRector (#​6791)



rectorphp/rector-symfony 🎵

  • [code-quality] Add RequestIsMainRector (#​708)
  • [symfony 7.3] Add InvokableCommandRector - kick off (#​707)
  • feat: Add Flysystem key support (#​705), Thanks @​dsdeboer
  • [CodeQuality] Enhance InlineClassRoutePrefixRector to concatenate name annotation/attribute (#​704)

rectorphp/rector-doctrine 🟠

  • [BUNDLE-230] Add AddAnnotationToRepositoryRector rule (#​375), Thanks @​JohJohan
  • [ORM-300] Add CastDoctrineExprToStringRector (#​372), Thanks @​JohJohan
  • [ORM-213] Add replace method call support (#​369), Thanks @​JohJohan
  • [deprecated] Remove deprecated MakeEntityDateTimePropertyDateTimeInterfaceRector (#​376)

rectorphp/rector-phpunit 🟢

  • [code-quality] Add RemoveDataProviderParamKeysRector (#​469)
  • [CodeQuality] Add AddInstanceofAssertForNullableInstanceRector (#​466)
  • [deprecated] Remove deprecated AssertCompareToSpecificMethodRector (#​468)
  • [deprecated] Deprecate AssertCountWithZeroToAssertEmptyRector for better readability with explicit methods (#​467)

v2.0.10: Released Rector 2.0.10

Compare Source

New Features 🥳


Bugfixes 🐛

  • [PhpParser] Re-add back get value from __DIR__ and __FILE__ on ValueResolver (#​6756)
  • [TypeDeclaration] Skip already typed param on AddClosureParamTypeForArrayReduceRector (#​6737)
  • [TypeDeclaration] Skip already typed param on AddClosureParamTypeForArrayMapRector (#​6738)
  • [Renaming] Handle crash on assign on for loop on RenameFunctionRector (#​6730)
  • [CodeQuality] Skip unused static methods in LocallyCalledStaticMethodToNonStaticRector, as should be handled by another rule (#​6731)
  • [Carbon] Fix refactor time to carbon to use ->getTimestamp() over ->timestamp (#​6733)
  • [TypeDeclaration] Unregister AddClosureParamTypeForArrayMapRector and AddClosureParamTypeForArrayReduceRector due to may read from docblock (#​6727)
  • [TypeDeclaration] Handle crash on union intersection on AddClosureParamTypeForArrayReduceRector (#​6729)
  • [Privatization] Skip magic method on PrivatizeFinalClassMethodRector (#​6734)
  • [Php74] Skip property hook on RestoreDefaultNullToNullableTypePropertyRector (#​6736)
  • [Php53] Handle parentheses in else on TernaryToElvisRector (#​6740)
  • [Php81] Handle crash Class parent was not found on MyCLabsMethodCallToEnumConstRector (#​6741)
  • [CodeQuality] Handle crash division by zero error on ForeachItemsAssignToEmptyArrayToAssignRector (#​6743)
  • fix(ValueObject): FileDiff first line number is below as expected (#​6746), Thanks @​neilime!
  • [naming] Skip variadic params in RenameParamToMatchTypeRector to avoid single naming for multiple types (#​6748)
  • Do not try to refresh attributes (#​6750), Thanks @​lyrixx!
  • [Php74] Skip with @​var doc with more specific type on ClosureToArrowFunctionRector (#​6753)
  • [Php81] Skip property hook on ReadOnlyPropertyRector (#​6758)
  • [code-quality] Skip complex new instance with args assigns in InlineArrayReturnAssignRector (#​6762)
  • [CodeQuality] Handle crash first class callable on InlineArrayReturnAssignRector (#​6763)
  • [dx] Remove 3 rules registered in both code quality and coding style levels, keep them in coding style level only (#​6757)



rectorphp/rector-symfony

  • [Symfony] Add attribute routing with mix other annotation (#​703)
  • [code-quality] Add InlineClassRoutePrefixRector (#​701)
  • Do not change method if name does not need to change (#​700), Thanks @​carlos-granados
  • [code-quality] Add attribute support (#​702)
  • [SYMFONY 5 & 6] Security add missing param (#​699), Thanks @​JohJohan



rectorphp/rector-doctrine

  • [code-quality] Add GetRepositoryServiceLocatorToRepositoryServiceInjectionRector (#​368)
  • [NodeAnalyzer] Ensure mix annotation and attribute lookup finder on AttrinationFinder::findManyBy* (#​367)
  • Add AttrinationFinder::findManyBy() (#​366)
  • Orm querybuilder set parameters to collection (#​326), Thanks @​marcelthole



rectorphp/rector-phpunit

  • add custom message support to AssertEmptyNullableObjectToAssertInstanceofRector (#​461)
  • [Attribute] Add CoversTrait support on CoversAnnotationWithValueToAttributeRector (#​460)
  • [CodeQuality] Skip union type on AssertCountWithZeroToAssertEmptyRector (#​459)

v2.0.9: Released Rector 2.0.9

Compare Source

Bugfixes 🐛

  • [Php81] Exclude Doctrine ODM MongoDB Document and EmbeddedDocument from ReadOnlyPropertyRector (#​6721), Thanks @​mickverm!
  • [PostRector] Handle with FQCN docblock on UnusedImportRemovingPostRector (#​6722)
  • Type hint array reduce closure (#​6725), Thanks @​peterfox!
  • [PHPStan 2.1.3] Add ReflectionAttribute and ReflectionIntersectionType stub for PHPStan 2.1.3 (#​6723)

v2.0.8: Released Rector 2.0.8

Compare Source

New Features 🥳


Bugfixes 🐛

  • [CodeQuality] Skip with comment inside on SimplifyIfElseToTernaryRector (#​6683)
  • [CodeQuality] Skip windows absolute path on AbsolutizeRequireAndIncludePathRector (#​6684)
  • [Strict] Handle in assign on BooleanInIfConditionRuleFixerRector (#​6685)
  • Replace ambiguous wrapped_with_brackets with existing attribute wrapped_in_parentheses (#​6691)
  • [NodeTypeResolver] Clean up wrap in parentheses check ReprintNodeVisitor (#​6692)
  • [Php80][TypeDeclaration] Fix crash on ClassPropertyAssignToConstructorPromotionRector + ReturnNeverTypeRector (#​6694)
  • CodeClimate output format (#​6697), Thanks @​VitalyArt!
  • Exclude node modules path (#​6702), Thanks @​vaishnavyogesh!
  • Fix str_getcsv() escape argument on PHP 8.4 (#​6704)
  • [Php74] Handle crash curly based array on trait on CurlyToSquareBracketArrayStringRector (#​6706)
  • [Php73] Handle infinite cast on StringifyStrNeedlesRector (#​6707)
  • Clean up unused use (#​6708)
  • fix: NewlineBeforeNewAssignSetRector variable as same name like property (#​6705), Thanks @​guideloince!
  • [TypeDeclaration] Skip override trait method on StrictStringParamConcatRector (#​6711)
  • [Test] Clean up test on WorkerCommandLineFactoryTest (#​6714)
  • [DX] Move isWindows() method from AbstractRectorTestCase to AbstractLazyTestCase (#​6715)
  • [Performance] Use exactly equal or append / file path check on RealpathMatcher (#​6716)
  • [TypeDeclaration] Allow union with closure type on property on TypedPropertyFromAssignsRector (#​6717)
  • [DeadCode] Skip union falsy mixed on trait on RecastingRemovalRector (#​6718)
  • Skip hexa chars in EncapsedStringsToSprintfRector (#​6719)
  • [CodingStyle] Rename method: containsASCIIChar to containsControlASCIIChar on EncapsedStringsToSprintfRector (#​6720)

v2.0.7: Released Rector 2.0.7

Compare Source

New Features 🥳


Bugfixes 🐛

  • [type-declaration] Add typed property, if traits do not duplicate the property (#​6663)
  • [removing] Add interface support to RemoveInterfaceRector (#​6681)
  • fix: add Symfony support as a composer-based option (#​6673), Thanks @​ayedbelsem!
  • [CodeQuality] Handle on assign on FlipTypeControlToUseExclusiveTypeRector (#​6653)
  • [Performance] Early return FullyQualifiedObjectType on FQCN on ObjectTypeSpecifier (#​6658)
  • [CodeQuality] Skip indirect return on SimplifyIfReturnBoolRector (#​6660)
  • [Php83] Handle concat in first argument on CombineHostPortLdapUriRector (#​6661)
  • [TypeDeclaration] Skip unset by trait on TypedPropertyFromStrictConstructorRector (#​6664)
  • [Renaming] Skip used by trait as property promotion on RenamePropertyToMatchTypeRector (#​6665)
  • [TypeDeclaration] Skip changed by ref from trait on TypedPropertyFromStrictConstructorRector (#​6666)
  • [CodeQuality] Handle with assign missing parentheses on ExplicitBoolCompareRector (#​6668)
  • use ->ignoreVCSIgnored() on RectorConfigBuilder::withRootFiles() over custom logic (#​6669)
  • [BetterPhpDocParser] Check for closing brace in text content (#​8977) (#​6670), Thanks @​andrewnicols!
  • [AutoImport] Handle FQCN with sub namespace (#​6672)
  • [BetterPhpDocParser] Use str_contains() for DoctrineAnnotationDecorator (#​6671) (#​6674), Thanks @​andrewnicols!
  • [AutoImport] Handle inner with sub namespace on auto import (#​6679)
  • [DeadCode] Skip dynamic name on RemoveParentCallWithoutParentRector (#​6659)



rectorphp/rector-symfony 🎵

  • Back to require-dev rector-src:dev-main (#​697)
  • Update GetBySymfonyStringToConstructorInjectionRector fixture test to cover rector-srv:tv-readonly-add-ctor (#​696)

rectorphp/rector-doctrine 🟠


rectorphp/rector-phpunit 🟢

  • [PHPUnit 10] Register PropertyExistsWithoutAssertRector to phpunit100.php (#​443)
  • Added testcase to demonstrate rector#8977 (#​440), Thanks @​andrewnicols
  • [PHPUnit10] Replace deleted PHPUnit methods (#​438), Thanks @​66Ton99

v2.0.6: Released: Rector 2.0.6

Compare Source

New Features 🥳

  • [dx] Add --only-suffix to filter files by suffixes (#​6647)
  • [DeadCode] Add ReplaceBlockToItsStmtsRector (#​6641)
  • [DeadCode] Add RemoveUselessAssignFromPropertyPromotionRector (#​6643)
  • Add readonly by default on new promoted property (#​6650)
  • Use autowired method if exists in adding new dependency (#​6652)

Bugfixes 🐛

  • [CodeQuality] Handle crash inside block statement with unreachable statement on OptionalParametersAfterRequiredRector (#​6640)
  • [DX] Use Param->isPromoted() over param->flags !== 0 check on promotion property check (#​6646)
  • [Php80] Keep numeric string, string "true", "false" as is on StringAnnotationToAttributeMapper (#​6610)
  • [PHPStan ^2.1.1] Handle next unreachable statement via UnreachableStatementNode->getNextUnreachableStatements() (#​6642)

Removed 💀

  • [Parser] Remove SmartPhpParserFactory and SmartPhpParser (#​6651)

v2.0.5: Released: Rector 2.0.5

Compare Source

This release support PHP-Parser 5.4.0 and PHPStan 2.1.0

Feature

  • Bump to PHP-Parser ^5.4.0 with use patches fix-patch-php-parser-54 patches (#​6637)
  • Bump to PHPStan ^2.1.0 (#​6639)
  • [DeadCode] Allow remove useless @​ var on typed class constant as well on RemoveUselessVarTagRector (#​6633)

Removed 💀

  • Remove unused AssignVariableNameResolverInterface instances (#​6631)

Bugfixes 🐛

  • [DX] Warn about ->withPhpSets() called multiple times, to avoid invalid set mix (#​6632)
  • [CodeQuality] Skip fopen() or die() on LogicalToBooleanRector on assign (#​6635)
  • use vendor-patches main branch that already include php-parser 5.4.0 patch (#​6638)

v2.0.4: Released Rector 2.0.4

Compare Source

New Features 🥳

  • [PHP 8.0] Add lcfirst annotation to attribute support (#​6577)
  • Add multiline comment fixture (#​6580)
  • [TypeDeclaration] Add param type to array map closure (#​6377), Thanks @​peterfox!
  • [deprecation] Add message about deprecated MixedTypeRector rule, Remove deprecated SetListInterface as no longer used (#​6590)
  • [Php81][php82] Add AttributeGroupNewLiner to make new line based on token on ReadOnlyPropertyRector and ReadOnlyClassRector ([#​6618](https://redirect.github.com/rectorphp/rec

Configuration

📅 Schedule: Branch creation - "before 5am on wednesday" in timezone Europe/Vienna, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate bot force-pushed the renovate/main-rector-rector-2.x branch from 3e7a668 to 18f883f Compare May 30, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants