From 3e99d2b3df76de5803ee3b79b444b5f91bb49e0b Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Tue, 21 Apr 2026 18:46:00 +0000 Subject: [PATCH] Restore strict_types enforcement in php-cs-fixer config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit php-cs-fixer v3.95.0 added a `strategy` option to `declare_strict_types` and set `@Symfony:risky` to `'strategy' => 'remove'` (see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/9384), which causes the preset we inherit to strip `declare(strict_types=1);` from every file on the next CI run. Override with `'strategy' => 'enforce'` to keep the pre-v3.95 behavior — strict types stay declared. Closes STF-223. --- .php-cs-fixer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index fe9b6558..4d1418e3 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -15,6 +15,7 @@ 'array_syntax' => ['syntax' => 'short'], 'combine_consecutive_unsets' => true, 'concat_space' => [ 'spacing' => 'one'], + 'declare_strict_types' => true, 'explicit_string_variable' => false, 'fopen_flags' => ['b_mode' => true], 'heredoc_to_nowdoc' => true,