Skip to content

Commit

Permalink
Closes #5593
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Dec 1, 2023
1 parent 80cab18 commit 23a9e6a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .psalm/baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@
<code><![CDATA[(new ReflectionClass($stubClassName))->newInstanceWithoutConstructor()]]></code>
</LessSpecificReturnStatement>
<MoreSpecificReturnType>
<code>MockObject</code>
<code>Stub</code>
</MoreSpecificReturnType>
</file>
<file src="src/Framework/MockObject/Runtime/Rule/Parameters.php">
Expand Down
7 changes: 7 additions & 0 deletions ChangeLog-10.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

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

## [10.5.1] - 2023-MM-DD

### Fixed

* [#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.5.0] - 2023-12-01

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

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

[10.5.1]: https://github.com/sebastianbergmann/phpunit/compare/10.5.0...10.5
[10.5.0]: https://github.com/sebastianbergmann/phpunit/compare/10.4.2...10.5.0
2 changes: 1 addition & 1 deletion src/Framework/MockObject/Runtime/ReturnValueGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ private function onlyInterfaces(array $types): bool
*
* @throws RuntimeException
*/
private function newInstanceOf(string $stubClassName, string $className, string $methodName): MockObject
private function newInstanceOf(string $stubClassName, string $className, string $methodName): Stub
{
try {
return (new ReflectionClass($stubClassName))->newInstanceWithoutConstructor();
Expand Down

0 comments on commit 23a9e6a

Please sign in to comment.