diff --git a/meta/definitions/http.php b/meta/definitions/http.php index 07783ea..148bfe1 100644 --- a/meta/definitions/http.php +++ b/meta/definitions/http.php @@ -7,7 +7,7 @@ use Laminas\{ Diactoros\ServerRequestFactory, HttpHandlerRunner\Emitter\EmitterI use Lean\Factory\{ HttpFactory, HttpFactoryInterface }; use Picea\Picea; -use function DI\autowire, DI\create, DI\get; +use function DI\{ autowire, create, get }; return [ ServerRequestInterface::class => function ($c) { diff --git a/src/ApplicationStrategy.php b/src/ApplicationStrategy.php index 2897e70..eae8c63 100644 --- a/src/ApplicationStrategy.php +++ b/src/ApplicationStrategy.php @@ -38,4 +38,9 @@ class ApplicationStrategy extends Strategy\ApplicationStrategy { { return $this->getContainer()->has(MethodNotAllowedInterface::class) ? $this->getContainer()->get(MethodNotAllowedInterface::class) : parent::getMethodNotAllowedDecorator($exception); } + + public function getMethodNotAllowedDecorator(MethodNotAllowedException $exception): MiddlewareInterface + { + return $this->getContainer()->has(MethodNotAllowedInterface::class) ? $this->getContainer()->get(MethodNotAllowedInterface::class) : parent::getMethodNotAllowedDecorator($exception); + } } \ No newline at end of file