Download the PHP package dotkernel/dot-errorhandler without Composer
On this page you can find all versions of the php package dotkernel/dot-errorhandler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dotkernel/dot-errorhandler
More information about dotkernel/dot-errorhandler
Files in dotkernel/dot-errorhandler
Package dot-errorhandler
Short Description Logging Error Handler for Middleware Applications
License MIT
Homepage https://github.com/dotkernel/dot-errorhandler
Informations about the package dot-errorhandler
dot-errorhandler
dot-errorhandler is Dotkernel's PSR-15 compliant error handler.
Version History
| Branch | Release | PSR-11 | Log Style Implementation | OSS Lifecycle | PHP Version |
|---|---|---|---|---|---|
| 4.1 | >= 4.2 |
2 | PSR-Log | ||
| 4.1 | < 4.2 |
2 | Laminas Log | ||
| 4.0 | < 4.1 |
1 | Laminas Log | ||
| 3.0 | < 4.0 |
1 | Laminas Log |
Documentation
Documentation is available at: https://docs.dotkernel.org/dot-errorhandler/
Badges
Adding the error handler
-
Add the composer package:
- Add the config provider:
- in
config/config.phpadd\Dot\ErrorHandler\ConfigProvider - in
config/pipeline.phpadd\Dot\ErrorHandler\ErrorHandlerInterface::class- the interface is used as an alias to keep all error handling related configurations in one file
- in
If you need other error handlers, you should place them before dot-errorhandler in the pipeline; else it will not be able to catch errors. We recommend using just one error handler unless you have an error-specific handler.
- Configure the error handler as shown below.
In config/autoload/error-handling.global.php:
A configuration example for the default logger can be found in config/log.global.php.dist.
When configuring the error handler in your application, you can choose between two classes:
Dot\ErrorHandler\LogErrorHandler: for logging and displaying errorsDot\ErrorHandler\ErrorHandler: for displaying errors only
Both
LogErrorHandlerandErrorHandlerhave factories declared in the package'sConfigProvider. If you need a custom ErrorHandler, it must have a factory declared in the config, as in the below example:
Example:
Config examples can be found in this project's config directory.
All versions of dot-errorhandler with dependencies
dotkernel/dot-log Version ^5.0
laminas/laminas-diactoros Version ^3.8.0
laminas/laminas-stdlib Version ^3.21
laminas/laminas-stratigility Version ^3.0 || ^4.0
mezzio/mezzio Version ^3.19
psr/http-message Version ^1.0 || ^2.0
psr/http-server-middleware Version ^1.0.2