diff --git a/rector.php b/rector.php index 99928f3d..9c6784cb 100644 --- a/rector.php +++ b/rector.php @@ -6,25 +6,21 @@ use Rector\PHPUnit\Set\PHPUnitSetList; use Rector\Set\ValueObject\LevelSetList; -return static function (RectorConfig $rectorConfig): void { - $rectorConfig->paths([ +return RectorConfig::configure() + ->withPaths([ __DIR__ . '/src', __DIR__ . '/tests', - ]); - - $rectorConfig->autoloadPaths([ + ]) + ->withAutoloadPaths([ __DIR__ . '/vendor/autoload.php', __DIR__ . '/vendor-bin/rector/vendor/autoload.php', - ]); - - $rectorConfig->importNames(); - - $rectorConfig->sets([ - LevelSetList::UP_TO_PHP_82, + ]) + ->withImportNames(removeUnusedImports: true) + ->withPhpSets(php82: true) + ->withSets([ PHPUnitSetList::PHPUNIT_100, - ]); - - $rectorConfig->skip([ + ]) + ->withSkip([ \Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector::class, \Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector::class, \Rector\Php55\Rector\String_\StringClassNameToClassConstantRector::class => [ @@ -32,4 +28,3 @@ ], \Rector\Php73\Rector\String_\SensitiveHereNowDocRector::class, ]); -}; diff --git a/vendor-bin/rector/composer.json b/vendor-bin/rector/composer.json index 1d58026d..22701b9a 100644 --- a/vendor-bin/rector/composer.json +++ b/vendor-bin/rector/composer.json @@ -1,6 +1,6 @@ { "require-dev": { - "rector/rector": ">=0.14" + "rector/rector": "^1.0" }, "config": {