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+ ## 1.0.1 - 2018-11-27
2+
3+ Corrected factory and config provider.
4+
5+ ### Added
6+ * Factory for plain ` ErrorHandler `
7+
8+ ### Deprecated
9+ * Nothing
10+
11+ ### Removed
12+ * Nothing
13+
14+ ### Fixed
15+ * Nothing
16+
17+
118## 1.0.0 - 2018-11-14
219
320Initial release
Original file line number Diff line number Diff line change 55 "require" : {
66 "zendframework/zend-expressive" : " ^3.0" ,
77 "zendframework/zend-log" : " ^2.10" ,
8- "dotkernel/dot-log" : " ^1.0"
8+ "dotkernel/dot-log" : " ^1.0" ,
9+ "psr/http-message" : " ^1.0" ,
10+ "psr/container" : " ^1.0"
911 },
1012 "license" : " MIT" ,
1113 "authors" : [
Original file line number Diff line number Diff line change 44
55namespace Dot \ErrorHandler ;
66
7- use Zend \Expressive \Container \ErrorHandlerFactory ;
8-
97class ConfigProvider
108{
119 public function __invoke ()
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * @see https://github.com/zendframework/zend-expressive for the canonical source repository
4+ * @copyright Copyright (c) 2016-2017 Zend Technologies USA Inc. (https://www.zend.com)
5+ * @license https://github.com/zendframework/zend-expressive/blob/master/LICENSE.md New BSD License
6+ */
7+
8+ declare (strict_types=1 );
9+
10+ namespace Dot \ErrorHandler ;
11+
12+ use Psr \Container \ContainerInterface ;
13+ use Psr \Http \Message \ResponseInterface ;
14+ use Zend \Expressive \Middleware \ErrorResponseGenerator ;
15+ // use Dot\ErrorHandler\ErrorHandler;
16+
17+ class ErrorHandlerFactory
18+ {
19+ public function __invoke (ContainerInterface $ container ) : ErrorHandler
20+ {
21+ $ generator = $ container ->has (ErrorResponseGenerator::class)
22+ ? $ container ->get (ErrorResponseGenerator::class)
23+ : null ;
24+
25+ return new ErrorHandler ($ container ->get (ResponseInterface::class), $ generator );
26+ }
27+ }
You can’t perform that action at this time.
0 commit comments