itamit/classifier-error-bundle

Bundle for symfony classifier error

dev-develop 2020-06-04 06:51 UTC

This package is auto-updated.

Last update: 2024-05-04 15:40:31 UTC


README

Automatic error generation from exceptions

The classifier represents application exception listeners. In order for the exception to be converted into an HTTP response, specify the error code known to the classifier in the code field of the exception.

Status

This package is currently in the active development.

Requirements

Installation

  1. Require the bundle and a PSR 7/17 implementation with Composer:

    composer require itamit/classifier-error-bundle
  2. Enable the bundle in config/bundles.php by adding it to the array:

    Itamit\ClassifierErrorBundle\ClassifierErrorBundle::class => ['all' => true]

Adding custom classifier error

  1. Create a class that implements an interface Itamit\ClassifierErrorBundle\Provider\ErrorProviderInterface

  2. Register the created class as a service with a tag classifier_error.error_provider