Installation

dotkernel/dot-errorhandler 6 requires PHP 8.3, 8.4, 8.5 or 8.6, and the mbstring extension.

Install it by executing the following Composer command:

composer require dotkernel/dot-errorhandler

Other packages you may need

Version 6 depends on PSR interfaces, Mezzio, Laminas Stratigility and Laminas Stdlib. If your container registers Mezzio\Middleware\ErrorResponseGenerator, the error handlers use it automatically. Mezzio also makes Composer install a PSR-7 implementation, for example laminas/laminas-diactoros. Composer selects this implementation, so it is not always Diactoros.

Depending on your application, you may need to require the following packages yourself:

  • dotkernel/dot-log: needed if you use the logger configured in this package's config/log.global.php.dist (the dot-log.default_logger service)
  • laminas/laminas-diactoros: needed if your application uses Laminas\Diactoros classes directly, for example to create the error response

Dotkernel and Mezzio application skeletons already require these packages.

composer require dotkernel/dot-log