From ded51a59576ea821a1878be9b8d5a3beb793d51b Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Mon, 30 Dec 2024 13:18:11 +0100 Subject: [PATCH] [BUGFIX] Make PHP-CS-Fixer >= 3.66 compatible with PHPUnit 9.x @see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8337 --- .php-cs-fixer.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 48a103a2..f7fb1fe2 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -4,6 +4,14 @@ 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']], + ] +); + // @TODO 4.0 no need to call this manually $config->setParallelConfig(ParallelConfigFactory::detect()); $config->getFinder()->in('Classes')->in('Configuration')->in('Tests');