docs(phpunit): coverage driver choice + branch coverage tradeoff#71
Conversation
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>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
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.
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
|



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 flagbranchCoverageas 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.