Skip to content

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 6, 2025

Note

Mend has cancelled the proposed renaming of the Renovate GitHub app being renamed to mend[bot].

This notice will be removed on 2025-10-07.


This PR contains the following updates:

Package Change Age Confidence
rector/rector (source) 2.1.7 -> 2.2.1 age confidence

Release Notes

rectorphp/rector (rector/rector)

v2.2.1: Released Rector 2.2.1

Compare Source

Bugfixes 🐛

  • Fix php 7.4 regression on strtolower to false on ClassLikeNameClassNameImportSkipVoter (#​7436)
  • [CodeQuality] Handle property fetch and common nodes crash on InlineArrayReturnAssignRector (#​7437)

v2.2.0: Released Rector 2.2

Compare Source

This release includes dozens of fixes, new PHP and Type Declaration rules, many Symfony Console rules improvements...

...and one brand new set: type coverage docblocks 🎉 🎉 🎉

Read the gist on our blog - Rector 2.2: New rules for Array Docblocks


New Features and Improvements 🚀

New rules for Type Coverage Docblocks:

  • Add AddReturnDocblockForCommonObjectDenominatorRector (#​7249)
  • Add AddParamArrayDocblockFromDimFetchAccessRector (#​7253)
  • Add AddParamArrayDocblockFromDataProviderRector (#​7257)
  • Add ClassMethodArrayDocblockParamFromLocalCallsRector (#​7259)
  • Add AddReturnDocblockDataProviderRector (#​7266)
  • Add fixture for data provider return options (#​7268)
  • Add AddReturnDocblockForArrayDimAssignedObjectRector (#​7302)
  • Add DocblockVarArrayFromPropertyDefaultsRector (#​7311)
  • Add DocblockVarArrayFromGetterReturnRector (#​7313)
  • Add AddReturnDocblockForJsonArrayRector (#​7320)
  • Add AddParamArrayDocblockFromAssignsParamToParamReferenceRector (#​7323)
  • [dx] add withTypeCoverageDocblockLevel() (#​7363)

  • [dead-code] Add RemoveUnusedVariableUseRector (#​7430)
  • [Php 8.5] Add WakeupToUnserializeRector (#​7242), Thanks @​arshidkv12!
  • [code-quality] Add RepeatedOrEqualToInArrayRector (#​7400)
  • [Php 8.1] Add NullToStrictIntPregSlitFuncCallLimitArgRector (#​7240)
  • feat: add greater and smaller support to StrlenZeroToIdenticalEmptyStringRector (#​7329), Thanks @​calebdw!
  • [TypeDeclaration] Allow empty array to native array on AddMethodCallBasedStrictParamTypeRector (#​7342)
  • [TypeDeclaration] Allow named arg on AddArrayFunctionClosureParamTypeRector (#​7397)
  • [type-declarations] Add KnownMagicClassMethodTypeRector (#​7419)
  • Add rector to migrate __sleep() to __serialize() (#​7212), Thanks @​arshidkv12!
  • [type-declaration] Add AddParamFromDimFetchKeyUseRector (#​7424)
  • Add first class callable support to CallUserFuncArrayToVariadicRector (#​7428)

Bugfixes 🐛

  • fix: remove empty construct when parent has no construct (#​7239), Thanks @​calebdw!
  • fix: overly strict ArraySpreadInsteadOfArrayMergeRector (#​7247), Thanks @​calebdw!
  • [CodingStyle] Skip non-native array type on PHP 7.4 for ArraySpreadInsteadOfArrayMergeRector (#​7248)
  • fix: FunctionLikeToFirstClassCallableRector (#​7265), Thanks @​calebdw!
  • fix: EnumCaseToPascalCaseRector skips existing pascal case (#​7264), Thanks @​calebdw!
  • [CodeQuality] Skip init not empty array on InlineArrayReturnAssignRector (#​7276)
  • fix: EnumCaseToPascalCaseRector bugs (#​7278), Thanks @​calebdw!
  • Avoid complex nesting in ConstantArrayTypeGeneralizer (#​7282)
  • [TypeDeclaration] Fix return by variable anonymous on ReturnTypeFromReturnNewRector (#​7292)
  • [Php84] Allow early return on ForeachToArrayAllRector (#​7316), Thanks @​Orest-Divintari!
  • [TypeDeclaration] Fix configurable on IncreaseDeclareStrictTypesRector to show on getrector.com (#​7327)
  • Skip nested array dim fetch assigns in InlineArrayReturnAssignRector (#​7380)
  • [CodeQuality] Fix escape character on SimplifyRegexPatternRector (#​7390)
  • Try use double quote on SimplifyRegexPatternRector (#​7392)
  • [type-declarations] Open isset check in StrictArrayParamDimFetchRectorTest, move to last position in type-declaration level (#​7388)
  • [CodeQuality] allow coalesce not on full variable, but dim fetch in StrictArrayParamDimFetchRector (#​7404)
  • [CodeQuality] Skip bool equal integer on UseIdenticalOverEqualWithSameTypeRector (#​7411)
  • update comment on fixtures (#​7413)
  • [CodeQuality] Use ->isBoolean() check on compare boolean and constant bool on UseIdenticalOverEqualWithSameTypeRector (#​7415)

Removed 💀

  • [Differ] Remove ConsoleDiffer, use DefaultDiffer that utilize ColorConsoleDiffFormatter instead to avoid double diffing process (#​7309)

Rector Symfony 🎵

  • [Symfony61] Handle already exists attributes name on CommandConfigureToAttributeRector (#​849)
  • [Symfony 6.2] Move symfony/security-core to security-http and security-bundle as target class/contant exists there (#​848)
  • [Symfony73] Remove extends AbstractExtension after apply change on GetFunctionsToAsTwigFunctionAttributeRector (#​846)
  • [code-quality] keep attribute in InlineClassRoutePrefixRector if it contains other metadata (#​845)
  • [console] [7.3] Add implicit boolean type in InputOption::VALUE_NONE option (#​844)
  • [console] [7.3] Add type declaration based on default value type in InvokableCommandInputAttributeRector (#​843)
  • [console] [7.3] add array argument support to /InvokableCommandInputAttributeRector (#​842)
  • [console] [7.3] Add support for default values in InvokableCommandInputAttributeRector (#​841)
  • [console] [7.3] Add const names in InvokableCommandInputAttributeRector + fix -_ naming to camel case (#​840)
  • [console] [7.3] Fix missing options in InvokableCommandInputAttributeRector (#​839)
  • [console] [7.3] Replace input/output with symfony style if used in InvokableCommandInputAttributeRector (#​838)

Rector Doctrine 🟠

  • [dbal] [4.0] remove constant rename, as will be turned into enum right away and required manaul upgrade (#​467)
  • Fix PHPStan notice on PHPStan 2.1.23 (#​466)

Rector PHPUnit 🟢

  • [CodeQuality] Ensure verify ClassReflection->hasConstructor() on MethodParametersAndReturnTypesResolver (#​550)
  • [CodeQuality] Skip not match position named argument part 2 (#​548)
  • [code-quality] add New_ support to ScalarArgumentToExpectedParamTypeRector (#​547)
  • [phpunit] [9.0] resolve WithConsecutiveRector naming ad-hoc to PHPUnit real code (#​546)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), 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.

@renovate renovate bot force-pushed the renovate/rector-rector-2.x-lockfile branch from 0277e12 to 3431cae Compare October 7, 2025 07:43
@renovate renovate bot changed the title chore(deps): update dependency rector/rector to v2.2.0 chore(deps): update dependency rector/rector to v2.2.1 Oct 7, 2025
Copy link

sonarqubecloud bot commented Oct 7, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants