Using IDE for development is quite typical nowadays because of the comfort it provides. It detects typos and errors, suggests code improvements and, of course, provides code autocomplete. For Yii 2.0 it works quite good out of the box but not in case of custom application components i.e. Yii::$app->mycomponent->something
.
The best way to give IDE some hints is to use your own Yii
file. Let's check application's index.php
: