From 203050257f22754b0eb8def9923eeb25c171e495 Mon Sep 17 00:00:00 2001 From: mscherer Date: Wed, 26 Nov 2025 21:20:59 +0100 Subject: [PATCH] Disable code coverage to fix php-parser conflict with rector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rector/rector bundles its own nikic/php-parser, and when PHPUnit runs with code coverage enabled, php-code-coverage also loads php-parser. This causes a class declaration collision: Cannot declare class PhpParser\Node\Scalar\InterpolatedString, because the name is already in use This is a known rector issue with no clean fix: https://github.com/rectorphp/rector/discussions/6958 Since this is a rector extension tool, code coverage isn't critical. Disabling it avoids the autoloader conflict entirely. Fixes CI failure: https://github.com/cakephp/upgrade/actions/runs/19643729518 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/ci.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5242bf3..61d8730 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: with: php-version: ${{ matrix.php-version }} extensions: mbstring, intl - coverage: pcov + coverage: none - name: Get composer cache directory id: composer-cache @@ -62,16 +62,7 @@ jobs: run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - name: Run PHPUnit - run: | - if [[ ${{ matrix.php-version }} == '8.1' ]]; then - export CODECOVERAGE=1 && vendor/bin/phpunit --display-incomplete --display-skipped --coverage-clover=coverage.xml - else - vendor/bin/phpunit - fi - - - name: Submit code coverage - if: matrix.php-version == '8.1' - uses: codecov/codecov-action@v5 + run: vendor/bin/phpunit --display-incomplete --display-skipped cs-stan: name: Coding Standard & Static Analysis