Skip to content

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 11, 2025

This PR contains the following updates:

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

Release Notes

rectorphp/rector (rector/rector)

v2.2.3: Released Rector 2.2.3

Compare Source

New Features 🥳

  • [code-quality] Add VariableConstFetchToClassConstFetchRector (#​7457)
  • [coding-style] Add BinaryOpStandaloneAssignsToDirectRector (#​7466)
  • [type-declaration] Add AddParamStringTypeFromSprintfUseRector (#​7477)

Bugfixes 🐛

  • [TypeDeclaration] Skip override from parent method on AddParamStringTypeFromSprintfUseRector (#​7479)
  • [ci] Run PHPUnit 12 and PHPStan compatibilty check (#​7455)
  • [TypeDeclarationDocblocks] Handle repeated item type on DocblockReturnArrayFromDirectArrayInstanceRector (#​7459)
  • [BetterPhpDocParser] Unique handling string on BracketsAwareUnionTypeNode (#​7462)
  • [CodeQuality] Skip non-variable fetch on VariableConstFetchToClassConstFetchRector as may cause side effect (#​7464)
  • Fix autoload preload on PHPUnit 12+ on global installation (#​7468)
  • [DeadCode] Skip vars exists in static vars on RemoveNonExistingVarAnnotationRector (#​7463)

Removed 💀

v2.2.2: Released Rector 2.2.2

Compare Source

This release contains important fix for Rector custom rules running on PHPUnit 12.2+ ✔️

PHPUnit started to preload it's own php-parser version, that conflicts with Rector's one. Now we preload our side first again. Your tests shall run 👍 If not: let us know in: #​9416


New Features 🥳

  • [tdd] Add AddParamArrayDocblockBasedOnArrayMapRector (#​7435)
  • [Php85] Add ShellExecFunctionCallOverBackticksRector (#​7445)

Bugfixes 🐛

  • [Scoped] Load early preload.php on scoped bootstrap.php on phpunit 12+ running (#​7451)
  • [autoload] Fix phpstan + rector tests co-run to avoid duplicated php-parser loading error (#​7440)
  • [Php80] Skip inside by ref method on ChangeSwitchToMatchRector (#​7443)
  • [Renaming] Allow self/static on RenamePropertyRector (#​7444)
  • Directly check type of substr() on RecastingRemovalRector (#​7446)
  • [fix] Skip symfony config closures on FirstClassCallableRector as they do not support first class callables (#​7447)
  • [DeadCode] Skip ClassLikeNameClassNameImportSkipVoter for RecastingRemovalRector (#​7448)
  • [dead-code] Skip substr casting removal on PHP 7.x, as can return false|string (#​7449)
  • [Php74] Skip used in compact on ClosureArrowFunctionAnalyzer (#​7453)
  • [TypeDeclarationDocblocks] Fix missing backslash on class-string type on DocblockGetterReturnArrayFromPropertyDocblockVarRector (#​7454)

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 - Only on Sunday and Saturday ( * * * * 0,6 ) (UTC), Automerge - Between 12:00 AM and 03:59 AM, only on Monday ( * 0-3 * * 1 ) (UTC).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, 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 branch from 895af37 to dda3606 Compare October 12, 2025 02:03
@renovate renovate bot changed the title chore(deps): update dependency rector/rector to v2.2.2 chore(deps): update dependency rector/rector to v2.2.3 Oct 12, 2025
@renovate renovate bot force-pushed the renovate/rector-rector-2.x branch from dda3606 to c4c9e49 Compare October 13, 2025 01:06
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