From f57a7778c5b9ecb6dd5bad694d08a4eb3ecacf5a Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Wed, 17 Sep 2025 13:30:00 +0200 Subject: [PATCH 1/2] Closes #1094 --- ChangeLog-12.3.md | 3 +++ src/Report/Html/Facade.php | 13 +++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog-12.3.md b/ChangeLog-12.3.md index 55c140d85..cead127ea 100644 --- a/ChangeLog-12.3.md +++ b/ChangeLog-12.3.md @@ -4,7 +4,10 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt ## [12.3.8] - 2025-MM-DD +### Fixed + * [#1092](https://github.com/sebastianbergmann/php-code-coverage/issues/1092): Error in `DOMDocument::saveXML()` is not handled +* [#1094](https://github.com/sebastianbergmann/php-code-coverage/issues/1094): No branch and path coverage in HTML report ## [12.3.7] - 2025-09-10 diff --git a/src/Report/Html/Facade.php b/src/Report/Html/Facade.php index 0e8b230aa..44c63c923 100644 --- a/src/Report/Html/Facade.php +++ b/src/Report/Html/Facade.php @@ -41,16 +41,17 @@ public function __construct(string $generator = '', ?Colors $colors = null, ?Thr public function process(CodeCoverage $coverage, string $target): void { - $target = $this->directory($target); - $report = $coverage->getReport(); - $date = date('D M j G:i:s T Y'); + $target = $this->directory($target); + $report = $coverage->getReport(); + $date = date('D M j G:i:s T Y'); + $hasBranchCoverage = $coverage->getData(true)->functionCoverage() !== []; $dashboard = new Dashboard( $this->templatePath, $this->generator, $date, $this->thresholds, - $coverage->collectsBranchAndPathCoverage(), + $hasBranchCoverage, ); $directory = new Directory( @@ -58,7 +59,7 @@ public function process(CodeCoverage $coverage, string $target): void $this->generator, $date, $this->thresholds, - $coverage->collectsBranchAndPathCoverage(), + $hasBranchCoverage, ); $file = new File( @@ -66,7 +67,7 @@ public function process(CodeCoverage $coverage, string $target): void $this->generator, $date, $this->thresholds, - $coverage->collectsBranchAndPathCoverage(), + $hasBranchCoverage, ); $directory->render($report, $target . 'index.html'); From 99e692c6a84708211f7536ba322bbbaef57ac7fc Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Wed, 17 Sep 2025 13:31:43 +0200 Subject: [PATCH 2/2] Prepare release --- ChangeLog-12.3.md | 4 ++-- src/Version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ChangeLog-12.3.md b/ChangeLog-12.3.md index cead127ea..9375e8b23 100644 --- a/ChangeLog-12.3.md +++ b/ChangeLog-12.3.md @@ -2,7 +2,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. -## [12.3.8] - 2025-MM-DD +## [12.3.8] - 2025-09-17 ### Fixed @@ -63,7 +63,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * [#1080](https://github.com/sebastianbergmann/php-code-coverage/pull/1080): Support for reporting code coverage information in OpenClover XML format; unlike the existing Clover XML reporter, which remains unchanged, the XML documents generated by this new reporter validate against the OpenClover project's XML schema definition, with one exception: we do not generate the `` element. This feature is experimental and the generated XML might change in order to improve compliance with the OpenClover project's XML schema definition further. Such changes will be made in bugfix and/or minor releases even if they break backward compatibility. -[12.3.8]: https://github.com/sebastianbergmann/php-code-coverage/compare/12.3.7...main +[12.3.8]: https://github.com/sebastianbergmann/php-code-coverage/compare/12.3.7...12.3.8 [12.3.7]: https://github.com/sebastianbergmann/php-code-coverage/compare/12.3.6...12.3.7 [12.3.6]: https://github.com/sebastianbergmann/php-code-coverage/compare/12.3.5...12.3.6 [12.3.5]: https://github.com/sebastianbergmann/php-code-coverage/compare/12.3.4...12.3.5 diff --git a/src/Version.php b/src/Version.php index 8562c54cf..8edfe98b0 100644 --- a/src/Version.php +++ b/src/Version.php @@ -19,7 +19,7 @@ final class Version public static function id(): string { if (self::$version === '') { - self::$version = (new VersionId('12.3.7', dirname(__DIR__)))->asString(); + self::$version = (new VersionId('12.3.8', dirname(__DIR__)))->asString(); } return self::$version;