From b33f67bb27167004a267c73f277befc04dd46f18 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 8 Jan 2023 16:50:19 +0800 Subject: [PATCH] remove deprecated Context class --- .phpstorm.meta.php | 11 ----------- config/global.php | 3 --- src/ZM/Container/ContainerRegistrant.php | 3 --- src/ZM/Context/Context.php | 23 ----------------------- 4 files changed, 40 deletions(-) delete mode 100644 .phpstorm.meta.php delete mode 100644 src/ZM/Context/Context.php diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php deleted file mode 100644 index 8c1a726f..00000000 --- a/.phpstorm.meta.php +++ /dev/null @@ -1,11 +0,0 @@ - OneBotEvent::class, - ])); -} diff --git a/config/global.php b/config/global.php index 8da695f8..ce6a04b0 100644 --- a/config/global.php +++ b/config/global.php @@ -54,9 +54,6 @@ $config['runtime'] = [ 'timezone' => 'Asia/Shanghai', ]; -/* 上下文接口类 implemented from ContextInterface */ -$config['context_class'] = \ZM\Context\Context::class; - /* 允许加载插件形式 */ $config['plugin'] = [ 'enable' => true, diff --git a/src/ZM/Container/ContainerRegistrant.php b/src/ZM/Container/ContainerRegistrant.php index ebc770b5..1d30e1ab 100644 --- a/src/ZM/Container/ContainerRegistrant.php +++ b/src/ZM/Container/ContainerRegistrant.php @@ -13,8 +13,6 @@ use OneBot\V12\Object\ActionResponse; use OneBot\V12\Object\OneBotEvent; use Psr\Http\Message\ServerRequestInterface; use ZM\Context\BotContext; -use ZM\Context\Context; -use ZM\Context\ContextInterface; class ContainerRegistrant { @@ -59,7 +57,6 @@ class ContainerRegistrant 'http.request.event' => DI\get(HttpRequestEvent::class), ServerRequestInterface::class => fn () => $event->getRequest(), 'http.request' => DI\get(ServerRequestInterface::class), - ContextInterface::class => Context::class, ]); } diff --git a/src/ZM/Context/Context.php b/src/ZM/Context/Context.php deleted file mode 100644 index a9c4e5c4..00000000 --- a/src/ZM/Context/Context.php +++ /dev/null @@ -1,23 +0,0 @@ -