This repository has been archived by the owner. It is now read-only.
Plugin for integrating the Whoops library into a CakePHP application
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
src/Error
.gitignore
LICENSE
README.md
composer.json

README.md

WhoopsCakephp

This package has been abandoned as of January 2017 in favor of https://github.com/gourmet/whoops

Latest Stable Version Total Downloads License

This plugin integrates the Whoops library into your CakePHP application.

Requirements

  • CakePHP 3.0.x
  • The actual Whoops library (automatically installed along with the plugin if Composer is used)

Installation

The plugin should be installed using Composer. The Plugin is available through the Packagist website. To install using composer, simply run:

php composer.phar require oldskool/whoops-cakephp:~2.1

Configuration

In order to start using Whoops as your error handler, you'll need to adjust your config/bootstrap.php file and have it load the Plugin.

Find this bit of code:

if (Configure::read('debug')) {
	Plugin::load('DebugKit', ['bootstrap' => true]);
}

And replace it with this:

if (Configure::read('debug')) {
    Plugin::load('DebugKit', ['bootstrap' => true]);
    Plugin::load('WhoopsCakephp', ['bootstrap' => true]);
}

If you want to use Whoops all the time, regardless of the debug setting of the application (not recommended), then just add the line Plugin::load('WhoopsCakephp', ['bootstrap' => true]); anywhere outside the if-statement.

Please note that this will enable Whoops for all your end users, including the stack traces and such. So be very cautious with this and only use it when you're very sure!