Drop DOM dependency in XML Report#1125
Drop DOM dependency in XML Report#1125sebastianbergmann merged 1 commit intosebastianbergmann:mainfrom
Conversation
|
double check against phpstan-src@05b80ef861 on my macos m4 pro laptop before this PR (using PHPUnit 12.4.4) after this PR |
c9a346b to
b5a8841
Compare
|
Does Infection need the Of course, we would need to expose this as a configuration option. This is just an idea so far. |
great idea. I did some testing and it seems the I also did some perf testing on phpstan-src and I can see a ~15% perf improvement when I think we should tackle this in a separate PR though for this PR here to continue we need a release of the xml-tokenizer including theseer/tokenizer#38 though |
Of course. c1888bb will be released in time for PHPUnit 12.5 which uses this for sebastianbergmann/phpunit@023845a. |
|
progress on this PR is blocked on a new theseer/tokenizer release, which is blocked on a new phpunit 10.x release with fixed prefixing |
PHPUnit 10.5.60 has been released. |
|
thank you! |
49fd2ac to
ae31bc1
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1125 +/- ##
============================================
- Coverage 88.70% 88.42% -0.29%
+ Complexity 1391 1390 -1
============================================
Files 105 105
Lines 4782 4700 -82
============================================
- Hits 4242 4156 -86
- Misses 540 544 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
to speedup xml report generation
|
running xml-report generation on the sebastianbergmann/php-code-coverage codebase: before this PR: after this PR: note + Generating code coverage report in PHPUnit XML format ... done [00:00.209]
- Generating code coverage report in PHPUnit XML format ... done [00:00.295] |
| </line> | ||
| </coverage> | ||
| <source> | ||
| <source xmlns="https://schema.phpunit.de/coverage/1.0"> |
There was a problem hiding this comment.
I think its not a change from a semantic point of view.
before this PR we imported one document into another which lead to the involved php extensions normalizing this namespace away. technically it is not necessary because its the same namespace as in the root phpunit element, but as this normalization no longer happens this xmlns="https://schema.phpunit.de/coverage/1.0" is showing up now.
| <token name="T_WHITESPACE"> </token> | ||
| <token name="T_OPEN_BRACKET">(</token> | ||
| <token name="T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG">&</token> | ||
| <token name="T_AMPERSAND">&</token> |
There was a problem hiding this comment.
I am not sure why this change happens though
There was a problem hiding this comment.
diving into it more.. T_AMPERSAND was a token type in PHP4.x and it only existed in theseer/tokenizer, because it was hard-coded in https://github.com/theseer/tokenizer/blob/d1dd771235a40694cb5cb7239e531cf9b9702682/src/Tokenizer.php#L35
since PHP5+ the builtin token names are
T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG
and/or T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG
There was a problem hiding this comment.
opened a upstream discussion: theseer/tokenizer#44
requires theseer/tokenizer#38
before this PR (using PHPUnit 12.4.4)
after this PR:
env