Skip to content

[depre] Remove strict-booleans set deprecated since 2025-10 - #8243

Merged
TomasVotruba merged 1 commit into
mainfrom
remove-strict-booleans-set
Jul 31, 2026
Merged

[depre] Remove strict-booleans set deprecated since 2025-10#8243
TomasVotruba merged 1 commit into
mainfrom
remove-strict-booleans-set

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

The strict-booleans set was deprecated on 2025-10-21 in #7523 - 9 months ago. Since that cleanup it holds exactly one rule:

// config/set/strict-booleans.php
$rectorConfig->rules([DisallowedEmptyRuleFixerRector::class]);

That rule is already registered in CodeQualityLevel, so the set adds nothing the code-quality set does not already give you.

The strictBooleans flag of withPreparedSets() was already inert - it printed a deprecation warning and was never part of $setMap, so it never applied any rule:

-        if ($strictBooleans) {
-            $message = 'The "strictBooleans" set is deprecated as mostly risky and not practical. ...';
-
-            $symfonyStyle = new SymfonyStyle(new ArgvInput(), new ConsoleOutput());
-            $symfonyStyle->warning($message);
-        }

Removed here:

  • config/set/strict-booleans.php
  • SetList::STRICT_BOOLEANS
  • the strictBooleans param and its warning block in RectorConfigBuilder
  • the Strict Booleans entry in CoreSetProvider

DisallowedEmptyRuleFixerRector itself stays, reachable through the code-quality set.

Note this is a BC break for configs still naming SetList::STRICT_BOOLEANS or passing strictBooleans: true - they now fail instead of warning.

ECS, PHPStan, Rector and PHPUnit (5472 tests) pass.

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.
@TomasVotruba
TomasVotruba enabled auto-merge (squash) July 31, 2026 17:10
@TomasVotruba
TomasVotruba merged commit b64e880 into main Jul 31, 2026
65 checks passed
@TomasVotruba
TomasVotruba deleted the remove-strict-booleans-set branch July 31, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant