You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rector --only seems to interact weirdly with the cache #9538
vendor-bin/rector/bin/rector --dry-run
vendor-bin/rector/bin/rector --only=GetDebugTypeRector --dry-run # did not show any change
vendor-bin/rector/bin/rector --only=GetDebugTypeRector --dry-run --clear-cache # showed up changes!
Expected Behaviour
I'm ensure how the cache works there, but I expect using --only=Rule to apply the rule on any relevant file, with our without a clean cache.
Indeed that would require more primitives with the cache, e.g. defining whether to use it at all or add additional parameters for the cache keys... Which obviously is a lot more work.
Feel free to close it if it's not an issue that is planned to be fixed in a foreseeable future.
Activity
samsonasik commentedon Dec 6, 2025
Yeah, that's expected, when using
--only, the--clear-cacheshould always be used. See the whole discussion on #9485theofidry commentedon Dec 6, 2025
Ha I see.
I did think there is a lot that could be done and is tricky on the rector cache...
I assume pushing another cache entry is not that simple? Would disabling the cache for
--onlybe an option then?samsonasik commentedon Dec 6, 2025
Yeah, that complicated per original kick of PR:
user will do: run
--only, then runnormalrector, then run--onlyagain, that the "last" flag need to be saved to another cachetheofidry commentedon Dec 6, 2025
Indeed that would require more primitives with the cache, e.g. defining whether to use it at all or add additional parameters for the cache keys... Which obviously is a lot more work.
Feel free to close it if it's not an issue that is planned to be fixed in a foreseeable future.
samsonasik commentedon Dec 6, 2025
Yes, thank you for understanding ;)
github-actions commentedon May 10, 2026
This issue has been automatically locked because it has been closed for 150 days. Please open a new issue if you have a similar problem.