PHPackages                             ibrows/php-airbrake-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. ibrows/php-airbrake-bundle

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

ibrows/php-airbrake-bundle
==========================

This helps binds the php-airbrake module into a Symfony2 bundle for easy use with the framework.

2.0.0(7y ago)011.7kMITPHPPHP &gt;=5.3.1CI failing

Since Jul 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ibrows/PhpAirbrakeBundle)[ Packagist](https://packagist.org/packages/ibrows/php-airbrake-bundle)[ Docs](https://github.com/nodrew/PhpAirbrakeBundle)[ RSS](/packages/ibrows-php-airbrake-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (17)Used By (0)

PHP Airbrake Bundle for Symfony2
================================

[](#php-airbrake-bundle-for-symfony2)

This helps binds the [php-airbrake module](https://github.com/nodrew/php-airbrake) into a Symfony2 bundle for easy use with the framework. It will autoload an exception handler into the framework, so that all uncaught errors are sent to the [Airbrake Service](http://airbrake.io).

Installation Instructions
=========================

[](#installation-instructions)

Using deps (for Symfony 2.0)
----------------------------

[](#using-deps-for-symfony-20)

Add these blocks to the following files

*deps*

```
[PhpAirbrakeBundle]
    git=http://github.com/nodrew/PhpAirbrakeBundle.git
    target=/bundles/Nodrew/Bundle/PhpAirbrakeBundle

[php-airbrake]
    git=http://github.com/nodrew/php-airbrake.git
    target=/bundles/Nodrew/Bundle/PhpAirbrakeBundle/vendor/php-airbrake

```

*app/autoload.php*

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

```

Using composer (for Symfony 2.1)
--------------------------------

[](#using-composer-for-symfony-21)

The best way to install the library is by using [Composer](http://getcomposer.org). Add the following to `composer.json` in the root of your project:

```
{
  "require": {
    "nodrew/php-airbrake-bundle": "dev-master"
  }
}
```

Including bundle in Kernel
--------------------------

[](#including-bundle-in-kernel)

*app/AppKernel.php*

```
public function registerBundles()
{
    $bundles = array(
        // System Bundles
        ...
        new Nodrew\Bundle\PhpAirbrakeBundle\PhpAirbrakeBundle(),
        ...
    );
}

```

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

[](#configuration)

*app/config/config.yml*

```
php_airbrake:
    api_key: %airbrake_api_key%
    api_endpoint: [optional custom API endpoint eg. http://api.airbrake.io/notifier_api/v2/notices]
    queue: [optional resqueue queue name]
    email_to: test@test.ch
    disabled: false # %kernel.debug% maybe

```

*app/config/parameters.ini*

```
    airbrake_api_key="[airpbrake api key]"

```

Calling Airbrake Manually
=========================

[](#calling-airbrake-manually)

The [Airbrake Client](https://github.com/nodrew/php-airbrake) can be found inside the Service Container and can be used like this:

```
