mhdaldossari7 / php-fatal-err-catcher
A PHP fatal error catcher
Package info
github.com/mhdaldossari7/php-fatal-error-catcher
pkg:composer/mhdaldossari7/php-fatal-err-catcher
v2.1.0
2021-01-28 12:53 UTC
Requires (Dev)
- phpstan/phpstan: 0.12.3
This package is auto-updated.
Last update: 2026-03-29 00:52:34 UTC
README
To catch fatal errors and notify in slack.
Installation
You can install php-fatal-err-catcher via composer or by downloading the source.
Via Composer:
php-fatal-err-catcher is available on Packagist as the
mhdaldossari7/php-fatal-err-catcher package:
composer require mhdaldossari7/php-fatal-err-catcher
Usage
<?php declare (strict_types = 1); require __DIR__ . '/vendor/autoload.php'; use FatalErrCatcher\ErrorCatcher; // import class $slackWebhookURL = "https://xxxxx"; // define slack url if you want to get notification in slack new ErrorCatcher($slackWebhookURL); // initialize object ($slackWebhookURL is optional argument, if you didn't provide slack_url the error message will be print in console) // (IMPORTANT NOTE) : You must create ErrorCatcher object at the beginning of your script, so it detects the incoming errors.