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

ActiveSymfony-bundle[Logging &amp; Monitoring](/categories/logging)

error-explorer/symfony
======================

Error Explorer integration for Symfony - Automatic error tracking with zero configuration

120PHP

Since Jan 7Pushed 4mo agoCompare

[ Source](https://github.com/Error-Explorer/symfony-sdk)[ Packagist](https://packagist.org/packages/error-explorer/symfony)[ RSS](/packages/error-explorer-symfony/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Error Explorer Symfony Bundle
=============================

[](#error-explorer-symfony-bundle)

Automatic error tracking for Symfony applications with zero configuration.

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

[](#installation)

```
composer require error-explorer/symfony
```

Quick Start
-----------

[](#quick-start)

Add your token to your environment:

```
# .env
ERROR_EXPLORER_TOKEN=your_project_token
```

Create the configuration file:

```
# config/packages/error_explorer.yaml
error_explorer:
    token: '%env(ERROR_EXPLORER_TOKEN)%'
```

**That's it!** All exceptions are now captured automatically.

What's Captured Automatically
-----------------------------

[](#whats-captured-automatically)

TypeHow**Exceptions**`kernel.exception` event**HTTP Requests**`kernel.request` / `kernel.response`**SQL Queries**Doctrine middleware**Logs**Monolog handler**Console Commands**Console events**Messenger**Message handled/failed events**User Context**Auto-detected from Security componentFull Configuration
------------------

[](#full-configuration)

```
# config/packages/error_explorer.yaml
error_explorer:
    # Required: Your project token
    token: '%env(ERROR_EXPLORER_TOKEN)%'

    # Or use DSN format instead
    # dsn: 'https://token@api.error-explorer.com/api/v1/webhook'

    # Environment (defaults to kernel.environment)
    environment: '%kernel.environment%'

    # Release version (optional)
    release: '%env(APP_VERSION)%'

    # Capture options (all enabled by default)
    capture:
        exceptions: true
        errors: true           # PHP warnings, notices
        fatal_errors: true     # Fatal errors via shutdown

    # Breadcrumb options
    breadcrumbs:
        max_breadcrumbs: 50
        http_requests: true    # kernel.request/response
        doctrine: true         # SQL queries
        monolog: true          # Log entries
        console: true          # Console commands
        messenger: true        # Messenger messages

    # Context options
    context:
        user: true             # Auto-detect from Security
        request: true          # URL, IP, headers
        server: true           # PHP version, memory

    # Transport options
    transport:
        async: true            # Send after response
        timeout: 3             # HTTP timeout
        retry: 2               # Retry count

    # Additional fields to scrub
    scrub_fields:
        - custom_secret
        - my_api_key

    # Exception listener priority (lower = runs later)
    listener_priority: -1024
```

Optional Enrichment
-------------------

[](#optional-enrichment)

### Add Custom Breadcrumbs

[](#add-custom-breadcrumbs)

```
use ErrorExplorer\ErrorExplorer;

class CheckoutController
{
    public function checkout(): Response
    {
        ErrorExplorer::addBreadcrumb([
            'type' => 'user-action',
            'message' => 'User started checkout',
            'data' => ['cart_items' => 5]
        ]);

        // ... checkout logic
    }
}
```

### Override User Context

[](#override-user-context)

```
// The bundle auto-detects user from Security, but you can override:
ErrorExplorer::setUser([
    'id' => $user->getId(),
    'email' => $user->getEmail(),
    'plan' => $user->getSubscription()->getPlan(),
]);
```

### Add Tags and Extra Data

[](#add-tags-and-extra-data)

```
ErrorExplorer::setTags([
    'feature' => 'checkout',
    'ab_test' => 'new-flow'
]);

ErrorExplorer::setExtra([
    'order_id' => $order->getId(),
    'total' => $order->getTotal()
]);
```

### Manual Exception Capture

[](#manual-exception-capture)

```
try {
    $paymentService->process($order);
} catch (PaymentException $e) {
    ErrorExplorer::captureException($e, [
        'tags' => ['payment' => 'failed'],
        'extra' => ['order_id' => $order->getId()]
    ]);

    throw $e; // Re-throw to let Symfony handle it
}
```

Console Commands
----------------

[](#console-commands)

Errors in console commands are automatically captured. The bundle also clears breadcrumbs between commands to avoid mixing context.

Messenger Workers
-----------------

[](#messenger-workers)

For long-running Messenger workers, the bundle:

- Tracks message received/handled/failed as breadcrumbs
- Captures exceptions on failure (if not retrying)
- Clears breadcrumbs after each successful message

Monolog Integration
-------------------

[](#monolog-integration)

The bundle registers a Monolog handler that records all log entries as breadcrumbs. When an error occurs, you'll see the full log trail in Error Explorer.

To customize the handler:

```
# config/packages/monolog.yaml
monolog:
    handlers:
        error_explorer:
            type: service
            id: error_explorer.monolog_handler
            level: debug  # Capture all levels
```

Requirements
------------

[](#requirements)

- PHP 8.1+
- Symfony 6.0+ or 7.0+
- error-explorer/php-sdk ^1.0

Optional Dependencies
---------------------

[](#optional-dependencies)

- `symfony/security-bundle`: For automatic user detection
- `doctrine/dbal`: For SQL query breadcrumbs
- `monolog/monolog`: For log breadcrumbs

License
-------

[](#license)

MIT

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance52

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/09a1b3bf709516aefba340935f9c1784d986688a173b09e96e55506e9197861a?d=identicon)[ErrorExplorer](/maintainers/ErrorExplorer)

---

Top Contributors

[![Manguet](https://avatars.githubusercontent.com/u/49959776?v=4)](https://github.com/Manguet "Manguet (4 commits)")

### Embed Badge

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

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

###  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)[ekino/newrelic-bundle

Integrate New Relic into Symfony2

28111.2M8](/packages/ekino-newrelic-bundle)

PHPackages © 2026

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