From 5a5a24cb0379ab5b86d21e7176d02e534230d7b4 Mon Sep 17 00:00:00 2001 From: MCJ Vasseur <14887731+vmcj@users.noreply.github.com> Date: Fri, 4 Jul 2025 11:54:26 +0200 Subject: [PATCH] Fail on PHPStan errors In the past we would get the annotation but the pipeline stopped failing. This resulted in some PHPStan findings not being handled. We could consider removing the GH action but that would remove the annotations. --- .github/workflows/phpstan.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 3d7b4fd952..7bc435277e 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -15,10 +15,16 @@ jobs: run: .github/jobs/composer_setup.sh - name: Show the phpstan version run: webapp/vendor/phpstan/phpstan/phpstan --version + - name: Run PHPStan in the classic way + run: | + set -euo pipefail + webapp/vendor/bin/phpstan \ + --configuration=webapp/phpstan.dist.neon \ + | tee /tmp/artifacts/phpstan.out + # Run the test again for GHA annotations - uses: php-actions/phpstan@v3.0.2 with: configuration: webapp/phpstan.dist.neon - path: webapp/src webapp/tests php_extensions: gd intl mysqli pcntl zip autoload_file: webapp/vendor/autoload.php version: composer