Skip to content

Commit

Permalink
simplified rector config
Browse files Browse the repository at this point in the history
  • Loading branch information
ToshY committed Mar 12, 2024
1 parent b3c8089 commit c119b00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"nyholm/psr7": "^1.6.1"
},
"require-dev": {
"rector/rector": "^0.15.1 || ^0.16.0 || ^0.17.0 || ^0.18.0 || ^0.19.0 || ^1.0.0",
"rector/rector": "^1.0",
"phpmd/phpmd": "^2.13",
"friendsofphp/php-cs-fixer": "^3.13",
"phpro/grumphp": "^1.15 || ^2.0",
Expand Down
15 changes: 4 additions & 11 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,27 @@
declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Core\ValueObject\PhpVersion;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
use Rector\Set\ValueObject\LevelSetList;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->phpVersion(phpVersion: PhpVersion::PHP_81);
$rectorConfig->importNames();
$rectorConfig->importShortClasses();
$rectorConfig->parallel(seconds: 600, maxNumberOfProcess: 32);

$rectorConfig->autoloadPaths(autoloadPaths: [
__DIR__ . '/vendor/autoload.php',
]);
$rectorConfig->parallel();

$rectorConfig->paths(paths: [
__DIR__ . '/src',
]);

$rectorConfig->skip(criteria: [
__DIR__ . '/vendor',
$rectorConfig->skip(skip: [
NullToStrictStringFuncCallArgRector::class => [
__DIR__ . '/src/TokenAuthentication.php',
],
]);

$rectorConfig->sets([
LevelSetList::UP_TO_PHP_74,
LevelSetList::UP_TO_PHP_80,
LevelSetList::UP_TO_PHP_81,
LevelSetList::UP_TO_PHP_82,
LevelSetList::UP_TO_PHP_83,
]);
};

0 comments on commit c119b00

Please sign in to comment.