From 689bc82dcf90640b1a9e1cde2ead6d9f66be4ae6 Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 22 May 2020 11:46:26 +0800 Subject: [PATCH] ComposerUpdate --- app/admin/controller/api/Plugs.php | 6 ++- composer.lock | 18 ++++---- vendor/composer/installed.json | 20 ++++----- vendor/opis/closure/CHANGELOG.md | 4 ++ vendor/opis/closure/src/ReflectionClosure.php | 1 - vendor/services.php | 2 +- .../src/service/MessageService.php | 44 +++++++++---------- 7 files changed, 50 insertions(+), 45 deletions(-) diff --git a/app/admin/controller/api/Plugs.php b/app/admin/controller/api/Plugs.php index 2b557e3f5..2bc12477b 100644 --- a/app/admin/controller/api/Plugs.php +++ b/app/admin/controller/api/Plugs.php @@ -46,8 +46,9 @@ class Plugs extends Controller { try { if (AdminService::instance()->isSuper()) { + $dbname = $this->app->db->getConnection()->getConfig('database'); + $this->app->console->call("optimize:schema", ["--db={$dbname}"]); $this->app->console->call('optimize:route'); - $this->app->console->call('optimize:schema'); $this->success('网站缓存加速成功!'); } else { $this->error('只有超级管理员才能操作!'); @@ -68,7 +69,8 @@ class Plugs extends Controller try { if (AdminService::instance()->isSuper()) { $data = SystemService::instance()->getRuntime(); - $this->app->console->call('clear'); + $path = strtr("{$this->app->getRootPath()}runtime/", '\\', '/'); + $this->app->console->call('clear', ["--path={$path}"]); SystemService::instance()->setRuntime($data['app_map'], $data['app_run']); $this->success('清理网站缓存成功!'); } else { diff --git a/composer.lock b/composer.lock index c365988b1..0aca05ebd 100644 --- a/composer.lock +++ b/composer.lock @@ -223,16 +223,16 @@ }, { "name": "opis/closure", - "version": "3.5.1", + "version": "3.5.2", "source": { "type": "git", "url": "https://github.com/opis/closure.git", - "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969" + "reference": "2e3299cea6f485ca64d19c540f46d7896c512ace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/93ebc5712cdad8d5f489b500c59d122df2e53969", - "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969", + "url": "https://api.github.com/repos/opis/closure/zipball/2e3299cea6f485ca64d19c540f46d7896c512ace", + "reference": "2e3299cea6f485ca64d19c540f46d7896c512ace", "shasum": "", "mirrors": [ { @@ -286,7 +286,7 @@ "serialization", "serialize" ], - "time": "2019-11-29T22:36:02+00:00" + "time": "2020-05-21T20:09:36+00:00" }, { "name": "psr/cache", @@ -915,12 +915,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "08dbda6ff99e8c4c531deaad340679b9366f7c0b" + "reference": "f654c159f0ecf03f34f8da433b98c40950696671" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/08dbda6ff99e8c4c531deaad340679b9366f7c0b", - "reference": "08dbda6ff99e8c4c531deaad340679b9366f7c0b", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/f654c159f0ecf03f34f8da433b98c40950696671", + "reference": "f654c159f0ecf03f34f8da433b98c40950696671", "shasum": "", "mirrors": [ { @@ -964,7 +964,7 @@ ], "description": "ThinkPHP v6.0 Development Library", "homepage": "http://framework.thinkadmin.top", - "time": "2020-05-19T08:03:38+00:00" + "time": "2020-05-21T09:42:50+00:00" }, { "name": "zoujingli/wechat-developer", diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 005b252bd..1ed0ea786 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -222,17 +222,17 @@ }, { "name": "opis/closure", - "version": "3.5.1", - "version_normalized": "3.5.1.0", + "version": "3.5.2", + "version_normalized": "3.5.2.0", "source": { "type": "git", "url": "https://github.com/opis/closure.git", - "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969" + "reference": "2e3299cea6f485ca64d19c540f46d7896c512ace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/93ebc5712cdad8d5f489b500c59d122df2e53969", - "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969", + "url": "https://api.github.com/repos/opis/closure/zipball/2e3299cea6f485ca64d19c540f46d7896c512ace", + "reference": "2e3299cea6f485ca64d19c540f46d7896c512ace", "shasum": "", "mirrors": [ { @@ -248,7 +248,7 @@ "jeremeamia/superclosure": "^2.0", "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, - "time": "2019-11-29T22:36:02+00:00", + "time": "2020-05-21T20:09:36+00:00", "type": "library", "extra": { "branch-alias": { @@ -941,12 +941,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "08dbda6ff99e8c4c531deaad340679b9366f7c0b" + "reference": "f654c159f0ecf03f34f8da433b98c40950696671" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/08dbda6ff99e8c4c531deaad340679b9366f7c0b", - "reference": "08dbda6ff99e8c4c531deaad340679b9366f7c0b", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/f654c159f0ecf03f34f8da433b98c40950696671", + "reference": "f654c159f0ecf03f34f8da433b98c40950696671", "shasum": "", "mirrors": [ { @@ -962,7 +962,7 @@ "ext-json": "*", "topthink/framework": "^6.0" }, - "time": "2020-05-19T08:03:38+00:00", + "time": "2020-05-21T09:42:50+00:00", "type": "library", "extra": { "think": { diff --git a/vendor/opis/closure/CHANGELOG.md b/vendor/opis/closure/CHANGELOG.md index 44370bff4..34753b063 100644 --- a/vendor/opis/closure/CHANGELOG.md +++ b/vendor/opis/closure/CHANGELOG.md @@ -1,6 +1,10 @@ CHANGELOG --------- +### v3.5.2, 2020.05.21 + +- Removed extra semicolon in short closures, since is not part of the closure's body. + ### v3.5.1, 2019.11.30 - Bugfix. See #47 diff --git a/vendor/opis/closure/src/ReflectionClosure.php b/vendor/opis/closure/src/ReflectionClosure.php index 491835eb4..f46bc3957 100644 --- a/vendor/opis/closure/src/ReflectionClosure.php +++ b/vendor/opis/closure/src/ReflectionClosure.php @@ -607,7 +607,6 @@ class ReflectionClosure extends ReflectionFunction } if ($isShortClosure) { - $code .= ';'; $this->useVariables = $this->getStaticVariables(); } else { $this->useVariables = empty($use) ? $use : array_intersect_key($this->getStaticVariables(), array_flip($use)); diff --git a/vendor/services.php b/vendor/services.php index 305e97627..c17572123 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/MessageService.php b/vendor/zoujingli/think-library/src/service/MessageService.php index 01203be77..652a2445d 100644 --- a/vendor/zoujingli/think-library/src/service/MessageService.php +++ b/vendor/zoujingli/think-library/src/service/MessageService.php @@ -54,11 +54,11 @@ class MessageService extends Service private $table; - private $china_username; - private $china_password; + private $chinaUsername; + private $chinaPassword; - private $globe_username; - private $globe_password; + private $globeUsername; + private $globePassword; /** * @return $this @@ -69,36 +69,36 @@ class MessageService extends Service protected function initialize() { $this->table = 'SystemMessageHistory'; - $this->china_username = sysconf('sms_zt.china_username'); - $this->china_password = sysconf('sms_zt.china_password'); - $this->globe_username = sysconf('sms_zt.globe_username'); - $this->globe_password = sysconf('sms_zt.globe_password'); + $this->chinaUsername = sysconf('sms_zt.china_username'); + $this->chinaPassword = sysconf('sms_zt.china_password'); + $this->globeUsername = sysconf('sms_zt.globe_username'); + $this->globePassword = sysconf('sms_zt.globe_password'); return $this; } /** * 配置内陆短信认证 - * @param string $username - * @param string $password + * @param string $username 账号名称 + * @param string $password 账号密码 * @return $this */ public function configChina($username, $password): MessageService { - $this->china_username = $username; - $this->china_password = $password; + $this->chinaUsername = $username; + $this->chinaPassword = $password; return $this; } /** * 配置国际短信认证 - * @param string $username - * @param string $password + * @param string $username 账号名称 + * @param string $password 账号密码 * @return $this */ public function configGlobe($username, $password): MessageService { - $this->globe_username = $username; - $this->globe_password = $password; + $this->globeUsername = $username; + $this->globePassword = $password; return $this; } @@ -131,7 +131,7 @@ class MessageService extends Service * 发送国内短信验证码 * @param string $phone 手机号 * @param string $content 短信内容 - * @param string $productid 短信通道ID + * @param string $productid 短信通道 * @return boolean */ public function sendChinaSms($phone, $content, $productid = '676767') @@ -141,9 +141,9 @@ class MessageService extends Service 'tkey' => $tkey, 'mobile' => $phone, 'content' => $content, - 'username' => $this->china_username, + 'username' => $this->chinaUsername, 'productid' => $productid, - 'password' => md5(md5($this->china_password) . $tkey), + 'password' => md5(md5($this->chinaPassword) . $tkey), ]); list($code, $message) = explode(',', $result . ','); $this->app->db->name($this->table)->insert([ @@ -203,8 +203,8 @@ class MessageService extends Service { $tkey = date("YmdHis"); $result = HttpExtend::post('http://www.ztsms.cn/balanceN.do', [ - 'username' => $this->china_username, 'tkey' => $tkey, - 'password' => md5(md5($this->china_password) . $tkey), + 'username' => $this->chinaUsername, 'tkey' => $tkey, + 'password' => md5(md5($this->chinaPassword) . $tkey), ]); if ($result > -1) { return ['code' => 1, 'num' => $result, 'msg' => '获取短信剩余条数成功!']; @@ -265,7 +265,7 @@ class MessageService extends Service { $tkey = date("YmdHis"); $result = HttpExtend::post('http://intl.zthysms.com/intBalance.do', [ - 'username' => $this->globe_username, 'tkey' => $tkey, 'password' => md5(md5($this->globe_password) . $tkey), + 'username' => $this->globeUsername, 'tkey' => $tkey, 'password' => md5(md5($this->globePassword) . $tkey), ]); if (!is_numeric($result) && ($state = intval($result)) && isset($this->globeMessageMap[$state])) { return ['code' => 0, 'num' => 0, 'msg' => $this->globeMessageMap[$state]];