PHPackages                             webforge/fatal-error-handler - 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. webforge/fatal-error-handler

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

webforge/fatal-error-handler
============================

A really simple class that can report fata errors by mail

1.0.2(12y ago)265.6k1[3 issues](https://github.com/webforge-labs/webforge-fatal-error-handler/issues)1MITPHP

Since Jul 10Pushed 10y ago1 watchersCompare

[ Source](https://github.com/webforge-labs/webforge-fatal-error-handler)[ Packagist](https://packagist.org/packages/webforge/fatal-error-handler)[ RSS](/packages/webforge-fatal-error-handler/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (1)

webforge-fatal-error-handler
============================

[](#webforge-fatal-error-handler)

A really simple class that can report fata errors by mail

installation
------------

[](#installation)

Use [Composer](http://getcomposer.org) to install.

```
composer require -v --prefer-source webforge/fatal-error-handler @stable

```

Usage
-----

[](#usage)

```
// do vendor autoload

$handler = new \Webforge\FatalErrorHandler('yourmail@your-domain.com');
$handler->register();
```

Fatal errors coming after these lines will be tried to be mailed with mail(). If mail() fails a notice is written into the php error log

Its now possible to add a custom callback to replace the php mail() call with your own logic to send the mail. Test your callback really really well!

```
// do vendor autoload

$handler = new \Webforge\FatalErrorHandler('yourmail@your-domain.com', function($recipient, $subject, $text, $headersString) {
  // send your own mail here, or log, etc
  return $successOfMail;
});
$handler->register();
```

the header string is already encoded for the php mail() function. (full string with \\r\\n seperated headers);

Roadmap
-------

[](#roadmap)

- add some simple rules to filter some errors (e.g. wanted errors from tests)

Known issues
------------

[](#known-issues)

- sometimes dom library triggers the fatal error handler for entities that cannot be parsed

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~51 days

Total

3

Last Release

4588d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bc659f3d1fe2fd98e62c9ac16965126a8b2c7f3fe7fad3b7c6c5f548c46e0c27?d=identicon)[pscheit](/maintainers/pscheit)

---

Top Contributors

[![pscheit](https://avatars.githubusercontent.com/u/488189?v=4)](https://github.com/pscheit "pscheit (14 commits)")

### Embed Badge

![Health badge](/badges/webforge-fatal-error-handler/health.svg)

```
[![Health](https://phpackages.com/badges/webforge-fatal-error-handler/health.svg)](https://phpackages.com/packages/webforge-fatal-error-handler)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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