Caleb White
Caleb White
@canvural, I had new docs in #1990 that didn't get merged, can you cherry-pick that? 17bce5f783f19258312aaf8a45e3cbbec335b144
> Or just avoid the `@return` tag. The `@return` is useful for IDE autocompletion on the method call---and you can avoid a costly model file parse if you include them
Make sure to clear any cache, `phpstan clear-result-cache`
Adding `covariant` is not the answer This was working on #1990 (and it is working on my [fork](https://github.com/calebdw/larastan)). Something likely was messed up when cherry-picking #1990
What does the full Model look like? By any chance are they `final`?
> Yes, all my models are final Ah, that's it---I can replicate it now. This looks like a PHPStan bug, I'll open an issue over there
@davideprevosto, then there's also a bug in Larastan because non-`final` models work just fine on my [fork](https://github.com/calebdw/larastan)
@NickSdot, This error is correct, your generic should be: ```php /** @return BelongsTo */ ```
@NickSdot, Yes it is intentional, and `$this` vs `self` matters when you have models that extend other models to insure the generics have the right model (the child and not...
There was talk about releasing this in v3, but we're going to release v3 when PHPStan is bumped to v2 so it was just decided to go ahead and release...