Skip to content

Conversation

@jdreesen
Copy link
Contributor

Fixes the following error for dummies with fluent interface:

TypeError : Double\SomeClass\P12::someMethod(): Return value must be of type Double\SomeClass\P12, null returned

…types for dummies

Fixes:
> TypeError : Double\SomeClass\P12::someMethod(): Return value must be of type Double\SomeClass\P12, null returned
@stof
Copy link
Member

stof commented Aug 29, 2025

This should be implemented in the MethodProphecy when guessing the default return value (like for other types) instead of changing the generated code.

@jdreesen
Copy link
Contributor Author

I'll take a look at that. Thanks for the feedback.

@stof
Copy link
Member

stof commented Aug 29, 2025

apparently, you already has a look at it in #645

@jdreesen
Copy link
Contributor Author

But as far as I remember, the change in #645 was not enough to make it work 🤔

@jdreesen
Copy link
Contributor Author

I think the problem with #645 not being sufficient was that MethodProphecy is not used at all unless the method is explicitly specified. So you would have to explicitly list all fluent methods for it to work.

@stof
Copy link
Member

stof commented Sep 29, 2025

but then, wouldn't it be an issue for any return type, not just for self or static ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants