diff --git a/ChangeLog-12.3.md b/ChangeLog-12.3.md index b24c5de55..8a7423e69 100644 --- a/ChangeLog-12.3.md +++ b/ChangeLog-12.3.md @@ -2,6 +2,12 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [12.3.7] - 2025-09-10 + +### Changed + +* Do not use `__sleep()` method (which will be deprecated in PHP 8.5) + ## [12.3.6] - 2025-09-02 ### Fixed @@ -50,6 +56,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.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 [12.3.4]: https://github.com/sebastianbergmann/php-code-coverage/compare/12.3.3...12.3.4 diff --git a/src/CodeCoverage.php b/src/CodeCoverage.php index 6976d7b80..ab9936ce7 100644 --- a/src/CodeCoverage.php +++ b/src/CodeCoverage.php @@ -77,24 +77,23 @@ public function __construct(Driver $driver, Filter $filter) $this->data = new ProcessedCodeCoverageData; } - /** - * @return non-empty-list - */ - public function __sleep(): array + public function __serialize(): array { + $prefix = "\x00" . self::class . "\x00"; + return [ // Configuration - 'cacheDirectory', - 'checkForUnintentionallyCoveredCode', - 'includeUncoveredFiles', - 'ignoreDeprecatedCode', - 'parentClassesExcludedFromUnintentionallyCoveredCodeCheck', - 'useAnnotationsForIgnoringCode', - 'filter', + $prefix . 'cacheDirectory' => $this->cacheDirectory, + $prefix . 'checkForUnintentionallyCoveredCode' => $this->checkForUnintentionallyCoveredCode, + $prefix . 'includeUncoveredFiles' => $this->includeUncoveredFiles, + $prefix . 'ignoreDeprecatedCode' => $this->ignoreDeprecatedCode, + $prefix . 'parentClassesExcludedFromUnintentionallyCoveredCodeCheck' => $this->parentClassesExcludedFromUnintentionallyCoveredCodeCheck, + $prefix . 'useAnnotationsForIgnoringCode' => $this->useAnnotationsForIgnoringCode, + $prefix . 'filter' => $this->filter, // Data - 'data', - 'tests', + $prefix . 'data' => $this->data, + $prefix . 'tests' => $this->tests, ]; } diff --git a/src/Version.php b/src/Version.php index df26baa9e..8562c54cf 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.6', dirname(__DIR__)))->asString(); + self::$version = (new VersionId('12.3.7', dirname(__DIR__)))->asString(); } return self::$version;