andersundsehr/rector-p
Run Rector in large legacy projects file-by-file. rector-p prompts you per changed file to apply or skip changes, tracks unchanged files to speed repeats, supports running on specific paths/files, and can process only a chunk (e.g., 1/2) at a time.
rector-p remains a file-by-file execution wrapper for Rector, maintaining its core value proposition for low-risk, granular refactoring in Laravel/PHP. The new release (10.2.8) does not introduce architectural changes, preserving its alignment with strategic technical debt reduction and controlled adoption of Rector rules.rector.php configurations. The backported PR (#112) does not affect the rule engine’s core functionality.--startOver) remain unchanged, retaining critical features for legacy systems and high-risk refactoring.composer req andersundsehr/rector-p and compatibility with existing rector.php.laravel-10, laravel-90) without disruption. The backported PR does not introduce Laravel-specific changes.--no-interaction) remains functional for automated pipelines. No updates to CI workflows are required.--dry-run, starting with non-breaking rules) remain applicable.--startOver, version-controlled rector.php).--chunk=N/M) and exclusion strategies remain valid optimizations.Rector\Php80\* before Rector\Laravel\*) remains critical. No new considerations from the backported PR.--no-interaction trade-offs are unchanged. Documentation and team coordination strategies remain relevant.git revert), --dry-run, and feature flags remain viable rollback strategies.--chunk=N/M) and file ownership assignments are still applicable.src/Http/Middleware/) with --dry-run and interactive mode. Validation via tests and manual review remains the same.--chunk=N/M) and rule prioritization for controlled rollout. Automated testing and code reviews are still critical.rector-p and Rector compatibility).rector.php configurations remain fully compatible. Example for Laravel 10:
use Rector\Config\RectorConfig;
use Rector\Laravel\Set\LaravelLevelSetList;
return RectorConfig::create()
->withPaths([__DIR__.'/src'])
->withExcludedPaths([__DIR__.'/tests', __DIR__.'/bootstrap/cache'])
->withRules([
// Rules remain unchanged; no new additions from the backported PR.
LaravelLevelSetList::UP_TO_LARAVEL_10_0,
]);
--dry-run, --no-interaction, --startOver) continue to work.--dry-run for previewing changes.--startOver for interrupted sessions.rector.php configurations.rector.php.NO_UPDATE_NEEDED
(The backported PR does not warrant a full reassessment, but the "Key Questions" and "Operational Impact" sections were updated to reflect ongoing maintenance considerations.)
How can I help you explore Laravel packages today?