PHPackages                             dereuromark/cakephp-whoops - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. dereuromark/cakephp-whoops

ActiveCakephp-plugin[Debugging &amp; Profiling](/categories/debugging)

dereuromark/cakephp-whoops
==========================

Whoops error handler for CakePHP

1.2.0(2y ago)1492.4k↓35.1%5[1 issues](https://github.com/dereuromark/cakephp-whoops/issues)1MITPHPPHP &gt;=7.4

Since Jan 19Pushed 2y ago2 watchersCompare

[ Source](https://github.com/dereuromark/cakephp-whoops)[ Packagist](https://packagist.org/packages/dereuromark/cakephp-whoops)[ Docs](https://github.com/dereuromark/cakephp-whoops)[ RSS](/packages/dereuromark-cakephp-whoops/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (3)Versions (12)Used By (1)

Whoops for CakePHP
==================

[](#whoops-for-cakephp)

[![CI](https://github.com/dereuromark/cakephp-whoops/actions/workflows/ci.yml/badge.svg)](https://github.com/dereuromark/cakephp-whoops/actions/workflows/ci.yml)[![Total Downloads](https://camo.githubusercontent.com/564e6f8e7e59c036a349893b3c823bd6dcc1d6f594defa8948fe750992af828d/68747470733a2f2f706f7365722e707567782e6f72672f6465726575726f6d61726b2f63616b657068702d77686f6f70732f642f746f74616c2e737667)](https://packagist.org/packages/dereuromark/cakephp-whoops)[![Latest Stable Version](https://camo.githubusercontent.com/5cccc205c001148ca0a409ff4b39caaf0be704447bf947748bf4fb9a9408a076/68747470733a2f2f706f7365722e707567782e6f72672f6465726575726f6d61726b2f63616b657068702d77686f6f70732f762f737461626c652e737667)](https://packagist.org/packages/dereuromark/cakephp-whoops)[![Minimum PHP Version](https://camo.githubusercontent.com/183804d09fec16ca7b6209b007250b7d8db1b915042feb093a9f20e6e1f25359/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e312d3838393242462e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dereuromark/cakephp-whoops)

Seamlessly integrate [Whoops](https://filp.github.io/whoops/) into [CakePHP](https://cakephp.org) applications.

Demo-Video: [Linux Mint + Firefox](https://streamable.com/s/h63t3/xweicf)

This branch is for use with **CakePHP 5.0+**. For details see [version map](https://github.com/dereuromark/cakephp-whoops/wiki#cakephp-version-map).

Install
-------

[](#install)

Using [Composer](https://getcomposer.org):

```
composer require dereuromark/cakephp-whoops

```

As this package only offers a Whoops handler for CakePHP, there is no need to enable it (no `->addPlugin()` call). You only need to configure the renderer classes inside your `config/app.php` or `config/app_local.php`:

```
'Error' => [
	'exceptionRenderer' => \CakephpWhoops\Error\WhoopsExceptionRenderer::class,
	'errorRenderer' => \CakephpWhoops\Error\WhoopsErrorRenderer::class
],
```

When using new Application.php and Middleware approach, you also need to adjust that:

```
// Replace ErrorHandlerMiddleware with
 ->add(new \CakephpWhoops\Error\Middleware\WhoopsHandlerMiddleware(Configure::read('Error')))
```

### Debug Mode

[](#debug-mode)

An important note: This plugin is installed as require dependency, but even so it is more used as require-dev one. If the debug mode is off, it will completely ignore the Whoops handler, as without debug mode there is no exception to render. It will then display the public error message and only log internally.

So make sure you enable debug (locally) for checking out this package. For each error and exception you should then see the improved whoops handler output on your screen.

Editor
------

[](#editor)

Opening the file in the editor via click in the browser is supported for most major IDEs. It uses `phpstorm://` URLs which can open the file through a command line call and directly jump to the right line.

Set your config as

```
	'Whoops' => [
		'editor' => true,
	],
```

To enable it.

If you are using a VM, e.g. CakeBox, you will also need the path mapping:

```
		'userBasePath' => 'C:\wamp\www\cakebox\Apps\my-app.local',
		'serverBasePath' => '/home/vagrant/Apps/my-app.local',
```

If you would like to override the default URL handler (`phpstorm://`) you could do so by setting the `ideLinkPattern` option to a custom URL handler:

- PhpStorm: `phpstorm://open?file=%s&line=%s`
- Visual Studio Code: `vscode://file/%s:%s`

See the Wiki for more details on different OS and Browsers.

Strictness
----------

[](#strictness)

As a bonus the error handler is a bit more strict here for development. It will not just ignore notices and other errors, but display them the same way in order to fix them with the same ease and speed as exceptions.

Usually, when a variable is not found, all following code can also not yield any useful results, as the example below shows. Better to code cleaner in the first place and to avoid any warning or notice to be thrown in the first place.

Before:

[![Screenshot](docs/cake.png)](docs/cake.png)

After:

[![Screenshot](docs/whoops.png)](docs/whoops.png)

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 70.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~261 days

Recently: every ~317 days

Total

9

Last Release

950d ago

Major Versions

0.1.4 → 1.0.02021-01-03

1.2.0 → 2.0.0-RC2023-10-11

PHP version history (4 changes)0.1.0PHP &gt;=5.6

1.0.0PHP &gt;=7.2

1.2.0PHP &gt;=7.4

2.0.0-RCPHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/39854?v=4)[Mark Scherer](/maintainers/dereuromark)[@dereuromark](https://github.com/dereuromark)

---

Top Contributors

[![dereuromark](https://avatars.githubusercontent.com/u/39854?v=4)](https://github.com/dereuromark "dereuromark (56 commits)")[![jadb](https://avatars.githubusercontent.com/u/33527?v=4)](https://github.com/jadb "jadb (12 commits)")[![softius](https://avatars.githubusercontent.com/u/586121?v=4)](https://github.com/softius "softius (3 commits)")[![josbeir](https://avatars.githubusercontent.com/u/26058?v=4)](https://github.com/josbeir "josbeir (3 commits)")[![ADmad](https://avatars.githubusercontent.com/u/142658?v=4)](https://github.com/ADmad "ADmad (2 commits)")[![challgren](https://avatars.githubusercontent.com/u/88909?v=4)](https://github.com/challgren "challgren (1 commits)")[![LordSimal](https://avatars.githubusercontent.com/u/9105243?v=4)](https://github.com/LordSimal "LordSimal (1 commits)")[![davidyell](https://avatars.githubusercontent.com/u/49889?v=4)](https://github.com/davidyell "davidyell (1 commits)")

---

Tags

whoopscakephperror-handler

### Embed Badge

![Health badge](/badges/dereuromark-cakephp-whoops/health.svg)

```
[![Health](https://phpackages.com/badges/dereuromark-cakephp-whoops/health.svg)](https://phpackages.com/packages/dereuromark-cakephp-whoops)
```

###  Alternatives

[filp/whoops

php error handling for cool kids

13.2k402.4M1.4k](/packages/filp-whoops)[php-console/php-console

PHP library for Google Chrome extension "PHP Console".

1.3k2.9M41](/packages/php-console-php-console)[yireo/magento2-whoops

Magento 2 module adding Whoops error handling

102703.5k](/packages/yireo-magento2-whoops)[recca0120/laravel-tracy

A Laravel Package to integrate Nette Tracy Debugger

388283.0k3](/packages/recca0120-laravel-tracy)[rarst/wps

WordPress plugin for whoops error handler.

129133.2k3](/packages/rarst-wps)[gourmet/whoops

Whoops for CakePHP 3

2438.0k1](/packages/gourmet-whoops)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
