pastuhov/yii2-query-tag
最新稳定版本:1.2.0
Composer 安装命令:
composer require --dev pastuhov/yii2-query-tag
包简介
Query tag extension for Yii 2
关键字:
README 文档
README
Query tag extension for Yii 2
Do you use pgbabger or pg_stat_statements ? And sometimes it can be difficult to understand which code generates the request? yii2-query-tag will help!
Before:
SELECT * FROM page WHERE 1=1
After:
SELECT /* ExampleTest:11 UnitHelper:28 Step:218 */ * FROM page WHERE 1=1
Features
- Production ready/safe/tested
- Saves team time
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist pastuhov/yii2-query-tag
or add
"require-dev": {
"pastuhov/yii2-query-tag": "~1.1.0"
...
to the require section of your composer.json file.
Usage
Change your app config:
'components' => [ 'db' => [ 'class' => \yii\db\Connection::class, 'commandClass' => \pastuhov\querytag\Command::class, // <-- add this line
Advanced usage
Extend query tag command class:
namespace app\components; class Command extends \pastuhov\querytag\Command { public $customTag = 'master'; public $enabledTags = [ self::TAG_TYPE_CUSTOM, self::TAG_TYPE_TRACE, ]; }
Testing
./vendor/bin/codecept run
Security
If you discover any security related issues, please email pastukhov_k@sima-land.ru instead of using the issue tracker.
统计信息
- 总下载量: 6.19k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-08-07