From d763e0bf579232df8a80c75635d7dead8850e4aa Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Fri, 31 Jul 2026 19:09:24 +0200 Subject: [PATCH] [depre] Remove strict-booleans set deprecated since 2025-10 The set has been deprecated for 9 months and shrank to a single rule, DisallowedEmptyRuleFixerRector, which the code-quality set already registers. The "strictBooleans" flag of withPreparedSets() only printed a warning, it never added the set to the config. --- config/set/strict-booleans.php | 10 ---------- src/Configuration/RectorConfigBuilder.php | 12 ------------ src/Set/SetProvider/CoreSetProvider.php | 1 - src/Set/ValueObject/SetList.php | 5 ----- 4 files changed, 28 deletions(-) delete mode 100644 config/set/strict-booleans.php diff --git a/config/set/strict-booleans.php b/config/set/strict-booleans.php deleted file mode 100644 index b5be5a0db30..00000000000 --- a/config/set/strict-booleans.php +++ /dev/null @@ -1,10 +0,0 @@ -rules([DisallowedEmptyRuleFixerRector::class]); -}; diff --git a/src/Configuration/RectorConfigBuilder.php b/src/Configuration/RectorConfigBuilder.php index c3d90f17917..35e5fa66008 100644 --- a/src/Configuration/RectorConfigBuilder.php +++ b/src/Configuration/RectorConfigBuilder.php @@ -39,9 +39,6 @@ use Rector\Symfony\Set\SymfonySetList; use Rector\ValueObject\Configuration\LevelOverflow; use Rector\ValueObject\PhpVersion; -use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Console\Output\ConsoleOutput; -use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Finder\Finder; use Webmozart\Assert\Assert; @@ -692,8 +689,6 @@ public function withPreparedSets( bool $instanceOf = false, bool $if = false, bool $earlyReturn = false, - /** @deprecated */ - bool $strictBooleans = false, bool $carbon = false, bool $rectorPreset = false, bool $phpunitCodeQuality = false, @@ -705,13 +700,6 @@ public function withPreparedSets( ): self { Notifier::notifyNotSuitableMethodForPHP74(__METHOD__); - if ($strictBooleans) { - $message = 'The "strictBooleans" set is deprecated as mostly risky and not practical. Remove it from withPreparedSets() method and use "codeQuality" and "codingStyle" sets instead. They already contain more granular and stable rules on same note.'; - - $symfonyStyle = new SymfonyStyle(new ArgvInput(), new ConsoleOutput()); - $symfonyStyle->warning($message); - } - $setMap = [ SetList::DEAD_CODE => $deadCode, SetList::CODE_QUALITY => $codeQuality, diff --git a/src/Set/SetProvider/CoreSetProvider.php b/src/Set/SetProvider/CoreSetProvider.php index bfe2aa071e2..6673cfe9a6c 100644 --- a/src/Set/SetProvider/CoreSetProvider.php +++ b/src/Set/SetProvider/CoreSetProvider.php @@ -27,7 +27,6 @@ public function provide(): array new Set(SetGroup::CORE, 'Gmagick to Imagick', __DIR__ . '/../../../config/set/gmagick-to-imagick.php'), new Set(SetGroup::CORE, 'Naming', __DIR__ . '/../../../config/set/naming.php'), new Set(SetGroup::CORE, 'Privatization', __DIR__ . '/../../../config/set/privatization.php'), - new Set(SetGroup::CORE, 'Strict Booleans', __DIR__ . '/../../../config/set/strict-booleans.php'), new Set(SetGroup::CORE, 'Type Declarations', __DIR__ . '/../../../config/set/type-declaration.php'), new ComposerTriggeredSet( diff --git a/src/Set/ValueObject/SetList.php b/src/Set/ValueObject/SetList.php index e37e0d73482..f318a227f6c 100644 --- a/src/Set/ValueObject/SetList.php +++ b/src/Set/ValueObject/SetList.php @@ -20,11 +20,6 @@ final class SetList public const string DEAD_CODE = __DIR__ . '/../../../config/set/dead-code.php'; - /** - * @deprecated As too strict and not practical. Use code quality and coding style sets instead. - */ - public const string STRICT_BOOLEANS = __DIR__ . '/../../../config/set/strict-booleans.php'; - public const string GMAGICK_TO_IMAGICK = __DIR__ . '/../../../config/set/gmagick-to-imagick.php'; public const string NAMING = __DIR__ . '/../../../config/set/naming.php';