diff --git a/rector.php b/rector.php index 1532d33471a3..041fa6f33082 100644 --- a/rector.php +++ b/rector.php @@ -28,6 +28,7 @@ use Rector\Config\RectorConfig; use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedConstructorParamRector; use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector; +use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector; use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfPhpVersionRector; use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector; use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector; @@ -118,6 +119,11 @@ ], SimplifyRegexPatternRector::class, + + RemoveAlwaysTrueIfConditionRector::class => [ + // false positive. @TODO remove if Rector is fixed. + __DIR__ . '/system/Router/AutoRouterImproved.php', + ], ]); // auto import fully qualified class names