Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw an exception if code coverage fails to write to disk #700

Closed
wants to merge 1 commit into from

Conversation

duncan3dc
Copy link
Contributor

I'm experiencing the same issue as #692 (seems to the \SoapClient causing some issues).

I traced the error to this \DomDocument#save() call.

This PR adds error checking to that call, so that at least the issue is reported.

Before:

PHPUnit 8.3.5 by Sebastian Bergmann and contributors.
.                                                                   1 / 1 (100%)
Time: 46 ms, Memory: 6.00 MB
OK (1 test, 1 assertion)

Generating code coverage report in PHPUnit XML format ... done [8 ms]

After:

PHPUnit 8.3.5 by Sebastian Bergmann and contributors.
.                                                                   1 / 1 (100%)
Time: 44 ms, Memory: 6.00 MB
OK (1 test, 1 assertion)

Generating code coverage report in PHPUnit XML format ... Unable to save the XML
flush error

@codecov
Copy link

codecov bot commented Sep 19, 2019

Codecov Report

Merging #700 into 8.0 will increase coverage by 1.55%.
The diff coverage is 60.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##                8.0     #700      +/-   ##
============================================
+ Coverage     82.29%   83.84%   +1.55%     
- Complexity      832      856      +24     
============================================
  Files            37       39       +2     
  Lines          2496     2538      +42     
============================================
+ Hits           2054     2128      +74     
+ Misses          442      410      -32     
Impacted Files Coverage Δ Complexity Δ
src/Report/Xml/Facade.php 91.85% <60.00%> (-2.60%) 31.00 <0.00> (+2.00) ⬇️
src/CodeCoverage.php 68.42% <0.00%> (-3.75%) 161.00% <0.00%> (-20.00%)
src/Node/Builder.php 97.14% <0.00%> (-0.08%) 24.00% <0.00%> (ø%)
.../Exception/UnintentionallyCoveredCodeException.php 100.00% <0.00%> (ø) 4.00% <0.00%> (ø%)
src/Driver/PHPDBG.php
src/Driver/PCOV.php
src/Driver/Xdebug.php
src/ProcessedCodeCoverageData.php 100.00% <0.00%> (ø) 27.00% <0.00%> (?%)
src/RawCodeCoverageData.php 100.00% <0.00%> (ø) 9.00% <0.00%> (?%)
src/Driver/PcovDriver.php 55.55% <0.00%> (ø) 3.00% <0.00%> (?%)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca6647f...58af0ef. Read the comment docs.

@sebastianbergmann
Copy link
Owner

This pull request has conflicts that must be resolved. Please update your pull request and base it on the 8.0 branch. Thanks!

@duncan3dc duncan3dc changed the base branch from master to 8.0 May 23, 2020 14:45
@sebastianbergmann
Copy link
Owner

Merged manually, thanks.

@duncan3dc duncan3dc deleted the xml-save-error branch July 31, 2020 13:08
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.

2 participants