From fef414759e4f32e76cf753817fee714315cda0b8 Mon Sep 17 00:00:00 2001 From: Anyon Date: Thu, 28 Nov 2019 10:33:21 +0800 Subject: [PATCH] ComposerUpdate --- composer.lock | 8 ++-- vendor/composer/autoload_classmap.php | 1 + vendor/composer/autoload_static.php | 1 + vendor/composer/installed.json | 8 ++-- vendor/services.php | 2 +- .../think-library/src/Controller.php | 2 +- .../zoujingli/think-library/src/Library.php | 1 + .../zoujingli/think-library/src/Service.php | 2 +- .../think-library/src/command/Install.php | 6 +-- .../think-library/src/command/Version.php | 42 +++++++++++++++++++ .../think-library/src/helper/DeleteHelper.php | 12 +++--- .../think-library/src/helper/QueryHelper.php | 12 +++--- .../think-library/src/helper/SaveHelper.php | 14 +++---- .../src/storage/QiniuStorage.php | 2 +- 14 files changed, 77 insertions(+), 36 deletions(-) create mode 100644 vendor/zoujingli/think-library/src/command/Version.php diff --git a/composer.lock b/composer.lock index f7ea60b70..27a51fdc8 100644 --- a/composer.lock +++ b/composer.lock @@ -783,12 +783,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "575e803f69555599fbc0914b95012f978da3798f" + "reference": "a77fd83917548d92d044a3481f01b102abbf1be9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/575e803f69555599fbc0914b95012f978da3798f", - "reference": "575e803f69555599fbc0914b95012f978da3798f", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/a77fd83917548d92d044a3481f01b102abbf1be9", + "reference": "a77fd83917548d92d044a3481f01b102abbf1be9", "shasum": "", "mirrors": [ { @@ -832,7 +832,7 @@ ], "description": "ThinkPHP v6.0 Development Library", "homepage": "http://framework.thinkadmin.top", - "time": "2019-11-27T09:48:45+00:00" + "time": "2019-11-28T02:30:34+00:00" } ], "packages-dev": [], diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 4ddc05c14..67613c02f 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -144,6 +144,7 @@ return array( 'think\\admin\\Service' => $vendorDir . '/zoujingli/think-library/src/Service.php', 'think\\admin\\Storage' => $vendorDir . '/zoujingli/think-library/src/Storage.php', 'think\\admin\\command\\Install' => $vendorDir . '/zoujingli/think-library/src/command/Install.php', + 'think\\admin\\command\\Version' => $vendorDir . '/zoujingli/think-library/src/command/Version.php', 'think\\admin\\extend\\CodeExtend' => $vendorDir . '/zoujingli/think-library/src/extend/CodeExtend.php', 'think\\admin\\extend\\DataExtend' => $vendorDir . '/zoujingli/think-library/src/extend/DataExtend.php', 'think\\admin\\extend\\ExcelExtend' => $vendorDir . '/zoujingli/think-library/src/extend/ExcelExtend.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 20d1328ef..a0222cecf 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -235,6 +235,7 @@ class ComposerStaticInit078c2496db47e2e94f2057948fdfa517 'think\\admin\\Service' => __DIR__ . '/..' . '/zoujingli/think-library/src/Service.php', 'think\\admin\\Storage' => __DIR__ . '/..' . '/zoujingli/think-library/src/Storage.php', 'think\\admin\\command\\Install' => __DIR__ . '/..' . '/zoujingli/think-library/src/command/Install.php', + 'think\\admin\\command\\Version' => __DIR__ . '/..' . '/zoujingli/think-library/src/command/Version.php', 'think\\admin\\extend\\CodeExtend' => __DIR__ . '/..' . '/zoujingli/think-library/src/extend/CodeExtend.php', 'think\\admin\\extend\\DataExtend' => __DIR__ . '/..' . '/zoujingli/think-library/src/extend/DataExtend.php', 'think\\admin\\extend\\ExcelExtend' => __DIR__ . '/..' . '/zoujingli/think-library/src/extend/ExcelExtend.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 91a2467ec..449183752 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": "575e803f69555599fbc0914b95012f978da3798f" + "reference": "a77fd83917548d92d044a3481f01b102abbf1be9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/575e803f69555599fbc0914b95012f978da3798f", - "reference": "575e803f69555599fbc0914b95012f978da3798f", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/a77fd83917548d92d044a3481f01b102abbf1be9", + "reference": "a77fd83917548d92d044a3481f01b102abbf1be9", "shasum": "", "mirrors": [ { @@ -826,7 +826,7 @@ "ext-json": "*", "topthink/framework": "^6.0" }, - "time": "2019-11-27T09:48:45+00:00", + "time": "2019-11-28T02:30:34+00:00", "type": "library", "extra": { "think": { diff --git a/vendor/services.php b/vendor/services.php index a9f206d09..852c7cec1 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\app\\Service', diff --git a/vendor/zoujingli/think-library/src/Controller.php b/vendor/zoujingli/think-library/src/Controller.php index 4298abe1e..2b2fbe1a1 100644 --- a/vendor/zoujingli/think-library/src/Controller.php +++ b/vendor/zoujingli/think-library/src/Controller.php @@ -180,7 +180,7 @@ abstract class Controller extends \stdClass * @param string|Query $dbQuery * @return QueryHelper */ - protected function _query($dbQuery) + protected function _query($dbQuery): QueryHelper { return QueryHelper::instance()->init($dbQuery); } diff --git a/vendor/zoujingli/think-library/src/Library.php b/vendor/zoujingli/think-library/src/Library.php index 611684ca2..79cd9714e 100644 --- a/vendor/zoujingli/think-library/src/Library.php +++ b/vendor/zoujingli/think-library/src/Library.php @@ -80,6 +80,7 @@ class Library extends Service 'think\admin\queue\QueryQueue', 'think\admin\queue\ListenQueue', 'think\admin\command\Install', + 'think\admin\command\Version', ]); } } \ No newline at end of file diff --git a/vendor/zoujingli/think-library/src/Service.php b/vendor/zoujingli/think-library/src/Service.php index 9f5d466c3..c782fa86c 100644 --- a/vendor/zoujingli/think-library/src/Service.php +++ b/vendor/zoujingli/think-library/src/Service.php @@ -42,7 +42,7 @@ abstract class Service /** * 服务初始化 - * @return static + * @return $this */ public function initialize(): Service { diff --git a/vendor/zoujingli/think-library/src/command/Install.php b/vendor/zoujingli/think-library/src/command/Install.php index 388bdfcb8..72be2b086 100644 --- a/vendor/zoujingli/think-library/src/command/Install.php +++ b/vendor/zoujingli/think-library/src/command/Install.php @@ -71,15 +71,11 @@ class Install extends Command protected function configure() { - $this->setName('xtask:install'); + $this->setName('xadmin:install'); $this->setDescription("[安装]安装或更新指定模块"); $this->addArgument('name', Argument::OPTIONAL, '模块名称', ''); } - /** - * @param Input $input - * @param Output $output - */ protected function execute(Input $input, Output $output) { $this->name = trim($input->getArgument('name')); diff --git a/vendor/zoujingli/think-library/src/command/Version.php b/vendor/zoujingli/think-library/src/command/Version.php new file mode 100644 index 000000000..8fe9e810a --- /dev/null +++ b/vendor/zoujingli/think-library/src/command/Version.php @@ -0,0 +1,42 @@ +setName('xadmin:version'); + $this->setDescription("[系统]查看当前框架版本号"); + } + + protected function execute(Input $input, Output $output) + { + $output->writeln("ThinkAdmin " . ProcessService::instance()->version()); + $output->writeln('ThinkPHPCore ' . App::VERSION); + } +} \ No newline at end of file diff --git a/vendor/zoujingli/think-library/src/helper/DeleteHelper.php b/vendor/zoujingli/think-library/src/helper/DeleteHelper.php index 9ae27041b..47b5f5531 100644 --- a/vendor/zoujingli/think-library/src/helper/DeleteHelper.php +++ b/vendor/zoujingli/think-library/src/helper/DeleteHelper.php @@ -35,13 +35,13 @@ class DeleteHelper extends Helper * 数据对象主键名称 * @var string */ - protected $pkField; + protected $field; /** * 数据对象主键值 * @var string */ - protected $pkValue; + protected $value; /** * 逻辑器初始化 @@ -55,11 +55,11 @@ class DeleteHelper extends Helper { $this->where = $where; $this->query = $this->buildQuery($dbQuery); - $this->pkField = empty($field) ? $this->query->getPk() : $field; - $this->pkValue = $this->app->request->post($this->pkField, null); + $this->field = empty($field) ? $this->query->getPk() : $field; + $this->value = $this->app->request->post($this->field, null); // 主键限制处理 - if (!isset($this->where[$this->pkField]) && is_string($this->pkValue)) { - $this->query->whereIn($this->pkField, explode(',', $this->pkValue)); + if (!isset($this->where[$this->field]) && is_string($this->value)) { + $this->query->whereIn($this->field, explode(',', $this->value)); } // 前置回调处理 if (false === $this->controller->callback('_delete_filter', $this->query, $where)) { diff --git a/vendor/zoujingli/think-library/src/helper/QueryHelper.php b/vendor/zoujingli/think-library/src/helper/QueryHelper.php index 1621ed13e..c864bf5d3 100644 --- a/vendor/zoujingli/think-library/src/helper/QueryHelper.php +++ b/vendor/zoujingli/think-library/src/helper/QueryHelper.php @@ -22,8 +22,8 @@ use think\db\Query; * 搜索条件处理器 * Class QueryHelper * @package think\admin\helper - * @see \think\Db\Query - * @mixin \think\Db\Query + * @see \think\db\Query + * @mixin \think\db\Query */ class QueryHelper extends Helper { @@ -211,8 +211,8 @@ class QueryHelper extends Helper /** * 实例化分页管理器 - * @param boolean $isPage 是否启用分页 - * @param boolean $isDisplay 是否渲染模板 + * @param boolean $page 是否启用分页 + * @param boolean $display 是否渲染模板 * @param boolean $total 集合分页记录数 * @param integer $limit 集合每页记录数 * @return mixed @@ -220,8 +220,8 @@ class QueryHelper extends Helper * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ - public function page($isPage = true, $isDisplay = true, $total = false, $limit = 0) + public function page($page = true, $display = true, $total = false, $limit = 0) { - return PageHelper::instance()->init($this->query, $isPage, $isDisplay, $total, $limit); + return PageHelper::instance()->init($this->query, $page, $display, $total, $limit); } } diff --git a/vendor/zoujingli/think-library/src/helper/SaveHelper.php b/vendor/zoujingli/think-library/src/helper/SaveHelper.php index f7da44df1..7431a96e3 100644 --- a/vendor/zoujingli/think-library/src/helper/SaveHelper.php +++ b/vendor/zoujingli/think-library/src/helper/SaveHelper.php @@ -41,13 +41,13 @@ class SaveHelper extends Helper * 数据对象主键名称 * @var array|string */ - protected $pkField; + protected $field; /** * 数据对象主键值 * @var string */ - protected $pkValue; + protected $value; /** * 逻辑器初始化 @@ -63,12 +63,12 @@ class SaveHelper extends Helper $this->where = $where; $this->query = $this->buildQuery($dbQuery); $this->data = empty($data) ? $this->app->request->post() : $data; - $this->pkField = empty($field) ? $this->query->getPk() : $field; - $this->pkValue = $this->app->request->post($this->pkField, null); + $this->field = empty($field) ? $this->query->getPk() : $field; + $this->value = $this->app->request->post($this->field, null); // 主键限制处理 - if (!isset($this->where[$this->pkField]) && is_string($this->pkValue)) { - $this->query->whereIn($this->pkField, explode(',', $this->pkValue)); - if (isset($this->data)) unset($this->data[$this->pkField]); + if (!isset($this->where[$this->field]) && is_string($this->value)) { + $this->query->whereIn($this->field, explode(',', $this->value)); + if (isset($this->data)) unset($this->data[$this->field]); } // 前置回调处理 if (false === $this->controller->callback('_save_filter', $this->query, $this->data)) { diff --git a/vendor/zoujingli/think-library/src/storage/QiniuStorage.php b/vendor/zoujingli/think-library/src/storage/QiniuStorage.php index 06f5aecd8..002ef3fe1 100644 --- a/vendor/zoujingli/think-library/src/storage/QiniuStorage.php +++ b/vendor/zoujingli/think-library/src/storage/QiniuStorage.php @@ -172,7 +172,7 @@ class QiniuStorage extends Storage */ public function upload() { - $protocol = request()->isSsl() ? 'https' : 'http'; + $protocol = $this->app->request->isSsl() ? 'https' : 'http'; switch (sysconf('storage.qiniu_region')) { case '华东': return "{$protocol}://up.qiniup.com";