|
25 | 25 | use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedConstructorParamRector; |
26 | 26 | use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector; |
27 | 27 | use Rector\DeadCode\Rector\MethodCall\RemoveNullArgOnNullDefaultParamRector; |
| 28 | +use Rector\DeadCode\Rector\Property\RemoveDefaultValueFromAssignedPropertyRector; |
28 | 29 | use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector; |
29 | 30 | use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector; |
30 | 31 | use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector; |
|
33 | 34 | use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector; |
34 | 35 | use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector; |
35 | 36 | use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector; |
| 37 | +use Rector\Php81\Rector\Property\ReadOnlyPropertyRector; |
36 | 38 | use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector; |
37 | 39 | use Rector\PHPUnit\CodeQuality\Rector\FuncCall\AssertFuncCallToPHPUnitAssertRector; |
38 | 40 | use Rector\PHPUnit\CodeQuality\Rector\StmtsAwareInterface\DeclareStrictTypesTestsRector; |
|
102 | 104 | __DIR__ . '/system/HTTP/Response.php', |
103 | 105 | ], |
104 | 106 |
|
| 107 | + // Keep property defaults for backward compatibility. |
| 108 | + RemoveDefaultValueFromAssignedPropertyRector::class, |
| 109 | + |
| 110 | + ReadOnlyPropertyRector::class => [ |
| 111 | + __DIR__ . '/system/Cache/ResponseCache.php', |
| 112 | + __DIR__ . '/system/HotReloader/IteratorFilter.php', |
| 113 | + __DIR__ . '/system/Router/RouteCollection.php', |
| 114 | + __DIR__ . '/system/Security/Security.php', |
| 115 | + ], |
| 116 | + |
105 | 117 | // Exclude test file because `is_cli()` is mocked and Rector might remove needed parameters. |
106 | 118 | RemoveExtraParametersRector::class => [ |
107 | 119 | __DIR__ . '/tests/system/Debug/ToolbarTest.php', |
|
0 commit comments