|
11 | 11 |
|
12 | 12 | declare(strict_types = 1); |
13 | 13 |
|
| 14 | +use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector; |
14 | 15 | use Rector\Config\RectorConfig; |
15 | 16 | use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector; |
16 | 17 | use Rector\DeadCode\Rector\If_\RemoveDeadInstanceOfRector; |
17 | 18 | use Rector\DeadCode\Rector\StaticCall\RemoveParentCallWithoutParentRector; |
18 | 19 | use Rector\DeadCode\Rector\StmtsAwareInterface\RemoveDeadInstanceOfAssertRector; |
| 20 | +use Rector\Naming\Rector\Class_\RenamePropertyToMatchTypeRector; |
| 21 | +use Rector\Naming\Rector\ClassMethod\RenameParamToMatchTypeRector; |
| 22 | +use Rector\Php80\Rector\Class_\AnnotationToAttributeRector; |
19 | 23 | use Rector\Php81\Rector\Property\ReadOnlyPropertyRector; |
20 | | -use Rector\PHPUnit\Set\PHPUnitSetList; |
21 | | -use Rector\Set\ValueObject\LevelSetList; |
22 | | -use Rector\Set\ValueObject\SetList; |
| 24 | +use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector; |
| 25 | +use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector; |
| 26 | +use Rector\PHPUnit\CodeQuality\Rector\ClassMethod\NoSetupWithParentCallOverrideRector; |
| 27 | +use Rector\PHPUnit\CodeQuality\Rector\FuncCall\AssertFuncCallToPHPUnitAssertRector; |
| 28 | +use Rector\ValueObject\PhpVersion; |
23 | 29 |
|
24 | | -return static function (RectorConfig $rectorConfig): void { |
25 | | - $rectorConfig->paths([ |
| 30 | +return RectorConfig::configure() |
| 31 | + ->withPaths([ |
26 | 32 | __DIR__ . '/src', |
27 | 33 | __DIR__ . '/tests', |
28 | | - ]); |
29 | | - |
30 | | - $rectorConfig->sets([ |
31 | | - SetList::DEAD_CODE, |
32 | | - LevelSetList::UP_TO_PHP_83, |
33 | | - PHPUnitSetList::PHPUNIT_100, |
34 | | - ]); |
35 | | - |
36 | | - $rectorConfig->skip( |
37 | | - [ |
38 | | - RemoveDeadInstanceOfRector::class, |
39 | | - RemoveAlwaysTrueIfConditionRector::class, |
40 | | - RemoveParentCallWithoutParentRector::class, |
41 | | - RemoveDeadInstanceOfAssertRector::class, |
42 | | - ], |
43 | | - ); |
44 | | - |
45 | | - $rectorConfig->skip([ |
| 34 | + ]) |
| 35 | + ->withPhpVersion(PhpVersion::PHP_83) |
| 36 | + ->withPreparedSets( |
| 37 | + deadCode: true, |
| 38 | + codeQuality: true, |
| 39 | + typeDeclarations: true, |
| 40 | + typeDeclarationDocblocks: true, |
| 41 | + naming: true, |
| 42 | + namedArgs: true, |
| 43 | + instanceOf: true, |
| 44 | + if: true, |
| 45 | + earlyReturn: true, |
| 46 | + phpunitCodeQuality: true, |
| 47 | + phpunitNarrowAsserts: true, |
| 48 | + phpunitMockToStub: true, |
| 49 | + ) |
| 50 | + ->withPhpSets(php83: true) |
| 51 | + ->withAttributesSets(phpunit: true) |
| 52 | + ->withComposerBased(phpunit: true) |
| 53 | + ->withSkip([ |
| 54 | + RemoveDeadInstanceOfRector::class, |
| 55 | + RemoveAlwaysTrueIfConditionRector::class, |
| 56 | + RemoveParentCallWithoutParentRector::class, |
| 57 | + AnnotationToAttributeRector::class, |
| 58 | + RemoveDeadInstanceOfAssertRector::class, |
| 59 | + PreferPHPUnitThisCallRector::class, |
| 60 | + AssertFuncCallToPHPUnitAssertRector::class, |
| 61 | + YieldDataProviderRector::class, |
| 62 | + RenamePropertyToMatchTypeRector::class, |
| 63 | + RenameParamToMatchTypeRector::class, |
| 64 | + ExplicitBoolCompareRector::class, |
| 65 | + NoSetupWithParentCallOverrideRector::class, |
| 66 | + ]) |
| 67 | + ->withSkip([ |
46 | 68 | ReadOnlyPropertyRector::class => [ |
47 | 69 | __DIR__ . '/src/LaminasRbacFactory.php', |
48 | 70 | ], |
49 | | - ]); |
50 | | -}; |
| 71 | + ]) |
| 72 | + ->withoutParallel() |
| 73 | + ->withMemoryLimit('2048M'); |
0 commit comments