Skip to content

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Nov 21, 2025

todo

  • test in phpunit/code-coverage
  • add unit test

With support to write into a consumer given XMLWriter tokinzer results can be consumed more efficiently, because there no longer is a DOM to XMLWriter conversion required.

@staabm staabm marked this pull request as ready for review November 22, 2025 08:48
@staabm
Copy link
Contributor Author

staabm commented Nov 25, 2025

this is good to go and a requirement for the php-code-coverage perf improvement in sebastianbergmann/php-code-coverage#1125

@staabm
Copy link
Contributor Author

staabm commented Nov 26, 2025

@theseer do you have a opinion on this one? :)

return $writer->outputMemory();
}

public function appendToWriter(XMLWriter $writer, TokenCollection $tokens): void {
Copy link
Contributor Author

@staabm staabm Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extracted the inner parts of toXML into a new separate method.

toXML itself did not change from a caller point of view

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