-
-
Notifications
You must be signed in to change notification settings - Fork 947
Class with generic mixin gives unexpected results #8008
Copy link
Copy link
Closed
Description
Bug report
I'm trying to implement the types for Pagination in Laravel, but I'm running into some issues with mixins.
It seems that types aren't resolved when a concrete class with a generic has a mixin and passes the generic through.
I've attached an example on phpstan.org that explains the situation.
Not sure if this is a bug or a feature request. Would be happy to try and solve this issue with some directions though!
Code snippet that reproduces the problem
https://phpstan.org/r/6bc14eb5-a2ad-46be-923e-c33c7441317a
Expected output
Expected type array<MyObject>, actual: array<TValue of object (class Paginator, parameter)>
Reactions are currently unavailable