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
Is your feature request related to a problem? Please describe.
Query Scope classes can be created using make:scope as an alternative to creating "local" scopes inside the Model class directly. The Scope interface has an apply() method that takes two parameters, Builder $builder and Model $model and these can not be overwritten in a Scope implementation, as this causes Psalm to emit a MoreSpecifciImplementedParamType error.
Describe the solution you'd like
The Scope interface should be extended with a @template TModel of Model, so that the apply() parameters can be typed as @param Builder<TModel> $builder and @param TModel $model respectively.
Is your feature request related to a problem? Please describe.
Query Scope classes can be created using
make:scope
as an alternative to creating "local" scopes inside the Model class directly. TheScope
interface has anapply()
method that takes two parameters,Builder $builder
andModel $model
and these can not be overwritten in aScope
implementation, as this causes Psalm to emit aMoreSpecifciImplementedParamType
error.Describe the solution you'd like
The Scope interface should be extended with a
@template TModel of Model
, so that theapply()
parameters can be typed as@param Builder<TModel> $builder
and@param TModel $model
respectively.Describe alternatives you've considered
(None.)
Additional context
The text was updated successfully, but these errors were encountered: