ComposerUpdate

This commit is contained in:
Anyon 2020-06-19 10:19:07 +08:00
parent 20507bfd03
commit be72564d80
7 changed files with 40 additions and 30 deletions

View File

@ -2,7 +2,7 @@
"type": "project", "type": "project",
"name": "zoujingli/thinkadmin", "name": "zoujingli/thinkadmin",
"license": "MIT", "license": "MIT",
"homepage": "http://demo.thinkadmin.top", "homepage": "https://thinkadmin.top",
"description": "Application development framework", "description": "Application development framework",
"keywords": [ "keywords": [
"ThinkAdmin", "ThinkAdmin",

18
composer.lock generated
View File

@ -223,16 +223,16 @@
}, },
{ {
"name": "opis/closure", "name": "opis/closure",
"version": "3.5.4", "version": "3.5.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/opis/closure.git", "url": "https://github.com/opis/closure.git",
"reference": "1d0deef692f66dae5d70663caee2867d0971306b" "reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/opis/closure/zipball/1d0deef692f66dae5d70663caee2867d0971306b", "url": "https://api.github.com/repos/opis/closure/zipball/dec9fc5ecfca93f45cd6121f8e6f14457dff372c",
"reference": "1d0deef692f66dae5d70663caee2867d0971306b", "reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -286,7 +286,7 @@
"serialization", "serialization",
"serialize" "serialize"
], ],
"time": "2020-06-07T11:41:29+00:00" "time": "2020-06-17T14:59:55+00:00"
}, },
{ {
"name": "psr/cache", "name": "psr/cache",
@ -929,12 +929,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git", "url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "60e7ef58637b5efdf08d8a8dd5199c183272f655" "reference": "b4b544f9e3ee8e5e3ed218f14eb442371a1de58c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/60e7ef58637b5efdf08d8a8dd5199c183272f655", "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/b4b544f9e3ee8e5e3ed218f14eb442371a1de58c",
"reference": "60e7ef58637b5efdf08d8a8dd5199c183272f655", "reference": "b4b544f9e3ee8e5e3ed218f14eb442371a1de58c",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -978,7 +978,7 @@
], ],
"description": "ThinkPHP v6.0 Development Library", "description": "ThinkPHP v6.0 Development Library",
"homepage": "http://framework.thinkadmin.top", "homepage": "http://framework.thinkadmin.top",
"time": "2020-06-16T08:08:00+00:00" "time": "2020-06-18T04:01:24+00:00"
}, },
{ {
"name": "zoujingli/wechat-developer", "name": "zoujingli/wechat-developer",

View File

@ -222,17 +222,17 @@
}, },
{ {
"name": "opis/closure", "name": "opis/closure",
"version": "3.5.4", "version": "3.5.5",
"version_normalized": "3.5.4.0", "version_normalized": "3.5.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/opis/closure.git", "url": "https://github.com/opis/closure.git",
"reference": "1d0deef692f66dae5d70663caee2867d0971306b" "reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/opis/closure/zipball/1d0deef692f66dae5d70663caee2867d0971306b", "url": "https://api.github.com/repos/opis/closure/zipball/dec9fc5ecfca93f45cd6121f8e6f14457dff372c",
"reference": "1d0deef692f66dae5d70663caee2867d0971306b", "reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -248,7 +248,7 @@
"jeremeamia/superclosure": "^2.0", "jeremeamia/superclosure": "^2.0",
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
}, },
"time": "2020-06-07T11:41:29+00:00", "time": "2020-06-17T14:59:55+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@ -955,12 +955,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git", "url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "60e7ef58637b5efdf08d8a8dd5199c183272f655" "reference": "b4b544f9e3ee8e5e3ed218f14eb442371a1de58c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/60e7ef58637b5efdf08d8a8dd5199c183272f655", "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/b4b544f9e3ee8e5e3ed218f14eb442371a1de58c",
"reference": "60e7ef58637b5efdf08d8a8dd5199c183272f655", "reference": "b4b544f9e3ee8e5e3ed218f14eb442371a1de58c",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -976,7 +976,7 @@
"ext-json": "*", "ext-json": "*",
"topthink/framework": "^6.0" "topthink/framework": "^6.0"
}, },
"time": "2020-06-16T08:08:00+00:00", "time": "2020-06-18T04:01:24+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"think": { "think": {

