From ecddacb3219bed8b14bffa1485cc5cf6480a9f3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 25 Feb 2022 17:21:00 +0800 Subject: [PATCH] modify plugin name --- kiri-engine/Application.php | 5 +++-- kiri-engine/FileListen/HotReload.php | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kiri-engine/Application.php b/kiri-engine/Application.php index 581e664a..ae23bf7e 100644 --- a/kiri-engine/Application.php +++ b/kiri-engine/Application.php @@ -238,7 +238,9 @@ class Application extends BaseApplication $this->getContainer()->setBindings(OutputInterface::class, $output); - scan_directory(MODEL_PATH, 'app\Model'); + if (!($class instanceof Kiri\Server\ServerCommand)) { + scan_directory(MODEL_PATH, 'app\Model'); + } $class->run($input, $output); fire(new OnAfterCommandExecute()); @@ -246,7 +248,6 @@ class Application extends BaseApplication } - /** * @param $className * @param null $abstracts diff --git a/kiri-engine/FileListen/HotReload.php b/kiri-engine/FileListen/HotReload.php index 0e5e32b6..cc017431 100644 --- a/kiri-engine/FileListen/HotReload.php +++ b/kiri-engine/FileListen/HotReload.php @@ -214,6 +214,7 @@ class HotReload extends Command $this->stopServer(); $this->process = new Process(function (Process $process) { $config = Config::get('scanner', []); + scan_directory(MODEL_PATH, 'app\Model'); if (is_array($config)) foreach ($config as $key => $value) { scan_directory($value, $key); }