New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use "mixed" as class name #1149
Comments
Attempting to declare a class with name do you have a test, that attempts to mock a class with the name |
Hi, The issue is apparently caused by having methods with a return type of interface MyInterface {
public function getSomething(): mixed;
}
$object = Mockery::mock(MyInterface::class);
$object->shouldReceive('getSomething->someMethod')->andReturn("someValue"); Seems like Mockery should know that |
I have a reproducible example in #1155, which is the same type of bug with the |
Hey @lindelius and @ramsey, your respective issues have been resolved via #1156 and #1157 (awaiting code review cc: @davedevelopment @padraic). |
We're getting the following error when running our PHPUnit suite:
PHP version: 8.0.8
Mockery version: 1.4.4
PHPUnit version: 9.5.10
The contents of the generated file:
The text was updated successfully, but these errors were encountered: