Skip to content

Commit

Permalink
fix: upgraded rector config to work with latest rector release
Browse files Browse the repository at this point in the history
  • Loading branch information
lgersman committed Jan 11, 2024
1 parent fb5543f commit 406283e
Showing 1 changed file with 25 additions and 12 deletions.
37 changes: 25 additions & 12 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
]
);
};

0 comments on commit 406283e

Please sign in to comment.