Hi everyone,
I’m using custom components in my application. So all of them connected in the config under “components”.
However I can’t see any autocomplete for them in my editor, because they added dynamically and never described in any class.
I looked up how it’s done for basic components like “formatter” or “mailer”. They all have comments inside \yii\base\Application.
And after than we have two classes: Yii and \yii\baseYii. The last one (\yii\baseYii) has comment for $app property to connect to \yii\base\Application.
If I change this comment to my own Application class with all comments for new components all is working.
However I use composer, so vendor dir is not under repository control. And when someone clone my repo - he doesn’t have IDE suggestions. And if I setup project again or update Yii - I loose my changes.
Inside main Yii class it is said
/**
* Yii is a helper class serving common framework functionalities.
*
* It extends from [[\yii\BaseYii]] which provides the actual implementation.
* By writing your own Yii class, you can customize some functionalities of [[\yii\BaseYii]].
*/
So I guess there is a way to write custom Yii class inside my own application. However \Yii point to yiisoft folder and I don’t know how to change this (assuming that I can’t touch vendor folder because it is downloaded with composer)
Can anyone help me with this?