Skip to content

Commit 23a9e6a

Browse files
Closes #5593
1 parent 80cab18 commit 23a9e6a

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.psalm/baseline.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@
378378
<code><![CDATA[(new ReflectionClass($stubClassName))->newInstanceWithoutConstructor()]]></code>
379379
</LessSpecificReturnStatement>
380380
<MoreSpecificReturnType>
381-
<code>MockObject</code>
381+
<code>Stub</code>
382382
</MoreSpecificReturnType>
383383
</file>
384384
<file src="src/Framework/MockObject/Runtime/Rule/Parameters.php">

ChangeLog-10.5.md

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

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

5+
## [10.5.1] - 2023-MM-DD
6+
7+
### Fixed
8+
9+
* [#5593](https://github.com/sebastianbergmann/phpunit/issues/5593): Return Value Generator fails to correctly create test stub for method with `static` return type declaration when used recursively
10+
511
## [10.5.0] - 2023-12-01
612

713
### Added
@@ -18,4 +24,5 @@ All notable changes of the PHPUnit 10.5 release series are documented in this fi
1824

1925
* [#5563](https://github.com/sebastianbergmann/phpunit/issues/5563): `createMockForIntersectionOfInterfaces()` does not automatically register mock object for expectation verification
2026

27+
[10.5.1]: https://github.com/sebastianbergmann/phpunit/compare/10.5.0...10.5
2128
[10.5.0]: https://github.com/sebastianbergmann/phpunit/compare/10.4.2...10.5.0

src/Framework/MockObject/Runtime/ReturnValueGenerator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ private function onlyInterfaces(array $types): bool
178178
*
179179
* @throws RuntimeException
180180
*/
181-
private function newInstanceOf(string $stubClassName, string $className, string $methodName): MockObject
181+
private function newInstanceOf(string $stubClassName, string $className, string $methodName): Stub
182182
{
183183
try {
184184
return (new ReflectionClass($stubClassName))->newInstanceWithoutConstructor();

0 commit comments

Comments
 (0)