mitirrli / yii2-ide-helper
Yii2 IDE Helper,为所有组件生成正确的PHPDocs,以改善自动完成。
v2.0.2
2022-06-28 05:16 UTC
Requires
- php: >=5.4.0
- yiisoft/yii2: *
Requires (Dev)
README
安装
使用以下命令通过composer安装此包
composer require mitirrli/yii2-ide-helper --dev
或者
"mitirrli/yii2-ide-helper": "*"
将以下内容添加到你的 composer.json
文件的 require-dev
部分中。
使用方法
更新composer后,将组件添加到控制台应用程序的配置文件中的 components
数组和 bootstrap
数组
'bootstrap' => ['log', 'ideHelper'], ... 'components' => [ 'ideHelper' => [ 'class' => 'Mitirrli\IdeHelper\IdeHelper', ], ... ],
现在你可以通过以下命令生成ide辅助文件
./yii ide-helper/generate
选项
'ideHelper' => [ 'class' => 'Mitirrli\IdeHelper\IdeHelper', 'filename' => '_ide_helper', 'rootDir' => dirname(__DIR__), 'configFiles' => [ 'console/config/main.php', 'console/config/main-local.php', ], ],
默认配置文件
protected $defaultConfigFiles = [ 'config/web.php', 'config/main.php', 'config/main-local.php', 'common/config/main.php', 'common/config/main-local.php', 'frontend/config/main.php', 'frontend/config/main-local.php', 'backend/config/main.php', 'backend/config/main-local.php', ];