View File

@ -1,6 +1,10 @@
CHANGELOG CHANGELOG
--------- ---------
### v3.5.5, 2020.06.17
- Fixed a false-positive when using `Opis\Closure\ReflectionClosure::isScopeRequired` method
### v3.5.4, 2020.06.07 ### v3.5.4, 2020.06.07
- Fixed a false-positive when using `Opis\Closure\ReflectionClosure::isScopeRequired` method - Fixed a false-positive when using `Opis\Closure\ReflectionClosure::isScopeRequired` method

View File

@ -569,7 +569,7 @@ class ReflectionClosure extends ReflectionFunction
$context === 'root' $context === 'root'
){ ){
if($id_start_ci === 'self' || $id_start_ci === 'static' || $id_start_ci === 'parent'){ if($id_start_ci === 'self' || $id_start_ci === 'static' || $id_start_ci === 'parent'){
if (!$inside_structure) { if (!$inside_structure && !$id_start_ci === 'static') {
$isUsingScope = true; $isUsingScope = true;
} }
} elseif (!($php7 && in_array($id_start_ci, $php7_types))){ } elseif (!($php7 && in_array($id_start_ci, $php7_types))){

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php <?php
// This file is automatically generated at:2020-06-17 13:50:59 // This file is automatically generated at:2020-06-19 10:18:45
declare (strict_types = 1); declare (strict_types = 1);
return array ( return array (
0 => 'think\\app\\Service', 0 => 'think\\app\\Service',

View File

@ -29,7 +29,7 @@ class DeleteHelper extends Helper
* 表单额外更新条件 * 表单额外更新条件
* @var array * @var array
*/ */
protected $where; protected $map;
/** /**
* 数据对象主键名称 * 数据对象主键名称
@ -48,28 +48,34 @@ class DeleteHelper extends Helper
* @param string|Query $dbQuery * @param string|Query $dbQuery
* @param string $field 操作数据主键 * @param string $field 操作数据主键
* @param array $where 额外更新条件 * @param array $where 额外更新条件
* @return boolean|null * @return boolean|null|void
* @throws \think\db\exception\DbException * @throws \think\db\exception\DbException
*/ */
public function init($dbQuery, $field = '', $where = []) public function init($dbQuery, $field = '', $where = [])
{ {
$this->where = $where; $this->map = $where;
$this->query = $this->buildQuery($dbQuery); $this->query = $this->buildQuery($dbQuery);
$this->field = $field ?: $this->query->getPk(); $this->field = $field ?: $this->query->getPk();
$this->value = $this->app->request->post($this->field, null); $this->value = $this->app->request->post($this->field, null);
// 主键限制处理 // 主键限制处理
if (!isset($this->where[$this->field]) && is_string($this->value)) { if (!isset($this->map[$this->field]) && is_string($this->value)) {
$this->query->whereIn($this->field, explode(',', $this->value)); $this->query->whereIn($this->field, explode(',', $this->value));
} }
// 前置回调处理 // 前置回调处理
if (false === $this->controller->callback('_delete_filter', $this->query, $where)) { if (false === $this->controller->callback('_delete_filter', $this->query, $this->map)) {
return null; return null;
} }
// 执行删除操作 // 执行删除操作
if (method_exists($this->query, 'getTableFields') && in_array('is_deleted', $this->query->getTableFields())) { $data = [];
$result = $this->query->where($this->where)->update(['is_deleted' => '1']); if (method_exists($this->query, 'getTableFields')) {
$fields = $this->query->getTableFields();
if (in_array('deleted', $fields)) $data['deleted'] = 1;
if (in_array('is_deleted', $fields)) $data['is_deleted'] = 1;
}
if (empty($data)) {
$result = $this->query->where($this->map)->update($data);
} else { } else {
$result = $this->query->where($this->where)->delete(); $result = $this->query->where($this->map)->delete();
} }
// 结果回调处理 // 结果回调处理
if (false === $this->controller->callback('_delete_result', $result)) { if (false === $this->controller->callback('_delete_result', $result)) {