From 7826bd3122ff7c115bc0121ed8faff01286b7dc4 Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 19 Jul 2019 11:44:46 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]ComposerUpdate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vendor/autoload.php | 2 +- vendor/composer/autoload_real.php | 14 +++++------ vendor/composer/autoload_static.php | 8 +++---- vendor/composer/installed.json | 8 +++---- .../think-library/src/command/Sync.php | 24 +++++++------------ 5 files changed, 25 insertions(+), 31 deletions(-) diff --git a/vendor/autoload.php b/vendor/autoload.php index a0f34226f..ec37f53f7 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit9e86e7f0caf03b802905a68d453659bc::getLoader(); +return ComposerAutoloaderInit715bbba180591c7e55267e7c41402e91::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 653f50d49..1da220454 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit9e86e7f0caf03b802905a68d453659bc +class ComposerAutoloaderInit715bbba180591c7e55267e7c41402e91 { private static $loader; @@ -19,15 +19,15 @@ class ComposerAutoloaderInit9e86e7f0caf03b802905a68d453659bc return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit9e86e7f0caf03b802905a68d453659bc', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit715bbba180591c7e55267e7c41402e91', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit9e86e7f0caf03b802905a68d453659bc', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit715bbba180591c7e55267e7c41402e91', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit9e86e7f0caf03b802905a68d453659bc::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit715bbba180591c7e55267e7c41402e91::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -48,19 +48,19 @@ class ComposerAutoloaderInit9e86e7f0caf03b802905a68d453659bc $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit9e86e7f0caf03b802905a68d453659bc::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit715bbba180591c7e55267e7c41402e91::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire9e86e7f0caf03b802905a68d453659bc($fileIdentifier, $file); + composerRequire715bbba180591c7e55267e7c41402e91($fileIdentifier, $file); } return $loader; } } -function composerRequire9e86e7f0caf03b802905a68d453659bc($fileIdentifier, $file) +function composerRequire715bbba180591c7e55267e7c41402e91($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 498a93952..dae97cc4d 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit9e86e7f0caf03b802905a68d453659bc +class ComposerStaticInit715bbba180591c7e55267e7c41402e91 { public static $files = array ( '841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php', @@ -347,9 +347,9 @@ class ComposerStaticInit9e86e7f0caf03b802905a68d453659bc public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit9e86e7f0caf03b802905a68d453659bc::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit9e86e7f0caf03b802905a68d453659bc::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit9e86e7f0caf03b802905a68d453659bc::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit715bbba180591c7e55267e7c41402e91::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit715bbba180591c7e55267e7c41402e91::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit715bbba180591c7e55267e7c41402e91::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 00501b224..1810efee9 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -502,12 +502,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "792cc96d0b400bde724d40a4296a4b9c98136cb4" + "reference": "f3eeca76e07fc7b21f9879ca1ead5b2f30c97d99" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/792cc96d0b400bde724d40a4296a4b9c98136cb4", - "reference": "792cc96d0b400bde724d40a4296a4b9c98136cb4", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/f3eeca76e07fc7b21f9879ca1ead5b2f30c97d99", + "reference": "f3eeca76e07fc7b21f9879ca1ead5b2f30c97d99", "shasum": "", "mirrors": [ { @@ -526,7 +526,7 @@ "qiniu/php-sdk": "^7.2", "topthink/framework": "5.1.*" }, - "time": "2019-07-19T03:28:52+00:00", + "time": "2019-07-19T03:42:10+00:00", "type": "library", "installation-source": "dist", "autoload": { diff --git a/vendor/zoujingli/think-library/src/command/Sync.php b/vendor/zoujingli/think-library/src/command/Sync.php index 21c7f4479..10aecc13e 100644 --- a/vendor/zoujingli/think-library/src/command/Sync.php +++ b/vendor/zoujingli/think-library/src/command/Sync.php @@ -53,9 +53,7 @@ class Sync extends Command $this->version = config('app.thinkadmin_ver'); if (empty($this->version)) $this->version = 'v4'; $this->uri = "https://{$this->version}.thinkadmin.top"; - if (is_string($name) && !empty($name)) { - parent::__construct($name); - } + parent::__construct($name); } /** @@ -65,18 +63,14 @@ class Sync extends Command */ protected function execute(Input $input, Output $output) { - $output->newLine(); - $output->comment("=== 准备从代码仓库下载更新{$this->version}版本文件 ==="); - $output->newLine(); $files = []; - foreach ($this->getDiff() as $file) foreach ($this->modules as $module) { - if (stripos($file['name'], $module) === 0) $files[] = $file; + $output->comment("=== 准备从代码仓库下载更新{$this->version}版本文件 ==="); + foreach ($this->getDiff() as $file) if (in_array($file['type'], ['add', 'del', 'mod'])) { + foreach ($this->modules as $module) if (stripos($file['name'], $module) === 0) $files[] = $file; } - if (empty($files)) $output->info('--- 本地文件与线上文件一致,无需要下载及更新文件'); + if (empty($files)) $output->info('--- 本地文件与线上文件一致,无需更新文件'); else foreach ($files as $file) $this->syncFile($file, $output); - $output->newLine(); - $output->comment("=== 从代码仓库下载{$this->version}版本并更新文件成功 ==="); - $output->newLine(); + $output->comment("=== 从代码仓库下载{$this->version}版本同步更新成功 ==="); } /** @@ -137,9 +131,9 @@ class Sync extends Command $output->error("--- 下载 {$file['name']} 更新失败"); } } elseif (in_array($file['type'], ['del'])) { - $realfile = realpath(env('root_path') . $file['name']); - if (is_file($realfile) && unlink($realfile)) { - $this->delEmptyDir(dirname($realfile)); + $real = realpath(env('root_path') . $file['name']); + if (is_file($real) && unlink($real)) { + $this->delEmptyDir(dirname($real)); $output->writeln("--- 删除 {$file['name']} 文件成功"); } else { $output->error("--- 删除 {$file['name']} 文件失败");