Skip to content

docs(phpunit): coverage driver choice + branch coverage tradeoff#71

Merged
CybotTM merged 3 commits into
mainfrom
docs/coverage-driver-tradeoff
Jul 15, 2026
Merged

docs(phpunit): coverage driver choice + branch coverage tradeoff#71
CybotTM merged 3 commits into
mainfrom
docs/coverage-driver-tradeoff

Conversation

@CybotTM

@CybotTM CybotTM commented Jul 15, 2026

Copy link
Copy Markdown
Member

Adds a coverage section to phpunit-modernization.md: pcov (line-only, fast) vs xdebug (line+branch+path); how to enable branch coverage (branchCoverage=true + --coverage-cobertura, xdebug-only); the schema validity (some AI review bots wrongly flag branchCoverage as unsupported); and the ~6× cost → run off the gating path + raise timeouts.

From a real session: pcov-vs-xdebug came up choosing a CI coverage strategy, and enabling branch coverage on a full unit suite exceeded a 10-min job timeout.

pcov is line-only (fast because it does less); xdebug does line+branch+path but
branch coverage is ~6x slower. Document the tradeoff, how to enable branch
coverage (branchCoverage=true + --coverage-cobertura, needs xdebug), the schema
validity (AI bots wrongly flag it), and the cost mitigation (run off the gating
path, raise timeouts).

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Copilot AI review requested due to automatic review settings July 15, 2026 12:18
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions github-actions Bot added documentation Improvements or additions to documentation skill labels Jul 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a new section to the PHPUnit modernization reference guide discussing code coverage driver choices (pcov vs. xdebug) and branch coverage. The reviewer correctly identified that the XML attribute 'branchCoverage' is invalid in PHPUnit schemas and should be updated to 'pathCoverage="true"' to prevent validation errors.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread skills/php-modernization/references/phpunit-modernization.md Outdated
github-actions[bot]
github-actions Bot previously approved these changes Jul 15, 2026
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
@sonarqubecloud

Copy link
Copy Markdown

@CybotTM
CybotTM merged commit f48e54a into main Jul 15, 2026
20 checks passed
@CybotTM
CybotTM deleted the docs/coverage-driver-tradeoff branch July 15, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants