From 2039b67eacda6f438070003568544c3e576bc84c Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 30 May 2024 14:52:41 +0700 Subject: [PATCH] Exclude IncreaseDeclareStrictTypesRector from rector-preset set as conflict with DeclareStrictTypesRector (#5926) --- config/set/rector-preset.php | 2 -- utils/Command/MissingInSetCommand.php | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/set/rector-preset.php b/config/set/rector-preset.php index f7ae68e138c..0fda46ee047 100644 --- a/config/set/rector-preset.php +++ b/config/set/rector-preset.php @@ -14,7 +14,6 @@ use Rector\Privatization\Rector\Class_\FinalizeTestCaseClassRector; use Rector\TypeDeclaration\Rector\BooleanAnd\BinaryOpNullableToInstanceofRector; use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector; -use Rector\TypeDeclaration\Rector\StmtsAwareInterface\IncreaseDeclareStrictTypesRector; use Rector\TypeDeclaration\Rector\While_\WhileNullableToInstanceofRector; return static function (RectorConfig $rectorConfig): void { @@ -26,7 +25,6 @@ StrvalToTypeCastRector::class, BoolvalToTypeCastRector::class, FloatvalToTypeCastRector::class, - IncreaseDeclareStrictTypesRector::class, StaticClosureRector::class, StaticArrowFunctionRector::class, PostIncDecToPreIncDecRector::class, diff --git a/utils/Command/MissingInSetCommand.php b/utils/Command/MissingInSetCommand.php index 1bd0b38dffe..f4785bb2054 100644 --- a/utils/Command/MissingInSetCommand.php +++ b/utils/Command/MissingInSetCommand.php @@ -15,6 +15,7 @@ use Rector\Php81\Rector\ClassConst\FinalizePublicClassConstantRector; use Rector\PHPUnit\CodeQuality\Rector\Class_\AddCoversClassAttributeRector; use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector; +use Rector\TypeDeclaration\Rector\StmtsAwareInterface\IncreaseDeclareStrictTypesRector; use Rector\Utils\Enum\RectorDirectoryToSetFileMap; use Rector\Utils\Finder\RectorClassFinder; use Rector\Utils\Finder\SetRectorClassesResolver; @@ -31,6 +32,7 @@ final class MissingInSetCommand extends Command private const SKIPPED_RULES = [ ConfigurableRectorInterface::class, // optional + IncreaseDeclareStrictTypesRector::class, CallableThisArrayToAnonymousFunctionRector::class, // changes behavior, should be applied on purpose regardless PHP 7.3 level JsonThrowOnErrorRector::class,