2017 © Pedro Peláez
 

library errbit-php

errbit/airbrake integration with php with psr-2

image

emgiezet/errbit-php

errbit/airbrake integration with php with psr-2

  • Friday, June 17, 2016
  • by emgiezet
  • Repository
  • 3 Watchers
  • 38 Stars
  • 49,151 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 12 Forks
  • 3 Open issues
  • 9 Versions
  • 6 % Grown

The README.md

Errbit & Airbrake Client for PHP

Coverage Status Build Status Dependency Status Latest Stable Version SymfonyInsight Join the chat at https://gitter.im/emgiezet/errbitPHP, (*1)

This is a full-featured client to add integration with Errbit (or Airbrake) to any PHP 8.0 and 8.1 application., (*2)

Original idea and source has no support for php namespaces. Moreover it has a bug and with newest errbit version the xml has not supported chars., (*3)

What is for?

Handling your errors and passing them to the Error Retention tool called Errbit. It's a free alternative of sentry.io or airbrake.io. Check the presentation below!, (*4)

Huston whe have an Airbrake, (*5)

ChangeLog

Check the:, (*6)

[Full change log here] [Releases], (*7)

Installation

Composer Way

For php 5.3, (*8)

require: {
    ...
    "emgiezet/errbit-php": "1.*"
  }

For php 8.0+, (*9)

require: {
    ...
    "emgiezet/errbit-php": "2.*"
  }

Usage

To setup an Errbit instance you need to configure it with an array of parameters. Only two of them are mandatory., (*10)

``` php use Errbit\Errbit;, (*11)

Errbit::instance() ->configure(array( 'api_key' => 'YOUR API KEY', 'host' => 'YOUR ERRBIT HOST, OR api.airbrake.io FOR AIRBRAKE' )) ->start();, (*12)


View the [full configuration](https://github.com/emgiezet/errbitPHP/blob/master/Resources/doc/full_config.md). This will register error handlers: ``` php set_error_handler(); set_exception_handler(); register_shutdown_function();

And log all the errors intercepted by handlers to your errbit., (*13)

If you want to notify an exception manually, you can call notify() without calling a start(). That way you can avoid registering the handlers., (*14)

``` php use Errbit\Errbit;, (*15)

try { somethingErrorProne(); } catch (Exception $e) { Errbit::instance()->notify( $e, array('controller'=>'UsersController', 'action'=>'show') ); }, (*16)


## Using your own error handler If you don't want Errbit to install its own error handlers and prefer to use your own, you can just leave out the call to `start()`, then wherever you catch an Exception (note the errors *must* be converted to Exceptions), simply call ``` php use Errbit\Errbit; Errbit::instance()->notify($exception);

With this type of use. Library will not handle the errors collected by:, (*17)

``` php set_error_handler(); register_shutdown_function();, (*18)


## Using only some of the default handlers There are three error handlers installed by Errbit: exception, error and fatal. By default all three are used. If you want to use your own for some handlers, but not for others, pass the list into the `start()` method. ``` php use Errbit\Errbit; Errbit::instance()->start(array('error', 'fatal')); // using our own exception handler

Symfony2 Integration

See the documentation for symfony2 integration., (*19)

Kohana 3.3 Integration

check out the kohana-errbit for kohana 3.3 integration., (*20)

Symfony 1.4 Integration

No namespaces in php 5.2 so this library can't be used. Go to filipc/sfErrbitPlugin and monitor your legacy 1.4 applications., (*21)

Copyright © mmx3.pl 2013 Licensed under the MIT license. Based on idea of git://github.com/flippa/errbit-php.git but rewritten in 90%., (*22)

Contributors

https://github.com/emgiezet/errbitPHP/graphs/contributors, (*23)

Rest of the contributors: Author: emgiezet Contributors page, (*24)

The Versions

17/06 2016

dev-master

9999999-dev http://github.com/emgiezet/errbitPHP

errbit/airbrake integration with php with psr-2

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

by Avatar karolsojko
by Avatar emgiezet
by flippa
by deathowl

airbrake errbit error tracking errbit php

04/11 2015

1.1.0

1.1.0.0 http://github.com/emgiezet/errbitPHP

errbit/airbrake integration with php with psr-2

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

by Avatar karolsojko
by Avatar emgiezet
by flippa
by deathowl

airbrake errbit error tracking errbit php

15/05 2015

1.0.5

1.0.5.0 http://github.com/emgiezet/errbitPHP

errbit/airbrake integration with php with psr-2

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

by Avatar karolsojko
by Avatar emgiezet
by flippa
by deathowl

airbrake errbit error tracking errbit php

15/04 2014

1.0.4

1.0.4.0 http://github.com/emgiezet/errbitPHP

errbit/airbrake integration with php with psr-2

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

by Avatar karolsojko
by Avatar emgiezet
by flippa
by deathowl

airbrake errbit error tracking errbit php

28/02 2014

1.0.3

1.0.3.0 http://github.com/emgiezet/errbitPHP

errbit/airbrake integration with php with phpcs-2

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

by Avatar karolsojko
by Avatar emgiezet
by flippa

airbrake errbit error tracking errbit php

15/01 2014

1.0.2

1.0.2.0 http://github.com/emgiezet/errbitPHP

errbit/airbrake integration with php with phpcs-2

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

by Avatar karolsojko
by Avatar emgiezet
by flippa

airbrake errbit error tracking errbit php

19/12 2013

dev-guzzle-transport

dev-guzzle-transport http://github.com/emgiezet/errbitPHP

errbit/airbrake integration with php with phpcs-2

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar karolsojko
by Avatar emgiezet
by flippa

airbrake errbit error tracking errbit php

12/10 2013

1.0.1

1.0.1.0 http://github.com/emgiezet/errbitPHP

errbit/airbrake integration with php with phpcs-2

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

by Avatar emgiezet
by flippa

airbrake errbit error tracking errbit php

30/09 2013

1.0.0

1.0.0.0 http://github.com/emgiezet/errbitPHP

errbit integration with php with phpcs-2

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

by Avatar emgiezet
by flippa

airbrake errbit error tracking errbit php