From eb46c743ca5bf3b13717c25633b675495907c5a4 Mon Sep 17 00:00:00 2001 From: alleknalle Date: Tue, 23 Dec 2025 16:54:05 +0100 Subject: [PATCH] Ignore all PHPStan errors since ArgTyper only collects types and doesn't throw errors --- .github/workflows/code_analysis.yaml | 4 ++-- config/phpstan-collecting-data.neon | 6 ++++++ ...eAllErrorsExceptArgTyperErrorExtension.php | 19 +++++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 src/PHPStan/IgnoreAllErrorsExceptArgTyperErrorExtension.php diff --git a/.github/workflows/code_analysis.yaml b/.github/workflows/code_analysis.yaml index 25513870..f7fca2a2 100644 --- a/.github/workflows/code_analysis.yaml +++ b/.github/workflows/code_analysis.yaml @@ -30,7 +30,7 @@ jobs: - name: 'Class Leak' - run: vendor/bin/class-leak check src tests --skip-path=Fixture --skip-path=Source + run: vendor/bin/class-leak check src tests --skip-path=Fixture --skip-path=Source --skip-type="Rector\\ArgTyper\\PHPStan\\IgnoreAllErrorsExceptArgTyperErrorExtension" - name: 'Tests' @@ -46,7 +46,7 @@ jobs: - name: 'Check Active Classes' - run: vendor/bin/class-leak check src bin tests --ansi --skip-path=Fixture --skip-path=Source + run: vendor/bin/class-leak check src bin tests --ansi --skip-path=Fixture --skip-path=Source --skip-type="Rector\\ArgTyper\\PHPStan\\IgnoreAllErrorsExceptArgTyperErrorExtension" name: ${{ matrix.actions.name }} runs-on: ubuntu-latest diff --git a/config/phpstan-collecting-data.neon b/config/phpstan-collecting-data.neon index 309ff0c8..cf562eac 100644 --- a/config/phpstan-collecting-data.neon +++ b/config/phpstan-collecting-data.neon @@ -14,3 +14,9 @@ parameters: rules: - Rector\ArgTyper\PHPStan\Rule\CollectFuncCallArgTypesRule - Rector\ArgTyper\PHPStan\Rule\CollectCallLikeArgTypesRule + +services: + - + class: Rector\ArgTyper\PHPStan\IgnoreAllErrorsExceptArgTyperErrorExtension + tags: + - phpstan.ignoreErrorExtension diff --git a/src/PHPStan/IgnoreAllErrorsExceptArgTyperErrorExtension.php b/src/PHPStan/IgnoreAllErrorsExceptArgTyperErrorExtension.php new file mode 100644 index 00000000..2b09b5de --- /dev/null +++ b/src/PHPStan/IgnoreAllErrorsExceptArgTyperErrorExtension.php @@ -0,0 +1,19 @@ +