-
-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
withTrashed() calls on BelongsTo are no longer allowed since version 0.6.6 #690
Comments
Hi, I think in previous versions this was working by "mistake". Unknown method calls on relation was treated as So I'd say this is a future request to support |
@canvural any hints on how we could implement this support for SoftDelete? We expected larastan to get into the |
@WouterSioen Are checking it in the The problem in general is; here we just try to find the method in the builder. So before that line there needs to be a check like if ($relatedModel->hasMethod($methodName)->yes()) {
return true;
} Then in if ($relatedModel->hasMethod($methodName)->yes()) {
return new EloquentBuilderMethodReflection(.....);
} |
Actually the check needs to happen if we can't find it in the builder. That makes more sense 👍 |
--level
used: 2Description
Phpstan/Larastan complains about
->withTrashed()
calls on BelongsTo relationship definitions since version 0.6.6.This was fine in version 0.6.5 and lower.
Laravel code where the issue was found
The text was updated successfully, but these errors were encountered: