mis / yii2-ide-helper
Yii2 IDE Helper,为所有组件生成正确的PHPDocs,以提高自动完成功能。
v1.0.2
2016-11-22 01:26 UTC
Requires
- php: >=5.4.0
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-09-06 23:21:09 UTC
README
安装
使用以下命令通过composer安装此包
composer require mis/yii2-ide-helper --dev
或者
"mis/yii2-ide-helper": "*"
将以下内容添加到你的composer.json
文件的require-dev
部分。
用法
更新composer后,将组件添加到控制台应用程序的config文件中的components
数组和bootstrap
数组
'bootstrap' => ['log', 'ideHelper'], ... 'components' => [ 'ideHelper' => [ 'class' => 'Mis\IdeHelper\IdeHelper', ], ... ],
现在你可以通过以下命令生成ide helper文件
php yii ide-helper/generate
选项
'ideHelper' => [ 'class' => 'Mis\IdeHelper\IdeHelper', 'filename' => '_ide_helper', 'format' => 'php', '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', ];