mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2025-01-07 04:46:11 +01:00

[BUGFIX] Avoid unsetting almost all PHP-CS-Fixes rules (#1535)

Followup to #1533
This commit is contained in:
Oliver Klee 2025-01-03 09:01:21 +01:00 committed by GitHub
parent 6c264c66a4
commit 318f97844e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;