From 4a87f5ccaf85814c75b928f44aa5c8ec71d1539d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=A3=E8=A8=80=E5=B0=B1=E6=98=AFSiam?= <59419979@qq.com> Date: Sat, 30 Sep 2023 19:21:49 +0800 Subject: [PATCH] Fixed PriorityMiddleware for testing. (#6183) --- src/Client.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Client.php b/src/Client.php index c11c788..83ccafb 100644 --- a/src/Client.php +++ b/src/Client.php @@ -218,6 +218,8 @@ protected function execute(ServerRequestInterface $psr7Request): ResponseInterfa $middlewares = array_merge($middlewares, $registeredMiddlewares); } + $middlewares = MiddlewareManager::sortMiddlewares($middlewares); + try { $psr7Response = $this->dispatcher->dispatch($psr7Request, $middlewares, $this->coreMiddleware); } catch (Throwable $throwable) {