|
4 | 4 |
|
5 | 5 | use Rector\Core\Configuration\Option;
|
6 | 6 | use Rector\Core\ValueObject\PhpVersion;
|
| 7 | +use Rector\Php80\Rector\Catch_\RemoveUnusedVariableInCatchRector; |
| 8 | +use Rector\Php80\Rector\FuncCall\ClassOnObjectRector; |
| 9 | +use Rector\Php80\Rector\FuncCall\Php8ResourceReturnToObjectRector; |
| 10 | +use Rector\Php80\Rector\FuncCall\TokenGetAllToObjectRector; |
| 11 | +use Rector\Php80\Rector\FunctionLike\UnionTypesRector; |
| 12 | +use Rector\Php80\Rector\Identical\StrEndsWithRector; |
| 13 | +use Rector\Php80\Rector\Identical\StrStartsWithRector; |
| 14 | +use Rector\Php80\Rector\NotIdentical\StrContainsRector; |
| 15 | +use Rector\Php80\Rector\Switch_\ChangeSwitchToMatchRector; |
| 16 | +use Rector\Php80\Rector\Ternary\GetDebugTypeRector; |
| 17 | +use Rector\Php81\Rector\Class_\MyCLabsClassToEnumRector; |
| 18 | +use Rector\Php81\Rector\Class_\SpatieEnumClassToEnumRector; |
| 19 | +use Rector\Php81\Rector\ClassConst\FinalizePublicClassConstantRector; |
| 20 | +use Rector\Php81\Rector\ClassMethod\NewInInitializerRector; |
| 21 | +use Rector\Php81\Rector\FunctionLike\IntersectionTypesRector; |
| 22 | +use Rector\Php81\Rector\MethodCall\MyCLabsMethodCallToEnumConstRector; |
| 23 | +use Rector\Php81\Rector\Property\ReadOnlyPropertyRector; |
7 | 24 | use Rector\Set\ValueObject\SetList;
|
8 | 25 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
9 | 26 |
|
|
13 | 30 | $parameters->set(Option::PATHS, [
|
14 | 31 | __DIR__ . '/Magento2',
|
15 | 32 | __DIR__ . '/Magento2Framework',
|
16 |
| - __DIR__ . '/PHP_CodeSniffer', |
| 33 | + __DIR__ . '/PHP_CodeSniffer' |
17 | 34 | ]);
|
18 | 35 | $parameters->set(Option::BOOTSTRAP_FILES, [__DIR__ . '/vendor/squizlabs/php_codesniffer/autoload.php']);
|
19 | 36 |
|
| 37 | + $parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_80); |
| 38 | + $parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_81); |
| 39 | + |
| 40 | + $parameters->set(Option::SKIP, [ |
| 41 | + ReadOnlyPropertyRector::class, |
| 42 | + StrContainsRector::class, |
| 43 | + UnionTypesRector::class, |
| 44 | + StrStartsWithRector::class, |
| 45 | + StrEndsWithRector::class, |
| 46 | + FinalizePublicClassConstantRector::class, |
| 47 | + RemoveUnusedVariableInCatchRector::class, |
| 48 | + ClassOnObjectRector::class, |
| 49 | + Php8ResourceReturnToObjectRector::class, |
| 50 | + TokenGetAllToObjectRector::class, |
| 51 | + GetDebugTypeRector::class, |
| 52 | + ChangeSwitchToMatchRector::class, |
| 53 | + NewInInitializerRector::class, |
| 54 | + IntersectionTypesRector::class, |
| 55 | + MyCLabsMethodCallToEnumConstRector::class, |
| 56 | + MyCLabsClassToEnumRector::class, |
| 57 | + SpatieEnumClassToEnumRector::class |
| 58 | + ]); |
| 59 | + |
20 | 60 | // Define what rule sets will be applied
|
21 | 61 | $containerConfigurator->import(SetList::PHP_80);
|
22 | 62 | $containerConfigurator->import(SetList::PHP_81);
|
|
0 commit comments