View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002420 | Xdebug | Code Coverage | public | 2026-04-29 09:43 | 2026-04-29 09:43 |
| Reporter | sebastian | Assigned To | |||
| Priority | normal | Severity | feature | Reproducibility | always |
| Status | new | Resolution | open | ||
| Product Version | 3.5.1 | ||||
| Summary | 0002420: Introduce separate flags for branch coverage and path coverage collection | ||||
| Description | Currently, Xdebug provides a single flag, XDEBUG_CC_BRANCH_CHECK, which activates both branch coverage and path coverage collection simultaneously. I'd like to propose splitting this into two independent flags so that branch coverage and path coverage can be activated separately. The current design only supports two scenarios:
There is no way to enable branch coverage without also enabling path coverage. My assumption is that collecting branch coverage information alone is less resource-intensive than collecting both branch coverage and path coverage. Users who only need branch coverage currently have to pay the additional cost of path coverage collection, even if they do not make use of that data. Splitting the flag would enable three scenarios:
And technically also "line coverage + path coverage", but I do not see how this would be useful in practice. I would like to propose two new flags:
I am not sure whether or not XDEBUG_CC_PATH_COVERAGE should also activate branch coverage. In a perfect world, the existing XDEBUG_CC_BRANCH_CHECK flag would be redefined to mean "activate branch coverage only". However, this would be a backward-compatibility break for existing users who rely on its current behaviour of also activating path coverage. To avoid that, I propose the deprecation of XDEBUG_CC_BRANCH_CHECK and the granular / separate flags shown above. | ||||
| Tags | No tags attached. | ||||
| Operating System | |||||
| PHP Version | 8.5.0-8.5.4 | ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-04-29 09:43 | sebastian | New Issue |