From e13c6a205cf0cde16b8d6d04b28c38ef46f9ffec Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Sun, 9 Feb 2025 14:48:04 +0100 Subject: [PATCH 1/2] use innmind/static-analysis --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9ca2c86..660c173 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ }, "require-dev": { "phpunit/phpunit": "~10.2", - "vimeo/psalm": "~5.15", + "innmind/static-analysis": "~1.1", "innmind/black-box": "~5.5", "innmind/coding-standard": "~2.0" }, From f2ff87ef88bbf4f76b3719925a3a01003fc36b62 Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Sun, 9 Feb 2025 14:48:29 +0100 Subject: [PATCH 2/2] forward the PHP_CS_FIXER_IGNORE_ENV to php-cs-fixer when defined by the user --- src/Trigger/CodingStandard.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Trigger/CodingStandard.php b/src/Trigger/CodingStandard.php index efc42bd..c592512 100644 --- a/src/Trigger/CodingStandard.php +++ b/src/Trigger/CodingStandard.php @@ -68,7 +68,11 @@ private function run( /** @var Map */ $variables = $console ->variables() - ->filter(static fn($key) => $key === 'PATH'); + ->filter(static fn($key) => \in_array( + $key, + ['PATH', 'PHP_CS_FIXER_IGNORE_ENV'], + true, + )); $command = Command::foreground('vendor/bin/php-cs-fixer') ->withArgument('fix')