PHPackages                             tigron/skeleton-error - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. tigron/skeleton-error

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

tigron/skeleton-error
=====================

Skeleton error handling

v0.2.9(11mo ago)018.7k↓30%1MITPHP

Since Aug 14Pushed 8mo ago4 watchersCompare

[ Source](https://github.com/tigron/skeleton-error)[ Packagist](https://packagist.org/packages/tigron/skeleton-error)[ RSS](/packages/tigron-skeleton-error/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (21)Used By (1)

skeleton-error
==============

[](#skeleton-error)

Description
-----------

[](#description)

This library contains the error handling logic of `skeleton`.

It will use `filp/whoops` and `sentry/sentry` if their presence can be detected and the required configuration exists. If not, it will fall back to its own basic error handler.

The basic error handlers can print debug information, as well as send e-mail to a configured address.

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

[](#installation)

Installation via composer:

```
composer require tigron/skeleton-error

```

Configuration
-------------

[](#configuration)

If you want to enable `skeleton-error` for your application, you need to call the `Handler::enable()` method, which will register the error handlers:

```
\Skeleton\Error\Handler::enable();

```

Setting the `debug` flag to true will result in detailed error messages being displayed in the browser, using the basic built-in handler or `filp/whoops`, depending on what is available:

```
\Skeleton\Error\Config::$debug = true;

```

You can provide additional information to the error handler, such as the release version and the environment the error occurred in. This can help with filtering reports. This is currently only supported by the `sentry` handler:

```
\Skeleton\Error\Config::$environment = 'development';
\Skeleton\Error\Config::$release = 'project@1.0.0';

```

By default, the level for `error_reporting` will be set to `E_ALL`. You can configure a different level if desired:

```
\Skeleton\Error\Config::$error_reporting = E_ALL & ~E_STRICT;

```

### E-mail handler

[](#e-mail-handler)

If you would like to receive error reports via e-mail, set the `mail_errors_to`and `mail_errors_from` options to the relevant addresses. You will also need to make sure that the system your application is running on can send mail:

```
\Skeleton\Error\Config::$mail_errors_to = 'colleague@example.com';
\Skeleton\Error\Config::$mail_errors_from = 'errors@example.com';

```

### Sentry handler

[](#sentry-handler)

If you would like to use [Sentry](https://github.com/getsentry/sentry-php), you need to install `sentry/sdk` (recommended) or `sentry/sentry` (deprecated).

Once installed, configure the DSN which it will use:

```
\Skeleton\Error\Config::$sentry_dsn = 'http://foo:bar@sentry.example.com/1';

```

### Whoops handler

[](#whoops-handler)

If you would like to use [Whoops](https://github.com/filp/whoops), you need to install `filp/whoops`. No further configuration is required.

Events
------

[](#events)

### Error context

[](#error-context)

#### sentry\_before\_send

[](#sentry_before_send)

The `sentry_before_send` can have two different signatures, depending on the version of Sentry you have installed.

For `sentry\sdk` (which depends on `sentry/sentry` version 2 or higher), the event will be called as the `beforeSend` callback. In the example below, we use `$event->getUserContext()` for version 2, whereas version 3 should use `$event->getUser()`. More information is available [here](https://docs.sentry.io/platforms/php/configuration/filtering/#using-beforesend)

```
public function sentry_before_send(\Sentry\Event $event) {
    $event->getUserContext()->setUsername('john-doe');
    return $event;
}

```

For the deprecated `sentry\sentry` version 1 and below, the event will be called as the `send_callback` function. More information is available [here](https://docs.sentry.io/clients/php/config/#available-settings)

```
public function sentry_before_send(&$data) {
    $data['user']['username'] = 'john-doe';
}

```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance56

Moderate activity, may be stable

Popularity25

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 54.3% 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 ~189 days

Recently: every ~371 days

Total

20

Last Release

333d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8bff1383483dacb0c3f89d2d3856ae03d4cf3e80de26a2998248dd1175317285?d=identicon)[tigron](/maintainers/tigron)

---

Top Contributors

[![christopheg](https://avatars.githubusercontent.com/u/199087?v=4)](https://github.com/christopheg "christopheg (19 commits)")[![gerryd](https://avatars.githubusercontent.com/u/3003371?v=4)](https://github.com/gerryd "gerryd (14 commits)")[![davidvandemaele](https://avatars.githubusercontent.com/u/1914033?v=4)](https://github.com/davidvandemaele "davidvandemaele (1 commits)")[![LionelLaffineur](https://avatars.githubusercontent.com/u/21120913?v=4)](https://github.com/LionelLaffineur "LionelLaffineur (1 commits)")

### Embed Badge

![Health badge](/badges/tigron-skeleton-error/health.svg)

```
[![Health](https://phpackages.com/badges/tigron-skeleton-error/health.svg)](https://phpackages.com/packages/tigron-skeleton-error)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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