-
Notifications
You must be signed in to change notification settings - Fork 30
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
Use generics #165
Use generics #165
Conversation
@localheinz WDYT? You're welcome to take this and put it forward. |
As you have seen in my attempt to make use of genetics in #155, I have no idea how to sort this out. I’ll happily take a look, though, when you have. |
@localheinz I've looked now at yours PR, and we have many parts in common. I didn't split the stub per-class, I'll try that because I have some autoload errors right now, it might help. @ondrejmirtes I've (partially) followed your suggestions, and I've restored a big part of the previous codebase, except from Almost all seems fixed, the only thing that I need to fix now is the return type inferred on |
Dump what's going into the |
Thanks @ondrejmirtes, that led me in the right direction! CI was crapping out on 7.4 + |
Can you take a look and let me know if this makes sense, please? |
Thank you, @Jean85 and @ondrejmirtes! |
This is a first stab at fixing #121Fixes #121
It tries to leverage the new generics support from PHPStan to obtain a cleaner way to detect Prophecy's mocks, and allow the
ObjectProphecy<OriginalClass>
PHPDoc notation.This is still WIP: I've tried to follow @ondrejmirtes suggestiong from #121 (comment), but I don't know how to proceed to make PHPStan recognize the calls of the original class on theObjectPropecy
.All green, ready for you to review @localheinz!