-
Notifications
You must be signed in to change notification settings - Fork 71
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
DB facade alias support #126
Conversation
The DB facade alias is not properly handled by the Laravel Psalm plugin: psalm/psalm-plugin-laravel#126
Any progress? |
I'm still waiting on feedback from the maintainers. |
Sorry but I don't use facades so I don't have much motivation to make them work with this plugin -- however I will happily merge any PRs that fix the issue! |
IIRC in my initial test the additional stub fixed the issue. But now somehow it doesn't. I'll take this up again when I have more time. Meanwhile if anyone is interested in this, please feel free to suggest a solution. |
I had another look: Does anything speak against making the facade stub function static? Since it's a facade, the function should be called statically anyway. This resolves my failing test case but I don't know about any other possible implications. |
thanks @mzur ! |
This failing test highlights the issue that the
DB
alias forIlluminate\Support\Facades\DB
is not properly handled by this plugin.It could be solved with a new
src/Stubs/DBFacadeAlias.stubphp
:However, I wanted to hear if there is a better solution.