From 406283e1363a4d5178496b5616fd6ddfda2593e8 Mon Sep 17 00:00:00 2001 From: Lars Gersmann Date: Thu, 11 Jan 2024 12:18:42 +0100 Subject: [PATCH] fix: upgraded rector config to work with latest rector release --- rector.php | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/rector.php b/rector.php index fddd9c5..824468d 100644 --- a/rector.php +++ b/rector.php @@ -9,16 +9,29 @@ use Rector\Set\ValueObject\DowngradeLevelSetList; return static function (RectorConfig $rectorConfig): void { - // get parameters - $parameters = $rectorConfig->parameters(); - $parameters->set(Option::PATHS, [ - __DIR__ . '/dist/cm4all-wp-impex-php7.4.0' - ]); - $parameters->set(Option::PARALLEL, false); - - $parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_80); - - // Define what rule sets will be applied - $rectorConfig->import(DowngradeLevelSetList::DOWN_TO_PHP_80); - $rectorConfig->import(DowngradeSetList::PHP_80); + // // get parameters + // $parameters = $rectorConfig->parameters(); + // $parameters->set(Option::PATHS, [ + // __DIR__ . '/dist/cm4all-wp-impex-php7.4.0' + // ]); + // $parameters->set(Option::PARALLEL, false); + + // $parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_80); + + // // Define what rule sets will be applied + // $rectorConfig->import(DowngradeLevelSetList::DOWN_TO_PHP_80); + // $rectorConfig->import(DowngradeSetList::PHP_80); + + $rectorConfig->paths([__DIR__ . '/dist/cm4all-wp-impex-php7.4.0']); + + $rectorConfig->skip([__DIR__ . '/vendor']); + $rectorConfig->disableParallel(); + $rectorConfig->phpVersion(PhpVersion::PHP_80); + + $rectorConfig->sets( + [ + DowngradeLevelSetList::DOWN_TO_PHP_80, + DowngradeSetList::PHP_80 + ] + ); };