diff --git a/rector.php b/rector.php index 0cbfa41114b1..2718a89b5cc7 100644 --- a/rector.php +++ b/rector.php @@ -37,6 +37,13 @@ use Rector\Php70\Rector\FuncCall\RandomFunctionRector; use Rector\Php71\Rector\FuncCall\CountOnNullRector; use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector; +use Rector\Php80\Rector\Class_\AnnotationToAttributeRector; +use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector; +use Rector\Php80\Rector\FunctionLike\MixedTypeRector; +use Rector\PHPUnit\AnnotationsToAttributes\Rector\Class_\AnnotationWithValueToAttributeRector; +use Rector\PHPUnit\AnnotationsToAttributes\Rector\Class_\CoversAnnotationWithValueToAttributeRector; +use Rector\PHPUnit\AnnotationsToAttributes\Rector\ClassMethod\DataProviderAnnotationToAttributeRector; +use Rector\PHPUnit\AnnotationsToAttributes\Rector\ClassMethod\DependsAnnotationWithValueToAttributeRector; use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector; use Rector\PHPUnit\Set\PHPUnitSetList; use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector; @@ -50,7 +57,7 @@ return static function (RectorConfig $rectorConfig): void { $rectorConfig->sets([ SetList::DEAD_CODE, - LevelSetList::UP_TO_PHP_74, + LevelSetList::UP_TO_PHP_80, PHPUnitSetList::PHPUNIT_CODE_QUALITY, PHPUnitSetList::PHPUNIT_100, ]); @@ -112,6 +119,17 @@ RandomFunctionRector::class, SimplifyRegexPatternRector::class, + + // PHP 8.0 features but cause breaking changes + ClassPropertyAssignToConstructorPromotionRector::class, + MixedTypeRector::class, + + // PHPUnit 10 (requires PHP 8.1) features + DataProviderAnnotationToAttributeRector::class, + DependsAnnotationWithValueToAttributeRector::class, + AnnotationWithValueToAttributeRector::class, + AnnotationToAttributeRector::class, + CoversAnnotationWithValueToAttributeRector::class, ]); // auto import fully qualified class names