diff --git a/ChangeLog-9.4.md b/ChangeLog-9.4.md index 7c9a5d01c44..97ed49423d4 100644 --- a/ChangeLog-9.4.md +++ b/ChangeLog-9.4.md @@ -2,6 +2,12 @@ All notable changes of the PHPUnit 9.4 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. +## [9.4.2] - 2020-MM-DD + +### Changed + +* `PHPUnit\Framework\Assert::assertObjectEquals()` is now `static` + ## [9.4.1] - 2020-10-11 ### Fixed @@ -20,5 +26,6 @@ All notable changes of the PHPUnit 9.4 release series are documented in this fil * The PHPUnit XML configuration generator (that is invoked using the `--generate-configuration` CLI option) now asks for a cache directory (default: `.phpunit.cache`) +[9.4.2]: https://github.com/sebastianbergmann/phpunit/compare/9.4.1...9.4 [9.4.1]: https://github.com/sebastianbergmann/phpunit/compare/9.4.0...9.4.1 [9.4.0]: https://github.com/sebastianbergmann/phpunit/compare/9.3.11...9.4.0 diff --git a/src/Framework/Assert.php b/src/Framework/Assert.php index b49553f95b8..2e78802964e 100644 --- a/src/Framework/Assert.php +++ b/src/Framework/Assert.php @@ -429,6 +429,18 @@ public static function assertNotEqualsWithDelta($expected, $actual, float $delta static::assertThat($actual, $constraint, $message); } + /** + * @throws ExpectationFailedException + */ + public static function assertObjectEquals(object $expected, object $actual, string $method = 'equals', string $message = ''): void + { + static::assertThat( + $actual, + static::objectEquals($expected, $method), + $message + ); + } + /** * Asserts that a variable is empty. * @@ -2783,18 +2795,6 @@ public static function resetCount(): void self::$count = 0; } - /** - * @throws ExpectationFailedException - */ - public function assertObjectEquals(object $expected, object $actual, string $method = 'equals', string $message = ''): void - { - static::assertThat( - $actual, - static::objectEquals($expected, $method), - $message - ); - } - private static function detectLocationHint(string $message): ?array { $hint = null;