From a3ad9d110813b9052e968170d51018f7a3311445 Mon Sep 17 00:00:00 2001 From: Filippo Tessarotto <zoeslam@gmail.com> Date: Tue, 12 Sep 2023 15:45:26 +0200 Subject: [PATCH 1/3] CodeCoverage: process PHP report as first in list to avoid serializing cache data --- src/TextUI/TestRunner.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/TextUI/TestRunner.php b/src/TextUI/TestRunner.php index 4f9d280c9e7..a1d71300c99 100644 --- a/src/TextUI/TestRunner.php +++ b/src/TextUI/TestRunner.php @@ -660,6 +660,21 @@ public function run(TestSuite $suite, array $arguments = [], array $warnings = [ $this->printer->printResult($result); if (isset($codeCoverage)) { + if (isset($arguments['coveragePHP'])) { + $this->codeCoverageGenerationStart('PHP'); + + try { + $writer = new PhpReport; + $writer->process($codeCoverage, $arguments['coveragePHP']); + + $this->codeCoverageGenerationSucceeded(); + + unset($writer); + } catch (CodeCoverageException $e) { + $this->codeCoverageGenerationFailed($e); + } + } + if (isset($arguments['coverageClover'])) { $this->codeCoverageGenerationStart('Clover XML'); @@ -728,21 +743,6 @@ public function run(TestSuite $suite, array $arguments = [], array $warnings = [ } } - if (isset($arguments['coveragePHP'])) { - $this->codeCoverageGenerationStart('PHP'); - - try { - $writer = new PhpReport; - $writer->process($codeCoverage, $arguments['coveragePHP']); - - $this->codeCoverageGenerationSucceeded(); - - unset($writer); - } catch (CodeCoverageException $e) { - $this->codeCoverageGenerationFailed($e); - } - } - if (isset($arguments['coverageText'])) { if ($arguments['coverageText'] === 'php://stdout') { $outputStream = $this->printer; From 0f2594d677ce465cbb2677bc2f899ffa898f4ad4 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann <sb@sebastian-bergmann.de> Date: Tue, 12 Sep 2023 15:56:44 +0200 Subject: [PATCH 2/3] Update ChangeLog --- ChangeLog-9.6.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ChangeLog-9.6.md b/ChangeLog-9.6.md index fa17d8e2585..2f3dc8a89b3 100644 --- a/ChangeLog-9.6.md +++ b/ChangeLog-9.6.md @@ -2,6 +2,12 @@ All notable changes of the PHPUnit 9.6 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. +## [9.6.12] - 2023-MM-DD + +### Changed + +* [#5508](https://github.com/sebastianbergmann/phpunit/pull/5508): Generate code coverage report in PHP format as first in list to avoid serializing cache data + ## [9.6.11] - 2023-08-19 ### Added @@ -83,6 +89,7 @@ All notable changes of the PHPUnit 9.6 release series are documented in this fil * [#5064](https://github.com/sebastianbergmann/phpunit/issues/5064): Deprecate `PHPUnit\Framework\TestCase::getMockClass()` * [#5132](https://github.com/sebastianbergmann/phpunit/issues/5132): Deprecate `Test` suffix for abstract test case classes +[9.6.12]: https://github.com/sebastianbergmann/phpunit/compare/9.6.11...9.6 [9.6.11]: https://github.com/sebastianbergmann/phpunit/compare/9.6.10...9.6.11 [9.6.10]: https://github.com/sebastianbergmann/phpunit/compare/9.6.9...9.6.10 [9.6.9]: https://github.com/sebastianbergmann/phpunit/compare/9.6.8...9.6.9 From a122c2ebd469b751d774aa0f613dc0d67697653f Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann <sb@sebastian-bergmann.de> Date: Tue, 12 Sep 2023 16:39:31 +0200 Subject: [PATCH 3/3] Prepare release --- ChangeLog-9.6.md | 4 ++-- composer.json | 2 +- src/Runner/Version.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ChangeLog-9.6.md b/ChangeLog-9.6.md index 2f3dc8a89b3..bbe94625200 100644 --- a/ChangeLog-9.6.md +++ b/ChangeLog-9.6.md @@ -2,7 +2,7 @@ All notable changes of the PHPUnit 9.6 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. -## [9.6.12] - 2023-MM-DD +## [9.6.12] - 2023-09-12 ### Changed @@ -89,7 +89,7 @@ All notable changes of the PHPUnit 9.6 release series are documented in this fil * [#5064](https://github.com/sebastianbergmann/phpunit/issues/5064): Deprecate `PHPUnit\Framework\TestCase::getMockClass()` * [#5132](https://github.com/sebastianbergmann/phpunit/issues/5132): Deprecate `Test` suffix for abstract test case classes -[9.6.12]: https://github.com/sebastianbergmann/phpunit/compare/9.6.11...9.6 +[9.6.12]: https://github.com/sebastianbergmann/phpunit/compare/9.6.11...9.6.12 [9.6.11]: https://github.com/sebastianbergmann/phpunit/compare/9.6.10...9.6.11 [9.6.10]: https://github.com/sebastianbergmann/phpunit/compare/9.6.9...9.6.10 [9.6.9]: https://github.com/sebastianbergmann/phpunit/compare/9.6.8...9.6.9 diff --git a/composer.json b/composer.json index 28411d9b9b2..42e16c6f39f 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "myclabs/deep-copy": "^1.10.1", "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", - "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-code-coverage": "^9.2.28", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", diff --git a/src/Runner/Version.php b/src/Runner/Version.php index 788c6f0b9d2..d2c68bc3ca6 100644 --- a/src/Runner/Version.php +++ b/src/Runner/Version.php @@ -41,7 +41,7 @@ public static function id(): string } if (self::$version === '') { - self::$version = (new VersionId('9.6.11', dirname(__DIR__, 2)))->getVersion(); + self::$version = (new VersionId('9.6.12', dirname(__DIR__, 2)))->getVersion(); } return self::$version;