Skip to content

Commit

Permalink
Closes #5612
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Dec 27, 2023
1 parent fecca89 commit d6e3b1f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions ChangeLog-10.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes of the PHPUnit 10.5 release series are documented in this fi

* [#5592](https://github.com/sebastianbergmann/phpunit/issues/5592): Error Handler prevents `error_get_last()` usage in tests
* [#5592](https://github.com/sebastianbergmann/phpunit/issues/5592): `E_USER_ERROR` does not abort test execution
* [#5612](https://github.com/sebastianbergmann/phpunit/issues/5612): Empty `<coverage>` element in XML configuration after migrating configuration
* [#5616](https://github.com/sebastianbergmann/phpunit/issues/5616): Values from data provider are not shown for failed test
* [#5621](https://github.com/sebastianbergmann/phpunit/issues/5621): Name of data set is missing from TeamCity output

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,11 @@ public function migrate(DOMDocument $document): void
$source->appendChild($node);
}
}

if ($coverage->childElementCount !== 0) {
return;
}

$coverage->parentNode->removeChild($coverage);

Check failure on line 58 in src/TextUI/Configuration/Xml/Migration/Migrations/MoveCoverageDirectoriesToSource.php

View workflow job for this annotation

GitHub Actions / Type Checker

PossiblyNullReference

src/TextUI/Configuration/Xml/Migration/Migrations/MoveCoverageDirectoriesToSource.php:58:32: PossiblyNullReference: Cannot call method removeChild on possibly null value (see https://psalm.dev/083)
}
}
2 changes: 0 additions & 2 deletions tests/_files/XmlConfigurationMigration/output-9.5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
cacheDirectory=".phpunit.cache"
requireCoverageMetadata="true">

<coverage/>

<logging/>

<source>
Expand Down

0 comments on commit d6e3b1f

Please sign in to comment.