-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Relation generics and PHPStan lvl 9 #101
Conversation
Awesome, thanks! |
@SanderMuller FYI: PHPStan released Not sure if that's a bug or PHPStan just hadn't been able to properly analyze the Eloquent and Query Builder construct until now. I fixed it with a |
Weird |
Yeah... My best guess would be that it's related to one of the commits about mixins. |
I'm actually getting the same PHPStan errors on my other projects. This seems to be the related issue phpstan/phpstan#11624 and larastan/larastan#2032, mixins are indeed mentioned there |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like I was a little late to catch this before it was merged, but here's some suggested improvements
Similar to the work on https://github.com/staudenmeir/laravel-adjacency-lis I've introduced generic support for the
BelongsToThrough
relation, and increasing PHPStan to the max level was quite easy!