PHPackages                             errorgap/errorgap - 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. errorgap/errorgap

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

errorgap/errorgap
=================

PHP notifier for Errorgap error tracking.

v0.1.0(4d ago)031MITPHP ^8.1

Since Jul 7Compare

[ Source](https://github.com/errorgaphq/errorgap-php)[ Packagist](https://packagist.org/packages/errorgap/errorgap)[ Docs](https://github.com/errorgaphq/errorgap-php)[ RSS](/packages/errorgap-errorgap/feed)WikiDiscussions Synced today

READMEChangelogDependencies (3)Versions (2)Used By (1)

errorgap/errorgap
=================

[](#errorgaperrorgap)

PHP notifier for [Errorgap](https://errorgap.com). Captures throwables, normalizes backtraces, and ships notices to an Errorgap server. Use this package for plain PHP, Symfony, Slim, or any framework other than WordPress or Laravel (those have their own dedicated packages).

Install
-------

[](#install)

```
composer require errorgap/errorgap
```

Requires PHP 8.1+.

Configure
---------

[](#configure)

```
use Errorgap\Errorgap;

Errorgap::init([
    'endpoint' => $_ENV['ERRORGAP_ENDPOINT'],
    'projectSlug' => $_ENV['ERRORGAP_PROJECT_SLUG'],
    'apiKey' => $_ENV['ERRORGAP_API_KEY'],
    'environment' => $_ENV['APP_ENV'] ?? 'production',
]);
```

`Errorgap::init` reads the same values from `ERRORGAP_ENDPOINT`, `ERRORGAP_PROJECT_SLUG`, `ERRORGAP_PROJECT_ID`, and `ERRORGAP_API_KEY` when omitted. By default it installs `set_exception_handler` and `set_error_handler`; pass `'captureGlobals' => false` to skip.

Manual notification
-------------------

[](#manual-notification)

```
try {
    risky();
} catch (\Throwable $exc) {
    Errorgap::notify($exc, context: ['component' => 'billing']);
    throw $exc;
}
```

`notify` returns a `DeliveryResult` (`status`, `body`, `error`, `queued`). The SDK never throws.

Async delivery
--------------

[](#async-delivery)

By default, async mode schedules the HTTP call via `register_shutdown_function`so the user's response is sent before the network call. Set `'async' => false` for synchronous delivery (useful in tests, CLI scripts, and long-running workers).

Configuration reference
-----------------------

[](#configuration-reference)

OptionDefaultNotes`endpoint``ERRORGAP_ENDPOINT` or `http://127.0.0.1:3030`Base URL, no trailing slash`projectSlug``ERRORGAP_PROJECT_SLUG`**Required**`projectId``ERRORGAP_PROJECT_ID`Optional, embedded in payload`apiKey``ERRORGAP_API_KEY`Sent as `x-errorgap-project-key``environment``ERRORGAP_ENVIRONMENT` or `production``rootDirectory``getcwd()`Used to mark frames as `in_app``async``true``register_shutdown_function` delivery`logger``null`PSR-3 logger; pass to receive SDK warnings`filterKeys``['password', 'token', ...]`Substring, case-insensitive`timeoutSeconds``5`HTTP request timeout`captureGlobals``true`Install error + exception handlersVerify
------

[](#verify)

```
curl -sS -X POST "$ERRORGAP_ENDPOINT/api/projects/$ERRORGAP_PROJECT_SLUG/notices" \
  -H "content-type: application/json" \
  -H "x-errorgap-project-key: $ERRORGAP_API_KEY" \
  -d '{"errors":[{"type":"ErrorgapInstallTest","message":"Errorgap install verification"}],"context":{"environment":"development"}}'
```

Then trigger a real error and confirm it appears in the Errorgap UI.

Development
-----------

[](#development)

```
composer install
composer test
```

License
-------

[](#license)

MIT.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance99

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

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

Unknown

Total

1

Last Release

4d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/67f0cceac802d3005e9c8d1574b2393bca31459e1cff77f3cb6288ec0697498e?d=identicon)[errorgap](/maintainers/errorgap)

---

Tags

monitoringexceptionserror-trackingerrorgap

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/errorgap-errorgap/health.svg)

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

###  Alternatives

[rollbar/rollbar

Monitors errors and exceptions and reports them to Rollbar

34424.8M88](/packages/rollbar-rollbar)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[illuminate/log

The Illuminate Log package.

6225.3M630](/packages/illuminate-log)[pagemachine/typo3-formlog

Form log for TYPO3

23238.6k8](/packages/pagemachine-typo3-formlog)

PHPackages © 2026

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