lucidtaz/yii2-whoops
Composer 安装命令:
composer require lucidtaz/yii2-whoops
包简介
Yii2 bindings for Whoops error handler
README 文档
README
This library provides easy integration of filp/whoops into Yii2. Whoops is a pretty exception and error formatter. This library enables you to use it by configuring an ErrorHandler in your application config.
USAGE
Configure web.php to disable Yii's built-in error handler and use the new one:
<?php $config = [ // ... 'components' => [ 'errorHandler' => [ 'class' => 'lucidtaz\yii2whoops\ErrorHandler', // NOTE: yii2-app-basic comes with this errorAction line by default, // be sure to comment/remove it, or you will get an // UnknownAttributeException when running your code: // 'errorAction' => 'site/error' ], // ... ], // ... ];
Or to only use it in Dev+Debug mode, to prevent your source code displaying in production:
<?php $config = [ // ... 'components' => [ 'errorHandler' => YII_ENV_DEV && YII_DEBUG ? [ 'class' => 'lucidtaz\yii2whoops\ErrorHandler', ] : [ 'class' => 'yii\web\ErrorHandler', 'errorAction' => 'site/error' ], // ... ], // ... ];
统计信息
- 总下载量: 22.38k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-10-01