diff --git a/composer.lock b/composer.lock index b46cf3a30..4ab132388 100644 --- a/composer.lock +++ b/composer.lock @@ -1,7 +1,7 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], "content-hash": "44a6bc247971794be9edd9df4f3dd0b9", @@ -783,12 +783,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "92f62b2deed4cebbedc38896089590c00a291b60" + "reference": "15fd0b9204728f69861ed7a4c7ba01be1ac4b687" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/92f62b2deed4cebbedc38896089590c00a291b60", - "reference": "92f62b2deed4cebbedc38896089590c00a291b60", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/15fd0b9204728f69861ed7a4c7ba01be1ac4b687", + "reference": "15fd0b9204728f69861ed7a4c7ba01be1ac4b687", "shasum": "", "mirrors": [ { @@ -832,7 +832,7 @@ ], "description": "ThinkPHP v6.0 Development Library", "homepage": "http://framework.thinkadmin.top", - "time": "2019-12-03T02:21:05+00:00" + "time": "2019-12-04T12:47:56+00:00" } ], "packages-dev": [], diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index fce8549f0..2c72175e7 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -279,7 +279,7 @@ class ClassLoader */ public function setApcuPrefix($apcuPrefix) { - $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; } /** @@ -377,11 +377,11 @@ class ClassLoader $subPath = $class; while (false !== $lastPos = strrpos($subPath, '\\')) { $subPath = substr($subPath, 0, $lastPos); - $search = $subPath . '\\'; + $search = $subPath.'\\'; if (isset($this->prefixDirsPsr4[$search])) { - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); foreach ($this->prefixDirsPsr4[$search] as $dir) { - if (file_exists($file = $dir . $pathEnd)) { + $length = $this->prefixLengthsPsr4[$first][$search]; + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { return $file; } } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 247f8496c..db6ef8b03 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -805,12 +805,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "92f62b2deed4cebbedc38896089590c00a291b60" + "reference": "15fd0b9204728f69861ed7a4c7ba01be1ac4b687" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/92f62b2deed4cebbedc38896089590c00a291b60", - "reference": "92f62b2deed4cebbedc38896089590c00a291b60", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/15fd0b9204728f69861ed7a4c7ba01be1ac4b687", + "reference": "15fd0b9204728f69861ed7a4c7ba01be1ac4b687", "shasum": "", "mirrors": [ { @@ -826,7 +826,7 @@ "ext-json": "*", "topthink/framework": "^6.0" }, - "time": "2019-12-03T02:21:05+00:00", + "time": "2019-12-04T12:47:56+00:00", "type": "library", "extra": { "think": { diff --git a/vendor/services.php b/vendor/services.php index ffc42a212..e0662f559 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\app\\Service', diff --git a/vendor/zoujingli/think-library/src/Service.php b/vendor/zoujingli/think-library/src/Service.php index c782fa86c..a4f0636a3 100644 --- a/vendor/zoujingli/think-library/src/Service.php +++ b/vendor/zoujingli/think-library/src/Service.php @@ -38,13 +38,14 @@ abstract class Service public function __construct(App $app) { $this->app = $app; + $this->initialize(); } /** * 服务初始化 * @return $this */ - public function initialize(): Service + protected function initialize(): Service { return $this; } @@ -55,6 +56,6 @@ abstract class Service */ public static function instance(): Service { - return Container::getInstance()->make(static::class)->initialize(); + return Container::getInstance()->make(static::class); } } \ No newline at end of file diff --git a/vendor/zoujingli/think-library/src/Storage.php b/vendor/zoujingli/think-library/src/Storage.php index 472e8d4b1..dbdd9bcdf 100644 --- a/vendor/zoujingli/think-library/src/Storage.php +++ b/vendor/zoujingli/think-library/src/Storage.php @@ -17,7 +17,6 @@ namespace think\admin; use think\App; use think\Container; -use think\Exception; /** * 文件存储引擎管理 @@ -69,7 +68,7 @@ abstract class Storage * @param string $method 方法名称 * @param array $arguments 调用参数 * @return mixed - * @throws Exception + * @throws \think\Exception * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException @@ -79,7 +78,7 @@ abstract class Storage if (method_exists($class = self::instance(), $method)) { return call_user_func_array([$class, $method], $arguments); } else { - throw new Exception("method not exists: " . get_class($class) . "->{$method}()"); + throw new \think\Exception("method not exists: " . get_class($class) . "->{$method}()"); } } @@ -87,7 +86,7 @@ abstract class Storage * 设置文件驱动名称 * @param string $name 驱动名称 * @return static - * @throws Exception + * @throws \think\Exception * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException @@ -98,7 +97,7 @@ abstract class Storage if (class_exists($object = "think\\admin\\storage\\{$class}Storage")) { return Container::getInstance()->make($object)->initialize(); } else { - throw new Exception("File driver [{$class}] does not exist."); + throw new \think\Exception("File driver [{$class}] does not exist."); } } @@ -110,7 +109,7 @@ abstract class Storage * @param string $fun 名称规则方法 * @return string */ - public static function name($url, $ext = '', $pre = '', $fun = 'md5') + public static function name($url, $ext = '', $pre = '', $fun = 'md5'): string { empty($ext) && $ext = pathinfo($url, 4); empty($ext) || $ext = trim($ext, '.\\/'); @@ -122,10 +121,10 @@ abstract class Storage /** * 根据文件后缀获取文件MINE * @param array $exts 文件后缀 - * @param array $mime 文件MINE信息 + * @param array $mime 文件信息 * @return string */ - public static function mime($exts, $mime = []) + public static function mime($exts, $mime = []): string { $mimes = self::mimes(); foreach (is_string($exts) ? explode(',', $exts) : $exts as $e) { @@ -135,7 +134,7 @@ abstract class Storage } /** - * 获取所有文件扩展的MINES + * 获取所有文件的信息 * @return array */ public static function mimes(): array diff --git a/vendor/zoujingli/think-library/src/service/CaptchaService.php b/vendor/zoujingli/think-library/src/service/CaptchaService.php index 7bde88ace..6fd6b2669 100644 --- a/vendor/zoujingli/think-library/src/service/CaptchaService.php +++ b/vendor/zoujingli/think-library/src/service/CaptchaService.php @@ -40,7 +40,7 @@ class CaptchaService extends Service * @param array $config * @return static */ - public function initialize($config = []): Service + protected function initialize($config = []): Service { // 动态配置属性 foreach ($config as $k => $v) if (isset($this->$k)) $this->$k = $v; diff --git a/vendor/zoujingli/think-library/src/service/InstallService.php b/vendor/zoujingli/think-library/src/service/InstallService.php index ffbfc3e8f..bac9c11d3 100644 --- a/vendor/zoujingli/think-library/src/service/InstallService.php +++ b/vendor/zoujingli/think-library/src/service/InstallService.php @@ -59,7 +59,7 @@ class InstallService extends Service * 初始化服务 * @return $this */ - public function initialize(): Service + protected function initialize(): Service { // 应用框架版本 $this->version = $this->app->config->get('app.thinkadmin_ver'); diff --git a/vendor/zoujingli/think-library/src/service/QueueService.php b/vendor/zoujingli/think-library/src/service/QueueService.php index 4303a9425..caa8fb869 100644 --- a/vendor/zoujingli/think-library/src/service/QueueService.php +++ b/vendor/zoujingli/think-library/src/service/QueueService.php @@ -59,7 +59,7 @@ class QueueService extends Service * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ - public function initialize($code = 0): Service + protected function initialize($code = 0): Service { if ($code > 0) { $this->queue = $this->app->db->name('SystemQueue')->where(['code' => $this->code])->find();