D
D
DarkByte20152018-09-25 10:59:09
Yii
DarkByte2015, 2018-09-25 10:59:09

How do I auto-complete third-party components?

I really want to get an autocomplete of third-party components. I found this article, but I can’t understand where to throw all these files to make it work? I understand there will be two files: Yii.php and User.php.
1. Suppose I can throw a webuser into the components folder, since he is in this namespace,
2. where to throw Yii.php? in the web folder? Or even at the root of the project?
3. In addition, after these machinations, I always underline the Yii class and write "Multiple definitions exist for class Yii".
4. Is it necessary in the web/index.php file instead of (new yii\web\Application($config))->run(); write (new WebApplication($config))->run(); ? And instead of require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php'; request my Yii.php.
5. And similarly for the root yii file that controls the console application.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question