PHPackages                             elao/error-notifier-bundle - 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. elao/error-notifier-bundle

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

elao/error-notifier-bundle
==========================

This bundle sends a html email when an error occurs.

v1.1.0(6y ago)61258.1k↓36.1%27[6 issues](https://github.com/Elao/ErrorNotifierBundle/issues)MITPHPPHP &gt;=5.3.2

Since Jan 17Pushed 6y ago20 watchersCompare

[ Source](https://github.com/Elao/ErrorNotifierBundle)[ Packagist](https://packagist.org/packages/elao/error-notifier-bundle)[ Docs](http://github.com/Elao/ErrorNotifierBundle)[ RSS](/packages/elao-error-notifier-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (19)Used By (0)

Elao ErrorNotifier Bundle
=========================

[](#elao-errornotifier-bundle)

[![Latest Stable Version](https://camo.githubusercontent.com/8340b14aa6655efe012145bf8091bf8d6b13f180b4b7516edf468ce891a9a383/68747470733a2f2f706f7365722e707567782e6f72672f656c616f2f6572726f722d6e6f7469666965722d62756e646c652f762f737461626c65)](https://packagist.org/packages/elao/error-notifier-bundle)[![Total Downloads](https://camo.githubusercontent.com/5247f5c897f7d4739590d9a580e1673b80777c607028ba4186361cf3cb6bdcf0/68747470733a2f2f706f7365722e707567782e6f72672f656c616f2f6572726f722d6e6f7469666965722d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/elao/error-notifier-bundle)[![Monthly Downloads](https://camo.githubusercontent.com/b7c2d5ecadebca3dd4cb17733a6109e7b04f8449ba7e70c34b79442dd2ac7e13/68747470733a2f2f706f7365722e707567782e6f72672f656c616f2f6572726f722d6e6f7469666965722d62756e646c652f642f6d6f6e74686c79)](https://packagist.org/packages/elao/error-notifier-bundle)[![Latest Unstable Version](https://camo.githubusercontent.com/157c2367322823744b4837b9b75442058fafcdff6a6245caddf8aa4fbff3ee22/68747470733a2f2f706f7365722e707567782e6f72672f656c616f2f6572726f722d6e6f7469666965722d62756e646c652f762f756e737461626c65)](https://packagist.org/packages/elao/error-notifier-bundle)[![License](https://camo.githubusercontent.com/d2626ea3a62ea297f9b222ab36955a099d16a24499f576062bf9330aab8ca077/68747470733a2f2f706f7365722e707567782e6f72672f656c616f2f6572726f722d6e6f7469666965722d62756e646c652f6c6963656e7365)](https://packagist.org/packages/elao/error-notifier-bundle)

What is it?
-----------

[](#what-is-it)

This bundle sends an email each time there is a 500 error on the production server. You can also be notified of 404 or PHP fatal errors.

The email contains a lot of information: see the screenshot at the end of the README.

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

[](#installation)

### Symfony &gt;= 2.1

[](#symfony--21)

Add this in your `composer.json`

```
"require": {
    "elao/error-notifier-bundle" : "dev-master"
},

```

And run `php composer.phar update elao/error-notifier-bundle`

### Symfony 2.0.x

[](#symfony-20x)

Add the followings lines to your `deps` file

```
[ElaoErrorNotifierBundle]
    git=git://github.com/Elao/ErrorNotifierBundle.git
    target=bundles/Elao/ErrorNotifierBundle

```

and don't forget to register it in your autoloading `app/autoload.php`

```
$loader->registerNamespaces(array(
    ...
    'Elao' => __DIR__.'/../vendor/bundles',
));
```

and finally run the vendors script:

```
$ php bin/vendors install
```

### Register the bundle in `app/AppKernel.php`

[](#register-the-bundle-in-appappkernelphp)

```
public function registerBundles()
{
    return array(
        // ...
        new Elao\ErrorNotifierBundle\ElaoErrorNotifierBundle(),
    );
}
```

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

[](#configuration)

Add in your `config_prod.yml` file, you don't need error notifier when you are in dev environment.

```
# app/config/config_prod.yml
elao_error_notifier:
    from: from@example.com
    to: to@example.com
    handle404: true # default :  false
    handleHTTPcodes: ~
    mailer: your.mailer.id # default : mailer
    handlePHPErrors: true # catch fatal erros and email them
    handlePHPWarnings: true # catch warnings and email them
    handleSilentErrors: false # don't catch error on method with an @
    filteredRequestParams: [password] # replace request contents of parameter "password" with stars
    ignoredClasses: ~
```

### How to setup another mailer for sending the error mail

[](#how-to-setup-another-mailer-for-sending-the-error-mail)

The mailer option has been added to let the application send the error mail via local smtp instead of using the regular quota on 3rd mailer services.

For example, if you wish to use an custom mailer that send mails via your server mail transport, create this one in the `config.yml` of your project:

```
# app/config/config.yml
swiftmailer:
    default_mailer: default
    mailers:
        default:
            transport: smtp
            host: localhost
            username: mylogin
            password: mypassword
        notifier:
            transport: mail
```

And after just change the `mailer` key on your `config_prod.yml` :

```
# app/config/config_prod.yml
elao_error_notifier:
    mailer: swiftmailer.mailer.notifier
```

### How to ignore errors raised by given classes ?

[](#how-to-ignore-errors-raised-by-given-classes-)

Sometimes, you want the bundle not to send email for errors raised by a given class. You can now do it by adding the name of the class raising the error in the `ignored_class` key.

```
# app/config/config_prod.yml
elao_error_notifier:
    ignoredClasses:
        - "Guzzle\\Http\\Exception\\ServerErrorResponseException"
        - ...
```

### How to handle other HTTP errors by given error code ?

[](#how-to-handle-other-http-errors-by-given-error-code-)

If you want the bundle to send email for other HTTP errors than 500 and 404, you can now specify the list of error codes you want to handle.

```
# app/config/config_prod.yml
elao_error_notifier:
    handleHTTPcodes:
        - 405
        - ...
```

### How to avoid sending many same messages for one error ?

[](#how-to-avoid-sending-many-same-messages-for-one-error-)

If an error occurs on a website with a lot of active visitors you'll get spammed by the notifier for the same error.

In order to avoid getting spammed, use the `repeatTimeout` option.

```
# app/config/config_prod.yml
elao_error_notifier:
    repeatTimeout: 3600
```

In this example, if an errors X occurs, and the same error X occurs again within 1 hour, you won't recieve a 2nd email.

Twig Extension
--------------

[](#twig-extension)

There are also some extensions that you can use in your Twig templates (thanks to [Goutte](https://github.com/Goutte)).

Extends Twig with:

```
{{ "my string, whatever" | pre }}  --> wraps with
{{ myBigVar | yaml_dump | pre }} as {{ myBigVar | ydump }} or {{ myBigVar | dumpy }}
{{ myBigVar | var_dump | pre }}  as {{ myBigVar | dump }}

You may control the depth of recursion with a parameter, say foo = array('a'=>array('b'=>array('c','d')))

{{ foo | dumpy(0) }} --> 'array of 1'
{{ foo | dumpy(2) }} -->
                           a:
                             b: 'array of 2'
{{ foo | dumpy(3) }} -->
                           a:
                             b:
                               - c
                               - d
```

Default value is 1 (MAX\_DEPTH const).

### How to ignore sending HTTP errors if request comes from any of given IPs?

[](#how-to-ignore-sending-http-errors-if-request-comes-from-any-of-given-ips)

If you want to ignore sending HTTP errors if the request comes from specific IPs, you can now specify the list of ignored IPs.

```
# app/config/config_prod.yml
elao_error_notifier:
    ignoredIPs:
        - "178.63.45.100"
        - ...
```

### How to ignore sending HTTP errors if the user agent match a given pattern?

[](#how-to-ignore-sending-http-errors-if-the-user-agent-match-a-given-pattern)

For some reasons you may need to ignore sending notifications if request comes from some user agents. Often you will need to use this feature with annoying crawlers which uses artificial intelligence to generate URLs which may not exist in your site.

```
# app/config/config_prod.yml
elao_error_notifier:
    ignoredAgentsPattern: "(Googlebot|bingbot)"
```

### How to ignore sending HTTP errors if the URI match a given pattern?

[](#how-to-ignore-sending-http-errors-if-the-uri-match-a-given-pattern)

For example if you want to ignore all not exist images errors you may do something like that.

```
# app/config/config_prod.yml
elao_error_notifier:
    ignoredUrlsPattern: "\.(jpg|png|gif)"
```

### How to filter sensitive data in request variables?

[](#how-to-filter-sensitive-data-in-request-variables)

Sometimes you don't want to receive passwords or other sensitive data via email. With `filteredRequestParams` you can specify request variable names which should be replaced with stars. This works for named forms, too (e.g. `myFormName[password]`).

```
# app/config/config_prod.yml
elao_error_notifier:
    filteredRequestParams:
      - "password"
      - "creditCardNo"
      - "_token"
```

Screenshot
----------

[](#screenshot)

[![Email ErrorNotifier Bundle](https://camo.githubusercontent.com/687a8af3a3633b48bd718e521d1ed7bff3c7beb5f371701a85bf9b7eadfb6ece/687474703a2f2f6934392e74696e797069632e636f6d2f3277636b3336652e706e67 "Email ErrorNotifier Bundle")](https://camo.githubusercontent.com/687a8af3a3633b48bd718e521d1ed7bff3c7beb5f371701a85bf9b7eadfb6ece/687474703a2f2f6934392e74696e797069632e636f6d2f3277636b3336652e706e67)

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity47

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~136 days

Recently: every ~65 days

Total

18

Last Release

2545d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/623877?v=4)[Elao](/maintainers/Elao)[@Elao](https://github.com/Elao)

---

Top Contributors

[![benji07](https://avatars.githubusercontent.com/u/166890?v=4)](https://github.com/benji07 "benji07 (57 commits)")[![tristanbes](https://avatars.githubusercontent.com/u/346010?v=4)](https://github.com/tristanbes "tristanbes (29 commits)")[![ollietb](https://avatars.githubusercontent.com/u/342090?v=4)](https://github.com/ollietb "ollietb (21 commits)")[![EmmanuelVella](https://avatars.githubusercontent.com/u/663607?v=4)](https://github.com/EmmanuelVella "EmmanuelVella (5 commits)")[![Padam87](https://avatars.githubusercontent.com/u/776488?v=4)](https://github.com/Padam87 "Padam87 (3 commits)")[![nervo](https://avatars.githubusercontent.com/u/95935?v=4)](https://github.com/nervo "nervo (3 commits)")[![justinhilles](https://avatars.githubusercontent.com/u/63185?v=4)](https://github.com/justinhilles "justinhilles (2 commits)")[![binarious](https://avatars.githubusercontent.com/u/200375?v=4)](https://github.com/binarious "binarious (2 commits)")[![ickbinhier](https://avatars.githubusercontent.com/u/2810904?v=4)](https://github.com/ickbinhier "ickbinhier (2 commits)")[![JohanLopes](https://avatars.githubusercontent.com/u/729464?v=4)](https://github.com/JohanLopes "JohanLopes (2 commits)")[![ogizanagi](https://avatars.githubusercontent.com/u/2211145?v=4)](https://github.com/ogizanagi "ogizanagi (2 commits)")[![dfridrich](https://avatars.githubusercontent.com/u/3758421?v=4)](https://github.com/dfridrich "dfridrich (1 commits)")[![daum](https://avatars.githubusercontent.com/u/52372?v=4)](https://github.com/daum "daum (1 commits)")[![NicolasDievart](https://avatars.githubusercontent.com/u/4649817?v=4)](https://github.com/NicolasDievart "NicolasDievart (1 commits)")[![woecifaun](https://avatars.githubusercontent.com/u/5421942?v=4)](https://github.com/woecifaun "woecifaun (1 commits)")[![chalasr](https://avatars.githubusercontent.com/u/7502063?v=4)](https://github.com/chalasr "chalasr (1 commits)")[![bonswouar](https://avatars.githubusercontent.com/u/615053?v=4)](https://github.com/bonswouar "bonswouar (1 commits)")[![peelandsee](https://avatars.githubusercontent.com/u/1212677?v=4)](https://github.com/peelandsee "peelandsee (1 commits)")[![PhilETaylor](https://avatars.githubusercontent.com/u/400092?v=4)](https://github.com/PhilETaylor "PhilETaylor (1 commits)")[![rolfviljamaa](https://avatars.githubusercontent.com/u/3079132?v=4)](https://github.com/rolfviljamaa "rolfviljamaa (1 commits)")

---

Tags

bundleerrornotifierelao

### Embed Badge

![Health badge](/badges/elao-error-notifier-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/elao-error-notifier-bundle/health.svg)](https://phpackages.com/packages/elao-error-notifier-bundle)
```

###  Alternatives

[twig/extra-bundle

A Symfony bundle for extra Twig extensions

91492.0M315](/packages/twig-extra-bundle)[lexik/translation-bundle

This bundle allows to import translation files content into the database and provide a GUI to edit translations.

4362.7M19](/packages/lexik-translation-bundle)[pentatrion/vite-bundle

Vite integration for your Symfony app

2755.3M13](/packages/pentatrion-vite-bundle)[guanguans/laravel-exception-notify

Monitor exception and report to the notification channels(Log、Mail、AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

14642.7k1](/packages/guanguans-laravel-exception-notify)[inspector-apm/inspector-symfony

Code Execution Monitoring for Symfony applications.

2830.1k2](/packages/inspector-apm-inspector-symfony)

PHPackages © 2026

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