Skip to content

[TASK] Update Rector packages to v2.5.1#269

Merged
renovate[bot] merged 1 commit into
mainfrom
renovate/rector-packages
Jun 22, 2026
Merged

[TASK] Update Rector packages to v2.5.1#269
renovate[bot] merged 1 commit into
mainfrom
renovate/rector-packages

Conversation

@renovate

@renovate renovate Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
rector/rector (source) 2.4.62.5.1 age adoption passing confidence

Release Notes

rectorphp/rector (rector/rector)

v2.5.1

Compare Source

v2.5.0: Released Rector 2.5

Compare Source

New Features 🥳 🎉 🎉 🎉

This release has 3 interesting new features. Let's look at them:

[dx] Report skips that never matched (#​8058)
  • What? - like PHPStan's reportUnusedIgnores, but for Rector ->withSkip(). Flags skip entries that never matched anything during the run, so you can delete stale skips.

  • Why? - skips rot. You skip a path/rule to dodge a problem, later the file moves or the rule stops firing there — the skip lingers forever,
    silently masking nothing. This surfaces dead skips so config stays honest.

// rector.php
return RectorConfig::configure()
    ->withSkip([
        SimplifyUselessVariableRector::class => [
            '*/src/Legacy/*',          // still matches — fine
            '*/NonexistentUnused/*',   // matches nothing — stale
        ],
    ])
    ->reportUnusedSkips();

Run output:

 [OK] Rector is done!
  
 [WARNING] This skip is unused, it never matched any element.
           You can remove it from "->withSkip()"

 * Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector => */NonexistentUnused/*

[dx] Removing unused imports by default (#​8047)

You can update your rector.php config:

 return RectorConfig::configure()
-    ->withImportNames(removeUnusedImports: true);
+    ->withImportNames();

In case it's not for you, turn it off:

 return RectorConfig::configure()
-    ->withImportNames();
+    ->withImportNames(removeUnusedImports: false);

[dx] Introducing Drupal composer-based sets (#​8041), Thanks @​bbrala!

If you're using Drupal Rector, you can now enable it's per-version sets via:

 return RectorConfig::configure()
+    ->withComposerBased(drupal: true);

To learn more about composer-based-sets, checkout the documentation.


New Rules 🎉
  • [php 8.4] [type-declaration] Add AddArrayAnyAllClosureParamTypeRector and NarrowArrayAnyAllNullableParamTypeRector (#​8049)
  • [code-quality] Add MoveInnerFunctionToTopLevelRector (#​8042)
  • [code-quality] Add NewArrayItemConcatAssignToAssignRector (#​8045)
  • [code-quality] Add FixClassCaseSensitivityVarDocblockRector (#​8046)
  • [polyfills] add missing polyfill to PHP 8.4 array functions (#​8052)
  • [rector] Add AddParamTypeToRefactorMethodRector if missing (#​8061)

Bugfixes 🐛

  • [internal] Streamline use imports management to FileNode (#​8040)
  • [PostRector] Do not keep an unused import matched only by a partial docblock name's tail (#​8043), Thanks @​ruudk!
  • [CodeQuality] Skip native function on MoveInnerFunctionToTopLevelRector (#​8044)
  • Fix --only runs caching files as unchanged, hiding pending changes from full runs (#​8029), Thanks @​SanderMuller!
  • [fix] Fix RemoveUnusedPrivateMethodRector for NeverType (#​8050)
  • [dead-code] Fix RemoveUnusedVariableAssignRector, allow for SplFileInfo as cleanup on purpose for gc (#​8054)
  • [fixes] Couple ClassPropertyAssignToConstructorPromotionRector, RemoveAlwaysTrueIfConditionRector and RemoveUnusedVariableAssignRector fixes (#​8055)
  • [TypeDeclaration][DeadCode] Skip class with Doctrine static function mapping (loadMetadata) in TypedPropertyFromAssignsRector and RemoveUnusedPrivatePropertyRector (#​8059)
  • [TypeDeclaration] Skip class with Doctrine static function mapping (loadMetadata) in TypedPropertyFromStrictConstructorRector (#​8060)

rectorphp/rector-doctrine 🟠

  • [NodeAnalyzer] Detect Doctrine static function mapping (loadMetadata) entity in DoctrineEntityDetector (736bf61)

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • Monday through Friday (* * * * 1-5)
  • Automerge
    • At any time (no schedule defined)

🚦 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.

| datasource | package       | from  | to    |
| ---------- | ------------- | ----- | ----- |
| packagist  | rector/rector | 2.4.6 | 2.5.1 |
@renovate renovate Bot added the dependencies Updates project dependencies label Jun 22, 2026
@renovate renovate Bot enabled auto-merge (squash) June 22, 2026 03:13
@renovate renovate Bot merged commit 8a64e93 into main Jun 22, 2026
11 checks passed
@renovate renovate Bot deleted the renovate/rector-packages branch June 22, 2026 03:14
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 27927197548

Coverage remained the same at 97.619%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 168
Covered Lines: 164
Line Coverage: 97.62%
Coverage Strength: 2.35 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Updates project dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant