Skip to content

fix(tia): suppress PHPUnit XML coverage during recording - #1845

Open
calebdw wants to merge 1 commit into
pestphp:5.xfrom
calebdw:calebdw/push-pkmorwmqossv
Open

fix(tia): suppress PHPUnit XML coverage during recording#1845
calebdw wants to merge 1 commit into
pestphp:5.xfrom
calebdw:calebdw/push-pkmorwmqossv

Conversation

@calebdw

@calebdw calebdw commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What:

  • Bug Fix
  • New Feature

Description:

When phpunit.xml has <coverage> and <source> sections, PHPUnit auto-initializes its code coverage driver which takes over xdebug's coverage APIs. TIA's recorder then gets empty data from xdebug_get_code_coverage(), resulting in zero recorded edges and no graph being saved.

When phpunit.xml has <coverage> and <source> sections, PHPUnit
auto-initializes its code coverage driver which takes over
xdebug's coverage APIs. TIA's recorder then gets empty data
from xdebug_get_code_coverage(), resulting in zero recorded
edges and no graph being saved.

Inject --no-coverage into the arguments when TIA enters its
own recording mode (not piggybacking on an explicit coverage
report). This tells PHPUnit to ignore XML-configured coverage
reports, leaving xdebug free for TIA's per-test recording.

Having <coverage> and <source> in phpunit.xml is standard for
any project that generates coverage reports. Without this fix,
users must manually pass --no-coverage alongside --tia, which
is an unnecessary footgun.
@calebdw
calebdw force-pushed the calebdw/push-pkmorwmqossv branch from c9c8071 to 5b38596 Compare August 17, 2026 20:36
@calebdw

calebdw commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

@nunomaduro, recording tia in ci is broken for every project that has <coverage> its own coverage section in phpunit.xml unless they manually pass --no-coverage to the pest command which is counter intuitive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant