Skip to content

Commit 44054dc

Browse files
committed
chore: change for upgrade to PHP 8.0
1 parent 760dbf4 commit 44054dc

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

rector.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@
3737
use Rector\Php70\Rector\FuncCall\RandomFunctionRector;
3838
use Rector\Php71\Rector\FuncCall\CountOnNullRector;
3939
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
40+
use Rector\Php80\Rector\Class_\AnnotationToAttributeRector;
41+
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
42+
use Rector\Php80\Rector\FunctionLike\MixedTypeRector;
43+
use Rector\PHPUnit\AnnotationsToAttributes\Rector\Class_\AnnotationWithValueToAttributeRector;
44+
use Rector\PHPUnit\AnnotationsToAttributes\Rector\ClassMethod\DataProviderAnnotationToAttributeRector;
45+
use Rector\PHPUnit\AnnotationsToAttributes\Rector\ClassMethod\DependsAnnotationWithValueToAttributeRector;
4046
use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector;
4147
use Rector\PHPUnit\Set\PHPUnitSetList;
4248
use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector;
@@ -50,7 +56,7 @@
5056
return static function (RectorConfig $rectorConfig): void {
5157
$rectorConfig->sets([
5258
SetList::DEAD_CODE,
53-
LevelSetList::UP_TO_PHP_74,
59+
LevelSetList::UP_TO_PHP_80,
5460
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
5561
PHPUnitSetList::PHPUNIT_100,
5662
]);
@@ -112,6 +118,16 @@
112118
RandomFunctionRector::class,
113119

114120
SimplifyRegexPatternRector::class,
121+
122+
// PHP 8.0 features but cause breaking changes
123+
ClassPropertyAssignToConstructorPromotionRector::class,
124+
MixedTypeRector::class,
125+
126+
// PHPUnit 10 (requires PHP 8.1) features
127+
DataProviderAnnotationToAttributeRector::class,
128+
DependsAnnotationWithValueToAttributeRector::class,
129+
AnnotationWithValueToAttributeRector::class,
130+
AnnotationToAttributeRector::class,
115131
]);
116132

117133
// auto import fully qualified class names

0 commit comments

Comments
 (0)