From 441223c7c82d36cfd8fc853fc201eaaecbecc29a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 23 Jun 2021 11:16:02 +0200 Subject: [PATCH 1/4] Fix: Run friendsofphp/php-cs-fixer on fixtures --- .github/workflows/integrate.yaml | 3 +++ Makefile | 1 + 2 files changed, 4 insertions(+) diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml index efbeed9c..476cb0c6 100644 --- a/.github/workflows/integrate.yaml +++ b/.github/workflows/integrate.yaml @@ -79,6 +79,9 @@ jobs: - name: "Run friendsofphp/php-cs-fixer" run: "vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --diff --diff-format=udiff --dry-run --verbose" + - name: "Run friendsofphp/php-cs-fixer on fixtures" + run: "vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.fixture.php --diff --diff-format=udiff --dry-run --verbose" + dependency-analysis: name: "Dependency Analysis" diff --git a/Makefile b/Makefile index 94230441..dfbba522 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ coding-standards: vendor ## Normalizes composer.json with ergebnis/composer-norm yamllint -c .yamllint.yaml --strict . mkdir -p .build/php-cs-fixer vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --diff --diff-format=udiff --verbose + vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.fixture.php --diff --diff-format=udiff --verbose .PHONY: dependency-analysis dependency-analysis: vendor ## Runs a dependency analysis with maglnet/composer-require-checker From 33d877848cbdc8e32c08c62fced0958d28ce0b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 23 Jun 2021 11:22:04 +0200 Subject: [PATCH 2/4] Fix: Exclude invalid fixture --- .php-cs-fixer.fixture.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.php-cs-fixer.fixture.php b/.php-cs-fixer.fixture.php index 06d74e48..288aa820 100644 --- a/.php-cs-fixer.fixture.php +++ b/.php-cs-fixer.fixture.php @@ -28,7 +28,9 @@ 'static_lambda' => false, ]); -$config->getFinder()->in(__DIR__ . '/test/Fixture'); +$config->getFinder() + ->exclude('Classes/PHPUnit/Framework/TestCaseWithSuffixRule/Success/ImplicitlyAbstractTestCase.php') + ->in(__DIR__ . '/test/Fixture'); $config->setCacheFile(__DIR__ . '/.build/php-cs-fixer/.php_cs.fixture.cache'); From 1049686ee42e810f33f12e4f3be60f7eb71131f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Mon, 8 Nov 2021 13:27:57 +0100 Subject: [PATCH 3/4] Fix: Do not configure deprecated lowercase_constants fixer --- .php-cs-fixer.fixture.php | 1 - 1 file changed, 1 deletion(-) diff --git a/.php-cs-fixer.fixture.php b/.php-cs-fixer.fixture.php index 288aa820..00f18a04 100644 --- a/.php-cs-fixer.fixture.php +++ b/.php-cs-fixer.fixture.php @@ -21,7 +21,6 @@ 'final_internal_class' => false, 'final_public_method_for_abstract_class' => false, 'header_comment' => false, - 'lowercase_constants' => false, 'lowercase_keywords' => false, 'magic_method_casing' => false, 'protected_to_private' => false, From 6637f07b282d384974831be5cd33f9cd16f6b327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Mon, 8 Nov 2021 13:29:04 +0100 Subject: [PATCH 4/4] Fix: Use notPath() instead of exclude() to exclude file --- .php-cs-fixer.fixture.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.php-cs-fixer.fixture.php b/.php-cs-fixer.fixture.php index 00f18a04..8d5d0c4f 100644 --- a/.php-cs-fixer.fixture.php +++ b/.php-cs-fixer.fixture.php @@ -28,8 +28,8 @@ ]); $config->getFinder() - ->exclude('Classes/PHPUnit/Framework/TestCaseWithSuffixRule/Success/ImplicitlyAbstractTestCase.php') - ->in(__DIR__ . '/test/Fixture'); + ->in(__DIR__ . '/test/Fixture') + ->notPath('Classes/PHPUnit/Framework/TestCaseWithSuffixRule/Success/ImplicitlyAbstractTestCase.php'); $config->setCacheFile(__DIR__ . '/.build/php-cs-fixer/.php_cs.fixture.cache');