PHPackages                             lefuturiste/slim-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. lefuturiste/slim-whoops

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

lefuturiste/slim-whoops
=======================

PHP whoops error on slim framework

0.6.3(6y ago)02843BSD-2-ClausePHPPHP &gt;=5.5.0

Since Jan 14Pushed 6y agoCompare

[ Source](https://github.com/lefuturiste/php-slim-whoops)[ Packagist](https://packagist.org/packages/lefuturiste/slim-whoops)[ Docs](https://github.com/zeuxisoo/php-slim-whoops/)[ RSS](/packages/lefuturiste-slim-whoops/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (4)Versions (13)Used By (3)

Slim whoops
===========

[](#slim-whoops)

PHP whoops error on slim framework

Status
------

[](#status)

[![Build Status](https://camo.githubusercontent.com/e68f3b8b784c709e437d47bf0a837462f692f39dae01fe68f696304b8cd451f8/68747470733a2f2f7472617669732d63692e6f72672f7a65757869736f6f2f7068702d736c696d2d77686f6f70732e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/zeuxisoo/php-slim-whoops)

Installation
------------

[](#installation)

Install the composer

```
curl -sS https://getcomposer.org/installer | php

```

Edit `composer.json`

SlimWhoopsVersionGlobal ModePHP DI1n/a0.1.\*nono21.\*0.3.\*nono3&lt;= 1.\*0.4.\*nono3&gt;= 2.\*0.5.\*nono3&gt;= 2.\*0.6.\*yesyesFor `Slim framework 3`, The `composer.json` will looks like

```
{
	"require": {
		"zeuxisoo/slim-whoops": "0.6.*"
	}
}

```

Now, `install` or `update` the dependencies

```
php composer.phar install

```

Usage
-----

[](#usage)

Just need to add the middleware in your slim application.

**Simple way**

In this case, You **must** ensure this line is first added and on top of other middlewares

```
$app->add(new \Zeuxisoo\Whoops\Provider\Slim\WhoopsMiddleware);
$app->add(new \Other\MiddlewareA);
$app->add(new \Other\MiddlewareB);

```

**Better DI**

In this case, You can place this line anywhere no position required

```
$app->add(new \Zeuxisoo\Whoops\Provider\Slim\WhoopsMiddleware($app));

```

**Global mode**

In this case, The following code can make Whoops errors in the global scope, whether you have destroyed the program's life cycle

```
$whoopsGuard = new \Zeuxisoo\Whoops\Provider\Slim\WhoopsGuard();
$whoopsGuard->setApp($app);
$whoopsGuard->setRequest($container['request']);
$whoopsGuard->setHandlers([]);
$whoopsGuard->install();

```

**Custom Whoops Handler**

In this case, You can push custom handler to whoops. For example:

A handler like:

```
$simplyErrorHandler = function($exception, $inspector, $run) {
    $message = $exception->getMessage();
    $title   =  $inspector->getExceptionName();

    echo "{$title} -> {$message}";
    exit;
};

```

Middleware case like:

```
new \Zeuxisoo\Whoops\Provider\Slim\WhoopsMiddleware($app, [$simplyErrorHandler]);

```

Global mode case like:

```
$whoopsGuard = new \Zeuxisoo\Whoops\Provider\Slim\WhoopsGuard();
$whoopsGuard->setHandlers([$simplyErrorHandler]);

```

Options
-------

[](#options)

Opening referenced files with your favorite editor or IDE

```
$app = new App([
    'settings' => [
    	 // Enable whoops
        'debug'         => true,

        // Support click to open editor
        'whoops.editor' => 'sublime',

        // Display call stack in orignal slim error when debug is off
        'displayErrorDetails' => true,
    ]
]);

```

Important Note
--------------

[](#important-note)

Version `0.3.0`

- The `whoops` library is installed by default base on the [Whoops Framework Integration Document](https://github.com/filp/whoops/blob/master/docs/Framework%20Integration.md#contributing-an-integration-with-a-framework "Whoops Framework Integration Document")

Version `0.2.0`

- You must to install the `whoops` library manually.

Testing
-------

[](#testing)

Run the test cases

```
php vendor/bin/phpunit

```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.7% 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 ~208 days

Recently: every ~300 days

Total

12

Last Release

2257d ago

PHP version history (2 changes)0.1.0PHP &gt;=5.3.0

0.4.0.x-devPHP &gt;=5.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/237a43763134833e785eaee2c646dc218b63a87a8b0943b585a7c9ce436fd306?d=identicon)[lefuturiste](/maintainers/lefuturiste)

---

Top Contributors

[![zeuxisoo](https://avatars.githubusercontent.com/u/322299?v=4)](https://github.com/zeuxisoo "zeuxisoo (105 commits)")[![lefuturiste](https://avatars.githubusercontent.com/u/20988163?v=4)](https://github.com/lefuturiste "lefuturiste (3 commits)")[![adamaveray](https://avatars.githubusercontent.com/u/1160237?v=4)](https://github.com/adamaveray "adamaveray (3 commits)")[![vkbansal](https://avatars.githubusercontent.com/u/5930351?v=4)](https://github.com/vkbansal "vkbansal (2 commits)")[![SpazzMarticus](https://avatars.githubusercontent.com/u/5716457?v=4)](https://github.com/SpazzMarticus "SpazzMarticus (2 commits)")[![michaelboke](https://avatars.githubusercontent.com/u/2121940?v=4)](https://github.com/michaelboke "michaelboke (1 commits)")[![ceejayoz](https://avatars.githubusercontent.com/u/2825?v=4)](https://github.com/ceejayoz "ceejayoz (1 commits)")

---

Tags

slimexceptionerrorwhoops

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lefuturiste-slim-whoops/health.svg)

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

###  Alternatives

[filp/whoops

php error handling for cool kids

13.2k420.3M1.5k](/packages/filp-whoops)[zeuxisoo/slim-whoops

PHP whoops error on slim framework

1301.1M27](/packages/zeuxisoo-slim-whoops)[yireo/magento2-whoops

Magento 2 module adding Whoops error handling

102739.7k](/packages/yireo-magento2-whoops)[rarst/wps

WordPress plugin for whoops error handler.

129135.5k3](/packages/rarst-wps)[topshelfcraft/canary

The kinder, cuter, cleverer Craft error handler.

114.4k](/packages/topshelfcraft-canary)

PHPackages © 2026

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