From 9bde88c21ff64b9c254de474e538964028315aac Mon Sep 17 00:00:00 2001 From: Dariusz Ruminski Date: Wed, 17 Apr 2024 00:07:24 +0200 Subject: [PATCH 1/3] DX: PR friendly, branch-specific PHP CS Fixer cache files --- .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 b4b2a5d64aa..7a4c0e0f5de 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -342,6 +342,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-master"] ?? 'unknown'); return $config; From 6cfef410339b0547c80a0ee03f8be3291bf67ec5 Mon Sep 17 00:00:00 2001 From: Dariusz Ruminski Date: Wed, 17 Apr 2024 00:07:37 +0200 Subject: [PATCH 2/3] chore: indicate that entry is dir and not regular file --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 10389658082..dde10741eca 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,7 @@ # PHP-CS-Fixer /.php-cs-fixer.php -/.php-cs-fixer.cache +/.php-cs-fixer.cache/ # Psalm /.psalm/cache From 53b61b9d6abb8e00cf1fad3e57c80411e481acbb Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Wed, 17 Apr 2024 08:32:37 +0200 Subject: [PATCH 3/3] Revert "chore: indicate that entry is dir and not regular file" This reverts commit 6cfef410339b0547c80a0ee03f8be3291bf67ec5. --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index dde10741eca..10389658082 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,7 @@ # PHP-CS-Fixer /.php-cs-fixer.php -/.php-cs-fixer.cache/ +/.php-cs-fixer.cache # Psalm /.psalm/cache