Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ChangeLog-12.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 `<testproject>` 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
Expand Down
25 changes: 12 additions & 13 deletions src/CodeCoverage.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,23 @@ public function __construct(Driver $driver, Filter $filter)
$this->data = new ProcessedCodeCoverageData;
}

/**
* @return non-empty-list<non-empty-string>
*/
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,
];
}

Expand Down
2 changes: 1 addition & 1 deletion src/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading