Skip to content

Commit 2030502

Browse files
dereuromarkclaude
andcommitted
Disable code coverage to fix php-parser conflict with rector
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: rectorphp/rector#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 <noreply@anthropic.com>
1 parent 63199da commit 2030502

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
with:
3232
php-version: ${{ matrix.php-version }}
3333
extensions: mbstring, intl
34-
coverage: pcov
34+
coverage: none
3535

3636
- name: Get composer cache directory
3737
id: composer-cache
@@ -62,16 +62,7 @@ jobs:
6262
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
6363

6464
- name: Run PHPUnit
65-
run: |
66-
if [[ ${{ matrix.php-version }} == '8.1' ]]; then
67-
export CODECOVERAGE=1 && vendor/bin/phpunit --display-incomplete --display-skipped --coverage-clover=coverage.xml
68-
else
69-
vendor/bin/phpunit
70-
fi
71-
72-
- name: Submit code coverage
73-
if: matrix.php-version == '8.1'
74-
uses: codecov/codecov-action@v5
65+
run: vendor/bin/phpunit --display-incomplete --display-skipped
7566

7667
cs-stan:
7768
name: Coding Standard & Static Analysis

0 commit comments

Comments
 (0)