From a392a5a95866ca33440633563ec38e95003f6b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 18 May 2021 14:10:39 +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 --- System/Runtime.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/System/Runtime.php b/System/Runtime.php index 62014f29..e04ce549 100644 --- a/System/Runtime.php +++ b/System/Runtime.php @@ -36,19 +36,18 @@ class Runtime extends Command $annotation = Snowflake::app()->getAnnotation(); $runtime = storage(static::CACHE_NAME); + $config = storage(static::CONFIG_NAME); - $configs = $this->configEach(); - - Snowflake::writeFile(storage(static::CONFIG_NAME), serialize($configs)); + Snowflake::writeFile($config, $this->configEach()); Snowflake::writeFile($runtime, serialize($annotation->getLoader())); } /** - * @return array + * @return string * @throws Exception */ - public function configEach(): array + public function configEach(): string { $array = []; $configs = Snowflake::app()->getConfig(); @@ -62,7 +61,7 @@ class Runtime extends Command $array[$key] = $datum; } } - return $array; + return serialize($array); }