File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ osslifecycle=active
Original file line number Diff line number Diff line change 22
33Logging Error Handler for DotKernel
44
5+ ![ OSS Lifecycle] ( https://img.shields.io/osslifecycle/dotkernel/dot-errorhandler )
6+
7+ [ ![ GitHub issues] ( https://img.shields.io/github/issues/dotkernel/dot-errorhandler )] ( https://github.com/dotkernel/dot-debugbar/issues )
8+ [ ![ GitHub forks] ( https://img.shields.io/github/forks/dotkernel/dot-errorhandler )] ( https://github.com/dotkernel/dot-debugbar/network )
9+ [ ![ GitHub stars] ( https://img.shields.io/github/stars/dotkernel/dot-errorhandler )] ( https://github.com/dotkernel/dot-debugbar/stargazers )
10+ [ ![ GitHub license] ( https://img.shields.io/github/license/dotkernel/dot-errorhandler )] ( https://github.com/dotkernel/dot-debugbar/blob/main/LICENSE.md )
11+
12+ ![ PHP from Packagist (specify version)] ( https://img.shields.io/packagist/php-v/dotkernel/dot-errorhandler/3.1.1 )
13+
514## Adding the error handler
615
716* Add the composer package:
Original file line number Diff line number Diff line change 2121 ],
2222 "require" : {
2323 "php" : " ^7.4" ,
24+ "dotkernel/dot-log" : " ^3.0" ,
25+ "laminas/laminas-dependency-plugin" : " ^2.0" ,
2426 "laminas/laminas-diactoros" : " ^2.2" ,
25- "mezzio/mezzio" : " ^3.2" ,
2627 "laminas/laminas-log" : " ^2.12" ,
27- "dotkernel/dot-log" : " ^3.0" ,
2828 "psr/http-message" : " ^1.0" ,
29- "psr/container" : " ^1.0" ,
30- "laminas/laminas-dependency-plugin" : " ^2.0"
29+ "psr/container" : " ^1.0"
3130 },
3231 "autoload" : {
3332 "psr-4" : {
Original file line number Diff line number Diff line change 1111
1212use Psr \Container \ContainerInterface ;
1313use Psr \Http \Message \ResponseInterface ;
14- use Mezzio \Middleware \ErrorResponseGenerator ;
15- // use Dot\ErrorHandler\ErrorHandler;
1614
1715class ErrorHandlerFactory
1816{
1917 public function __invoke (ContainerInterface $ container ) : ErrorHandler
2018 {
21- $ generator = $ container ->has (ErrorResponseGenerator::class)
22- ? $ container ->get (ErrorResponseGenerator::class)
19+ $ generator = $ container ->has (\ Mezzio \ Middleware \ ErrorResponseGenerator::class)
20+ ? $ container ->get (\ Mezzio \ Middleware \ ErrorResponseGenerator::class)
2321 : null ;
2422
2523 return new ErrorHandler ($ container ->get (ResponseInterface::class), $ generator );
Original file line number Diff line number Diff line change 88use Psr \Container \ContainerInterface ;
99use Psr \Http \Message \ResponseInterface ;
1010use Psr \Http \Server \MiddlewareInterface ;
11- use Mezzio \Middleware \ErrorResponseGenerator ;
1211use Laminas \Log \LoggerInterface ;
1312
1413class LogErrorHandlerFactory
@@ -33,8 +32,8 @@ public function __invoke(ContainerInterface $container) : MiddlewareInterface
3332 $ logger = $ container ->get ($ errorHandlerConfig ['logger ' ]);
3433 }
3534
36- $ generator = $ container ->has (ErrorResponseGenerator::class)
37- ? $ container ->get (ErrorResponseGenerator::class)
35+ $ generator = $ container ->has (\ Mezzio \ Middleware \ ErrorResponseGenerator::class)
36+ ? $ container ->get (\ Mezzio \ Middleware \ ErrorResponseGenerator::class)
3837 : null ;
3938
4039 return new LogErrorHandler ($ container ->get (ResponseInterface::class), $ generator , $ logger );
You can’t perform that action at this time.
0 commit comments