From ce0ee98363e996f2cd18f0ff74f71767c013467b Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sun, 26 Oct 2025 21:46:56 +0100 Subject: [PATCH 1/3] Fix mutation testing on dev branch --- .github/workflows/build.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f4f92b51..dd84a025 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -261,8 +261,14 @@ jobs: > infection.json5 cat infection.json5 | jq - - name: "Cache Result cache" - uses: actions/cache@v4 + - name: "Determine default branch" + id: default-branch + working-directory: phpstan-dist + run: | + echo "name=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')" >> $GITHUB_OUTPUT + + - name: "Restore result cache" + uses: actions/cache/restore@v4 with: path: ./tmp key: "result-cache-v1-${{ matrix.php-version }}-${{ github.run_id }}" @@ -271,9 +277,9 @@ jobs: - name: "Run infection" run: | - git fetch --depth=1 origin $GITHUB_BASE_REF + git fetch --depth=1 origin ${{ steps.default-branch.outputs.name }} infection \ - --git-diff-base=origin/$GITHUB_BASE_REF \ + --git-diff-base=origin/${{ steps.default-branch.outputs.name }} \ --git-diff-lines \ --ignore-msi-with-no-mutations \ --min-msi=100 \ @@ -281,3 +287,10 @@ jobs: --log-verbosity=all \ --debug \ --logger-text=php://stdout + + - name: "Save result cache" + uses: actions/cache/save@v4 + if: ${{ !cancelled() }} + with: + path: ./tmp + key: "result-cache-v1-${{ matrix.php-version }}-${{ github.run_id }}" From e0af1919a00f1ead343184d32626a059f5af61ec Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sun, 26 Oct 2025 21:47:25 +0100 Subject: [PATCH 2/3] Update build.yml --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd84a025..50334926 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -263,7 +263,6 @@ jobs: - name: "Determine default branch" id: default-branch - working-directory: phpstan-dist run: | echo "name=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')" >> $GITHUB_OUTPUT From cfbc3dffa5b7b07d7e429a09a47bffdf4b8adebd Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sun, 26 Oct 2025 21:58:22 +0100 Subject: [PATCH 3/3] move level config into phpstan.neon https://github.com/phpstan/phpstan-doctrine/commit/38fc20dce359703f48c076c9a9bab0e2cc30c533 --- Makefile | 4 ++-- phpstan.neon | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1ee557df..8cec0a5b 100644 --- a/Makefile +++ b/Makefile @@ -26,8 +26,8 @@ cs-fix: .PHONY: phpstan phpstan: - php vendor/bin/phpstan analyse -l 8 -c phpstan.neon src tests + php vendor/bin/phpstan analyse -c phpstan.neon src tests .PHONY: phpstan-generate-baseline phpstan-generate-baseline: - php vendor/bin/phpstan analyse -l 8 -c phpstan.neon src tests -b phpstan-baseline.neon + php vendor/bin/phpstan analyse -c phpstan.neon src tests -b phpstan-baseline.neon diff --git a/phpstan.neon b/phpstan.neon index a88579c4..4441aa97 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -7,6 +7,7 @@ includes: - phpstan-baseline.neon parameters: + level: 8 reportUnmatchedIgnoredErrors: false resultCachePath: tmp/resultCache.php