nvlad / yii2support

Yii2 Support for PhpStorm / IntelliJ IDEA
https://plugins.jetbrains.com/idea/plugin/9388-yii2-support
Other
295 stars 54 forks source link

Autocomplete for third-party components #210

Closed i-panov closed 6 years ago

i-panov commented 6 years ago

Hi! I started using your plugin today and was totally delighted! Thank you, it's very convenient! But I have one idea how it would be possible to improve the plug-in: make an auto-completed for Yii components please! For example, when you write Yii::$app->urlManager - there is an auto-complete for standard components by default, but there is not for third-party components. If I put yiisoft/yii2-queue for example and write \Yii::$app->queue (previously declaring it in the config), then the IDE will highlight it as an error. It would be very convenient if your plugin highlighted the third-party components of the application!

nvlad commented 6 years ago

Hi! Thanks for your feedback!

Use this receipt for third-party components autocompletion https://github.com/samdark/yii2-cookbook/blob/master/book/ide-autocompletion.md

i-panov commented 6 years ago

@nvlad Thanks! I will try to understand this instruction, but of course it would be simpler if this functionality was added by the plugin without writing additional files.

shaqman commented 6 years ago

I agree with @i-panov. Since the Yii stub file is not used in code execution, but rather by the ide, it would be a nice idea to be part of this extension.

nvlad commented 6 years ago

We aim to develop functionality that cannot be obtained by other means (stubs or other plugins). Maybe we'll do it, but probably not very soon.

But you can join us and implement this functionality. We will be glad to see new participants.

insperedia commented 6 years ago

We inspected the possibility to do that quite deeply, unfortunately, due to the very dynamic nature of Yii config it is impossible to do that in a good way.

i-panov commented 5 years ago

If anyone is interested, I found a fantastically convenient extension for PhpStorm that automatically generates stubs: https://github.com/bazilio91/yii2-stubs-generator