php-dk/yii2-phpstorm

Yii2 generator tips.

0.2 2018-03-13 14:44 UTC

This package is not auto-updated.

Last update: 2024-05-31 01:30:04 UTC


README

composer require php-dk/yii2-phpstorm:@dev --dev

Configuration

console-local.php

return [
    'modules' => [
        'tips' => [
            'class' => \phpdk\yii2PhpStorm\Module::class,
            'config' => \yii\helpers\ArrayHelper::merge(
                require 'main.php',
                require 'main-local.php',
                ... 
            )
        ]
    ],
];
    

Run

./yii tips/gen/application - generate Application class ./yii tips/gen/meta - generate .phpstorm.meta.php file in basePath ./yii tips/gen - all

Use

После обновления будут доступны подсказки для имён модулей, и компоненты, .phpstorm.meta.php - начинает работать только после перезапуска IDE.

  Yii::$app->component->...
  Yii::$app->getModule('...')->...

PhpStorm "multiple definitions exist for class" To hide this message:

Find a duplicate class file (not created by this generator), for example: vendor/yiisoft/yii/YiiBase.php Mark it as a plain text in file context menu.