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

AbandonedSymfony-bundle

nodrew/php-airbrake-bundle
==========================

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

152.8k12PHP

Since Oct 29Pushed 9y agoCompare

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

READMEChangelogDependenciesVersions (1)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]

```

*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:

```
