Skip to content

Conversation

@renovate-runner
Copy link
Contributor

@renovate-runner renovate-runner bot commented Oct 27, 2025

This PR contains the following updates:

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

Release Notes

rectorphp/rector (rector/rector)

v2.2.6: Released Rector 2.2.6

Compare Source

New Features 🥳

  • [PHP 8.5] Add NestedToPipeOperatorRector (#​7577)
  • [code-quality] Add DirnameDirConcatStringToDirectStringPathRector (#​7552)
  • [dead-code] Add RemoveNullArgOnNullDefaultParamRector (#​7562)
  • register AddClosureParamTypeFromIterableMethodCallRector to type declaration set (rectorphp/rector-src@4d78f41)
  • register AddParamArrayDocblockBasedOnCallableNativeFuncCallRector in type declaration docblocks (rectorphp/rector-src@80f7db8)

Bugfixes 🐛

  • Fix next catch missed variable rename in CatchExceptionNameMatchingTypeRector (#​7547)
  • [Php81] Fix first class callable should not have trailing comma on FunctionLikeToFirstClassCallableRector (#​7551)
  • [CodingStyle] Skip Method target not found or defined only via @​method on FunctionLikeToFirstClassCallableRector (#​7553)
  • [Php81][CodingStyle] Allow both exists in both @​method and native method on FunctionLikeToFirstClassCallableRector (#​7559)
  • [Php81][CodingStyle] Skip param used as invokable function multi args on FunctionLikeToFirstClassCallableRector (#​7563)
  • [Php81][CodingStyle] Skip Closure/ArrowFunction as assign expr on FunctionLikeToFirstClassCallableRector (#​7564)
  • finalize rules as well (#​7575), Thanks @​Orest-Divintari!
  • [Php85] Clean up dynamic expr check on NestedToPipeOperatorRector (#​7578)
  • [Php81] Skip Closure bindTo on FunctionLikeToFirstClassCallableRector (#​7581)
  • Remove trait support rom AddParamBasedOnParentClassMethodRector as depends on context; move to Class_ node hooking for efficiency (#​7587)
  • [Php85] Handle indent inside class method on NestedToPipeOperatorRector (#​7584)
  • make DeclareStrictTypesRector skip files without namespace, as very risky in files without PSR-4 autodiscovery (#​7585)
  • speedup - skip refleciton if all params are typed (rectorphp/rector-src@08f6dc3)
  • skip all-typed properties in TypedPropertyFromStrictConstructorRector (rectorphp/rector-src@c5d9fdf)
  • skip no-type params in RenameParamToMatchTypeRector (rectorphp/rector-src@cd7eb93)
  • optimize ParamTypeByParentCallTypeRector to handle only classes with parents and method without param type (rectorphp/rector-src@0ca4e91)
  • [DeadCode] Allow FuncCall on RemoveNullArgOnNullDefaultParamRector (#​7567)
  • [DeadCode] Handle with middle default not null on RemoveNullArgOnNullDefaultParamRector (#​7565)
  • [DeadCode] Allow remove named argument if position is match with param on RemoveNullArgOnNullDefaultParamRector (#​7566)
  • [comments] Remove attribute comments support as comments require standalone line before any doctrine annotation (#​7582)

Removed and Deprecated 💀

  • [depre] Deprecate ParentClassToTraitsRector as very narrow use case to be generic, create custom rule instead (#​7550)
  • [depre] Deprecate ReplaceParentCallByPropertyCallRector as not used since doctrine set service removed, not standalone rule (#​7554)
  • [depre] Deprecate MethodCallToNewRector as not used and based on assumptions (#​7555)
  • [depre] Deprecate MethodCallToPropertyFetchRector, as not practical/used and part of removed set (#​7556)
  • [depre] Deprecate MethodCallToPropertyFetchRector as not used and part of removed set (#​7557)
  • [depre] Deprecate PropertyFetchToMethodCallRector not used and as too generic, use custom rule instead (#​7558)
  • [depre] Deprecate PropertyAssignToMethodCallRector as too narrow use-case and never used (#​7561)
  • [depre] Deprecate ReturnTypeWillChangeRector as discourages from filling correct types, use type declaration set instead (#​7570)
  • [depre] Deprecate MultiDimensionalArrayToArrayDestructRector as not part of any set, can create less readable and harder to analyse code (#​7573)
  • [depre] Deprecate InlineVarDocTagToAssertRector as not par of any set, and create prod crashing code (#​7574)
  • [depre] Deprecate AddAllowDynamicPropertiesAttributeRector, as not in PHP sets and does not help by adding attribute everywhere (#​7568)
  • [depre] Deprecate AddLiteralSeparatorToNumberRector as cannot be automated and depends on context (#​7569)

rectorphp/rector-symfony 🎵

  • [Configs] Skip first class callable on RemoveConstructorAutowireServiceRector (#​858)
  • [config] Add FromServicePublicToDefaultsPublicRector (#​857)
  • cover 2nd arg class in RemoveConstructorAutowireServiceRector (#​856)
  • [config] Add RemoveConstructorAutowireServiceRector (#​855)
  • [Symfony73] Skip empty result of named arguments on ConstraintOptionsToNamedArgumentsRector (#​853)
  • [depre] Deprecate StringExtensionToConfigBuilderRector as deprecated in Symfony 7.4 (#​854)

rectorphp/rector-phpunit 🟢

  • [code-quality] Add DeclareStrictTypesTestsRector to code-quality test (#​566)
  • [depre] Deprecate AddParentSetupCallOnSetupRector as not generic to be automated, fill manually where needed (#​565)
  • [CodeQuality] Skip used inside static closure on AssertFuncCallToPHPUnitAssertRector (#​564)
  • register ReplaceAtMethodWithDesiredMatcherRector to code-quality (#​563)
  • [depre] Deprecate CreateMockToAnonymousClassRector as requires manual work, often value object setter can be better alternative (#​562)

v2.2.5: Released Rector 2.2.5

Compare Source

Rules Registered in sets 🥳

Couple long-existing rules were added to PHP 8.1, code quality and type declaration sets after optional community testing ✔️
If you'll experience any undersired changes, let us know 👍


Bugfixes 🐛

  • [fix] skip variadic param on ParamTypeByParentCallTypeRector (#​7532)
  • [Php81][CodingStyle] Skip multi params on FunctionLikeToFirstClassCallableRector (#​7537)
  • [Php81][CodingStyle] Skip callable param assign with signature multi params on FunctionLikeToFirstClassCallableRector (#​7538)
  • Fix NullToStrictStringFuncCallArgRector with probabilistic check for plural array passed to function where array allowed (#​7539)
  • [Php81][CodingStyle] Skip variadic not used on FunctionLikeToFirstClassCallableRector (#​7540)
  • [Php81] Keep nullable param on NewInInitializerRector (#​7545)
  • [php 8.1] skip nullable property without null default in NewInInitializerRector (#​7546)

Removed and deprecated 💀

  • [depre] Deprecate 3 configurable-only, never used closure param rules as too specific (#​7541)
  • [depre] Deprecate RenameFunctionLikeParamWithinCallLikeArgRector as never used, too narrow and better suits custom project (#​7544)
  • [depre] Deprecate AddTypeFromResourceDocblockRector as breaks code and does not solve any real problem (#​7542)
  • [Php81] Completely remove AttributeGroupNewLiner (#​7536)



rectorphp/rector-phpunit 🟢

  • [depre] Add never used AddCoversClassAttributeRector, as very opionated and requires very specific file location - use custom rule instead (#​561)
  • Fix implicit PHP and PHPUnit version in RequiresAnnotationWithValueToAttributeRector (#​560)
  • [code-quality] Add AssertArrayCastedObjectToAssertSameRector (#​559)

v2.2.4: Released Rector 2.2.4

Compare Source

New Features 🥳

  • [code-quality] Add RepeatedAndNotEqualToNotInArrayRector (#​7517)
  • [code-quality] Add ReplaceConstantBooleanNotRector (#​7527)
  • [code-quality] Add VariableConstFetchToClassConstFetchRector (#​7457)
  • [coding-style] Add BinaryOpStandaloneAssignsToDirectRector (#​7466)

Bugfixes 🐛

  • Fix autoload preload on PHPUnit 12+ on global installation (#​7468) (#​7472) (#​7475)
  • [TypeDeclaration] Skip override from parent method on AddParamStringTypeFromSprintfUseRector (#​7479)
  • 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)
  • [CodingStyle] Skip any CallLike with args !== [] on BinaryOpStandaloneAssignsToDirectRector (#​7469)
  • [CodingStyle] Skip compare binary op on BinaryOpStandaloneAssignsToDirectRector (#​7470)
  • [CodingStyle] Skip by ref params on BinaryOpStandaloneAssignsToDirectRector (#​7471)

Removed and deprecated 💀

  • [deprecated] Deprecate strict-types rules as risky and not practical (#​7523)
  • [DeadCode] Skip vars exists in static vars on RemoveNonExistingVarAnnotationRector (#​7463)
  • [autoload] Remove PHPUnit version 12 check on preload.php load (#​7474)
  • [Removal] Remove --kaizen option, as it might jump right to risky rules, use levels instead (#​7478)

rectorphp/rector-phpunit

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)

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 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 has been generated by Renovate Bot.

@renovate-runner renovate-runner bot added CI 🚧 Dependencies 📦 Pull requests that update a dependency file labels Oct 27, 2025
@boring-cyborg boring-cyborg bot added JSON 👨‍💼 PHP 🐘 Hypertext Pre Processor labels Oct 27, 2025
@github-actions
Copy link

github-actions bot commented Oct 27, 2025

🏰 Composer Production Dependency changes 🏰

Prod Packages Operation Base Target Link
rector/rector Upgraded 2.2.1 2.2.6 Compare
@github-actions github-actions bot added this to the 8.7.0 milestone Oct 27, 2025
@renovate-runner renovate-runner bot force-pushed the renovate/update-packagist-rector-rector-2-2-6 branch from e43a71b to 05a4a8a Compare October 27, 2025 18:40
@renovate-runner renovate-runner bot changed the title Update dependency rector/rector to ^2.2.6 Update dependency rector/rector to ^2.2.6 - autoclosed Oct 29, 2025
@renovate-runner renovate-runner bot closed this Oct 29, 2025
@renovate-runner renovate-runner bot deleted the renovate/update-packagist-rector-rector-2-2-6 branch October 29, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI 🚧 Dependencies 📦 Pull requests that update a dependency file JSON 👨‍💼 PHP 🐘 Hypertext Pre Processor

1 participant