From 9c2eaf4d70eb331b6f1070c8f8fbb3636fd6e913 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Thu, 31 Oct 2024 06:57:52 +0100 Subject: [PATCH 1/2] Use branch information from composer.json --- .php-cs-fixer.dist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index ba84f1608..c6a3202a1 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -315,6 +315,6 @@ 'whitespace_after_comma_in_array' => true, ]); -$config->setCacheFile(__DIR__ . '/.php-cs-fixer.cache/' . sha1(@trim((string) @shell_exec('git rev-parse --abbrev-ref HEAD')))); +$config->setCacheFile(__DIR__ . '/.php-cs-fixer.cache/' . json_decode((string) @file_get_contents('composer.json'), true)["extra"]["branch-alias"]["dev-main"] ?? 'unknown'); return $config; From 0448d60087a382392a1b2a1abe434466e03dcc87 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Thu, 31 Oct 2024 06:58:25 +0100 Subject: [PATCH 2/2] Enable parallel processing --- .php-cs-fixer.dist.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index c6a3202a1..0431776b2 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -317,4 +317,6 @@ $config->setCacheFile(__DIR__ . '/.php-cs-fixer.cache/' . json_decode((string) @file_get_contents('composer.json'), true)["extra"]["branch-alias"]["dev-main"] ?? 'unknown'); +$config->setParallelConfig(\PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect()); + return $config;