2017 © Pedro Peláez
 

symfony-bundle airbrake-bundle

Airbrake.io integration for Symfony

image

eo/airbrake-bundle

Airbrake.io integration for Symfony

  • Wednesday, January 18, 2017
  • by eymengunay
  • Repository
  • 3 Watchers
  • 6 Stars
  • 49,791 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 14 Forks
  • 2 Open issues
  • 7 Versions
  • 2 % Grown

The README.md

EoAirbrakeBundle

Latest Stable Version Dependencies Status, (*1)

Airbrake.io & Errbit integration for Symfony2., (*2)

Prerequisites

This version of the bundle requires Symfony 2.1+, (*3)

Installation

Step 1: Download EoAirbrakeBundle using composer

Add EoAirbrakeBundle in your composer.json:, (*4)

{
    "require": {
        "eo/airbrake-bundle": "dev-master"
    }
}

Now tell composer to download the bundle by running the command:, (*5)

$ php composer.phar update eo/airbrake-bundle

Composer will install the bundle to your project's vendor/eo directory., (*6)

Step 2: Enable the bundle

Enable the bundle in the kernel:, (*7)

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Eo\AirbrakeBundle\EoAirbrakeBundle(),
    );
}

Step 3: Configure the EoAirbrakeBundle

Now that you have properly installed and enabled EoAirbrakeBundle, the next step is to configure the bundle to work with the specific needs of your application., (*8)

Add the following configuration to your config.yml file, (*9)

# app/config/config.yml
eo_airbrake:
    api_key: YOUR-API-KEY

Step 4 (Optional): Add EoAirbrakeBundle routing to simulate an error exception:

If you want to simulate an exception and test your configuration you can add the following route in your application., (*10)

# app/config/routing.yml
eo_airbrake_simulate:
    pattern: /airbrake/simulate
    defaults:  { _controller:  EoAirbrakeBundle:Simulate:index }

You will now be able to access the example controller from: http://domain.tld/airbrake/simulate, (*11)

Configuration reference

eo_airbrake:
    # Omit this key if you need to enable/disable the bundle temporarily 
    # If not given, this bundle will ignore all exceptions and won't send any data to remote.
    api_key: YOUR-API-KEY

    # By default, the notifier uses a socket connection to send the exceptions to Airbrake, 
    # which WON'T wait for a response back from the server. 
    # If this is not derisable for your application, you can pass async: false 
    # and the notifier will send an syncronous notification using cURL.
    async: true

    # If you are using your own hosted implementation of 
    # Airbrake (such as Errbit) you will have to specify your custom host name.
    host: errbit.example.com

    # You might want to ignore some exceptions such as http not found, access denied etc.
    # By default this bundle ignores all HttpException instances. (includes HttpNotFoundException, AccessDeniedException)
    # To log all exceptions leave this array empty.
    ignored_exceptions: ["Symfony\Component\HttpKernel\Exception\HttpException"]

    # If you want to force override of whether or not to use SSL you can set secure to true/false whether or not to use SSL you can set secure to true/false
    # By default secure is set to true
    secure: true

Usage

Once configured, bundle will automatically send exceptions/errors to airbrake server., (*12)

Logging javascript errors

EoAirbrakeBundle includes a twig extension for airbrake javascript notifier. To start logging exceptions on client side you have to add {{ airbrake_notifier() }} function in your base template:, (*13)

<!doctype html>
<html lang="en">
    <head>
        <title>Hello World</title>
        <!-- Airbrake notifier -->
        {{ airbrake_notifier() }}
    </head>
...

License

This bundle is under the MIT license. See the complete license in the bundle:, (*14)

Resources/meta/LICENSE

Reporting an issue or a feature request

Issues and feature requests related to this bundle are tracked in the Github issue tracker https://github.com/eymengunay/EoAirbrakeBundle/issues., (*15)

The Versions

18/01 2017

dev-master

9999999-dev

Airbrake.io integration for Symfony

  Sources   Download

MIT

The Requires

 

exception airbrake errbit

26/10 2016

v1.0.5

1.0.5.0

Airbrake.io integration for Symfony

  Sources   Download

MIT

The Requires

 

exception airbrake errbit

30/07 2015

v1.0.4

1.0.4.0

Airbrake.io integration for Symfony2

  Sources   Download

MIT

The Requires

 

exception airbrake errbit

02/06 2014

v1.0.3

1.0.3.0

Airbrake.io integration for Symfony2

  Sources   Download

MIT

The Requires

 

exception airbrake errbit

04/12 2013

v1.0.2

1.0.2.0

Airbrake.io integration for Symfony2

  Sources   Download

MIT

The Requires

 

exception airbrake errbit

24/10 2013

v1.0.1

1.0.1.0

Airbrake.io integration for Symfony2

  Sources   Download

MIT

The Requires

 

exception airbrake errbit

20/07 2013

v1.0.0

1.0.0.0

Airbrake.io integration for Symfony2

  Sources   Download

MIT

The Requires

 

exception airbrake errbit