Include driver code in code coverage to enable proper self-test #745
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello @sebastianbergmann
Please see attached a PR to remove
@codeCoverageIgnore
declarations from the driver classes.Rationale for the change is this:
git blame
reveals the code has been in the code base since v2 (see 577fdf3 and 121d8c7), which combined with the fact I cannot reproduce the behaviour strongly suggests to me that it was to workaround an issue in an ancient version of Xdebug that has long since been fixedThe drivers have been excluded for a very long time, the commit that originally introduced the exclusion for the whole Xdebug driver didn't include any rationale, it simply says "Simplify" (see 9db2cc4). Since then, drivers for phpdbg and pcov have been added but I can't find any reason for the exclusions there other than cargo-culting/copy-pasting.
I can't think of a reason why they should not be included, are you able to remember that far back and why you might have initially excluded them? The phpdbg driver in particular does a lot of post-processing on the data before handing it off and it would be good to have that show up in reports as something that doesn't have tests.