Download the PHP package kam2yar/failure-notifier without Composer

On this page you can find all versions of the php package kam2yar/failure-notifier. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package failure-notifier

Laravel Failure Notifier

This package helps you to track your exceptions and do what you want to do with them such as sending an SMS or an Email.

You can specify the amount of time to count the exceptions.

If you had more exceptions than you expect, the service will run your function, then you can send a notification or whatever you want.

This package uses your default cache driver to count the exceptions. You are free to choose the driver, but we suggest you to use Redis for that.

Installation

You need to add this package to your project by:

Optional: The service provider will automatically get registered. Or you may manually add the service provider in your config/app.php file:

After you need to run the below command to copy the configuration file to your project directory.

After this, you are free to remove it from your provider's array.

Add the service to the handler

You must add the service to the Exceptions\Handler.php file to capture the exceptions.

Add the report method to the "Handler" class as below:

Write your custom failure handler

You must write a new class in your project and pass it to the capture method that implements the FailureHandlerInterface interface:

Bind your custom handler to your application

Now you need to add your custom failure handler to your App\Providers\AppServiceProvider file.

Add the bellow code to the boot function:

Configuration

You can change the service configuration by editing the config\failure-notifier.php file.

You can have a setting for each type of exception. or you can leave it to use the default configuration.

To add a new exception you need to add a new record to the "exceptions" array like the below example:

Parameters

Count: Minimum count of exceptions needs to raise to run your function.

Interval: Seconds to store the count of exceptions in the cache.

Lock Until: Seconds to prevent sending duplicate notify

Active: Enable or disable service for this type of exception

Deactivate the service

If you need to disable the service, you can set a new key in your .env file.

Contribution

Please tell me about the feature or issues before start developing it. Thank you.


All versions of failure-notifier with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
illuminate/contracts Version ^7.0|^8.0|^9.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kam2yar/failure-notifier contains the following files

Loading the files please wait ....