Shared configuration for rector
composer require --dev mll-lab/rector-config
In your rector.php
:
+use function MLL\RectorConfig\config;
use Rector\Config\RectorConfig;
return static function (RectorConfig $rectorConfig): void {
+ config($rectorConfig);
$rectorConfig->paths([
...
]);
$rectorConfig->rule(...);
};
If the project is using Laravel, use laravel
instead of config
.