When I run the psalm analyzer on my project it trips on the CachedBuilder class because it can't find the EloquentBuilder class it extends. I don't know how it finds the class when the code actually runs because it works fine, but if I check get_parent_class on the object it says it's a subclass of Illuminate\Database\Eloquent\Builder. Adding the import line below fixes the issue in psalm and doesn't seem to break anything in my project and didn't seem to affect the laravel-model-caching tests (I had 2 failing tests with and without the import related to a missing authors table):
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
Stack Trace
The full stack trace from your log file.
Describe the bug
When I run the psalm analyzer on my project it trips on the CachedBuilder class because it can't find the
EloquentBuilder
class it extends. I don't know how it finds the class when the code actually runs because it works fine, but if I checkget_parent_class
on the object it says it's a subclass ofIlluminate\Database\Eloquent\Builder
. Adding the import line below fixes the issue in psalm and doesn't seem to break anything in my project and didn't seem to affect the laravel-model-caching tests (I had 2 failing tests with and without the import related to a missing authors table):Stack Trace The full stack trace from your log file.
Environment
Additional context I wasn't able to get psalm working by ignoring the
vendor
directory in the configuration.