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
After running --only a "normal" run finishes instantly, telling me:
[OK] Rector is done!
process --dry-run --clear-cache works again.
Minimal PHP Code Causing Issue
Expected Behaviour
After --only, non---only runs should run "normally" and show all results again.
Or maybe I misunderstood how it should work and it caches the --only run and therefore has nothing to do before the next --clear-cache?
I am going to close it, the --only command is used for apply on speficic rule, usually for apply multiple PRs as a use case, and use --clear-cache is expected if you want to start over.
Tweaking it will make it too complicated just to make it works, as it will need verify previous command is using --only or not, and in current command without --only, that means another cache entry is needed.
Activity
ghbob commentedon Nov 6, 2025
looks like a cache thing:
process --dry-run --clear-cacheprocess --only="ClosureReturnTypeRector", ok, does its thing (30 files)process --only="AddArrowFunctionReturnTypeRector, does its thing but only on the files from the--onlyrule above? (10 files)process --only="AddArrowFunctionReturnTypeRector" --clear-cachedoes the rest (28 files)samsonasik commentedon Nov 6, 2025
The possible solution is enforce clear cache for run
--only, like in the experimentalkaizenfeature (thekaizenfeature removed tho)samsonasik commentedon Nov 19, 2025
I created kickoff PR for it:
samsonasik commentedon Nov 20, 2025
I am going to close it, the
--onlycommand is used for apply on speficic rule, usually for apply multiple PRs as a use case, and use--clear-cacheis expected if you want to start over.Tweaking it will make it too complicated just to make it works, as it will need verify previous command is using
--onlyor not, and in current command without--only, that means another cache entry is needed.Thank you for understanding.
ghbob commentedon Nov 20, 2025
@samsonasik makes sense but I'd suggest to add this info to: https://getrector.com/documentation/run-single-rule otherwise this is not clear at all.
thanks for your effort!
samsonasik commentedon Nov 20, 2025
The website is open source, feel free to provide PR
https://github.com/rectorphp/getrector-com/tree/main/resources/docs
Thank you.
github-actions commentedon Apr 26, 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.