Skip to content

Commit 486c954

Browse files
Merge branch '8.5' into 9.6
2 parents dcf66f4 + 6ca7646 commit 486c954

File tree

4 files changed

+12
-47
lines changed

4 files changed

+12
-47
lines changed

ChangeLog-9.6.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes of the PHPUnit 9.6 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
44

5+
## [9.6.26] - 2025-MM-DD
6+
7+
### Changed
8+
9+
* Implement `__serialize()` in addition to `__sleep()` (which will be deprecated in PHP 8.5)
10+
511
## [9.6.25] - 2025-08-20
612

713
### Changed
@@ -182,7 +188,7 @@ All notable changes of the PHPUnit 9.6 release series are documented in this fil
182188
* [#5064](https://github.com/sebastianbergmann/phpunit/issues/5064): Deprecate `PHPUnit\Framework\TestCase::getMockClass()`
183189
* [#5132](https://github.com/sebastianbergmann/phpunit/issues/5132): Deprecate `Test` suffix for abstract test case classes
184190

185-
[9.6.25]: https://github.com/sebastianbergmann/phpunit/compare/9.6.24...9.6.25
191+
[9.6.25]: https://github.com/sebastianbergmann/phpunit/compare/9.6.25...9.6
186192
[9.6.24]: https://github.com/sebastianbergmann/phpunit/compare/9.6.23...9.6.24
187193
[9.6.23]: https://github.com/sebastianbergmann/phpunit/compare/9.6.22...9.6.23
188194
[9.6.22]: https://github.com/sebastianbergmann/phpunit/compare/9.6.21...9.6.22

src/Framework/Exception/Exception.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ public function __sleep(): array
7171
return array_keys(get_object_vars($this));
7272
}
7373

74+
public function __serialize(): array
75+
{
76+
return get_object_vars($this);
77+
}
78+
7479
/**
7580
* Returns the serializable trace (without 'args').
7681
*/

tests/_files/SingletonClass.php

Lines changed: 0 additions & 38 deletions
This file was deleted.

tests/unit/Framework/MockObject/GeneratorTest.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
use PHPUnit\TestFixture\InterfaceWithSemiReservedMethodName;
2828
use PHPUnit\TestFixture\MockObject\AbstractMockTestClass;
2929
use PHPUnit\TestFixture\MockObject\ReadonlyClass;
30-
use PHPUnit\TestFixture\SingletonClass;
3130
use stdClass;
3231
use Throwable;
3332

@@ -213,13 +212,6 @@ public function testGetMockClassMethodsForNonExistantClass(): void
213212
$mock = $this->generator->mockClassMethods('Tux', true, true);
214213
}
215214

216-
public function testGetMockForSingletonWithReflectionSuccess(): void
217-
{
218-
$mock = $this->generator->getMock(SingletonClass::class, ['doSomething'], [], '', false);
219-
220-
$this->assertInstanceOf(SingletonClass::class, $mock);
221-
}
222-
223215
public function testExceptionIsRaisedForMutuallyExclusiveOptions(): void
224216
{
225217
$this->expectException(OriginalConstructorInvocationRequiredException::class);

0 commit comments

Comments
 (0)