diff --git a/rector.php b/rector.php index 6972403e..868959dc 100644 --- a/rector.php +++ b/rector.php @@ -21,18 +21,17 @@ use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector; use Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector; use Rector\Config\RectorConfig; -use Rector\Core\Configuration\Option; -use Rector\Core\ValueObject\PhpVersion; +use Rector\Configuration\Option; use Rector\DeadCode\Rector\Assign\RemoveUnusedVariableAssignRector; use Rector\DeadCode\Rector\ClassMethod\RemoveEmptyClassMethodRector; use Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector; use Rector\EarlyReturn\Rector\Return_\ReturnBinaryOrToEarlyReturnRector; use Rector\PHPUnit\CodeQuality\Rector\Class_\AddSeeTestAnnotationRector; -use Rector\PHPUnit\Set\PHPUnitLevelSetList; use Rector\PHPUnit\Set\PHPUnitSetList; use Rector\Set\ValueObject\DowngradeLevelSetList; use Rector\Set\ValueObject\LevelSetList; use Rector\Set\ValueObject\SetList; +use Rector\ValueObject\PhpVersion; return static function (RectorConfig $rectorConfig): void { define('MHASH_XXH3', 2 << 0); @@ -44,7 +43,7 @@ // $rectorConfig->disableParallel(); $rectorConfig->parallel(240); $rectorConfig->phpstanConfig(__DIR__.'/phpstan.neon'); - $rectorConfig->phpVersion(PhpVersion::PHP_72); + $rectorConfig->phpVersion(PhpVersion::PHP_74); // $rectorConfig->cacheClass(FileCacheStorage::class); // $rectorConfig->cacheDirectory(__DIR__.'/build/rector'); // $rectorConfig->containerCacheDirectory(__DIR__.'/build/rector'); @@ -109,8 +108,8 @@ ]); $rectorConfig->sets([ - DowngradeLevelSetList::DOWN_TO_PHP_72, - LevelSetList::UP_TO_PHP_72, + DowngradeLevelSetList::DOWN_TO_PHP_74, + LevelSetList::UP_TO_PHP_74, // SetList::ACTION_INJECTION_TO_CONSTRUCTOR_INJECTION, SetList::CODE_QUALITY, SetList::CODING_STYLE, @@ -125,8 +124,9 @@ SetList::EARLY_RETURN, SetList::INSTANCEOF, - PHPUnitLevelSetList::UP_TO_PHPUNIT_80, + PHPUnitSetList::PHPUNIT_90, PHPUnitSetList::PHPUNIT_CODE_QUALITY, + PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES, ]); $rectorConfig->rules([