You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I note that findOrFail has a stub type:
/** * @template T * @param T $id * @param list<non-empty-string> $columns * @psalm-return (T is (array|\Illuminate\Contracts\Support\Arrayable) ? \Illuminate\Database\Eloquent\Collection<int, TModel> : TModel) */publicfunctionfindOrFail($id, $columns = ['*']) {}
But findOrFail should throw ModelNotFoundException. Since I am using checkForThrowsDocblock config so IMO I would like to enforce developers handle this exception.
Impacted Versions
Latest version
Additional context
Thanks for your effort of maintaining this amazing library.
The text was updated successfully, but these errors were encountered:
Describe the bug
I note that
findOrFail
has a stub type:But
findOrFail
should throwModelNotFoundException
. Since I am using checkForThrowsDocblock config so IMO I would like to enforce developers handle this exception.Impacted Versions
Latest version
Additional context
Thanks for your effort of maintaining this amazing library.
The text was updated successfully, but these errors were encountered: