PHPackages                             emgiezet/errbit-php - 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. emgiezet/errbit-php

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

emgiezet/errbit-php
===================

errbit/airbrake integration with php with psr-2

3.0.3(4mo ago)44146.2k↓14.3%143MITPHPPHP ^8.1||^8.2||^8.3||^8.4CI passing

Since Sep 30Pushed 4mo ago4 watchersCompare

[ Source](https://github.com/emgiezet/errbit-php)[ Packagist](https://packagist.org/packages/emgiezet/errbit-php)[ Docs](https://github.com/emgiezet/errbitPHP)[ RSS](/packages/emgiezet-errbit-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (7)Versions (30)Used By (3)

Errbit &amp; Airbrake Client for PHP
====================================

[](#errbit--airbrake-client-for-php)

[![Coverage Status](https://camo.githubusercontent.com/9f1db5d93888987e07724d1c3ea0a3044a721be68601878fa0cf68ad21ca9568/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f656d6769657a65742f6572726269745048502f62616467652e706e67)](https://coveralls.io/r/emgiezet/errbitPHP)[![Build Status](https://github.com/emgiezet/errbit-php/actions/workflows/ci.yml/badge.svg)](https://github.com/emgiezet/errbit-php/actions/workflows/ci.yml)[![Latest Stable Version](https://camo.githubusercontent.com/28740bd014381349a3c9552cf7240b742af0e6ee84b1b15912773a66b4df1a19/68747470733a2f2f706f7365722e707567782e6f72672f656d6769657a65742f6572726269742d7068702f762f737461626c652e706e67)](https://packagist.org/packages/emgiezet/errbit-php)[![SymfonyInsight](https://camo.githubusercontent.com/50322033ca7da6bac56a987e596639a8e1ba1e2cc74f7de5d6644bef9a5ac986/68747470733a2f2f696e73696768742e73796d666f6e792e636f6d2f70726f6a656374732f61306334303566622d386565392d343065392d616366312d6565653038346663333561362f6d696e692e737667)](https://insight.symfony.com/projects/a0c405fb-8ee9-40e9-acf1-eee084fc35a6)

This is a full-featured client to add integration with [Errbit](https://github.com/errbit/errbit) (or Airbrake) to any PHP 8.2+ application.

PHP Version Requirements
------------------------

[](#php-version-requirements)

Library VersionPHP Version1.xPHP 5.32.xPHP 8.0, 8.1**3.x****PHP 8.2, 8.3, 8.4** (recommended)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.

What is for?
------------

[](#what-is-for)

Handling your errors and passing them to the Error Retention tool called [Errbit](https://github.com/errbit/errbit). It's a free alternative of sentry.io or airbrake.io. Check the presentation below!

[![Huston whe have an Airbrake](https://camo.githubusercontent.com/084eabe300f4a02efa593aef82e30301981326206c155f805159faf81b9f5a34/687474703a2f2f696d6167652e736c696465736861726563646e2e636f6d2f687573746f6e776568617665616e6169726272616b652d3133313132353135323633372d70687061707030322f39352f736c6964652d312d3633382e6a70673f31333835343135303833)](http://www.slideshare.net/MaxMaecki/meetphp-11-huston-we-have-an-airbrake)

Upgrading to v3.0
-----------------

[](#upgrading-to-v30)

Version 3.0 contains breaking changes. If you're upgrading from v2.x, please note:

- **PHP 8.0 and 8.1 support has been dropped** - Minimum PHP version is now 8.2
- **Removed `ErrorInterface`** - Use `\Throwable` type hints instead
- **Changed `WriterInterface::write()` signature** - Now accepts `\Throwable` instead of `ErrorInterface`
- **Updated error class constructors** - `Notice`, `Warning`, `Error`, `Fatal` now use named parameters

ChangeLog
---------

[](#changelog)

Check the:

- [Full change log here](Resources/doc/changlelog.md)
- [Releases](https://github.com/emgiezet/errbitPHP/releases)

Installation
------------

[](#installation)

### Composer Way

[](#composer-way)

For PHP 5.3

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

For PHP 8.0, 8.1

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

For PHP 8.2+ (recommended)

```
require: {
    "emgiezet/errbit-php": "^3.0"
}
```

Usage
-----

[](#usage)

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

```
use Errbit\Errbit;

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

View the [full configuration](https://github.com/emgiezet/errbitPHP/blob/master/Resources/doc/full_config.md).

This will register error handlers:

```
set_error_handler();
set_exception_handler();
register_shutdown_function();
```

And log all the errors intercepted by handlers to your errbit.

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

```
use Errbit\Errbit;

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

Using your own error handler
----------------------------

[](#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

```
use Errbit\Errbit;
Errbit::instance()->notify($exception);
```

With this type of use. Library will not handle the errors collected by:

```
set_error_handler();
register_shutdown_function();
```

Using only some of the default handlers
---------------------------------------

[](#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.

```
use Errbit\Errbit;
Errbit::instance()->start(array('error', 'fatal')); // using our own exception handler
```

Symfony Integration
-------------------

[](#symfony-integration)

### Symfony 7

[](#symfony-7)

See the [Symfony 7 integration guide](Resources/doc/symfony7_integration.md) for modern Symfony 7+ integration using PHP attributes and best practices.

### Symfony 2

[](#symfony-2)

See the [Symfony 2 documentation](Resources/doc/symfony2_integration.md) for legacy Symfony 2 integration.

Kohana 3.3 Integration
----------------------

[](#kohana-33-integration)

check out the [kohana-errbit](https://github.com/kwn/kohana-errbit) for kohana 3.3 integration.

Symfony 1.4 Integration
-----------------------

[](#symfony-14-integration)

No namespaces in php 5.2 so this library can't be used. Go to [filipc/sfErrbitPlugin](https://github.com/filipc/sfErrbitPlugin) and monitor your legacy 1.4 applications.

License &amp; Copyright
-----------------------

[](#license--copyright)

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

Contributors
------------

[](#contributors)

Rest of the contributors: Author: [emgiezet](https://github.com/emgiezet/)[Contributors page](https://github.com/emgiezet/errbitPHP/graphs/contributors)

###  Health Score

64

—

FairBetter than 99% of packages

Maintenance77

Regular maintenance activity

Popularity44

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity91

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 75.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~320 days

Recently: every ~142 days

Total

15

Last Release

124d ago

Major Versions

1.1.1 → 2.0.02023-02-07

2.0.2 → 3.0.02024-06-25

PHP version history (5 changes)1.0.0PHP &gt;=5.3.2

2.0.0PHP ^8.1

2.0.1PHP ^8.0||^8.1

2.0.2PHP ^8.0||8.1||8.2||^8.3

3.0.1PHP ^8.1||^8.2||^8.3||^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/0097d294b2f26fb737d68e1dd37c954870bce0db01b61fad25caae641fe29f54?d=identicon)[emgiezet](/maintainers/emgiezet)

---

Top Contributors

[![emgiezet](https://avatars.githubusercontent.com/u/1410665?v=4)](https://github.com/emgiezet "emgiezet (118 commits)")[![d11wtq](https://avatars.githubusercontent.com/u/37948?v=4)](https://github.com/d11wtq "d11wtq (24 commits)")[![stloyd](https://avatars.githubusercontent.com/u/67402?v=4)](https://github.com/stloyd "stloyd (4 commits)")[![danielbeardsley](https://avatars.githubusercontent.com/u/26855?v=4)](https://github.com/danielbeardsley "danielbeardsley (3 commits)")[![mikk150](https://avatars.githubusercontent.com/u/4953629?v=4)](https://github.com/mikk150 "mikk150 (1 commits)")[![nkovacs](https://avatars.githubusercontent.com/u/2269242?v=4)](https://github.com/nkovacs "nkovacs (1 commits)")[![bitdeli-chef](https://avatars.githubusercontent.com/u/3092978?v=4)](https://github.com/bitdeli-chef "bitdeli-chef (1 commits)")[![tijsverkoyen](https://avatars.githubusercontent.com/u/250042?v=4)](https://github.com/tijsverkoyen "tijsverkoyen (1 commits)")[![danielneis](https://avatars.githubusercontent.com/u/17608?v=4)](https://github.com/danielneis "danielneis (1 commits)")[![gitter-badger](https://avatars.githubusercontent.com/u/8518239?v=4)](https://github.com/gitter-badger "gitter-badger (1 commits)")[![maintux](https://avatars.githubusercontent.com/u/1492713?v=4)](https://github.com/maintux "maintux (1 commits)")

---

Tags

airbrakeerror-trackingerrbiterrbit php

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm, Rector

Type Coverage Yes

### Embed Badge

![Health badge](/badges/emgiezet-errbit-php/health.svg)

```
[![Health](https://phpackages.com/badges/emgiezet-errbit-php/health.svg)](https://phpackages.com/packages/emgiezet-errbit-php)
```

###  Alternatives

[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1851.5M3](/packages/justbetter-magento2-sentry)[rigor789/airbrake-laravel

Laravel package for the Airbrake API, which supports Errbit

1636.5k](/packages/rigor789-airbrake-laravel)[kouz/laravel-airbrake

Laravel service provider for Airbrake https://github.com/airbrake/phpbrake

26298.1k](/packages/kouz-laravel-airbrake)[lordsimal/cakephp-sentry

Sentry plugin for CakePHP

12270.3k](/packages/lordsimal-cakephp-sentry)[inspector-apm/inspector-symfony

Code Execution Monitoring for Symfony applications.

2830.1k2](/packages/inspector-apm-inspector-symfony)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
