bugs
This commit is contained in:
parent
c0b2b29a61
commit
03063bc9c1
18
composer.lock
generated
18
composer.lock
generated
@ -8,16 +8,16 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "1.0.62",
|
||||
"version": "1.0.63",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "14dd5d7dff5fbc29ca9a2a53ff109760e40d91a0"
|
||||
"reference": "8132daec326565036bc8e8d1876f77ec183a7bd6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/14dd5d7dff5fbc29ca9a2a53ff109760e40d91a0",
|
||||
"reference": "14dd5d7dff5fbc29ca9a2a53ff109760e40d91a0",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/8132daec326565036bc8e8d1876f77ec183a7bd6",
|
||||
"reference": "8132daec326565036bc8e8d1876f77ec183a7bd6",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -94,7 +94,7 @@
|
||||
"sftp",
|
||||
"storage"
|
||||
],
|
||||
"time": "2019-12-29T14:46:55+00:00"
|
||||
"time": "2020-01-04T16:30:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem-cached-adapter",
|
||||
@ -722,12 +722,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/top-think/think-orm.git",
|
||||
"reference": "444277e2acff186a8066a8a42912ebea01d948c5"
|
||||
"reference": "9caecd97608c937059fc09550b41af2557471d35"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/444277e2acff186a8066a8a42912ebea01d948c5",
|
||||
"reference": "444277e2acff186a8066a8a42912ebea01d948c5",
|
||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/9caecd97608c937059fc09550b41af2557471d35",
|
||||
"reference": "9caecd97608c937059fc09550b41af2557471d35",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -765,7 +765,7 @@
|
||||
"database",
|
||||
"orm"
|
||||
],
|
||||
"time": "2019-12-28T13:25:27+00:00"
|
||||
"time": "2020-01-04T04:00:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "topthink/think-template",
|
||||
|
@ -1,63 +0,0 @@
|
||||
<?php
|
||||
use think\facade\Env;
|
||||
|
||||
return [
|
||||
// 默认使用的数据库连接配置
|
||||
'default' => Env::get('database.driver', 'mysql'),
|
||||
|
||||
// 自定义时间查询规则
|
||||
'time_query_rule' => [],
|
||||
|
||||
// 自动写入时间戳字段
|
||||
// true为自动识别类型 false关闭
|
||||
// 字符串则明确指定时间字段类型 支持 int timestamp datetime date
|
||||
'auto_timestamp' => true,
|
||||
|
||||
// 时间字段取出后的默认时间格式
|
||||
'datetime_format' => 'Y-m-d H:i:s',
|
||||
|
||||
// 数据库连接配置信息
|
||||
'connections' => [
|
||||
'mysql' => [
|
||||
// 数据库类型
|
||||
'type' => Env::get('database.type', 'mysql'),
|
||||
// 服务器地址
|
||||
'hostname' => Env::get('database.hostname', '127.0.0.1'),
|
||||
// 数据库名
|
||||
'database' => Env::get('database.database', ''),
|
||||
// 用户名
|
||||
'username' => Env::get('database.username', 'root'),
|
||||
// 密码
|
||||
'password' => Env::get('database.password', ''),
|
||||
// 端口
|
||||
'hostport' => Env::get('database.hostport', '3306'),
|
||||
// 数据库连接参数
|
||||
'params' => [],
|
||||
// 数据库编码默认采用utf8
|
||||
'charset' => Env::get('database.charset', 'utf8'),
|
||||
// 数据库表前缀
|
||||
'prefix' => Env::get('database.prefix', ''),
|
||||
|
||||
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
|
||||
'deploy' => 0,
|
||||
// 数据库读写是否分离 主从式有效
|
||||
'rw_separate' => false,
|
||||
// 读写分离后 主服务器数量
|
||||
'master_num' => 1,
|
||||
// 指定从服务器序号
|
||||
'slave_no' => '',
|
||||
// 是否严格检查字段是否存在
|
||||
'fields_strict' => true,
|
||||
// 是否需要断线重连
|
||||
'break_reconnect' => false,
|
||||
// 监听SQL
|
||||
'trigger_sql' => true,
|
||||
// 开启字段缓存
|
||||
'fields_cache' => false,
|
||||
// 字段缓存路径
|
||||
'schema_cache_path' => app()->getRuntimePath() . 'schema' . DIRECTORY_SEPARATOR,
|
||||
],
|
||||
|
||||
// 更多的数据库配置信息
|
||||
],
|
||||
];
|
@ -7,7 +7,7 @@ return [
|
||||
// 模板引擎类型使用Think
|
||||
'type' => 'Think',
|
||||
// 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
|
||||
'auto_rule' => 3,
|
||||
'auto_rule' => 2,
|
||||
// 模板目录名
|
||||
'view_dir_name' => 'view',
|
||||
// 模板后缀
|
||||
|
20
vendor/composer/installed.json
vendored
20
vendor/composer/installed.json
vendored
@ -1,17 +1,17 @@
|
||||
[
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "1.0.62",
|
||||
"version_normalized": "1.0.62.0",
|
||||
"version": "1.0.63",
|
||||
"version_normalized": "1.0.63.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "14dd5d7dff5fbc29ca9a2a53ff109760e40d91a0"
|
||||
"reference": "8132daec326565036bc8e8d1876f77ec183a7bd6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/14dd5d7dff5fbc29ca9a2a53ff109760e40d91a0",
|
||||
"reference": "14dd5d7dff5fbc29ca9a2a53ff109760e40d91a0",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/8132daec326565036bc8e8d1876f77ec183a7bd6",
|
||||
"reference": "8132daec326565036bc8e8d1876f77ec183a7bd6",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -47,7 +47,7 @@
|
||||
"spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
|
||||
"srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
|
||||
},
|
||||
"time": "2019-12-29T14:46:55+00:00",
|
||||
"time": "2020-01-04T16:30:31+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
@ -954,12 +954,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/top-think/think-orm.git",
|
||||
"reference": "a343dbb39fc51a09e78a68e7968dc8e8060c4a66"
|
||||
"reference": "9caecd97608c937059fc09550b41af2557471d35"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/a343dbb39fc51a09e78a68e7968dc8e8060c4a66",
|
||||
"reference": "a343dbb39fc51a09e78a68e7968dc8e8060c4a66",
|
||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/9caecd97608c937059fc09550b41af2557471d35",
|
||||
"reference": "9caecd97608c937059fc09550b41af2557471d35",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -975,7 +975,7 @@
|
||||
"psr/simple-cache": "^1.0",
|
||||
"topthink/think-helper": "^3.1"
|
||||
},
|
||||
"time": "2020-01-01T12:36:51+00:00",
|
||||
"time": "2020-01-04T04:00:06+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
@ -557,6 +557,10 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
|
||||
*/
|
||||
protected function normalizePermissions($permissions)
|
||||
{
|
||||
if (is_numeric($permissions)) {
|
||||
return $permissions & 0777;
|
||||
}
|
||||
|
||||
// remove the type identifier
|
||||
$permissions = substr($permissions, 1);
|
||||
|
||||
|
22
vendor/league/flysystem/src/Adapter/Ftp.php
vendored
22
vendor/league/flysystem/src/Adapter/Ftp.php
vendored
@ -6,9 +6,11 @@ use ErrorException;
|
||||
use League\Flysystem\Adapter\Polyfill\StreamedCopyTrait;
|
||||
use League\Flysystem\AdapterInterface;
|
||||
use League\Flysystem\Config;
|
||||
use League\Flysystem\ConnectionErrorException;
|
||||
use League\Flysystem\ConnectionRuntimeException;
|
||||
use League\Flysystem\InvalidRootException;
|
||||
use League\Flysystem\Util;
|
||||
use League\Flysystem\Util\MimeType;
|
||||
use RuntimeException;
|
||||
|
||||
class Ftp extends AbstractFtpAdapter
|
||||
{
|
||||
@ -135,7 +137,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
}
|
||||
|
||||
if ( ! $this->connection) {
|
||||
throw new RuntimeException('Could not connect to host: ' . $this->getHost() . ', port:' . $this->getPort());
|
||||
throw new ConnectionRuntimeException('Could not connect to host: ' . $this->getHost() . ', port:' . $this->getPort());
|
||||
}
|
||||
|
||||
$this->login();
|
||||
@ -153,7 +155,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
if ($this->utf8) {
|
||||
$response = ftp_raw($this->connection, "OPTS UTF8 ON");
|
||||
if (substr($response[0], 0, 3) !== '200') {
|
||||
throw new RuntimeException(
|
||||
throw new ConnectionRuntimeException(
|
||||
'Could not set UTF-8 mode for connection: ' . $this->getHost() . '::' . $this->getPort()
|
||||
);
|
||||
}
|
||||
@ -163,7 +165,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
/**
|
||||
* Set the connections to passive mode.
|
||||
*
|
||||
* @throws RuntimeException
|
||||
* @throws ConnectionRuntimeException
|
||||
*/
|
||||
protected function setConnectionPassiveMode()
|
||||
{
|
||||
@ -172,7 +174,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
}
|
||||
|
||||
if ( ! ftp_pasv($this->connection, $this->passive)) {
|
||||
throw new RuntimeException(
|
||||
throw new ConnectionRuntimeException(
|
||||
'Could not set passive mode for connection: ' . $this->getHost() . '::' . $this->getPort()
|
||||
);
|
||||
}
|
||||
@ -187,7 +189,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
$connection = $this->connection;
|
||||
|
||||
if ($root && ! ftp_chdir($connection, $root)) {
|
||||
throw new RuntimeException('Root is invalid or does not exist: ' . $this->getRoot());
|
||||
throw new InvalidRootException('Root is invalid or does not exist: ' . $this->getRoot());
|
||||
}
|
||||
|
||||
// Store absolute path for further reference.
|
||||
@ -200,7 +202,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
/**
|
||||
* Login.
|
||||
*
|
||||
* @throws RuntimeException
|
||||
* @throws ConnectionRuntimeException
|
||||
*/
|
||||
protected function login()
|
||||
{
|
||||
@ -215,7 +217,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
|
||||
if ( ! $isLoggedIn) {
|
||||
$this->disconnect();
|
||||
throw new RuntimeException(
|
||||
throw new ConnectionRuntimeException(
|
||||
'Could not login with connection: ' . $this->getHost() . '::' . $this->getPort(
|
||||
) . ', username: ' . $this->getUsername()
|
||||
);
|
||||
@ -526,7 +528,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @throws ErrorException
|
||||
* @throws ConnectionErrorException
|
||||
*/
|
||||
public function isConnected()
|
||||
{
|
||||
@ -534,7 +536,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
return is_resource($this->connection) && ftp_rawlist($this->connection, $this->getRoot()) !== false;
|
||||
} catch (ErrorException $e) {
|
||||
if (strpos($e->getMessage(), 'ftp_rawlist') === false) {
|
||||
throw $e;
|
||||
throw new ConnectionErrorException($e->getMessage());
|
||||
}
|
||||
|
||||
return false;
|
||||
|
9
vendor/league/flysystem/src/ConnectionErrorException.php
vendored
Normal file
9
vendor/league/flysystem/src/ConnectionErrorException.php
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace League\Flysystem;
|
||||
|
||||
use ErrorException;
|
||||
|
||||
class ConnectionErrorException extends ErrorException implements FilesystemException
|
||||
{
|
||||
}
|
9
vendor/league/flysystem/src/ConnectionRuntimeException.php
vendored
Normal file
9
vendor/league/flysystem/src/ConnectionRuntimeException.php
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace League\Flysystem;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
class ConnectionRuntimeException extends RuntimeException implements FilesystemException
|
||||
{
|
||||
}
|
2
vendor/league/flysystem/src/Exception.php
vendored
2
vendor/league/flysystem/src/Exception.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
namespace League\Flysystem;
|
||||
|
||||
class Exception extends \Exception
|
||||
class Exception extends \Exception implements FilesystemException
|
||||
{
|
||||
//
|
||||
}
|
||||
|
7
vendor/league/flysystem/src/FilesystemException.php
vendored
Normal file
7
vendor/league/flysystem/src/FilesystemException.php
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace League\Flysystem;
|
||||
|
||||
interface FilesystemException
|
||||
{
|
||||
}
|
@ -7,6 +7,6 @@ use LogicException;
|
||||
/**
|
||||
* Thrown when the MountManager cannot find a filesystem.
|
||||
*/
|
||||
class FilesystemNotFoundException extends LogicException
|
||||
class FilesystemNotFoundException extends LogicException implements FilesystemException
|
||||
{
|
||||
}
|
||||
|
9
vendor/league/flysystem/src/InvalidRootException.php
vendored
Normal file
9
vendor/league/flysystem/src/InvalidRootException.php
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace League\Flysystem;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
class InvalidRootException extends RuntimeException implements FilesystemException
|
||||
{
|
||||
}
|
@ -5,7 +5,7 @@ namespace League\Flysystem;
|
||||
use RuntimeException;
|
||||
use SplFileInfo;
|
||||
|
||||
class NotSupportedException extends RuntimeException
|
||||
class NotSupportedException extends RuntimeException implements FilesystemException
|
||||
{
|
||||
/**
|
||||
* Create a new exception for a link.
|
||||
|
@ -4,7 +4,7 @@ namespace League\Flysystem;
|
||||
|
||||
use LogicException;
|
||||
|
||||
class RootViolationException extends LogicException
|
||||
class RootViolationException extends LogicException implements FilesystemException
|
||||
{
|
||||
//
|
||||
}
|
||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// This file is automatically generated at:2020-01-02 11:24:44
|
||||
// This file is automatically generated at:2020-01-07 14:28:37
|
||||
declare (strict_types = 1);
|
||||
return array (
|
||||
0 => 'think\\captcha\\CaptchaService',
|
||||
|
@ -906,7 +906,8 @@ abstract class PDOConnection extends Connection implements ConnectionInterface
|
||||
return 0;
|
||||
}
|
||||
|
||||
$query->parseOptions();
|
||||
$options = $query->parseOptions();
|
||||
$replace = !empty($options['replace']);
|
||||
|
||||
if (0 === $limit && count($dataSet) >= 5000) {
|
||||
$limit = 1000;
|
||||
@ -921,7 +922,7 @@ abstract class PDOConnection extends Connection implements ConnectionInterface
|
||||
$count = 0;
|
||||
|
||||
foreach ($array as $item) {
|
||||
$sql = $this->builder->insertAll($query, $item);
|
||||
$sql = $this->builder->insertAll($query, $item, $replace);
|
||||
$count += $this->execute($query, $sql, $query->getBind());
|
||||
}
|
||||
|
||||
@ -935,7 +936,7 @@ abstract class PDOConnection extends Connection implements ConnectionInterface
|
||||
return $count;
|
||||
}
|
||||
|
||||
$sql = $this->builder->insertAll($query, $dataSet);
|
||||
$sql = $this->builder->insertAll($query, $dataSet, $replace);
|
||||
|
||||
return $this->execute($query, $sql, $query->getBind());
|
||||
}
|
||||
|
@ -424,7 +424,7 @@ trait Attribute
|
||||
break;
|
||||
case 'datetime':
|
||||
$value = is_numeric($value) ? $value : strtotime($value);
|
||||
$value = $this->formatDateTime('Y-m-d H:i:s.u', $value);
|
||||
$value = $this->formatDateTime('Y-m-d H:i:s.u', $value, true);
|
||||
break;
|
||||
case 'object':
|
||||
if (is_object($value)) {
|
||||
|
Loading…
Reference in New Issue
Block a user