PHPackages                             symfony/error-handler - 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. symfony/error-handler

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

symfony/error-handler
=====================

Provides tools to manage errors and ease debugging PHP code

v8.0.4(3mo ago)2.7k651.8M↓13.8%20[1 issues](https://github.com/symfony/error-handler/issues)20MITPHPPHP &gt;=8.4

Since Nov 12Pushed 1w ago4 watchersCompare

[ Source](https://github.com/symfony/error-handler)[ Packagist](https://packagist.org/packages/symfony/error-handler)[ Docs](https://symfony.com)[ Fund](https://symfony.com/sponsor)[ GitHub Sponsors](https://github.com/fabpot)[ RSS](/packages/symfony-error-handler/feed)WikiDiscussions 8.1 Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (253)Used By (20)Security (1)

ErrorHandler Component
======================

[](#errorhandler-component)

The ErrorHandler component provides tools to manage errors and ease debugging PHP code.

Getting Started
---------------

[](#getting-started)

```
composer require symfony/error-handler
```

```
use Symfony\Component\ErrorHandler\Debug;
use Symfony\Component\ErrorHandler\ErrorHandler;
use Symfony\Component\ErrorHandler\DebugClassLoader;

Debug::enable();

// or enable only one feature
//ErrorHandler::register();
//DebugClassLoader::enable();

// If you want a custom generic template when debug is not enabled
// HtmlErrorRenderer::setTemplate('/path/to/custom/error.html.php');

$data = ErrorHandler::call(static function () use ($filename, $datetimeFormat) {
    // if any code executed inside this anonymous function fails, a PHP exception
    // will be thrown, even if the code uses the '@' PHP silence operator
    $data = json_decode(file_get_contents($filename), true);
    $data['read_at'] = date($datetimeFormat);
    file_put_contents($filename, json_encode($data));

    return $data;
});
```

Resources
---------

[](#resources)

- [Contributing](https://symfony.com/doc/current/contributing/index.html)
- [Report issues](https://github.com/symfony/symfony/issues) and [send Pull Requests](https://github.com/symfony/symfony/pulls)in the [main Symfony repository](https://github.com/symfony/symfony)

###  Health Score

82

—

ExcellentBetter than 100% of packages

Maintenance89

Actively maintained with recent releases

Popularity81

Widely adopted with strong download metrics

Community49

Growing community involvement

Maturity94

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 56.6% 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 ~9 days

Total

253

Last Release

62d ago

Major Versions

v7.4.0 → v8.0.02025-11-05

v6.4.32 → 7.3.x-dev2026-01-20

v7.4.4 → v8.0.42026-01-23

6.4.x-dev → 7.4.x-dev2026-03-17

7.4.x-dev → 8.0.x-dev2026-03-17

PHP version history (9 changes)v4.4.0-BETA2PHP ^7.1.3

v5.0.0-BETA2PHP ^7.2.9

v5.0.0PHP ^7.2.5

v5.1.0-RC2PHP &gt;=7.2.5

v4.4.10PHP &gt;=7.1.3

v6.0.0-BETA1PHP &gt;=8.0.2

v6.1.0-BETA1PHP &gt;=8.1

v7.0.0PHP &gt;=8.2

v8.0.0-BETA1PHP &gt;=8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/47313?v=4)[Fabien Potencier](/maintainers/fabpot)[@fabpot](https://github.com/fabpot)

---

Top Contributors

[![nicolas-grekas](https://avatars.githubusercontent.com/u/243674?v=4)](https://github.com/nicolas-grekas "nicolas-grekas (463 commits)")[![fabpot](https://avatars.githubusercontent.com/u/47313?v=4)](https://github.com/fabpot "fabpot (95 commits)")[![derrabus](https://avatars.githubusercontent.com/u/1506493?v=4)](https://github.com/derrabus "derrabus (75 commits)")[![xabbuh](https://avatars.githubusercontent.com/u/1957048?v=4)](https://github.com/xabbuh "xabbuh (58 commits)")[![fancyweb](https://avatars.githubusercontent.com/u/3658119?v=4)](https://github.com/fancyweb "fancyweb (18 commits)")[![yceruto](https://avatars.githubusercontent.com/u/2028198?v=4)](https://github.com/yceruto "yceruto (14 commits)")[![wouterj](https://avatars.githubusercontent.com/u/749025?v=4)](https://github.com/wouterj "wouterj (13 commits)")[![keradus](https://avatars.githubusercontent.com/u/2716794?v=4)](https://github.com/keradus "keradus (11 commits)")[![lyrixx](https://avatars.githubusercontent.com/u/408368?v=4)](https://github.com/lyrixx "lyrixx (10 commits)")[![alexandre-daubois](https://avatars.githubusercontent.com/u/2144837?v=4)](https://github.com/alexandre-daubois "alexandre-daubois (7 commits)")[![javiereguiluz](https://avatars.githubusercontent.com/u/73419?v=4)](https://github.com/javiereguiluz "javiereguiluz (6 commits)")[![jderusse](https://avatars.githubusercontent.com/u/578547?v=4)](https://github.com/jderusse "jderusse (6 commits)")[![mpdude](https://avatars.githubusercontent.com/u/1202333?v=4)](https://github.com/mpdude "mpdude (4 commits)")[![OskarStark](https://avatars.githubusercontent.com/u/995707?v=4)](https://github.com/OskarStark "OskarStark (4 commits)")[![ogizanagi](https://avatars.githubusercontent.com/u/2211145?v=4)](https://github.com/ogizanagi "ogizanagi (4 commits)")[![chalasr](https://avatars.githubusercontent.com/u/7502063?v=4)](https://github.com/chalasr "chalasr (4 commits)")[![PhilETaylor](https://avatars.githubusercontent.com/u/400092?v=4)](https://github.com/PhilETaylor "PhilETaylor (3 commits)")[![Tobion](https://avatars.githubusercontent.com/u/610090?v=4)](https://github.com/Tobion "Tobion (3 commits)")[![MatTheCat](https://avatars.githubusercontent.com/u/1898254?v=4)](https://github.com/MatTheCat "MatTheCat (3 commits)")[![alamirault](https://avatars.githubusercontent.com/u/9253091?v=4)](https://github.com/alamirault "alamirault (2 commits)")

---

Tags

componentphpsymfonysymfony-component

### Embed Badge

![Health badge](/badges/symfony-error-handler/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.7k509.9M17.0k](/packages/laravel-framework)[php-debugbar/php-debugbar

Debug bar in the browser for php application

4.4k21.3M40](/packages/php-debugbar-php-debugbar)[symfony/debug-bundle

Provides a tight integration of the Symfony VarDumper component and the ServerLogCommand from MonologBridge into the Symfony full-stack framework

2.4k115.8M824](/packages/symfony-debug-bundle)[spatie/laravel-ignition

A beautiful error page for Laravel applications.

573146.7M471](/packages/spatie-laravel-ignition)[spatie/ignition

A beautiful error page for PHP applications.

511147.6M69](/packages/spatie-ignition)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M343](/packages/drupal-core-recommended)

PHPackages © 2026

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