Caleb White
Caleb White
I'll take a look. Is that the only relation or does it do that for all relation types?
The recursive generics would've been prevented by #1990 You can test with my fork: https://github.com/calebdw/larastan
The error is correct, this should be: ```php /** @return Relations\BelongsToMany */ ```
This should be: ```php /** @return Builder */ ```
> but that actually does something else. I don't want static::query(). No it doesn't---if you really want `self` then you need to make the model final. Calling `self::query()` actually does...
> But then Phpstan should complain about the unsafe new static() calls, right? It would if you were analyzing the framework---but you're not. Calling `static::query()` is not going to generate...
> How can you have a stan validated project built on top of a non-validated framework? That happens all the time, which is why you don't analyze the `vendor` directory
> Good to hear. It doesn't work correctly for self:: case, I'll look at that later. It doesn't need to, as I mention earlier `self::query()`, `self::create()`, etc. should return `static`...
All of the relation generics are going to need to be updated: 
> What would be the best way in dealing with this? Would be a shame to make a major release just for this. That's probably the easiest thing to do,...