From 8e4b2bdaeade3897d919ec86053b94e571b99add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=9D=BE=E6=A0=91?= Date: Fri, 8 Mar 2019 11:59:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B05135LTS=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.lock | 194 +++-------------- thinkphp/helper.php | 6 +- thinkphp/library/think/App.php | 2 +- thinkphp/library/think/File.php | 2 +- thinkphp/library/think/Model.php | 37 ++++ thinkphp/library/think/Request.php | 16 +- thinkphp/library/think/Route.php | 2 +- thinkphp/library/think/Template.php | 2 +- thinkphp/library/think/Validate.php | 38 +++- thinkphp/library/think/db/Builder.php | 4 +- thinkphp/library/think/db/Query.php | 45 ++-- thinkphp/library/think/db/builder/Mysql.php | 12 +- thinkphp/library/think/db/builder/Sqlsrv.php | 2 +- thinkphp/library/think/db/connector/pgsql.sql | 48 ++++- thinkphp/library/think/facade/Config.php | 9 +- thinkphp/library/think/facade/Log.php | 1 + thinkphp/library/think/log/driver/File.php | 24 ++- .../library/think/model/concern/Attribute.php | 5 + .../think/model/concern/Conversion.php | 29 +-- .../think/model/relation/BelongsToMany.php | 1 + .../library/think/model/relation/HasMany.php | 4 +- thinkphp/library/think/response/Download.php | 10 +- thinkphp/library/think/route/Rule.php | 2 +- thinkphp/library/think/route/RuleGroup.php | 4 - vendor/composer/ClassLoader.php | 2 +- vendor/composer/installed.json | 196 +++--------------- 26 files changed, 268 insertions(+), 429 deletions(-) diff --git a/composer.lock b/composer.lock index f7ed9c6b..0466d15f 100644 --- a/composer.lock +++ b/composer.lock @@ -18,13 +18,7 @@ "type": "zip", "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/5a91b62b9d37cee635bbf8d553f4546057250bee", "reference": "5a91b62b9d37cee635bbf8d553f4546057250bee", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "ext-iconv": "*", @@ -70,13 +64,7 @@ "type": "zip", "url": "https://api.github.com/repos/endroid/installer/zipball/2db0498b3a1cdb95db75309ea3087739f8017e62", "reference": "2db0498b3a1cdb95db75309ea3087739f8017e62", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "composer-plugin-api": "^1.1", @@ -121,13 +109,7 @@ "type": "zip", "url": "https://api.github.com/repos/endroid/qr-code/zipball/4752fc7cc7f658c17049919af33872e9b7d5e64d", "reference": "4752fc7cc7f658c17049919af33872e9b7d5e64d", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "bacon/bacon-qr-code": "^1.0.3", @@ -187,13 +169,7 @@ "type": "zip", "url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/a75482d3bc804e3f6702332bfda6cccbb0dfaa76", "reference": "a75482d3bc804e3f6702332bfda6cccbb0dfaa76", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": "^5.6|^7.0" @@ -243,13 +219,7 @@ "type": "zip", "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/1ea674a8308baf547cbcbd30c5fcd6d301b7c000", "reference": "1ea674a8308baf547cbcbd30c5fcd6d301b7c000", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": "^5.6.0|^7.0.0" @@ -344,13 +314,7 @@ "type": "zip", "url": "https://api.github.com/repos/myclabs/php-enum/zipball/550d2334d77f91b0816a5cbd6965272fe20146b8", "reference": "550d2334d77f91b0816a5cbd6965272fe20146b8", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=5.4" @@ -394,13 +358,7 @@ "type": "zip", "url": "https://api.github.com/repos/ivanlanin/pclzip/zipball/19dd1de9d3f5fc4d7d70175b4c344dee329f45fd", "reference": "19dd1de9d3f5fc4d7d70175b4c344dee329f45fd", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "type": "library", "autoload": { @@ -437,13 +395,7 @@ "type": "zip", "url": "https://api.github.com/repos/php4world/auth/zipball/e356cad8de77c3e27f78875685b309d561c0fa94", "reference": "e356cad8de77c3e27f78875685b309d561c0fa94", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "topthink/framework": "5.1.*" @@ -479,13 +431,7 @@ "type": "zip", "url": "https://api.github.com/repos/PHPOffice/Common/zipball/edb5d32b1e3400a35a5c91e2539ed6f6ce925e4d", "reference": "edb5d32b1e3400a35a5c91e2539ed6f6ce925e4d", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "pclzip/pclzip": "^2.8", @@ -540,13 +486,7 @@ "type": "zip", "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/2dfd06c59825914a1a325f2a2ed13634b9d8c411", "reference": "2dfd06c59825914a1a325f2a2ed13634b9d8c411", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "ext-ctype": "*", @@ -633,13 +573,7 @@ "type": "zip", "url": "https://api.github.com/repos/PHPOffice/PHPWord/zipball/dfa2f36cad2b632b7ab1c56473e4f5db9a7caf7f", "reference": "dfa2f36cad2b632b7ab1c56473e4f5db9a7caf7f", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "ext-xml": "*", @@ -748,13 +682,7 @@ "type": "zip", "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=5.3.0" @@ -802,13 +730,7 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/inflector/zipball/8da789363973920dd7df6753822810592138e5ba", "reference": "8da789363973920dd7df6753822810592138e5ba", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": "^7.1.3", @@ -866,13 +788,7 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/options-resolver/zipball/31e5523373cb06163079ef46d0a2d507d70fe064", "reference": "31e5523373cb06163079ef46d0a2d507d70fe064", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": "^7.1.3" @@ -926,13 +842,7 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=5.3.3" @@ -990,13 +900,7 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/property-access/zipball/10edb6c4b6f496a2ed40a788ebbd280b421985ae", "reference": "10edb6c4b6f496a2ed40a788ebbd280b421985ae", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": "^7.1.3", @@ -1053,23 +957,17 @@ }, { "name": "topthink/framework", - "version": "v5.1.32", + "version": "v5.1.35", "source": { "type": "git", "url": "https://github.com/top-think/framework.git", - "reference": "88a2ab625b35e047896718db320e08375cf021da" + "reference": "c53c0c6132022a87e8ee9c4109939eaf9a8a7adb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/framework/zipball/88a2ab625b35e047896718db320e08375cf021da", - "reference": "88a2ab625b35e047896718db320e08375cf021da", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/top-think/framework/zipball/c53c0c6132022a87e8ee9c4109939eaf9a8a7adb", + "reference": "c53c0c6132022a87e8ee9c4109939eaf9a8a7adb", + "shasum": "" }, "require": { "php": ">=5.6.0", @@ -1106,7 +1004,7 @@ "orm", "thinkphp" ], - "time": "2018-12-23T13:42:11+00:00" + "time": "2019-03-03T00:44:44+00:00" }, { "name": "topthink/think-captcha", @@ -1120,13 +1018,7 @@ "type": "zip", "url": "https://api.github.com/repos/top-think/think-captcha/zipball/54c8a51552f99ff9ea89ea9c272383a8f738ceee", "reference": "54c8a51552f99ff9ea89ea9c272383a8f738ceee", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "topthink/framework": "5.1.*" @@ -1165,13 +1057,7 @@ "type": "zip", "url": "https://api.github.com/repos/top-think/think-helper/zipball/0c99dc625b0d2d4124e1b6ca15a3ad6f0125963f", "reference": "0c99dc625b0d2d4124e1b6ca15a3ad6f0125963f", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "type": "library", "autoload": { @@ -1207,13 +1093,7 @@ "type": "zip", "url": "https://api.github.com/repos/top-think/think-installer/zipball/f5400a12c60e513911aef41fe443fa6920952675", "reference": "f5400a12c60e513911aef41fe443fa6920952675", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "composer-plugin-api": "^1.0" @@ -1254,13 +1134,7 @@ "type": "zip", "url": "https://api.github.com/repos/top-think/think-migration/zipball/70c89850ca29c2eab988c7c3475d1d5331901bb8", "reference": "70c89850ca29c2eab988c7c3475d1d5331901bb8", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "topthink/framework": "5.1.*" @@ -1299,13 +1173,7 @@ "type": "zip", "url": "https://api.github.com/repos/whitehat101/apr1-md5/zipball/8b261c9fc0481b4e9fa9d01c6ca70867b5d5e819", "reference": "8b261c9fc0481b4e9fa9d01c6ca70867b5d5e819", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=5.3.0" @@ -1349,13 +1217,7 @@ "type": "zip", "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/31d8aafae982f9568287cb4dce987e6aff8fd074", "reference": "31d8aafae982f9568287cb4dce987e6aff8fd074", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": "^5.6 || ^7.0" diff --git a/thinkphp/helper.php b/thinkphp/helper.php index 9c465335..fc2ca8c8 100644 --- a/thinkphp/helper.php +++ b/thinkphp/helper.php @@ -313,9 +313,9 @@ if (!function_exists('download')) { * @param integer $expire 有效期(秒) * @return \think\response\Download */ - function download($filename, $name = '', $content = false, $expire = 360, $openinBrower = false) + function download($filename, $name = '', $content = false, $expire = 360, $openinBrowser = false) { - return Response::create($filename, 'download')->name($name)->isContent($content)->expire($expire)->openinBrower($openinBrower); + return Response::create($filename, 'download')->name($name)->isContent($content)->expire($expire)->openinBrowser($openinBrowser); } } @@ -533,7 +533,7 @@ if (!function_exists('response')) { * @param string $type * @return Response */ - function response($data = [], $code = 200, $header = [], $type = 'html') + function response($data = '', $code = 200, $header = [], $type = 'html') { return Response::create($data, $type, $code, $header); } diff --git a/thinkphp/library/think/App.php b/thinkphp/library/think/App.php index ac8b0e91..e1703eb0 100644 --- a/thinkphp/library/think/App.php +++ b/thinkphp/library/think/App.php @@ -20,7 +20,7 @@ use think\route\Dispatch; */ class App extends Container { - const VERSION = '5.1.32 LTS'; + const VERSION = '5.1.35 LTS'; /** * 当前模块路径 diff --git a/thinkphp/library/think/File.php b/thinkphp/library/think/File.php index b2906097..b24b7770 100644 --- a/thinkphp/library/think/File.php +++ b/thinkphp/library/think/File.php @@ -300,7 +300,7 @@ class File extends SplFileObject */ public function checkSize($size) { - if ($this->getSize() > $size) { + if ($this->getSize() > (int) $size) { $this->error = 'filesize not match'; return false; } diff --git a/thinkphp/library/think/Model.php b/thinkphp/library/think/Model.php index 9896f9ff..8e6ee412 100644 --- a/thinkphp/library/think/Model.php +++ b/thinkphp/library/think/Model.php @@ -18,6 +18,33 @@ use think\db\Query; * Class Model * @package think * @mixin Query + * @method Query where(mixed $field, string $op = null, mixed $condition = null) static 查询条件 + * @method Query whereRaw(string $where, array $bind = []) static 表达式查询 + * @method Query whereExp(string $field, string $condition, array $bind = []) static 字段表达式查询 + * @method Query when(mixed $condition, mixed $query, mixed $otherwise = null) static 条件查询 + * @method Query join(mixed $join, mixed $condition = null, string $type = 'INNER') static JOIN查询 + * @method Query view(mixed $join, mixed $field = null, mixed $on = null, string $type = 'INNER') static 视图查询 + * @method Query with(mixed $with) static 关联预载入 + * @method Query count(string $field) static Count统计查询 + * @method Query min(string $field) static Min统计查询 + * @method Query max(string $field) static Max统计查询 + * @method Query sum(string $field) static SUM统计查询 + * @method Query avg(string $field) static Avg统计查询 + * @method Query field(mixed $field, boolean $except = false) static 指定查询字段 + * @method Query fieldRaw(string $field, array $bind = []) static 指定查询字段 + * @method Query union(mixed $union, boolean $all = false) static UNION查询 + * @method Query limit(mixed $offset, integer $length = null) static 查询LIMIT + * @method Query order(mixed $field, string $order = null) static 查询ORDER + * @method Query orderRaw(string $field, array $bind = []) static 查询ORDER + * @method Query cache(mixed $key = null , integer $expire = null) static 设置查询缓存 + * @method mixed value(string $field) static 获取某个字段的值 + * @method array column(string $field, string $key = '') static 获取某个列的值 + * @method mixed find(mixed $data = null) static 查询单个记录 + * @method mixed select(mixed $data = null) static 查询多个记录 + * @method mixed get(mixed $data = null,mixed $with =[],bool $cache= false) static 查询单个记录 支持关联预载入 + * @method mixed getOrFail(mixed $data = null,mixed $with =[],bool $cache= false) static 查询单个记录 不存在则抛出异常 + * @method mixed findOrEmpty(mixed $data = null,mixed $with =[],bool $cache= false) static 查询单个记录 不存在则返回空模型 + * @method mixed all(mixed $data = null,mixed $with =[],bool $cache= false) static 查询多个记录 支持关联预载入 * @method \think\Model withAttr(array $name,\Closure $closure) 动态定义获取器 */ abstract class Model implements \JsonSerializable, \ArrayAccess @@ -410,6 +437,16 @@ abstract class Model implements \JsonSerializable, \ArrayAccess return $this->exists; } + /** + * 判断模型是否为空 + * @access public + * @return bool + */ + public function isEmpty() + { + return empty($this->data); + } + /** * 保存当前数据对象 * @access public diff --git a/thinkphp/library/think/Request.php b/thinkphp/library/think/Request.php index 6ba6e7d7..f6529d03 100644 --- a/thinkphp/library/think/Request.php +++ b/thinkphp/library/think/Request.php @@ -809,9 +809,14 @@ class Request return $this->server('REQUEST_METHOD') ?: 'GET'; } elseif (!$this->method) { if (isset($_POST[$this->config['var_method']])) { - $this->method = strtoupper($_POST[$this->config['var_method']]); - $method = strtolower($this->method); - $this->{$method} = $_POST; + $method = strtolower($_POST[$this->config['var_method']]); + if (in_array($method, ['get', 'post', 'put', 'patch', 'delete'])) { + $this->method = strtoupper($method); + $this->{$method} = $_POST; + } else { + $this->method = 'POST'; + } + unset($_POST[$this->config['var_method']]); } elseif ($this->server('HTTP_X_HTTP_METHOD_OVERRIDE')) { $this->method = strtoupper($this->server('HTTP_X_HTTP_METHOD_OVERRIDE')); } else { @@ -1320,7 +1325,8 @@ class Request * @param array $data 数据源 * @return void */ - public function arrayReset(array &$data) { + public function arrayReset(array &$data) + { foreach ($data as &$value) { if (is_array($value)) { $this->arrayReset($value); @@ -1523,7 +1529,7 @@ class Request */ public function has($name, $type = 'param', $checkEmpty = false) { - if (!in_array($type, ['param', 'get', 'post', 'request', 'put', 'file', 'session', 'cookie', 'env', 'header', 'route'])) { + if (!in_array($type, ['param', 'get', 'post', 'request', 'put', 'patch', 'file', 'session', 'cookie', 'env', 'header', 'route'])) { return false; } diff --git a/thinkphp/library/think/Route.php b/thinkphp/library/think/Route.php index 7bd468ba..44af9871 100644 --- a/thinkphp/library/think/Route.php +++ b/thinkphp/library/think/Route.php @@ -408,7 +408,7 @@ class Route $result = $this->bind[$domain]; } elseif (isset($name) && isset($this->bind[$name])) { $result = $this->bind[$name]; - } elseif (isset($this->bind['*'])) { + } elseif (!empty($subDomain) && isset($this->bind['*'])) { $result = $this->bind['*']; } else { $result = null; diff --git a/thinkphp/library/think/Template.php b/thinkphp/library/think/Template.php index dc1acfa5..2855cbcb 100644 --- a/thinkphp/library/think/Template.php +++ b/thinkphp/library/think/Template.php @@ -1311,7 +1311,7 @@ class Template public function __debugInfo() { $data = get_object_vars($this); - unset($data['app'], $data['storege']); + unset($data['app'], $data['storage']); return $data; } diff --git a/thinkphp/library/think/Validate.php b/thinkphp/library/think/Validate.php index 54c3a737..c846f1f8 100644 --- a/thinkphp/library/think/Validate.php +++ b/thinkphp/library/think/Validate.php @@ -131,7 +131,7 @@ class Validate * 内置正则验证规则 * @var array */ - protected $regex = [ + protected $defaultRegex = [ 'alphaDash' => '/^[A-Za-z0-9\-\_]+$/', 'chs' => '/^[\x{4e00}-\x{9fa5}]+$/u', 'chsAlpha' => '/^[\x{4e00}-\x{9fa5}a-zA-Z]+$/u', @@ -178,6 +178,12 @@ class Validate */ protected $append = []; + /** + * 验证正则定义 + * @var array + */ + protected $regex = []; + /** * 架构函数 * @access public @@ -513,7 +519,7 @@ class Validate if (isset($this->append[$field])) { // 追加额外的验证规则 - $rules = array_merge($rules, $this->append[$field]); + $rules = array_unique(array_merge($rules, $this->append[$field])); } $i = 0; @@ -561,10 +567,11 @@ class Validate } elseif (true !== $result) { // 返回自定义错误信息 if (is_string($result) && false !== strpos($result, ':')) { - $result = str_replace( - [':attribute', ':rule'], - [$title, (string) $rule], - $result); + $result = str_replace(':attribute', $title, $result); + + if (strpos($result, ':rule') && is_scalar($rule)) { + $msg = str_replace(':rule', (string) $rule, $result); + } } return $result; @@ -1006,6 +1013,8 @@ class Validate $map[] = [$key, '=', $data[$key]]; } } + } elseif (strpos($key, '=')) { + parse_str($key, $map); } elseif (isset($data[$field])) { $map[] = [$key, '=', $data[$field]]; } else { @@ -1360,6 +1369,8 @@ class Validate { if (isset($this->regex[$rule])) { $rule = $this->regex[$rule]; + } elseif (isset($this->defaultRegex[$rule])) { + $rule = $this->defaultRegex[$rule]; } if (0 !== strpos($rule, '/') && !preg_match('/\/[imsU]{0,4}$/', $rule)) { @@ -1461,13 +1472,17 @@ class Validate $msg = $title . $lang->get('not conform to the rules'); } - if (is_string($msg) && 0 === strpos($msg, '{%')) { + if (!is_string($msg)) { + return $msg; + } + + if (0 === strpos($msg, '{%')) { $msg = $lang->get(substr($msg, 2, -1)); } elseif ($lang->has($msg)) { $msg = $lang->get($msg); } - if (is_string($msg) && is_scalar($rule) && false !== strpos($msg, ':')) { + if (is_scalar($rule) && false !== strpos($msg, ':')) { // 变量替换 if (is_string($rule) && strpos($rule, ',')) { $array = array_pad(explode(',', $rule), 3, ''); @@ -1475,9 +1490,12 @@ class Validate $array = array_pad([], 3, ''); } $msg = str_replace( - [':attribute', ':rule', ':1', ':2', ':3'], - [$title, (string) $rule, $array[0], $array[1], $array[2]], + [':attribute', ':1', ':2', ':3'], + [$title, $array[0], $array[1], $array[2]], $msg); + if (strpos($msg, ':rule')) { + $msg = str_replace(':rule', (string) $rule, $msg); + } } return $msg; diff --git a/thinkphp/library/think/db/Builder.php b/thinkphp/library/think/db/Builder.php index 3dbbf768..b742506a 100644 --- a/thinkphp/library/think/db/Builder.php +++ b/thinkphp/library/think/db/Builder.php @@ -454,7 +454,7 @@ abstract class Builder $array[] = $key . ' ' . $exp . ' :' . $name; } - $whereStr = '(' . implode($array, ' ' . strtoupper($logic) . ' ') . ')'; + $whereStr = '(' . implode(' ' . strtoupper($logic) . ' ', $array) . ')'; } else { $whereStr = $key . ' ' . $exp . ' ' . $value; } @@ -647,6 +647,8 @@ abstract class Builder // IN 查询 if ($value instanceof \Closure) { $value = $this->parseClosure($query, $value, false); + } elseif ($value instanceof Expression) { + $value = $value->getValue(); } else { $value = array_unique(is_array($value) ? $value : explode(',', $value)); diff --git a/thinkphp/library/think/db/Query.php b/thinkphp/library/think/db/Query.php index 2704c8df..dea5fa71 100644 --- a/thinkphp/library/think/db/Query.php +++ b/thinkphp/library/think/db/Query.php @@ -611,9 +611,9 @@ class Query /** * 聚合查询 * @access public - * @param string $aggregate 聚合方法 - * @param string $field 字段名 - * @param bool $force 强制转为数字类型 + * @param string $aggregate 聚合方法 + * @param string|Expression $field 字段名 + * @param bool $force 强制转为数字类型 * @return mixed */ public function aggregate($aggregate, $field, $force = false) @@ -634,7 +634,7 @@ class Query /** * COUNT查询 * @access public - * @param string $field 字段名 + * @param string|Expression $field 字段名 * @return float|string */ public function count($field = '*') @@ -664,7 +664,7 @@ class Query /** * SUM查询 * @access public - * @param string $field 字段名 + * @param string|Expression $field 字段名 * @return float */ public function sum($field) @@ -675,8 +675,8 @@ class Query /** * MIN查询 * @access public - * @param string $field 字段名 - * @param bool $force 强制转为数字类型 + * @param string|Expression $field 字段名 + * @param bool $force 强制转为数字类型 * @return mixed */ public function min($field, $force = true) @@ -687,8 +687,8 @@ class Query /** * MAX查询 * @access public - * @param string $field 字段名 - * @param bool $force 强制转为数字类型 + * @param string|Expression $field 字段名 + * @param bool $force 强制转为数字类型 * @return mixed */ public function max($field, $force = true) @@ -699,7 +699,7 @@ class Query /** * AVG查询 * @access public - * @param string $field 字段名 + * @param string|Expression $field 字段名 * @return float */ public function avg($field) @@ -834,9 +834,10 @@ class Query * @param mixed $join 关联的表名 * @param mixed $condition 条件 * @param string $type JOIN类型 + * @param array $bind 参数绑定 * @return $this */ - public function join($join, $condition = null, $type = 'INNER') + public function join($join, $condition = null, $type = 'INNER', $bind = []) { if (empty($condition)) { // 如果为组数,则循环调用join @@ -847,7 +848,9 @@ class Query } } else { $table = $this->getJoinTable($join); - + if ($bind) { + $this->bindParams($condition, $bind); + } $this->options['join'][] = [$table, strtoupper($type), $condition]; } @@ -859,9 +862,10 @@ class Query * @access public * @param mixed $join 关联的表名 * @param mixed $condition 条件 + * @param array $bind 参数绑定 * @return $this */ - public function leftJoin($join, $condition = null) + public function leftJoin($join, $condition = null, $bind = []) { return $this->join($join, $condition, 'LEFT'); } @@ -871,9 +875,10 @@ class Query * @access public * @param mixed $join 关联的表名 * @param mixed $condition 条件 + * @param array $bind 参数绑定 * @return $this */ - public function rightJoin($join, $condition = null) + public function rightJoin($join, $condition = null, $bind = []) { return $this->join($join, $condition, 'RIGHT'); } @@ -883,9 +888,10 @@ class Query * @access public * @param mixed $join 关联的表名 * @param mixed $condition 条件 + * @param array $bind 参数绑定 * @return $this */ - public function fullJoin($join, $condition = null) + public function fullJoin($join, $condition = null, $bind = []) { return $this->join($join, $condition, 'FULL'); } @@ -943,6 +949,10 @@ class Query */ public function union($union, $all = false) { + if (empty($union)) { + return $this; + } + $this->options['union']['type'] = $all ? 'UNION ALL' : 'UNION'; if (is_array($union)) { @@ -1520,7 +1530,7 @@ class Query return $this->whereRaw($field, is_array($op) ? $op : []); } elseif ($strict) { // 使用严格模式查询 - $where = [$field, $op, $condition]; + $where = [$field, $op, $condition, $logic]; } elseif (is_array($field)) { // 解析数组批量查询 return $this->parseArrayWhereItems($field, $logic); @@ -1572,7 +1582,7 @@ class Query // 字段相等查询 $where = [$field, '=', $op]; } - } elseif (in_array(strtoupper($op), ['REGEXP', 'NOT REGEXP', 'EXISTS', 'NOT EXISTS', 'NOTEXISTS'], true)) { + } elseif (in_array(strtoupper($op), ['EXISTS', 'NOT EXISTS', 'NOTEXISTS'], true)) { $where = [$field, $op, is_string($condition) ? $this->raw($condition) : $condition]; } else { $where = $field ? [$field, $op, $condition, isset($param[2]) ? $param[2] : null] : null; @@ -1645,6 +1655,7 @@ class Query { if (true === $option) { $this->options = []; + $this->bind = []; } elseif (is_string($option) && isset($this->options[$option])) { unset($this->options[$option]); } diff --git a/thinkphp/library/think/db/builder/Mysql.php b/thinkphp/library/think/db/builder/Mysql.php index 7ec3bf85..22f33900 100644 --- a/thinkphp/library/think/db/builder/Mysql.php +++ b/thinkphp/library/think/db/builder/Mysql.php @@ -94,13 +94,17 @@ class Mysql extends Builder * @param Query $query 查询对象 * @param string $key * @param string $exp - * @param Expression $value + * @param mixed $value * @param string $field * @return string */ - protected function parseRegexp(Query $query, $key, $exp, Expression $value, $field) + protected function parseRegexp(Query $query, $key, $exp, $value, $field) { - return $key . ' ' . $exp . ' ' . $value->getValue(); + if ($value instanceof Expression) { + $value = $value->getValue(); + } + + return $key . ' ' . $exp . ' ' . $value; } /** @@ -145,7 +149,7 @@ class Mysql extends Builder throw new Exception('not support data:' . $key); } - if ('*' != $key && ($strict || !preg_match('/[,\'\"\*\(\)`.\s]/', $key))) { + if ('*' != $key && !preg_match('/[,\'\"\*\(\)`.\s]/', $key)) { $key = '`' . $key . '`'; } diff --git a/thinkphp/library/think/db/builder/Sqlsrv.php b/thinkphp/library/think/db/builder/Sqlsrv.php index e24f7d25..ef27aafa 100644 --- a/thinkphp/library/think/db/builder/Sqlsrv.php +++ b/thinkphp/library/think/db/builder/Sqlsrv.php @@ -114,7 +114,7 @@ class Sqlsrv extends Builder throw new Exception('not support data:' . $key); } - if ('*' != $key && ($strict || !preg_match('/[,\'\"\*\(\)\[.\s]/', $key))) { + if ('*' != $key && !preg_match('/[,\'\"\*\(\)\[.\s]/', $key)) { $key = '[' . $key . ']'; } diff --git a/thinkphp/library/think/db/connector/pgsql.sql b/thinkphp/library/think/db/connector/pgsql.sql index e1a09a30..5a4442d0 100644 --- a/thinkphp/library/think/db/connector/pgsql.sql +++ b/thinkphp/library/think/db/connector/pgsql.sql @@ -37,6 +37,10 @@ DECLARE v_sql varchar; v_rec RECORD; v_key varchar; + v_conkey smallint[]; + v_pk varchar[]; + v_len smallint; + v_pos smallint := 1; BEGIN SELECT pg_class.oid INTO v_oid @@ -49,6 +53,31 @@ BEGIN RETURN; END IF; + SELECT + pg_constraint.conkey INTO v_conkey + FROM + pg_constraint + INNER JOIN pg_class ON pg_constraint.conrelid = pg_class.oid + INNER JOIN pg_attribute ON pg_attribute.attrelid = pg_class.oid + INNER JOIN pg_type ON pg_type.oid = pg_attribute.atttypid + WHERE + pg_class.relname = a_table_name + AND pg_constraint.contype = 'p'; + + v_len := array_length(v_conkey,1) + 1; + WHILE v_pos < v_len LOOP + SELECT + pg_attribute.attname INTO v_key + FROM pg_constraint + INNER JOIN pg_class ON pg_constraint.conrelid = pg_class.oid + INNER JOIN pg_attribute ON pg_attribute.attrelid = pg_class.oid AND pg_attribute.attnum = pg_constraint.conkey [ v_conkey[v_pos] ] + INNER JOIN pg_type ON pg_type.oid = pg_attribute.atttypid + WHERE pg_class.relname = a_table_name AND pg_constraint.contype = 'p'; + v_pk := array_append(v_pk,v_key); + + v_pos := v_pos + 1; + END LOOP; + v_sql=' SELECT pg_attribute.attname AS fields_name, @@ -83,12 +112,19 @@ BEGIN v_ret.fields_not_null=v_rec.fields_not_null; v_ret.fields_default=v_rec.fields_default; v_ret.fields_comment=v_rec.fields_comment; - SELECT constraint_name INTO v_key FROM information_schema.key_column_usage WHERE table_schema=a_schema_name AND table_name=a_table_name AND column_name=v_rec.fields_name; - IF FOUND THEN - v_ret.fields_key_name=v_key; - ELSE - v_ret.fields_key_name=''; - END IF; + + v_ret.fields_key_name=''; + + v_len := array_length(v_pk,1) + 1; + v_pos := 1; + WHILE v_pos < v_len LOOP + IF v_rec.fields_name = v_pk[v_pos] THEN + v_ret.fields_key_name=v_pk[v_pos]; + EXIT; + END IF; + v_pos := v_pos + 1; + END LOOP; + RETURN NEXT v_ret; END LOOP; RETURN ; diff --git a/thinkphp/library/think/facade/Config.php b/thinkphp/library/think/facade/Config.php index 8646d127..0421982a 100644 --- a/thinkphp/library/think/facade/Config.php +++ b/thinkphp/library/think/facade/Config.php @@ -16,11 +16,14 @@ use think\Facade; /** * @see \think\Config * @mixin \think\Config + * @method array load(string $file, string $name = '') static 加载配置文件 * @method bool has(string $name) static 检测配置是否存在 - * @method array pull(string $name) static 获取一级配置 + * @method array pull(string $name) static 获取一级配置参数 * @method mixed get(string $name,mixed $default = null) static 获取配置参数 - * @method mixed set(string $name, mixed $value = null) static 设置配置参数 - * @method array reset(string $prefix ='') static 重置配置参数 + * @method array set(mixed $name, mixed $value = null) static 设置配置参数 + * @method array reset(string $name ='') static 重置配置参数 + * @method void remove(string $name = '') static 移除配置 + * @method void setYaconf(mixed $$yaconf) static 设置开启Yaconf 或者指定配置文件名 */ class Config extends Facade { diff --git a/thinkphp/library/think/facade/Log.php b/thinkphp/library/think/facade/Log.php index ddf851ea..ae627a5c 100644 --- a/thinkphp/library/think/facade/Log.php +++ b/thinkphp/library/think/facade/Log.php @@ -21,6 +21,7 @@ use think\Facade; * @method \think\Log record(mixed $msg, string $type = 'info', array $context = []) static 记录日志信息 * @method \think\Log clear() static 清空日志信息 * @method \think\Log key(string $key) static 当前日志记录的授权key + * @method \think\Log close() static 关闭本次请求日志写入 * @method bool check(array $config) static 检查日志写入权限 * @method bool save() static 保存调试信息 * @method void write(mixed $msg, string $type = 'info', bool $force = false) static 实时写入日志信息 diff --git a/thinkphp/library/think/log/driver/File.php b/thinkphp/library/think/log/driver/File.php index 10f745d2..c506105f 100644 --- a/thinkphp/library/think/log/driver/File.php +++ b/thinkphp/library/think/log/driver/File.php @@ -19,7 +19,7 @@ use think\App; class File { protected $config = [ - 'time_format' => ' c ', + 'time_format' => 'c', 'single' => false, 'file_size' => 2097152, 'path' => '', @@ -107,7 +107,13 @@ class File $info['timestamp'] = date($this->config['time_format']); foreach ($message as $type => $msg) { - $info[$type] = is_array($msg) ? implode("\r\n", $msg) : $msg; + $msg = is_array($msg) ? implode("\r\n", $msg) : $msg; + if (PHP_SAPI == 'cli') { + $info['msg'] = $msg; + $info['type'] = $type; + } else { + $info[$type] = $msg; + } } if (PHP_SAPI == 'cli') { @@ -140,13 +146,13 @@ class File } } + $cli = PHP_SAPI == 'cli' ? '_cli' : ''; + if ($this->config['single']) { $name = is_string($this->config['single']) ? $this->config['single'] : 'single'; - $destination = $this->config['path'] . $name . '.log'; + $destination = $this->config['path'] . $name . $cli . '.log'; } else { - $cli = PHP_SAPI == 'cli' ? '_cli' : ''; - if ($this->config['max_files']) { $filename = date('Ymd') . $cli . '.log'; } else { @@ -172,15 +178,13 @@ class File if ($this->config['single']) { $name = is_string($this->config['single']) ? $this->config['single'] : 'single'; - - $name .= '_' . $type; } elseif ($this->config['max_files']) { - $name = date('Ymd') . '_' . $type . $cli; + $name = date('Ymd'); } else { - $name = date('d') . '_' . $type . $cli; + $name = date('d'); } - return $path . DIRECTORY_SEPARATOR . $name . '.log'; + return $path . DIRECTORY_SEPARATOR . $name . '_' . $type . $cli . '.log'; } /** diff --git a/thinkphp/library/think/model/concern/Attribute.php b/thinkphp/library/think/model/concern/Attribute.php index b7a80fd3..0605478a 100644 --- a/thinkphp/library/think/model/concern/Attribute.php +++ b/thinkphp/library/think/model/concern/Attribute.php @@ -12,6 +12,7 @@ namespace think\model\concern; use InvalidArgumentException; +use think\db\Expression; use think\Exception; use think\Loader; use think\model\Relation; @@ -407,6 +408,10 @@ trait Attribute return; } + if ($value instanceof Expression) { + return $value; + } + if (is_array($type)) { list($type, $param) = $type; } elseif (strpos($type, ':')) { diff --git a/thinkphp/library/think/model/concern/Conversion.php b/thinkphp/library/think/model/concern/Conversion.php index b88528ad..73782da1 100644 --- a/thinkphp/library/think/model/concern/Conversion.php +++ b/thinkphp/library/think/model/concern/Conversion.php @@ -140,9 +140,13 @@ trait Conversion // 过滤属性 if (!empty($this->visible)) { $array = $this->parseAttr($this->visible, $visible); - $data = array_intersect_key($data, array_flip($array)); - } elseif (!empty($this->hidden)) { - $array = $this->parseAttr($this->hidden, $hidden, false); + if (!empty($array)) { + $data = array_intersect_key($data, array_flip($array)); + } + } + + if (empty($array) && !empty($this->hidden)) { + $array = $this->parseAttr($this->hidden, $hidden); $data = array_diff_key($data, array_flip($array)); } @@ -187,10 +191,7 @@ trait Conversion $item[$key] = $relation->append([$attr])->toArray(); } else { - $value = $this->getAttr($name, $item); - if (false !== $value) { - $item[$name] = $value; - } + $item[$name] = $this->getAttr($name, $item); } } } @@ -256,28 +257,18 @@ trait Conversion * @access protected * @param array $attrs 属性 * @param array $result 结果集 - * @param bool $visible * @return array */ - protected function parseAttr($attrs, &$result, $visible = true) + protected function parseAttr($attrs, &$result) { $array = []; foreach ($attrs as $key => $val) { if (is_array($val)) { - if ($visible) { - $array[] = $key; - } - $result[$key] = $val; } elseif (strpos($val, '.')) { list($key, $name) = explode('.', $val); - - if ($visible) { - $array[] = $key; - } - - $result[$key][] = $name; + $result[$key][] = $name; } else { $array[] = $val; } diff --git a/thinkphp/library/think/model/relation/BelongsToMany.php b/thinkphp/library/think/model/relation/BelongsToMany.php index 747482b6..54df68b0 100644 --- a/thinkphp/library/think/model/relation/BelongsToMany.php +++ b/thinkphp/library/think/model/relation/BelongsToMany.php @@ -561,6 +561,7 @@ class BelongsToMany extends Relation $pivot[$this->foreignKey] = $id; $this->pivot->replace() ->exists(false) + ->data([]) ->save($pivot); $result[] = $this->newPivot($pivot, true); } diff --git a/thinkphp/library/think/model/relation/HasMany.php b/thinkphp/library/think/model/relation/HasMany.php index dbb8fa08..d5a7d9d1 100644 --- a/thinkphp/library/think/model/relation/HasMany.php +++ b/thinkphp/library/think/model/relation/HasMany.php @@ -194,8 +194,8 @@ class HasMany extends Relation } } - return $this->query - ->whereExp($this->foreignKey, '=' . $this->parent->getTable() . '.' . $this->localKey) + return $this->query->alias($aggregate . '_table') + ->whereExp($aggregate . '_table.' . $this->foreignKey, '=' . $this->parent->getTable() . '.' . $this->localKey) ->fetchSql() ->$aggregate($field); } diff --git a/thinkphp/library/think/response/Download.php b/thinkphp/library/think/response/Download.php index d5fcb444..5595f9ab 100644 --- a/thinkphp/library/think/response/Download.php +++ b/thinkphp/library/think/response/Download.php @@ -20,7 +20,7 @@ class Download extends Response protected $name; protected $mimeType; protected $isContent = false; - protected $openinBrower = false; + protected $openinBrowser = false; /** * 处理数据 * @access protected @@ -53,7 +53,7 @@ class Download extends Response $this->header['Pragma'] = 'public'; $this->header['Content-Type'] = $mimeType ?: 'application/octet-stream'; $this->header['Cache-control'] = 'max-age=' . $this->expire; - $this->header['Content-Disposition'] = $this->openinBrower ? 'inline' : 'attachment; filename="' . $name . '"'; + $this->header['Content-Disposition'] = $this->openinBrowser ? 'inline' : 'attachment; filename="' . $name . '"'; $this->header['Content-Length'] = $size; $this->header['Content-Transfer-Encoding'] = 'binary'; $this->header['Expires'] = gmdate("D, d M Y H:i:s", time() + $this->expire) . ' GMT'; @@ -138,11 +138,11 @@ class Download extends Response /** * 设置是否在浏览器中显示文件 * @access public - * @param bool $openinBrower 是否在浏览器中显示文件 + * @param bool $openinBrowser 是否在浏览器中显示文件 * @return $this */ - public function openinBrower($openinBrower) { - $this->openinBrower = $openinBrower; + public function openinBrowser($openinBrowser) { + $this->openinBrowser = $openinBrowser; return $this; } } diff --git a/thinkphp/library/think/route/Rule.php b/thinkphp/library/think/route/Rule.php index fdfc29d1..f841ada6 100644 --- a/thinkphp/library/think/route/Rule.php +++ b/thinkphp/library/think/route/Rule.php @@ -1001,7 +1001,7 @@ abstract class Rule } } - $regex = str_replace($match, $replace, $rule); + $regex = str_replace(array_unique($match), array_unique($replace), $rule); $regex = str_replace([')?/', ')/', ')?-', ')-', '\\\\/'], [')\/', ')\/', ')\-', ')\-', '\/'], $regex); if (isset($hasSlash)) { diff --git a/thinkphp/library/think/route/RuleGroup.php b/thinkphp/library/think/route/RuleGroup.php index 36be2f44..faad639a 100644 --- a/thinkphp/library/think/route/RuleGroup.php +++ b/thinkphp/library/think/route/RuleGroup.php @@ -151,10 +151,6 @@ class RuleGroup extends Rule $method = strtolower($request->method()); $rules = $this->getMethodRules($method); - if (count($rules) == 0) { - return false; - } - if ($this->parent) { // 合并分组参数 $this->mergeGroupOptions(); diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index 95f7e097..fce8549f 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') && ini_get('apc.enabled') ? $apcuPrefix : null; + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; } /** diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index fbc6b199..914558b9 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -12,13 +12,7 @@ "type": "zip", "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/5a91b62b9d37cee635bbf8d553f4546057250bee", "reference": "5a91b62b9d37cee635bbf8d553f4546057250bee", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "ext-iconv": "*", @@ -66,13 +60,7 @@ "type": "zip", "url": "https://api.github.com/repos/endroid/installer/zipball/2db0498b3a1cdb95db75309ea3087739f8017e62", "reference": "2db0498b3a1cdb95db75309ea3087739f8017e62", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "composer-plugin-api": "^1.1", @@ -119,13 +107,7 @@ "type": "zip", "url": "https://api.github.com/repos/endroid/qr-code/zipball/4752fc7cc7f658c17049919af33872e9b7d5e64d", "reference": "4752fc7cc7f658c17049919af33872e9b7d5e64d", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "bacon/bacon-qr-code": "^1.0.3", @@ -187,13 +169,7 @@ "type": "zip", "url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/a75482d3bc804e3f6702332bfda6cccbb0dfaa76", "reference": "a75482d3bc804e3f6702332bfda6cccbb0dfaa76", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": "^5.6|^7.0" @@ -245,13 +221,7 @@ "type": "zip", "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/1ea674a8308baf547cbcbd30c5fcd6d301b7c000", "reference": "1ea674a8308baf547cbcbd30c5fcd6d301b7c000", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": "^5.6.0|^7.0.0" @@ -348,13 +318,7 @@ "type": "zip", "url": "https://api.github.com/repos/myclabs/php-enum/zipball/550d2334d77f91b0816a5cbd6965272fe20146b8", "reference": "550d2334d77f91b0816a5cbd6965272fe20146b8", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=5.4" @@ -400,13 +364,7 @@ "type": "zip", "url": "https://api.github.com/repos/ivanlanin/pclzip/zipball/19dd1de9d3f5fc4d7d70175b4c344dee329f45fd", "reference": "19dd1de9d3f5fc4d7d70175b4c344dee329f45fd", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "time": "2014-06-05T11:42:24+00:00", "type": "library", @@ -445,13 +403,7 @@ "type": "zip", "url": "https://api.github.com/repos/php4world/auth/zipball/e356cad8de77c3e27f78875685b309d561c0fa94", "reference": "e356cad8de77c3e27f78875685b309d561c0fa94", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "topthink/framework": "5.1.*" @@ -489,13 +441,7 @@ "type": "zip", "url": "https://api.github.com/repos/PHPOffice/Common/zipball/edb5d32b1e3400a35a5c91e2539ed6f6ce925e4d", "reference": "edb5d32b1e3400a35a5c91e2539ed6f6ce925e4d", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "pclzip/pclzip": "^2.8", @@ -552,13 +498,7 @@ "type": "zip", "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/2dfd06c59825914a1a325f2a2ed13634b9d8c411", "reference": "2dfd06c59825914a1a325f2a2ed13634b9d8c411", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "ext-ctype": "*", @@ -647,13 +587,7 @@ "type": "zip", "url": "https://api.github.com/repos/PHPOffice/PHPWord/zipball/dfa2f36cad2b632b7ab1c56473e4f5db9a7caf7f", "reference": "dfa2f36cad2b632b7ab1c56473e4f5db9a7caf7f", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "ext-xml": "*", @@ -764,13 +698,7 @@ "type": "zip", "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=5.3.0" @@ -820,13 +748,7 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/inflector/zipball/8da789363973920dd7df6753822810592138e5ba", "reference": "8da789363973920dd7df6753822810592138e5ba", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": "^7.1.3", @@ -886,13 +808,7 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/options-resolver/zipball/31e5523373cb06163079ef46d0a2d507d70fe064", "reference": "31e5523373cb06163079ef46d0a2d507d70fe064", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": "^7.1.3" @@ -948,13 +864,7 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=5.3.3" @@ -1014,13 +924,7 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/property-access/zipball/10edb6c4b6f496a2ed40a788ebbd280b421985ae", "reference": "10edb6c4b6f496a2ed40a788ebbd280b421985ae", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": "^7.1.3", @@ -1078,24 +982,18 @@ }, { "name": "topthink/framework", - "version": "v5.1.32", - "version_normalized": "5.1.32.0", + "version": "v5.1.35", + "version_normalized": "5.1.35.0", "source": { "type": "git", "url": "https://github.com/top-think/framework.git", - "reference": "88a2ab625b35e047896718db320e08375cf021da" + "reference": "c53c0c6132022a87e8ee9c4109939eaf9a8a7adb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/framework/zipball/88a2ab625b35e047896718db320e08375cf021da", - "reference": "88a2ab625b35e047896718db320e08375cf021da", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/top-think/framework/zipball/c53c0c6132022a87e8ee9c4109939eaf9a8a7adb", + "reference": "c53c0c6132022a87e8ee9c4109939eaf9a8a7adb", + "shasum": "" }, "require": { "php": ">=5.6.0", @@ -1110,7 +1008,7 @@ "sebastian/phpcpd": "2.*", "squizlabs/php_codesniffer": "2.*" }, - "time": "2018-12-23T13:42:11+00:00", + "time": "2019-03-03T00:44:44+00:00", "type": "think-framework", "installation-source": "dist", "notification-url": "https://packagist.org/downloads/", @@ -1148,13 +1046,7 @@ "type": "zip", "url": "https://api.github.com/repos/top-think/think-captcha/zipball/54c8a51552f99ff9ea89ea9c272383a8f738ceee", "reference": "54c8a51552f99ff9ea89ea9c272383a8f738ceee", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "topthink/framework": "5.1.*" @@ -1195,13 +1087,7 @@ "type": "zip", "url": "https://api.github.com/repos/top-think/think-helper/zipball/0c99dc625b0d2d4124e1b6ca15a3ad6f0125963f", "reference": "0c99dc625b0d2d4124e1b6ca15a3ad6f0125963f", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "time": "2017-04-05T07:15:37+00:00", "type": "library", @@ -1239,13 +1125,7 @@ "type": "zip", "url": "https://api.github.com/repos/top-think/think-installer/zipball/f5400a12c60e513911aef41fe443fa6920952675", "reference": "f5400a12c60e513911aef41fe443fa6920952675", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "composer-plugin-api": "^1.0" @@ -1288,13 +1168,7 @@ "type": "zip", "url": "https://api.github.com/repos/top-think/think-migration/zipball/70c89850ca29c2eab988c7c3475d1d5331901bb8", "reference": "70c89850ca29c2eab988c7c3475d1d5331901bb8", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "topthink/framework": "5.1.*" @@ -1335,13 +1209,7 @@ "type": "zip", "url": "https://api.github.com/repos/whitehat101/apr1-md5/zipball/8b261c9fc0481b4e9fa9d01c6ca70867b5d5e819", "reference": "8b261c9fc0481b4e9fa9d01c6ca70867b5d5e819", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=5.3.0" @@ -1387,13 +1255,7 @@ "type": "zip", "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/31d8aafae982f9568287cb4dce987e6aff8fd074", "reference": "31d8aafae982f9568287cb4dce987e6aff8fd074", - "shasum": "", - "mirrors": [ - { - "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": "^5.6 || ^7.0"