-
Notifications
You must be signed in to change notification settings - Fork 28
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
IDE autocomplete #71
Comments
This is something I am unhappy with for a long time. But I don't know how to fix it 🤷♂️ Recently, Laravel Idea shared that they will support this with their next update [0]. But I don't know any approach for VSCode or PHP Storm without the plugin. [0] https://x.com/laravel_idea/status/1755279230210904084?s=20 |
I've added a <?php
declare(strict_types=1);
namespace Illuminate\Database\Eloquent {
/**
* @mixin \Tpetry\PostgresqlEnhanced\Query\Builder
*/
class Builder {}
}
namespace PHPSTORM_META {
//metadata directives
} |
Hmm, but that file would still need to be copied. And potentially conflicts with other packages wanting to do the same. Would be awesome if it could be at the root dir of every package in the vendor dir. So, every package could provide their own always-updated definitions. |
Yup, this isn't a solution for packages and def feels hacky, but it's worked well for me. Be good when Laravel Idea supports this, tho! |
@vatsake @boris-glumpler Are you using PhpStorm with Laravel Idea? In that case you could test the open Pull Request which should do a full integration with auto-suggestions and jump-to-code. |
Nah, I'm using vscode. |
Yup, I do. I've just finished a hike in a pretty remote part of Nepal, tho, and it'll take me 2-3 days to get back to my laptop. Will try it out then. |
Just tested it and it all seems to work really well! |
Ok, then I'll test on the weekend again. |
Autocomplete for PhpStorm with Laravel Idea plugin is now live with Other IDEs or PhpStorm without the plugin are not supported as there are no ways to do this currently. But I've requested the Laravel IDE helper package to make this possible in the future with a generic way: barryvdh/laravel-ide-helper#1529 |
How does one make IDE understand
Tpetry\PostgresqlEnhanced\Query\Builder
methods?:)
The text was updated successfully, but these errors were encountered: