-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
newQuery() is not static #846
Comments
The Method class constructor treats all methods as static. |
Yes but it shouldn't do, since some methods aren't static. |
I'd say: PRs welcome 😄 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Closed in favor of #872 |
php artisan ide-helper:models --write
addsquery()
andnewQuery()
as static methods in the PHPDoc of the model class.query()
is static, butnewQuery()
isn't. However, ide-helper marks them both as static.This normally wouldn't matter too much, until you use strict PHPStan which states that any usages of
newQuery()
should be static. So$model->newQuery()
fails PHPStan due to the false PHPDoc added by ide-helper.I hope that makes sense, but basically
newQuery()
shouldn't be marked as static.The text was updated successfully, but these errors were encountered: