Download the PHP package nkovacs/yii-whoops without Composer
On this page you can find all versions of the php package nkovacs/yii-whoops. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nkovacs/yii-whoops
More information about nkovacs/yii-whoops
Files in nkovacs/yii-whoops
Package yii-whoops
Short Description Whoops integration class for Yii Framework 1.1
License MIT
Informations about the package yii-whoops
Yii Error Handler with Whoops
Integrates the Whoops library into Yii 1.1.
This error handler replaces the built-in exception views with Whoops.
Your error action (or Yii's built-in error views, if errorAction is not set)
is used if your application is not in debug mode (i.e. YII_DEBUG
is false), or the
exception is a CHttpException
.
Usage
-
Install it:
-
Using Composer (it will automatically install Whoops main libraries as well):
- Or downloading and unpacking it in your
extensions
folder.
-
-
If you're using Composer, I strongly recomend you create a
vendor
alias if you haven't yet. Add this to the beginning of yourconfig/main.php
: -
Replace your
errorHandler
entry atconfig/main.php
with the error handler class. Example:If you're using Composer's autoloader, you can simply use
'WhoopsErrorHandler'
. You must require 'vendor/autoload.php' in your entry scripts (index.php, yiic.php etc.) for this to work. - If you're using some custom LogRoute that binds to the application's end, you can disable it using
the component's
disabledLogRoutes
property. Just set it to an array containing all the classnames (not aliases!) of each route you want disabled whenever Whoops is launched. By default it disables the famous Yii Debug Toolbar; if you want to keep it enabled, override thedefaultDisabledLogRoutes
property.
Sample screenshot
