This commit is contained in:
toogee 2020-07-31 15:30:10 +08:00
parent 26bf82c632
commit 26f7a501d9
25 changed files with 277 additions and 157 deletions

92
composer.lock generated
View File

@ -8,16 +8,16 @@
"packages": [
{
"name": "league/flysystem",
"version": "1.0.69",
"version": "1.0.70",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem.git",
"reference": "7106f78428a344bc4f643c233a94e48795f10967"
"reference": "585824702f534f8d3cf7fab7225e8466cc4b7493"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/7106f78428a344bc4f643c233a94e48795f10967",
"reference": "7106f78428a344bc4f643c233a94e48795f10967",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/585824702f534f8d3cf7fab7225e8466cc4b7493",
"reference": "585824702f534f8d3cf7fab7225e8466cc4b7493",
"shasum": "",
"mirrors": [
{
@ -34,7 +34,7 @@
"league/flysystem-sftp": "<1.0.6"
},
"require-dev": {
"phpspec/phpspec": "^3.4",
"phpspec/phpspec": "^3.4 || ^4.0 || ^5.0 || ^6.0",
"phpunit/phpunit": "^5.7.26"
},
"suggest": {
@ -94,20 +94,20 @@
"sftp",
"storage"
],
"time": "2020-05-18T15:13:39+00:00"
"time": "2020-07-26T07:20:36+00:00"
},
{
"name": "league/flysystem-cached-adapter",
"version": "1.0.9",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem-cached-adapter.git",
"reference": "08ef74e9be88100807a3b92cc9048a312bf01d6f"
"reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/08ef74e9be88100807a3b92cc9048a312bf01d6f",
"reference": "08ef74e9be88100807a3b92cc9048a312bf01d6f",
"url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/d1925efb2207ac4be3ad0c40b8277175f99ffaff",
"reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff",
"shasum": "",
"mirrors": [
{
@ -147,7 +147,7 @@
}
],
"description": "An adapter decorator to enable meta-data caching.",
"time": "2018-07-09T20:51:04+00:00"
"time": "2020-07-25T15:56:04+00:00"
},
{
"name": "opis/closure",
@ -218,16 +218,16 @@
},
{
"name": "phpmailer/phpmailer",
"version": "v6.1.6",
"version": "v6.1.7",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "c2796cb1cb99d7717290b48c4e6f32cb6c60b7b3"
"reference": "2c2370ba3df7034f9eb7b8f387c97b52b2ba5ad0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/c2796cb1cb99d7717290b48c4e6f32cb6c60b7b3",
"reference": "c2796cb1cb99d7717290b48c4e6f32cb6c60b7b3",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/2c2370ba3df7034f9eb7b8f387c97b52b2ba5ad0",
"reference": "2c2370ba3df7034f9eb7b8f387c97b52b2ba5ad0",
"shasum": "",
"mirrors": [
{
@ -282,7 +282,7 @@
}
],
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"time": "2020-05-27T12:24:03+00:00"
"time": "2020-07-14T18:50:27+00:00"
},
{
"name": "psr/cache",
@ -723,16 +723,16 @@
},
{
"name": "topthink/think-multi-app",
"version": "v1.0.13",
"version": "v1.0.14",
"source": {
"type": "git",
"url": "https://github.com/top-think/think-multi-app.git",
"reference": "21ac02a99bd69e29444963841e09c5d39b2bcecb"
"reference": "ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/top-think/think-multi-app/zipball/21ac02a99bd69e29444963841e09c5d39b2bcecb",
"reference": "21ac02a99bd69e29444963841e09c5d39b2bcecb",
"url": "https://api.github.com/repos/top-think/think-multi-app/zipball/ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3",
"reference": "ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3",
"shasum": "",
"mirrors": [
{
@ -769,7 +769,7 @@
}
],
"description": "thinkphp6 multi app support",
"time": "2020-04-24T08:53:21+00:00"
"time": "2020-07-12T13:50:37+00:00"
},
{
"name": "topthink/think-orm",
@ -970,16 +970,16 @@
"packages-dev": [
{
"name": "symfony/polyfill-mbstring",
"version": "v1.17.1",
"version": "v1.18.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "7110338d81ce1cbc3e273136e4574663627037a7"
"reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7110338d81ce1cbc3e273136e4574663627037a7",
"reference": "7110338d81ce1cbc3e273136e4574663627037a7",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a",
"reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a",
"shasum": "",
"mirrors": [
{
@ -997,7 +997,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.17-dev"
"dev-master": "1.18-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -1035,20 +1035,20 @@
"portable",
"shim"
],
"time": "2020-06-06T08:46:27+00:00"
"time": "2020-07-14T12:35:20+00:00"
},
{
"name": "symfony/polyfill-php72",
"version": "v1.17.0",
"version": "v1.18.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "f048e612a3905f34931127360bdd2def19a5e582"
"reference": "639447d008615574653fb3bc60d1986d7172eaae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582",
"reference": "f048e612a3905f34931127360bdd2def19a5e582",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae",
"reference": "639447d008615574653fb3bc60d1986d7172eaae",
"shasum": "",
"mirrors": [
{
@ -1063,7 +1063,11 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.17-dev"
"dev-master": "1.18-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@ -1096,20 +1100,20 @@
"portable",
"shim"
],
"time": "2020-05-12T16:47:27+00:00"
"time": "2020-07-14T12:35:20+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.17.1",
"version": "v1.18.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2"
"reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4a5b6bba3259902e386eb80dd1956181ee90b5b2",
"reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981",
"reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981",
"shasum": "",
"mirrors": [
{
@ -1124,7 +1128,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.17-dev"
"dev-master": "1.18-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -1168,20 +1172,20 @@
"portable",
"shim"
],
"time": "2020-06-06T08:46:27+00:00"
"time": "2020-07-14T12:35:20+00:00"
},
{
"name": "symfony/var-dumper",
"version": "v4.4.10",
"version": "v4.4.11",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "56b3aa5eab0ac6720dcd559fd1d590ce301594ac"
"reference": "2125805a1a4e57f2340bc566c3013ca94d2722dc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/56b3aa5eab0ac6720dcd559fd1d590ce301594ac",
"reference": "56b3aa5eab0ac6720dcd559fd1d590ce301594ac",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/2125805a1a4e57f2340bc566c3013ca94d2722dc",
"reference": "2125805a1a4e57f2340bc566c3013ca94d2722dc",
"shasum": "",
"mirrors": [
{
@ -1251,7 +1255,7 @@
"debug",
"dump"
],
"time": "2020-05-30T20:06:45+00:00"
"time": "2020-06-24T13:34:53+00:00"
},
{
"name": "topthink/think-trace",

View File

@ -7,5 +7,6 @@ $baseDir = dirname($vendorDir);
return array(
'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
);

View File

@ -146,6 +146,7 @@ class ComposerStaticInit1b32198725235c8d6500c87262ef30c2
public static $classMap = array (
'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
);

View File

@ -1,17 +1,17 @@
[
{
"name": "league/flysystem",
"version": "1.0.69",
"version_normalized": "1.0.69.0",
"version": "1.0.70",
"version_normalized": "1.0.70.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem.git",
"reference": "7106f78428a344bc4f643c233a94e48795f10967"
"reference": "585824702f534f8d3cf7fab7225e8466cc4b7493"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/7106f78428a344bc4f643c233a94e48795f10967",
"reference": "7106f78428a344bc4f643c233a94e48795f10967",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/585824702f534f8d3cf7fab7225e8466cc4b7493",
"reference": "585824702f534f8d3cf7fab7225e8466cc4b7493",
"shasum": "",
"mirrors": [
{
@ -28,7 +28,7 @@
"league/flysystem-sftp": "<1.0.6"
},
"require-dev": {
"phpspec/phpspec": "^3.4",
"phpspec/phpspec": "^3.4 || ^4.0 || ^5.0 || ^6.0",
"phpunit/phpunit": "^5.7.26"
},
"suggest": {
@ -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": "2020-05-18T15:13:39+00:00",
"time": "2020-07-26T07:20:36+00:00",
"type": "library",
"extra": {
"branch-alias": {
@ -93,17 +93,17 @@
},
{
"name": "league/flysystem-cached-adapter",
"version": "1.0.9",
"version_normalized": "1.0.9.0",
"version": "1.1.0",
"version_normalized": "1.1.0.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem-cached-adapter.git",
"reference": "08ef74e9be88100807a3b92cc9048a312bf01d6f"
"reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/08ef74e9be88100807a3b92cc9048a312bf01d6f",
"reference": "08ef74e9be88100807a3b92cc9048a312bf01d6f",
"url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/d1925efb2207ac4be3ad0c40b8277175f99ffaff",
"reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff",
"shasum": "",
"mirrors": [
{
@ -126,7 +126,7 @@
"suggest": {
"ext-phpredis": "Pure C implemented extension for PHP"
},
"time": "2018-07-09T20:51:04+00:00",
"time": "2020-07-25T15:56:04+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -217,17 +217,17 @@
},
{
"name": "phpmailer/phpmailer",
"version": "v6.1.6",
"version_normalized": "6.1.6.0",
"version": "v6.1.7",
"version_normalized": "6.1.7.0",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "c2796cb1cb99d7717290b48c4e6f32cb6c60b7b3"
"reference": "2c2370ba3df7034f9eb7b8f387c97b52b2ba5ad0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/c2796cb1cb99d7717290b48c4e6f32cb6c60b7b3",
"reference": "c2796cb1cb99d7717290b48c4e6f32cb6c60b7b3",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/2c2370ba3df7034f9eb7b8f387c97b52b2ba5ad0",
"reference": "2c2370ba3df7034f9eb7b8f387c97b52b2ba5ad0",
"shasum": "",
"mirrors": [
{
@ -254,7 +254,7 @@
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
},
"time": "2020-05-27T12:24:03+00:00",
"time": "2020-07-14T18:50:27+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -509,17 +509,17 @@
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.17.1",
"version_normalized": "1.17.1.0",
"version": "v1.18.0",
"version_normalized": "1.18.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "7110338d81ce1cbc3e273136e4574663627037a7"
"reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7110338d81ce1cbc3e273136e4574663627037a7",
"reference": "7110338d81ce1cbc3e273136e4574663627037a7",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a",
"reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a",
"shasum": "",
"mirrors": [
{
@ -534,11 +534,11 @@
"suggest": {
"ext-mbstring": "For best performance"
},
"time": "2020-06-06T08:46:27+00:00",
"time": "2020-07-14T12:35:20+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.17-dev"
"dev-master": "1.18-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -580,17 +580,17 @@
},
{
"name": "symfony/polyfill-php72",
"version": "v1.17.0",
"version_normalized": "1.17.0.0",
"version": "v1.18.0",
"version_normalized": "1.18.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "f048e612a3905f34931127360bdd2def19a5e582"
"reference": "639447d008615574653fb3bc60d1986d7172eaae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582",
"reference": "f048e612a3905f34931127360bdd2def19a5e582",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae",
"reference": "639447d008615574653fb3bc60d1986d7172eaae",
"shasum": "",
"mirrors": [
{
@ -602,11 +602,15 @@
"require": {
"php": ">=5.3.3"
},
"time": "2020-05-12T16:47:27+00:00",
"time": "2020-07-14T12:35:20+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.17-dev"
"dev-master": "1.18-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"installation-source": "dist",
@ -643,17 +647,17 @@
},
{
"name": "symfony/polyfill-php80",
"version": "v1.17.1",
"version_normalized": "1.17.1.0",
"version": "v1.18.0",
"version_normalized": "1.18.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2"
"reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4a5b6bba3259902e386eb80dd1956181ee90b5b2",
"reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981",
"reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981",
"shasum": "",
"mirrors": [
{
@ -665,11 +669,11 @@
"require": {
"php": ">=7.0.8"
},
"time": "2020-06-06T08:46:27+00:00",
"time": "2020-07-14T12:35:20+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.17-dev"
"dev-master": "1.18-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -717,17 +721,17 @@
},
{
"name": "symfony/var-dumper",
"version": "v4.4.10",
"version_normalized": "4.4.10.0",
"version": "v4.4.11",
"version_normalized": "4.4.11.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "56b3aa5eab0ac6720dcd559fd1d590ce301594ac"
"reference": "2125805a1a4e57f2340bc566c3013ca94d2722dc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/56b3aa5eab0ac6720dcd559fd1d590ce301594ac",
"reference": "56b3aa5eab0ac6720dcd559fd1d590ce301594ac",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/2125805a1a4e57f2340bc566c3013ca94d2722dc",
"reference": "2125805a1a4e57f2340bc566c3013ca94d2722dc",
"shasum": "",
"mirrors": [
{
@ -757,7 +761,7 @@
"ext-intl": "To show region name in time zone dump",
"symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
},
"time": "2020-05-30T20:06:45+00:00",
"time": "2020-06-24T13:34:53+00:00",
"bin": [
"Resources/bin/var-dump-server"
],
@ -1033,17 +1037,17 @@
},
{
"name": "topthink/think-multi-app",
"version": "v1.0.13",
"version_normalized": "1.0.13.0",
"version": "v1.0.14",
"version_normalized": "1.0.14.0",
"source": {
"type": "git",
"url": "https://github.com/top-think/think-multi-app.git",
"reference": "21ac02a99bd69e29444963841e09c5d39b2bcecb"
"reference": "ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/top-think/think-multi-app/zipball/21ac02a99bd69e29444963841e09c5d39b2bcecb",
"reference": "21ac02a99bd69e29444963841e09c5d39b2bcecb",
"url": "https://api.github.com/repos/top-think/think-multi-app/zipball/ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3",
"reference": "ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3",
"shasum": "",
"mirrors": [
{
@ -1056,7 +1060,7 @@
"php": ">=7.1.0",
"topthink/framework": "^6.0.0"
},
"time": "2020-04-24T08:53:21+00:00",
"time": "2020-07-12T13:50:37+00:00",
"type": "library",
"extra": {
"think": {

View File

@ -237,6 +237,28 @@ class CachedAdapter implements AdapterInterface
return $this->adapter->readStream($path);
}
/**
* Get the path prefix.
*
* @return string|null path prefix or null if pathPrefix is empty
*/
public function getPathPrefix()
{
return $this->adapter->getPathPrefix();
}
/**
* Prefix a path.
*
* @param string $path
*
* @return string prefixed path
*/
public function applyPathPrefix($path)
{
return $this->adapter->applyPathPrefix($path);
}
/**
* {@inheritdoc}
*/

View File

@ -328,6 +328,7 @@ abstract class AbstractCache implements CacheInterface
$cachedProperties = array_flip([
'path', 'dirname', 'basename', 'extension', 'filename',
'size', 'mimetype', 'visibility', 'timestamp', 'type',
'md5',
]);
foreach ($contents as $path => $object) {

View File

@ -68,8 +68,8 @@ class Adapter extends AbstractCache
list($cache, $complete, $expire) = json_decode($json, true);
if (! $expire || $expire > $this->getTime()) {
$this->cache = $cache;
$this->complete = $complete;
$this->cache = is_array($cache) ? $cache : [];
$this->complete = is_array($complete) ? $complete : [];
} else {
$this->adapter->delete($this->file);
}

View File

@ -25,7 +25,7 @@
"ext-fileinfo": "*"
},
"require-dev": {
"phpspec/phpspec": "^3.4",
"phpspec/phpspec": "^3.4 || ^4.0 || ^5.0 || ^6.0",
"phpunit/phpunit": "^5.7.26"
},
"autoload": {

View File

@ -206,8 +206,9 @@ class Local extends AbstractAdapter
$result = compact('type', 'path', 'size', 'contents');
if ($mimetype = $config->get('mimetype') ?: Util::guessMimeType($path, $contents)) {
$result['mimetype'] = $mimetype;
if ($visibility = $config->get('visibility')) {
$this->setVisibility($path, $visibility);
$result['visibility'] = $visibility;
}
return $result;

View File

@ -1 +1 @@
6.1.6
6.1.7

View File

@ -19,8 +19,8 @@ $PHPMAILER_LANG['invalid_address'] = 'Felaktig adress: ';
$PHPMAILER_LANG['provide_address'] = 'Du måste ange minst en mottagares e-postadress.';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fel: Följande mottagare är felaktig: ';
$PHPMAILER_LANG['signing'] = 'Signerings fel: ';
$PHPMAILER_LANG['signing'] = 'Signeringsfel: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() misslyckades.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP server fel: ';
$PHPMAILER_LANG['smtp_error'] = 'SMTP serverfel: ';
$PHPMAILER_LANG['variable_set'] = 'Kunde inte definiera eller återställa variabel: ';
$PHPMAILER_LANG['extension_missing'] = 'Tillägg ej tillgängligt: ';

View File

@ -441,6 +441,8 @@ class PHPMailer
* Only supported in `mail` and `sendmail` transports, not in SMTP.
*
* @var bool
*
* @deprecated 6.0.0 PHPMailer isn't a mailing list manager!
*/
public $SingleTo = false;
@ -745,7 +747,7 @@ class PHPMailer
*
* @var string
*/
const VERSION = '6.1.6';
const VERSION = '6.1.7';
/**
* Error severity: message only, continue processing.
@ -1307,7 +1309,7 @@ class PHPMailer
$patternselect = static::$validator;
}
if (is_callable($patternselect)) {
return $patternselect($address);
return call_user_func($patternselect, $address);
}
//Reject line breaks in addresses; it's valid RFC5322, but not RFC5321
if (strpos($address, "\n") !== false || strpos($address, "\r") !== false) {
@ -2975,7 +2977,6 @@ class PHPMailer
if ('' === $name) {
$name = $filename;
}
if (!$this->validateEncoding($encoding)) {
throw new Exception($this->lang('encoding') . $encoding);
}
@ -3990,7 +3991,8 @@ class PHPMailer
* @param string $message HTML message string
* @param string $basedir Absolute path to a base directory to prepend to relative paths to images
* @param bool|callable $advanced Whether to use the internal HTML to text converter
* or your own custom converter @return string $message The transformed message Body
* or your own custom converter
* @return string The transformed message body
*
* @throws Exception
*
@ -4114,7 +4116,7 @@ class PHPMailer
public function html2text($html, $advanced = false)
{
if (is_callable($advanced)) {
return $advanced($html);
return call_user_func($advanced, $html);
}
return html_entity_decode(

View File

@ -45,7 +45,7 @@ class POP3
*
* @var string
*/
const VERSION = '6.1.6';
const VERSION = '6.1.7';
/**
* Default POP3 port number.

View File

@ -34,7 +34,7 @@ class SMTP
*
* @var string
*/
const VERSION = '6.1.6';
const VERSION = '6.1.7';
/**
* SMTP line break constant.
@ -311,12 +311,6 @@ class SMTP
*/
public function connect($host, $port = null, $timeout = 30, $options = [])
{
static $streamok;
//This is enabled by default since 5.0.0 but some providers disable it
//Check this once and cache the result
if (null === $streamok) {
$streamok = function_exists('stream_socket_client');
}
// Clear errors to avoid confusion
$this->setError('');
// Make sure we are __not__ connected
@ -335,12 +329,48 @@ class SMTP
(count($options) > 0 ? var_export($options, true) : 'array()'),
self::DEBUG_CONNECTION
);
$this->smtp_conn = $this->getSMTPConnection($host, $port, $timeout, $options);
if ($this->smtp_conn === false) {
//Error info already set inside `getSMTPConnection()`
return false;
}
$this->edebug('Connection: opened', self::DEBUG_CONNECTION);
// Get any announcement
$this->last_reply = $this->get_lines();
$this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER);
return true;
}
/**
* Create connection to the SMTP server.
*
* @param string $host SMTP server IP or host name
* @param int $port The port number to connect to
* @param int $timeout How long to wait for the connection to open
* @param array $options An array of options for stream_context_create()
*
* @return false|resource
*/
protected function getSMTPConnection($host, $port = null, $timeout = 30, $options = [])
{
static $streamok;
//This is enabled by default since 5.0.0 but some providers disable it
//Check this once and cache the result
if (null === $streamok) {
$streamok = function_exists('stream_socket_client');
}
$errno = 0;
$errstr = '';
if ($streamok) {
$socket_context = stream_context_create($options);
set_error_handler([$this, 'errorHandler']);
$this->smtp_conn = stream_socket_client(
$connection = stream_socket_client(
$host . ':' . $port,
$errno,
$errstr,
@ -356,7 +386,7 @@ class SMTP
self::DEBUG_CONNECTION
);
set_error_handler([$this, 'errorHandler']);
$this->smtp_conn = fsockopen(
$connection = fsockopen(
$host,
$port,
$errno,
@ -365,8 +395,9 @@ class SMTP
);
restore_error_handler();
}
// Verify we connected properly
if (!is_resource($this->smtp_conn)) {
if (!is_resource($connection)) {
$this->setError(
'Failed to connect to server',
'',
@ -381,22 +412,19 @@ class SMTP
return false;
}
$this->edebug('Connection: opened', self::DEBUG_CONNECTION);
// SMTP server can take longer to respond, give longer timeout for first read
// Windows does not have support for this timeout function
if (strpos(PHP_OS, 'WIN') !== 0) {
$max = (int) ini_get('max_execution_time');
$max = (int)ini_get('max_execution_time');
// Don't bother if unlimited
if (0 !== $max && $timeout > $max) {
@set_time_limit($timeout);
}
stream_set_timeout($this->smtp_conn, $timeout, 0);
stream_set_timeout($connection, $timeout, 0);
}
// Get any announcement
$announce = $this->get_lines();
$this->edebug('SERVER -> CLIENT: ' . $announce, self::DEBUG_SERVER);
return true;
return $connection;
}
/**
@ -1166,13 +1194,40 @@ class SMTP
$selW = null;
while (is_resource($this->smtp_conn) && !feof($this->smtp_conn)) {
//Must pass vars in here as params are by reference
if (!stream_select($selR, $selW, $selW, $this->Timelimit)) {
//solution for signals inspired by https://github.com/symfony/symfony/pull/6540
set_error_handler([$this, 'errorHandler']);
$n = stream_select($selR, $selW, $selW, $this->Timelimit);
restore_error_handler();
if ($n === false) {
$message = $this->getError()['detail'];
$this->edebug(
'SMTP -> get_lines(): select failed (' . $message . ')',
self::DEBUG_LOWLEVEL
);
//stream_select returns false when the `select` system call is interrupted by an incoming signal, try the select again
if (stripos($message, 'interrupted system call') !== false) {
$this->edebug(
'SMTP -> get_lines(): retrying stream_select',
self::DEBUG_LOWLEVEL
);
$this->setError('');
continue;
}
break;
}
if (!$n) {
$this->edebug(
'SMTP -> get_lines(): select timed-out in (' . $this->Timelimit . ' sec)',
self::DEBUG_LOWLEVEL
);
break;
}
//Deliberate noise suppression - errors are handled afterwards
$str = @fgets($this->smtp_conn, self::MAX_REPLY_LENGTH);
$this->edebug('SMTP INBOUND: "' . trim($str) . '"', self::DEBUG_LOWLEVEL);

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php
// This file is automatically generated at:2020-06-27 15:54:24
// This file is automatically generated at:2020-07-31 15:28:52
declare (strict_types = 1);
return array (
0 => 'think\\captcha\\CaptchaService',

View File

@ -28,7 +28,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.17-dev"
"dev-master": "1.18-dev"
},
"thanks": {
"name": "symfony/polyfill",

View File

@ -25,7 +25,11 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.17-dev"
"dev-master": "1.18-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
}
}

View File

@ -6,6 +6,7 @@ This component provides features added to PHP 8.0 core:
- `Stringable` interface
- [`fdiv`](https://php.net/fdiv)
- `ValueError` class
- `UnhandledMatchError` class
- `FILTER_VALIDATE_BOOL` constant
- [`get_debug_type`](https://php.net/get_debug_type)
- [`preg_last_error_msg`](https://php.net/preg_last_error_msg)

View File

@ -0,0 +1,5 @@
<?php
class UnhandledMatchError extends Error
{
}

View File

@ -30,7 +30,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.17-dev"
"dev-master": "1.18-dev"
},
"thanks": {
"name": "symfony/polyfill",

View File

@ -97,7 +97,7 @@ class ReflectionCaster
$prefix = Caster::PREFIX_VIRTUAL;
$a += [
$prefix.'name' => $c->getName(),
$prefix.'name' => $c instanceof \ReflectionNamedType ? $c->getName() : (string) $c,
$prefix.'allowsNull' => $c->allowsNull(),
$prefix.'isBuiltin' => $c->isBuiltin(),
];
@ -182,7 +182,7 @@ class ReflectionCaster
if (isset($a[$prefix.'returnType'])) {
$v = $a[$prefix.'returnType'];
$v = $v->getName();
$v = $v instanceof \ReflectionNamedType ? $v->getName() : (string) $v;
$a[$prefix.'returnType'] = new ClassStub($a[$prefix.'returnType']->allowsNull() ? '?'.$v : $v, [class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '']);
}
if (isset($a[$prefix.'class'])) {
@ -244,7 +244,7 @@ class ReflectionCaster
]);
if ($v = $c->getType()) {
$a[$prefix.'typeHint'] = $v->getName();
$a[$prefix.'typeHint'] = $v instanceof \ReflectionNamedType ? $v->getName() : (string) $v;
}
if (isset($a[$prefix.'typeHint'])) {
@ -320,10 +320,14 @@ class ReflectionCaster
foreach ($a[$prefix.'parameters']->value as $k => $param) {
$signature .= ', ';
if ($type = $param->getType()) {
if (!$param->isOptional() && $param->allowsNull()) {
$signature .= '?';
if (!$type instanceof \ReflectionNamedType) {
$signature .= $type.' ';
} else {
if (!$param->isOptional() && $param->allowsNull()) {
$signature .= '?';
}
$signature .= substr(strrchr('\\'.$type->getName(), '\\'), 1).' ';
}
$signature .= substr(strrchr('\\'.$type->getName(), '\\'), 1).' ';
}
$signature .= $k;

View File

@ -22,6 +22,11 @@ use Symfony\Component\VarDumper\Cloner\Stub;
*/
class ResourceCaster
{
/**
* @param \CurlHandle|resource $h
*
* @return array
*/
public static function castCurl($h, array $a, Stub $stub, $isNested)
{
return curl_getinfo($h);

View File

@ -144,7 +144,9 @@ abstract class AbstractCloner implements ClonerInterface
'Ds\Pair' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castPair'],
'Symfony\Component\VarDumper\Caster\DsPairStub' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castPairStub'],
'CurlHandle' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castCurl'],
':curl' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castCurl'],
':dba' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'],
':dba persistent' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'],
':gd' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castGd'],

View File

@ -287,7 +287,8 @@ class CliDumper extends AbstractDumper
} elseif (Cursor::HASH_RESOURCE === $type) {
$prefix = $this->style('note', $class.' resource', $attr).($hasChild ? ' {' : ' ');
} else {
$prefix = $class && !(self::DUMP_LIGHT_ARRAY & $this->flags) ? $this->style('note', 'array:'.$class, $attr).' [' : '[';
$unstyledPrefix = $class && !(self::DUMP_LIGHT_ARRAY & $this->flags) ? 'array:'.$class : '';
$prefix = $this->style('note', $unstyledPrefix, $attr).($unstyledPrefix ? ' [' : '[');
}
if (($cursor->softRefCount || 0 < $cursor->softRefHandle) && empty($attr['cut_hash'])) {

View File

@ -21,7 +21,6 @@ use think\route\Url as UrlBuild;
*/
class Url extends UrlBuild
{
/**
* 直接解析URL地址
* @access protected
@ -43,34 +42,25 @@ class Url extends UrlBuild
// 解析到控制器
$url = substr($url, 1);
} elseif ('' === $url) {
$url = $this->app->http->getName() . '/' . $request->controller() . '/' . $request->action();
$url = $this->getAppName() . '/' . $request->controller() . '/' . $request->action();
} else {
// 解析到 应用/控制器/操作
$controller = $request->controller();
$app = $this->app->http->getName();
$app = $this->getAppName();
$path = explode('/', $url);
$action = array_pop($path);
$controller = empty($path) ? $controller : array_pop($path);
$app = empty($path) ? $app : array_pop($path);
$url = $controller . '/' . $action;
$bind = $this->app->config->get('app.domain_bind', []);
$url = $controller . '/' . $action;
$bind = $this->app->config->get('app.domain_bind', []);
if ($key = array_search($app, $bind)) {
if ($key = array_search($this->app->http->getName(), $bind)) {
isset($bind[$_SERVER['SERVER_NAME']]) && $domain = $_SERVER['SERVER_NAME'];
$domain = is_bool($domain) ? $key : $domain;
} else {
$map = $this->app->config->get('app.app_map', []);
if ($key = array_search($app, $map)) {
$url = $key . '/' . $url;
} else {
$url = $app . '/' . $url;
}
$url = $app . '/' . $url;
}
}
return $url;
@ -142,7 +132,8 @@ class Url extends UrlBuild
}
if (!$this->app->http->isBind()) {
$url = $this->app->http->getName() . '/' . $url;
$app = $this->getAppName();
$url = $app . '/' . $url;
}
} elseif (!empty($rule) && isset($name)) {
throw new \InvalidArgumentException('route name not exists:' . $name);
@ -222,4 +213,20 @@ class Url extends UrlBuild
return $domain . rtrim($this->root, '/') . '/' . ltrim($url, '/');
}
/**
* 获取URL的应用名
* @access protected
* @return string
*/
protected function getAppName()
{
$app = $this->app->http->getName();
$map = $this->app->config->get('app.app_map', []);
if ($key = array_search($app, $map)) {
$app = $key;
}
return $app;
}
}