- Merged with master done

This commit is contained in:
Dave Mc Nicoll committed 2026-02-25 19:40:07 +00:00
1 parent b12fc65ea9
commit ca388e8a52
4 files changed
+24 -2

No files matched your search

+7
View File
@@ -2,8 +2,10 @@
namespace Lean;
use League\Route\Http\Exception\MethodNotAllowedException;
use League\Route\Strategy;
use League\Route\Http\Exception\NotFoundException;
use Lean\ApplicationStrategy\MethodNotAllowedInterface;
use Lean\ApplicationStrategy\NotFoundDecoratorInterface;
use Lean\ApplicationStrategy\ThrowableHandlerInterface;
use Lean\Factory\HttpFactoryInterface;
@@ -32,4 +34,9 @@ class ApplicationStrategy extends Strategy\ApplicationStrategy {
return $this->getContainer()->get(ThrowableHandlerInterface::class);
}
public function getMethodNotAllowedDecorator(MethodNotAllowedException $exception): MiddlewareInterface
{
return $this->getContainer()->has(MethodNotAllowedInterface::class) ? $this->getContainer()->get(MethodNotAllowedInterface::class) : parent::getMethodNotAllowedDecorator($exception);
}
}
@@ -0,0 +1,10 @@
<?php
namespace Lean\ApplicationStrategy;
use Psr\Http\Server\MiddlewareInterface;
interface MethodNotAllowedInterface extends MiddlewareInterface
{
}