From 86eeceda7421cc58574433c27f4d03b2ad0dd7c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 26 Oct 2021 10:29:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http-core/Server.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http-core/Server.php b/http-core/Server.php index d20d3c9d..095d1ac1 100644 --- a/http-core/Server.php +++ b/http-core/Server.php @@ -58,8 +58,8 @@ class Server implements OnRequestInterface */ public function init() { - $this->container->setBindings(RequestInterface::class, Constrict\Request::class); - $this->container->setBindings(ResponseInterface::class, Constrict\Response::class); + $this->container->mapping(RequestInterface::class, Constrict\Request::class); + $this->container->mapping(ResponseInterface::class, Constrict\Response::class); $exceptionHandler = Config::get('exception.http', ExceptionHandlerDispatcher::class); if (!in_array(ExceptionHandlerInterface::class, class_implements($exceptionHandler))) {