|
37 | 37 | use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector; |
38 | 38 | use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector; |
39 | 39 | use Rector\EarlyReturn\Rector\Return_\PreparedValueToEarlyReturnRector; |
| 40 | +use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector; |
| 41 | +use Rector\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector; |
| 42 | +use Rector\Php70\Rector\FuncCall\RandomFunctionRector; |
40 | 43 | use Rector\Php70\Rector\Ternary\TernaryToNullCoalescingRector; |
| 44 | +use Rector\Php71\Rector\FuncCall\CountOnNullRector; |
41 | 45 | use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector; |
42 | 46 | use Rector\Php71\Rector\List_\ListToArrayDestructRector; |
43 | 47 | use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector; |
44 | 48 | use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector; |
| 49 | +use Rector\Set\ValueObject\LevelSetList; |
45 | 50 | use Rector\Set\ValueObject\SetList; |
46 | 51 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
47 | 52 | use Utils\Rector\PassStrictParameterToFunctionParameterRector; |
|
51 | 56 |
|
52 | 57 | return static function (ContainerConfigurator $containerConfigurator): void { |
53 | 58 | $containerConfigurator->import(SetList::DEAD_CODE); |
54 | | - $containerConfigurator->import(SetList::PHP_73); |
| 59 | + $containerConfigurator->import(LevelSetList::UP_TO_PHP_73); |
55 | 60 |
|
56 | 61 | $parameters = $containerConfigurator->parameters(); |
57 | 62 |
|
|
95 | 100 | UnderscoreToCamelCaseVariableNameRector::class => [ |
96 | 101 | __DIR__ . '/system/Session/Handlers', |
97 | 102 | ], |
| 103 | + |
| 104 | + // may cause load view files directly when detecting class that |
| 105 | + // make warning |
| 106 | + StringClassNameToClassConstantRector::class, |
| 107 | + |
| 108 | + // sometime too detail |
| 109 | + CountOnNullRector::class, |
| 110 | + |
| 111 | + // may not be unitialized on purpose |
| 112 | + AddDefaultValueForUndefinedVariableRector::class, |
| 113 | + |
| 114 | + // use mt_rand instead of random_int on purpose on non-cryptographically random |
| 115 | + RandomFunctionRector::class, |
98 | 116 | ]); |
99 | 117 |
|
100 | 118 | // auto import fully qualified class names |
|
0 commit comments