|
21 | 21 | use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector;
|
22 | 22 | use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector;
|
23 | 23 | use Rector\EarlyReturn\Rector\Return_\PreparedValueToEarlyReturnRector;
|
24 |
| -use Rector\Php73\Rector\FuncCall\ArrayKeyFirstLastRector; |
| 24 | +use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector; |
| 25 | +use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector; |
| 26 | +use Rector\Set\ValueObject\SetList; |
25 | 27 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
26 | 28 | use Utils\Rector\PassStrictParameterToFunctionParameterRector;
|
27 | 29 | use Utils\Rector\UnderscoreToCamelCaseVariableNameRector;
|
|
32 | 34 | // paths to refactor; solid alternative to CLI arguments
|
33 | 35 | $parameters->set(Option::PATHS, [__DIR__ . '/app', __DIR__ . '/system', __DIR__ . '/tests', __DIR__ . '/utils/Rector']);
|
34 | 36 |
|
| 37 | + $parameters->set(Option::SETS, [ |
| 38 | + SetList::PHP_73, |
| 39 | + ]); |
| 40 | + |
35 | 41 | // do you need to include constants, class aliases or custom autoloader? files listed will be executed
|
36 | 42 | $parameters->set(Option::BOOTSTRAP_FILES, [
|
37 | 43 | __DIR__ . '/system/Test/bootstrap.php',
|
|
45 | 51 | __DIR__ . '/tests/system/Config/fixtures',
|
46 | 52 | __DIR__ . '/tests/_support',
|
47 | 53 | PassStrictParameterToFunctionParameterRector::class => [__DIR__ . '/tests/system/Database/Live/SelectTest.php'],
|
| 54 | + JsonThrowOnErrorRector::class, |
| 55 | + StringifyStrNeedlesRector::class, |
48 | 56 | ]);
|
49 | 57 |
|
50 | 58 | // auto import fully qualified class names
|
|
61 | 69 | $services->set(ForToForeachRector::class);
|
62 | 70 | $services->set(ChangeNestedForeachIfsToEarlyContinueRector::class);
|
63 | 71 | $services->set(ChangeIfElseValueAssignToEarlyReturnRector::class);
|
64 |
| - $services->set(ArrayKeyFirstLastRector::class); |
65 | 72 | $services->set(SimplifyStrposLowerRector::class);
|
66 | 73 | $services->set(CombineIfRector::class);
|
67 | 74 | $services->set(SimplifyIfReturnBoolRector::class);
|
|
0 commit comments