diff --git a/ChangeLog-10.0.md b/ChangeLog-10.0.md index ddc60059006..cb286c90233 100644 --- a/ChangeLog-10.0.md +++ b/ChangeLog-10.0.md @@ -2,6 +2,12 @@ All notable changes of the PHPUnit 10.0 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. +## [10.0.4] - 2023-MM-DD + +### Fixed + +* [#5171](https://github.com/sebastianbergmann/phpunit/issues/5171): `@backupStaticProperties` and `@backupStaticAttributes` trigger an error + ## [10.0.3] - 2023-02-04 ### Added @@ -151,6 +157,7 @@ All notable changes of the PHPUnit 10.0 release series are documented in this fi * The CLI test runner can no longer be extended through inheritance, the `PHPUnit\TextUI\Command` class has been removed * PHP 7.3, PHP 7.4, and PHP 8.0 are no longer supported +[10.0.4]: https://github.com/sebastianbergmann/phpunit/compare/10.0.3...10.0 [10.0.3]: https://github.com/sebastianbergmann/phpunit/compare/10.0.2...10.0.3 [10.0.2]: https://github.com/sebastianbergmann/phpunit/compare/10.0.1...10.0.2 [10.0.1]: https://github.com/sebastianbergmann/phpunit/compare/10.0.0...10.0.1 diff --git a/src/Framework/TestBuilder.php b/src/Framework/TestBuilder.php index 551e26e944b..a0711e7d89e 100644 --- a/src/Framework/TestBuilder.php +++ b/src/Framework/TestBuilder.php @@ -184,7 +184,7 @@ private function backupSettings(string $className, string $methodName): array $backupStaticProperties = true; } } elseif ($metadataForClass->isBackupStaticProperties()->isNotEmpty()) { - $metadata = $metadataForMethod->isBackupStaticProperties()->asArray()[0]; + $metadata = $metadataForClass->isBackupStaticProperties()->asArray()[0]; assert($metadata instanceof BackupStaticProperties);