Skip to content

Drop the cacheClass() call Rector 2.8 removed - #99

Merged
loevgaard merged 1 commit into
1.14.xfrom
fix-rector-cache-class-1.14.x
Nov 2, 2026
Merged

loevgaard merged 1 commit into
1.14.xfrom
fix-rector-cache-class-1.14.x

Conversation

@loevgaard

Copy link
Copy Markdown
Member

Summary

Rector 2.8 removed RectorConfig::cacheClass(), so vendor/bin/rector process --dry-run errors on highest deps, in the skeleton and in every plugin generated from it (seen on Setono/SyliusQuickpayPlugin#143, fixed there in Setono/SyliusQuickpayPlugin#144).

-use Rector\Caching\ValueObject\Storage\FileCacheStorage;
 ...
-    $rectorConfig->cacheClass(FileCacheStorage::class);
     $rectorConfig->cacheDirectory('./.build/rector');

FileCacheStorage is Rector's default cache storage, and the only one left in 2.8, so the cache behaviour is unchanged.

Evidence

rector process --dry-run with Rector 2.8.3, run on SyliusQuickpayPlugin's identical config:

  • Before: [ERROR] Call to undefined method Rector\Config\RectorConfig::cacheClass()
    After: [OK] Rector is done!

Still [OK] on Rector 2.6.1. This PR's own coding-standards job runs it on the skeleton.

Merge Danger

Door: two-way

Blast Radius: none

Dev tooling config only; plugins already generated from the skeleton need the same two-line change.

Rector 2.8 removed RectorConfig::cacheClass(), so 'vendor/bin/rector process' fails with 'Call to undefined method' on highest deps. FileCacheStorage is Rector's default cache storage (and the only one left in 2.8), so dropping the call keeps the behaviour.
@loevgaard
loevgaard merged commit a4e4a01 into 1.14.x Nov 2, 2026
28 checks passed
@loevgaard
loevgaard deleted the fix-rector-cache-class-1.14.x branch November 2, 2026 09:21
@codecov

codecov Bot commented Nov 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (3f22a19) to head (a0ca131).
⚠️ Report is 2 commits behind head on 1.14.x.

Additional details and impacted files
@@             Coverage Diff             @@
##              1.14.x       #99   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity         2         2           
===========================================
  Files              2         2           
  Lines             16        16           
===========================================
  Hits              16        16           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant