From 318f97844ea0eb41d7a83ace1beddb8984db6ca2 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Fri, 3 Jan 2025 09:01:21 +0100 Subject: [PATCH] [BUGFIX] Avoid unsetting almost all PHP-CS-Fixes rules (#1535) Followup to #1533 --- .php-cs-fixer.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index f7fb1fe..28aec1b 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -4,15 +4,15 @@ use PhpCsFixer\Runner\Parallel\ParallelConfigFactory; use TYPO3\CodingStandards\CsFixerConfig; $config = CsFixerConfig::create(); + // This is required as long as we are on PHPUnit 9.x. It can be removed after the switch to PHPUnit 10.x. // @see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8337 -$config->setRules( - [ - 'php_unit_test_case_static_method_calls' => ['call_type' => 'self', 'methods' => ['createStub' => 'this']], - ] -); +$rules = $config->getRules(); +$rules['php_unit_test_case_static_method_calls'] = ['call_type' => 'self', 'methods' => ['createStub' => 'this']]; +$config->setRules($rules); // @TODO 4.0 no need to call this manually $config->setParallelConfig(ParallelConfigFactory::detect()); + $config->getFinder()->in('Classes')->in('Configuration')->in('Tests'); return $config;