samdark / yii2-cookbook

Yii 2.0 Community Cookbook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IDE autocompletion: not directly possible with current PHPStorm

robsch opened this issue · comments

Just a hint, that you might want to add to the documentation: To 'Mark as plain text' the Yii.php file it is required to temporarily remove the vendor/yiisoft/yii2 from the excluded folders. Otherwise nothing happens.

More info here:
https://youtrack.jetbrains.com/issue/WI-34936#u=1486048661978

I use a post-package-install script in composer.json file:

"scripts": {
    "post-package-install": [
        "php -r '@unlink(\"vendor/yiisoft/yii2/Yii.php\");'"
    ]
}

@larryli how does it work w/o Yii.php file?

@robsch isn't it fixed?

Sorry to have confused you! I think it's just an issue/bug with PHPStorm itself. Your documentation is not wrong.

On https://yii2-cookbook.readthedocs.io/ide-autocompletion/ you say:

Note: To avoid "Multiple Implementations" PHPStorm warning and make autocomplete faster exclude or "Mark as Plain Text" vendor/yiisoft/yii2/Yii.php file.

I have tried this but I was not able to do it directly. I had to temporarily turn off the exclusion of the folder that contains Yii.php. After that all is perfect!

afaik, it is not fixed.

But close this issue if it's not important enough. It is already documented here in this issue now and one can find it via search enginge.

Are you using latest PhpStorm version? If so, please report it to JetBrains issue tracker since, it seems, it's not there yet. What you've linked to is a bit different.