Home

Awesome

MailExceptionBundle

Email you when Symfony2 Exceptions occurs with some information.

NameBadgeNameBadge
BuildBuild StatusLatest StableLatest Stable Version
Quality ScoreScrutinizer Quality ScoreLatest UnstableLatest Unstable Version
Code CoverageCode CoverageTotal DownloadsTotal Downloads
InsightSensioLabsInsightLicenseLicense
DependenciesDependency Status

Installation

Download the Bundle.

composer require "desarrolla2/mail-exception-bundle"

Enable the Bundle

// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new  Desarrolla2\Bundle\MailExceptionBundle\MailExceptionBundle(),
        );

        // ...
    }

    // ...
}

Usage

You need put something like this in your config.yml

mail_exception:
    from: 'your@email.com'
    to: 'your@email.com'
    subject: 'An error has ocurred'
    avoid:
        environments: #this environments will be ignored
        
            - 'dev'
            - 'test'
            
        exceptions: #this exceptions will be ignored
        
            - 'Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException'
            - 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException'
            

Example

When a exception occurs you will receive in your mail inbox something like this.

screenshot

Contact

You can contact with me on @desarrolla2.