mhdaldossari7 / php-fatal-err-catcher
A PHP fatal error catcher
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/mhdaldossari7/php-fatal-err-catcher
Requires (Dev)
- phpstan/phpstan: 0.12.3
This package is auto-updated.
Last update: 2025-12-28 23:46:43 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.