2017 © Pedro Peláez
 

symfony-bundle airbrake-bundle

Airbrake API v3 integration for Symfony 2/3

image

aminin/airbrake-bundle

Airbrake API v3 integration for Symfony 2/3

  • Monday, March 5, 2018
  • by aminin
  • Repository
  • 1 Watchers
  • 7 Stars
  • 11,124 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 8 Versions
  • 11 % Grown

The README.md

AmiAirbrakeBundle

Build Status Coding Style Latest Stable Version Total Downloads Latest Unstable Version SensioLabsInsight License, (*1)

Airbrake.io & Errbit integration for Symfony 3/4/5. This bundle plugs the Airbrake API client into Symfony project., (*2)

Prerequisites

This version of the bundle requires Symfony 3.4+ and php 7.2+, (*3)

Installation

Step 1: Download AmiAirbrakeBundle using composer

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

$ composer require aminin/airbrake-bundle

Step 2: Enable the bundle

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

<?php
// app/AppKernel.php

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

Step 3: Configure the AmiAirbrakeBundle

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

# app/config/config.yml
ami_airbrake:
    project_id:  YOUR-PROJECT-ID
    project_key: YOUR-API-KEY

Configuration reference

ami_airbrake:
    # This parameter is required
    # For Errbit the exact value of project_id doesn't matter
    project_id: YOUR-PROJECT-ID

    # 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.
    project_key: YOUR-API-KEY

    # By default, it is set to api.airbrake.io.
    # A host is a web address containing a scheme ("http" or "https"), a host and a port.
    # You can omit the scheme ("https" will be assumed) and the port (80 or 443 will be assumed).
    host: http://errbit.localhost:8000

    # 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"]

parameters:
  # You may modify these parameters at your own risk
  ami_airbrake.notifier.class: 'Airbrake\Notifier'
  ami_airbrake.exception_listener.class: 'Ami\AirbrakeBundle\EventListener\ExceptionListener'
  ami_airbrake.shutdown_listener.class: 'Ami\AirbrakeBundle\EventListener\ShutdownListener'

Usage

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

You may access the Notifier as ami_airbrake.notifier service, (*8)

    /** @var ContainerInterface $container */
    $container->get('ami_airbrake.notifier')->addFilter(function ($notice) {
        $notice['context']['environment'] = 'production';
        return $notice;
    });

License

This bundle is under the MIT license. See the complete license in the Resources/meta/LICENSE, (*9)

References

Airbrake API client: https://github.com/airbrake/phpbrake, (*10)

The Versions

05/03 2018

dev-master

9999999-dev

Airbrake API v3 integration for Symfony 2/3

  Sources   Download

MIT

The Requires

 

The Development Requires

by Anton Minin

05/03 2018

v0.3.0

0.3.0.0

Airbrake API v3 integration for Symfony 2/3

  Sources   Download

MIT

The Requires

 

The Development Requires

by Anton Minin

05/03 2018

v0.2.0

0.2.0.0

Airbrake API v3 integration for Symfony 2/3

  Sources   Download

MIT

The Requires

 

The Development Requires

by Anton Minin

23/08 2017

v0.1.4

0.1.4.0

Airbrake API v3 integration for Symfony 2/3

  Sources   Download

MIT

The Requires

 

The Development Requires

by Anton Minin

22/03 2016

v0.1.3

0.1.3.0

Airbrake API v3 integration for Symfony2

  Sources   Download

MIT

The Requires

 

The Development Requires

by Anton Minin

21/03 2016

v0.1.2

0.1.2.0

Airbrake API v3 integration for Symfony2

  Sources   Download

MIT

The Requires

 

by Anton Minin

18/03 2016

v0.1.1

0.1.1.0

Airbrake API v3 integration for Symfony2

  Sources   Download

MIT

The Requires

 

by Anton Minin

13/03 2016

v0.1.0

0.1.0.0

Airbrake API v3 integration for Symfony2

  Sources   Download

MIT

The Requires

 

by Anton Minin