AfterBug error monitoring for PHP applications.

1.0.2 2018-05-24 03:48 UTC


StyleCI Total Downloads Latest Stable Version Latest Unstable Version License

This library detects errors and exceptions in your PHP application and reports them to AfterBug for alerts and reporting.


  • Automatically report exceptions and errors
  • Send customized diagnostic data
  • Attach user information to determine how many people are affected by the error.


The preferred way to install this extension is through composer.

Either run

composer require afterbug/afterbug "~1.0"

Add afterbug/afterbug to your composer.json

"afterbug/afterbug": "~1.0"


$afterbug = AfterBug\Client::make('AFTERBUG_API_KEY')

// Register AfterBug error handler

// will be reported by the exception handler
throw new \Exception('testing exception handler');

Exclude exceptions

Sets for which exception classes we should not send to AfterBug.

$afterbug->registerCallback(function ($config) {


Set a callback to customize the data.

$afterbug->registerCallback(function ($config) {
            'id' => 1,
            'name' => 'Alfa'
            'custom' => 'Your custom data'

Integration with frameworks

Other packages exists to integrate this SDK into the most common frameworks.

Official Integrations

The following integrations are supported by AfterBug team.