upgrade framework 6.0.5

This commit is contained in:
toogee 2020-10-28 15:31:11 +08:00
parent 439fbe5aa2
commit cfc100865a
50 changed files with 2527 additions and 1571 deletions

250
composer.lock generated
View File

@ -95,6 +95,16 @@
"sftp",
"storage"
],
"support": {
"issues": "https://github.com/thephpleague/flysystem/issues",
"source": "https://github.com/thephpleague/flysystem/tree/1.x"
},
"funding": [
{
"url": "https://offset.earth/frankdejonge",
"type": "other"
}
],
"time": "2020-08-23T07:39:11+00:00"
},
{
@ -148,20 +158,24 @@
}
],
"description": "An adapter decorator to enable meta-data caching.",
"support": {
"issues": "https://github.com/thephpleague/flysystem-cached-adapter/issues",
"source": "https://github.com/thephpleague/flysystem-cached-adapter/tree/master"
},
"time": "2020-07-25T15:56:04+00:00"
},
{
"name": "league/mime-type-detection",
"version": "1.5.0",
"version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/mime-type-detection.git",
"reference": "ea2fbfc988bade315acd5967e6d02274086d0f28"
"reference": "353f66d7555d8a90781f6f5e7091932f9a4250aa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ea2fbfc988bade315acd5967e6d02274086d0f28",
"reference": "ea2fbfc988bade315acd5967e6d02274086d0f28",
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/353f66d7555d8a90781f6f5e7091932f9a4250aa",
"reference": "353f66d7555d8a90781f6f5e7091932f9a4250aa",
"shasum": "",
"mirrors": [
{
@ -195,20 +209,34 @@
}
],
"description": "Mime-type detection for Flysystem",
"time": "2020-09-21T18:10:53+00:00"
"support": {
"issues": "https://github.com/thephpleague/mime-type-detection/issues",
"source": "https://github.com/thephpleague/mime-type-detection/tree/1.5.1"
},
"funding": [
{
"url": "https://github.com/frankdejonge",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/league/flysystem",
"type": "tidelift"
}
],
"time": "2020-10-18T11:50:25+00:00"
},
{
"name": "phpmailer/phpmailer",
"version": "v6.1.8",
"version": "v6.1.7",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "917ab212fa00dc6eacbb26e8bc387ebe40993bc1"
"reference": "2c2370ba3df7034f9eb7b8f387c97b52b2ba5ad0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/917ab212fa00dc6eacbb26e8bc387ebe40993bc1",
"reference": "917ab212fa00dc6eacbb26e8bc387ebe40993bc1",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/2c2370ba3df7034f9eb7b8f387c97b52b2ba5ad0",
"reference": "2c2370ba3df7034f9eb7b8f387c97b52b2ba5ad0",
"shasum": "",
"mirrors": [
{
@ -220,7 +248,6 @@
"require": {
"ext-ctype": "*",
"ext-filter": "*",
"ext-hash": "*",
"php": ">=5.5.0"
},
"require-dev": {
@ -264,7 +291,17 @@
}
],
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"time": "2020-10-09T14:55:58+00:00"
"support": {
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.1.7"
},
"funding": [
{
"url": "https://github.com/synchro",
"type": "github"
}
],
"time": "2020-07-14T18:50:27+00:00"
},
{
"name": "psr/cache",
@ -316,6 +353,9 @@
"psr",
"psr-6"
],
"support": {
"source": "https://github.com/php-fig/cache/tree/master"
},
"time": "2016-08-06T20:24:11+00:00"
},
{
@ -371,6 +411,10 @@
"container-interop",
"psr"
],
"support": {
"issues": "https://github.com/php-fig/container/issues",
"source": "https://github.com/php-fig/container/tree/master"
},
"time": "2017-02-14T16:28:37+00:00"
},
{
@ -424,6 +468,9 @@
"psr",
"psr-3"
],
"support": {
"source": "https://github.com/php-fig/log/tree/1.1.3"
},
"time": "2020-03-23T09:12:05+00:00"
},
{
@ -478,6 +525,9 @@
"psr-16",
"simple-cache"
],
"support": {
"source": "https://github.com/php-fig/simple-cache/tree/master"
},
"time": "2017-10-23T01:57:42+00:00"
},
{
@ -533,20 +583,24 @@
"think-auth",
"thinkphp6"
],
"support": {
"issues": "https://github.com/taoser/think-auth/issues",
"source": "https://github.com/taoser/think-auth/tree/master"
},
"time": "2020-02-11T06:16:10+00:00"
},
{
"name": "topthink/framework",
"version": "v6.0.4",
"version": "v6.0.5",
"source": {
"type": "git",
"url": "https://github.com/top-think/framework.git",
"reference": "4b252d78562d4a51a501651f837c26cb9d91624f"
"reference": "85625d984f5c96699dc27d384869f206c3aec1cc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/top-think/framework/zipball/4b252d78562d4a51a501651f837c26cb9d91624f",
"reference": "4b252d78562d4a51a501651f837c26cb9d91624f",
"url": "https://api.github.com/repos/top-think/framework/zipball/85625d984f5c96699dc27d384869f206c3aec1cc",
"reference": "85625d984f5c96699dc27d384869f206c3aec1cc",
"shasum": "",
"mirrors": [
{
@ -600,7 +654,11 @@
"orm",
"thinkphp"
],
"time": "2020-09-29T02:19:59+00:00"
"support": {
"issues": "https://github.com/top-think/framework/issues",
"source": "https://github.com/top-think/framework/tree/v6.0.5"
},
"time": "2020-10-26T07:18:00+00:00"
},
{
"name": "topthink/think-captcha",
@ -655,6 +713,10 @@
}
],
"description": "captcha package for thinkphp",
"support": {
"issues": "https://github.com/top-think/think-captcha/issues",
"source": "https://github.com/top-think/think-captcha/tree/v3.0.3"
},
"time": "2020-05-19T10:55:45+00:00"
},
{
@ -700,6 +762,10 @@
}
],
"description": "The ThinkPHP6 Helper Package",
"support": {
"issues": "https://github.com/top-think/think-helper/issues",
"source": "https://github.com/top-think/think-helper/tree/3.0"
},
"time": "2019-11-08T08:01:10+00:00"
},
{
@ -750,6 +816,10 @@
}
],
"description": "thinkphp6 multi app support",
"support": {
"issues": "https://github.com/top-think/think-multi-app/issues",
"source": "https://github.com/top-think/think-multi-app/tree/master"
},
"time": "2020-07-12T13:50:37+00:00"
},
{
@ -801,6 +871,10 @@
"database",
"orm"
],
"support": {
"issues": "https://github.com/top-think/think-orm/issues",
"source": "https://github.com/top-think/think-orm/tree/v2.0.34"
},
"time": "2020-09-28T08:24:57+00:00"
},
{
@ -844,6 +918,10 @@
}
],
"description": "the php template engine",
"support": {
"issues": "https://github.com/top-think/think-template/issues",
"source": "https://github.com/top-think/think-template/tree/v2.0.7"
},
"time": "2019-09-20T15:31:04+00:00"
},
{
@ -887,6 +965,10 @@
}
],
"description": "thinkphp template driver",
"support": {
"issues": "https://github.com/top-think/think-view/issues",
"source": "https://github.com/top-think/think-view/tree/v1.0.14"
},
"time": "2019-11-06T11:40:13+00:00"
},
{
@ -945,22 +1027,26 @@
}
],
"description": "The ThinkPHP6 Addons Package",
"support": {
"issues": "https://github.com/zz-studio/think-addons/issues",
"source": "https://github.com/zz-studio/think-addons/tree/2.0.5"
},
"time": "2020-01-06T06:42:39+00:00"
}
],
"packages-dev": [
{
"name": "symfony/polyfill-mbstring",
"version": "v1.18.1",
"version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a"
"reference": "39d483bdf39be819deabf04ec872eb0b2410b531"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a",
"reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531",
"reference": "39d483bdf39be819deabf04ec872eb0b2410b531",
"shasum": "",
"mirrors": [
{
@ -970,7 +1056,7 @@
]
},
"require": {
"php": ">=5.3.3"
"php": ">=7.1"
},
"suggest": {
"ext-mbstring": "For best performance"
@ -978,7 +1064,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.18-dev"
"dev-main": "1.20-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -1016,20 +1102,37 @@
"portable",
"shim"
],
"time": "2020-07-14T12:35:20+00:00"
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.20.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-10-23T14:02:19+00:00"
},
{
"name": "symfony/polyfill-php72",
"version": "v1.18.1",
"version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "639447d008615574653fb3bc60d1986d7172eaae"
"reference": "cede45fcdfabdd6043b3592e83678e42ec69e930"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae",
"reference": "639447d008615574653fb3bc60d1986d7172eaae",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cede45fcdfabdd6043b3592e83678e42ec69e930",
"reference": "cede45fcdfabdd6043b3592e83678e42ec69e930",
"shasum": "",
"mirrors": [
{
@ -1039,12 +1142,12 @@
]
},
"require": {
"php": ">=5.3.3"
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.18-dev"
"dev-main": "1.20-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -1081,20 +1184,37 @@
"portable",
"shim"
],
"time": "2020-07-14T12:35:20+00:00"
"support": {
"source": "https://github.com/symfony/polyfill-php72/tree/v1.20.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-10-23T14:02:19+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.18.1",
"version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981"
"reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981",
"reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/e70aa8b064c5b72d3df2abd5ab1e90464ad009de",
"reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de",
"shasum": "",
"mirrors": [
{
@ -1104,12 +1224,12 @@
]
},
"require": {
"php": ">=7.0.8"
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.18-dev"
"dev-main": "1.20-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -1153,20 +1273,37 @@
"portable",
"shim"
],
"time": "2020-07-14T12:35:20+00:00"
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.20.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-10-23T14:02:19+00:00"
},
{
"name": "symfony/var-dumper",
"version": "v4.4.15",
"version": "v4.4.16",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "0dc22bdf9d1197467bb04d505355180b6f20bcca"
"reference": "3718e18b68d955348ad860e505991802c09f5f73"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/0dc22bdf9d1197467bb04d505355180b6f20bcca",
"reference": "0dc22bdf9d1197467bb04d505355180b6f20bcca",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/3718e18b68d955348ad860e505991802c09f5f73",
"reference": "3718e18b68d955348ad860e505991802c09f5f73",
"shasum": "",
"mirrors": [
{
@ -1200,11 +1337,6 @@
"Resources/bin/var-dump-server"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.4-dev"
}
},
"autoload": {
"files": [
"Resources/functions/dump.php"
@ -1236,7 +1368,24 @@
"debug",
"dump"
],
"time": "2020-09-18T08:35:10+00:00"
"support": {
"source": "https://github.com/symfony/var-dumper/tree/v4.4.16"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-10-26T20:47:51+00:00"
},
{
"name": "topthink/think-trace",
@ -1289,6 +1438,10 @@
}
],
"description": "thinkphp debug trace",
"support": {
"issues": "https://github.com/top-think/think-trace/issues",
"source": "https://github.com/top-think/think-trace/tree/v1.4"
},
"time": "2020-06-29T05:27:28+00:00"
}
],
@ -1300,5 +1453,6 @@
"platform": {
"php": ">=7.1.0"
},
"platform-dev": []
"platform-dev": [],
"plugin-api-version": "2.0.0"
}

View File

@ -37,8 +37,8 @@ namespace Composer\Autoload;
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
@ -60,7 +60,7 @@ class ClassLoader
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0);
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}
return array();

407
vendor/composer/InstalledVersions.php vendored Normal file
View File

@ -0,0 +1,407 @@
<?php
namespace Composer;
use Composer\Semver\VersionParser;
class InstalledVersions
{
private static $installed = array (
'root' =>
array (
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'aliases' =>
array (
),
'reference' => '439fbe5aa24da419f4b846ffefb842d3067a60c2',
'name' => 'topthink/think',
),
'versions' =>
array (
'league/flysystem' =>
array (
'pretty_version' => '1.1.3',
'version' => '1.1.3.0',
'aliases' =>
array (
),
'reference' => '9be3b16c877d477357c015cec057548cf9b2a14a',
),
'league/flysystem-cached-adapter' =>
array (
'pretty_version' => '1.1.0',
'version' => '1.1.0.0',
'aliases' =>
array (
),
'reference' => 'd1925efb2207ac4be3ad0c40b8277175f99ffaff',
),
'league/mime-type-detection' =>
array (
'pretty_version' => '1.5.1',
'version' => '1.5.1.0',
'aliases' =>
array (
),
'reference' => '353f66d7555d8a90781f6f5e7091932f9a4250aa',
),
'phpmailer/phpmailer' =>
array (
'pretty_version' => 'v6.1.7',
'version' => '6.1.7.0',
'aliases' =>
array (
),
'reference' => '2c2370ba3df7034f9eb7b8f387c97b52b2ba5ad0',
),
'psr/cache' =>
array (
'pretty_version' => '1.0.1',
'version' => '1.0.1.0',
'aliases' =>
array (
),
'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
),
'psr/container' =>
array (
'pretty_version' => '1.0.0',
'version' => '1.0.0.0',
'aliases' =>
array (
),
'reference' => 'b7ce3b176482dbbc1245ebf52b181af44c2cf55f',
),
'psr/log' =>
array (
'pretty_version' => '1.1.3',
'version' => '1.1.3.0',
'aliases' =>
array (
),
'reference' => '0f73288fd15629204f9d42b7055f72dacbe811fc',
),
'psr/simple-cache' =>
array (
'pretty_version' => '1.0.1',
'version' => '1.0.1.0',
'aliases' =>
array (
),
'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
),
'symfony/polyfill-mbstring' =>
array (
'pretty_version' => 'v1.20.0',
'version' => '1.20.0.0',
'aliases' =>
array (
),
'reference' => '39d483bdf39be819deabf04ec872eb0b2410b531',
),
'symfony/polyfill-php72' =>
array (
'pretty_version' => 'v1.20.0',
'version' => '1.20.0.0',
'aliases' =>
array (
),
'reference' => 'cede45fcdfabdd6043b3592e83678e42ec69e930',
),
'symfony/polyfill-php80' =>
array (
'pretty_version' => 'v1.20.0',
'version' => '1.20.0.0',
'aliases' =>
array (
),
'reference' => 'e70aa8b064c5b72d3df2abd5ab1e90464ad009de',
),
'symfony/var-dumper' =>
array (
'pretty_version' => 'v4.4.16',
'version' => '4.4.16.0',
'aliases' =>
array (
),
'reference' => '3718e18b68d955348ad860e505991802c09f5f73',
),
'taoser/think-auth' =>
array (
'pretty_version' => 'v1.0.0',
'version' => '1.0.0.0',
'aliases' =>
array (
),
'reference' => '19bb04e4fb957a95ff3fdc142939922c19167b43',
),
'topthink/framework' =>
array (
'pretty_version' => 'v6.0.5',
'version' => '6.0.5.0',
'aliases' =>
array (
),
'reference' => '85625d984f5c96699dc27d384869f206c3aec1cc',
),
'topthink/think' =>
array (
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'aliases' =>
array (
),
'reference' => '439fbe5aa24da419f4b846ffefb842d3067a60c2',
),
'topthink/think-captcha' =>
array (
'pretty_version' => 'v3.0.3',
'version' => '3.0.3.0',
'aliases' =>
array (
),
'reference' => '1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55',
),
'topthink/think-helper' =>
array (
'pretty_version' => 'v3.1.4',
'version' => '3.1.4.0',
'aliases' =>
array (
),
'reference' => 'c28d37743bda4a0455286ca85b17b5791d626e10',
),
'topthink/think-multi-app' =>
array (
'pretty_version' => 'v1.0.14',
'version' => '1.0.14.0',
'aliases' =>
array (
),
'reference' => 'ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3',
),
'topthink/think-orm' =>
array (
'pretty_version' => 'v2.0.34',
'version' => '2.0.34.0',
'aliases' =>
array (
),
'reference' => '57f9b98895b0ff4ae7b7b75e51456fd8cb8fb629',
),
'topthink/think-template' =>
array (
'pretty_version' => 'v2.0.7',
'version' => '2.0.7.0',
'aliases' =>
array (
),
'reference' => 'e98bdbb4a4c94b442f17dfceba81e0134d4fbd19',
),
'topthink/think-trace' =>
array (
'pretty_version' => 'v1.4',
'version' => '1.4.0.0',
'aliases' =>
array (
),
'reference' => '9a9fa8f767b6c66c5a133ad21ca1bc96ad329444',
),
'topthink/think-view' =>
array (
'pretty_version' => 'v1.0.14',
'version' => '1.0.14.0',
'aliases' =>
array (
),
'reference' => 'edce0ae2c9551ab65f9e94a222604b0dead3576d',
),
'zzstudio/think-addons' =>
array (
'pretty_version' => '2.0.5',
'version' => '2.0.5.0',
'aliases' =>
array (
),
'reference' => '7eb740cb219a111d593a05ad88248a74f640fe5c',
),
),
);
public static function getInstalledPackages()
{
return array_keys(self::$installed['versions']);
}
public static function isInstalled($packageName)
{
return isset(self::$installed['versions'][$packageName]);
}
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
public static function getVersionRanges($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
$ranges = array();
if (isset(self::$installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = self::$installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', self::$installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', self::$installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', self::$installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
public static function getVersion($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
if (!isset(self::$installed['versions'][$packageName]['version'])) {
return null;
}
return self::$installed['versions'][$packageName]['version'];
}
public static function getPrettyVersion($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
if (!isset(self::$installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return self::$installed['versions'][$packageName]['pretty_version'];
}
public static function getReference($packageName)
{
if (!isset(self::$installed['versions'][$packageName])) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
if (!isset(self::$installed['versions'][$packageName]['reference'])) {
return null;
}
return self::$installed['versions'][$packageName]['reference'];
}
public static function getRootPackage()
{
return self::$installed['root'];
}
public static function getRawData()
{
return self::$installed;
}
public static function reload($data)
{
self::$installed = $data;
}
}

View File

@ -6,6 +6,8 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'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

@ -7,10 +7,10 @@ $baseDir = dirname($vendorDir);
return array(
'9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php',
'39594db8502267d6df2fe2dca5f3914d' => $vendorDir . '/zzstudio/think-addons/src/helper.php',
'667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
);

View File

@ -10,7 +10,7 @@ return array(
'think\\trace\\' => array($vendorDir . '/topthink/think-trace/src'),
'think\\captcha\\' => array($vendorDir . '/topthink/think-captcha/src'),
'think\\app\\' => array($vendorDir . '/topthink/think-multi-app/src'),
'think\\' => array($vendorDir . '/topthink/framework/src/think', $vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/think-template/src', $vendorDir . '/zzstudio/think-addons/src'),
'think\\' => array($vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/think-template/src', $vendorDir . '/zzstudio/think-addons/src', $vendorDir . '/topthink/framework/src/think'),
'taoser\\think\\' => array($vendorDir . '/taoser/think-auth/src'),
'app\\' => array($baseDir . '/app'),
'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),

View File

@ -13,19 +13,24 @@ class ComposerAutoloaderInit1b32198725235c8d6500c87262ef30c2
}
}
/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit1b32198725235c8d6500c87262ef30c2', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit1b32198725235c8d6500c87262ef30c2', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit1b32198725235c8d6500c87262ef30c2::getInitializer($loader));
} else {

View File

@ -8,12 +8,12 @@ class ComposerStaticInit1b32198725235c8d6500c87262ef30c2
{
public static $files = array (
'9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
'667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
'39594db8502267d6df2fe2dca5f3914d' => __DIR__ . '/..' . '/zzstudio/think-addons/src/helper.php',
'667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
);
public static $prefixLengthsPsr4 = array (
@ -72,11 +72,11 @@ class ComposerStaticInit1b32198725235c8d6500c87262ef30c2
),
'think\\' =>
array (
0 => __DIR__ . '/..' . '/topthink/framework/src/think',
1 => __DIR__ . '/..' . '/topthink/think-helper/src',
2 => __DIR__ . '/..' . '/topthink/think-orm/src',
3 => __DIR__ . '/..' . '/topthink/think-template/src',
4 => __DIR__ . '/..' . '/zzstudio/think-addons/src',
0 => __DIR__ . '/..' . '/topthink/think-helper/src',
1 => __DIR__ . '/..' . '/topthink/think-orm/src',
2 => __DIR__ . '/..' . '/topthink/think-template/src',
3 => __DIR__ . '/..' . '/zzstudio/think-addons/src',
4 => __DIR__ . '/..' . '/topthink/framework/src/think',
),
'taoser\\think\\' =>
array (
@ -141,6 +141,8 @@ class ComposerStaticInit1b32198725235c8d6500c87262ef30c2
);
public static $classMap = array (
'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'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',

File diff suppressed because it is too large Load Diff

222
vendor/composer/installed.php vendored Normal file
View File

@ -0,0 +1,222 @@
<?php return array (
'root' =>
array (
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'aliases' =>
array (
),
'reference' => '439fbe5aa24da419f4b846ffefb842d3067a60c2',
'name' => 'topthink/think',
),
'versions' =>
array (
'league/flysystem' =>
array (
'pretty_version' => '1.1.3',
'version' => '1.1.3.0',
'aliases' =>
array (
),
'reference' => '9be3b16c877d477357c015cec057548cf9b2a14a',
),
'league/flysystem-cached-adapter' =>
array (
'pretty_version' => '1.1.0',
'version' => '1.1.0.0',
'aliases' =>
array (
),
'reference' => 'd1925efb2207ac4be3ad0c40b8277175f99ffaff',
),
'league/mime-type-detection' =>
array (
'pretty_version' => '1.5.1',
'version' => '1.5.1.0',
'aliases' =>
array (
),
'reference' => '353f66d7555d8a90781f6f5e7091932f9a4250aa',
),
'phpmailer/phpmailer' =>
array (
'pretty_version' => 'v6.1.7',
'version' => '6.1.7.0',
'aliases' =>
array (
),
'reference' => '2c2370ba3df7034f9eb7b8f387c97b52b2ba5ad0',
),
'psr/cache' =>
array (
'pretty_version' => '1.0.1',
'version' => '1.0.1.0',
'aliases' =>
array (
),
'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
),
'psr/container' =>
array (
'pretty_version' => '1.0.0',
'version' => '1.0.0.0',
'aliases' =>
array (
),
'reference' => 'b7ce3b176482dbbc1245ebf52b181af44c2cf55f',
),
'psr/log' =>
array (
'pretty_version' => '1.1.3',
'version' => '1.1.3.0',
'aliases' =>
array (
),
'reference' => '0f73288fd15629204f9d42b7055f72dacbe811fc',
),
'psr/simple-cache' =>
array (
'pretty_version' => '1.0.1',
'version' => '1.0.1.0',
'aliases' =>
array (
),
'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
),
'symfony/polyfill-mbstring' =>
array (
'pretty_version' => 'v1.20.0',
'version' => '1.20.0.0',
'aliases' =>
array (
),
'reference' => '39d483bdf39be819deabf04ec872eb0b2410b531',
),
'symfony/polyfill-php72' =>
array (
'pretty_version' => 'v1.20.0',
'version' => '1.20.0.0',
'aliases' =>
array (
),
'reference' => 'cede45fcdfabdd6043b3592e83678e42ec69e930',
),
'symfony/polyfill-php80' =>
array (
'pretty_version' => 'v1.20.0',
'version' => '1.20.0.0',
'aliases' =>
array (
),
'reference' => 'e70aa8b064c5b72d3df2abd5ab1e90464ad009de',
),
'symfony/var-dumper' =>
array (
'pretty_version' => 'v4.4.16',
'version' => '4.4.16.0',
'aliases' =>
array (
),
'reference' => '3718e18b68d955348ad860e505991802c09f5f73',
),
'taoser/think-auth' =>
array (
'pretty_version' => 'v1.0.0',
'version' => '1.0.0.0',
'aliases' =>
array (
),
'reference' => '19bb04e4fb957a95ff3fdc142939922c19167b43',
),
'topthink/framework' =>
array (
'pretty_version' => 'v6.0.5',
'version' => '6.0.5.0',
'aliases' =>
array (
),
'reference' => '85625d984f5c96699dc27d384869f206c3aec1cc',
),
'topthink/think' =>
array (
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'aliases' =>
array (
),
'reference' => '439fbe5aa24da419f4b846ffefb842d3067a60c2',
),
'topthink/think-captcha' =>
array (
'pretty_version' => 'v3.0.3',
'version' => '3.0.3.0',
'aliases' =>
array (
),
'reference' => '1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55',
),
'topthink/think-helper' =>
array (
'pretty_version' => 'v3.1.4',
'version' => '3.1.4.0',
'aliases' =>
array (
),
'reference' => 'c28d37743bda4a0455286ca85b17b5791d626e10',
),
'topthink/think-multi-app' =>
array (
'pretty_version' => 'v1.0.14',
'version' => '1.0.14.0',
'aliases' =>
array (
),
'reference' => 'ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3',
),
'topthink/think-orm' =>
array (
'pretty_version' => 'v2.0.34',
'version' => '2.0.34.0',
'aliases' =>
array (
),
'reference' => '57f9b98895b0ff4ae7b7b75e51456fd8cb8fb629',
),
'topthink/think-template' =>
array (
'pretty_version' => 'v2.0.7',
'version' => '2.0.7.0',
'aliases' =>
array (
),
'reference' => 'e98bdbb4a4c94b442f17dfceba81e0134d4fbd19',
),
'topthink/think-trace' =>
array (
'pretty_version' => 'v1.4',
'version' => '1.4.0.0',
'aliases' =>
array (
),
'reference' => '9a9fa8f767b6c66c5a133ad21ca1bc96ad329444',
),
'topthink/think-view' =>
array (
'pretty_version' => 'v1.0.14',
'version' => '1.0.14.0',
'aliases' =>
array (
),
'reference' => 'edce0ae2c9551ab65f9e94a222604b0dead3576d',
),
'zzstudio/think-addons' =>
array (
'pretty_version' => '2.0.5',
'version' => '2.0.5.0',
'aliases' =>
array (
),
'reference' => '7eb740cb219a111d593a05ad88248a74f640fe5c',
),
),
);

25
vendor/composer/platform_check.php vendored Normal file
View File

@ -0,0 +1,25 @@
<?php
// platform_check.php @generated by Composer
$issues = array();
if (!(PHP_VERSION_ID >= 70205)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.5". You are running ' . PHP_VERSION . '.';
}
$missingExtensions = array();
extension_loaded('ctype') || $missingExtensions[] = 'ctype';
extension_loaded('fileinfo') || $missingExtensions[] = 'fileinfo';
extension_loaded('filter') || $missingExtensions[] = 'filter';
extension_loaded('json') || $missingExtensions[] = 'json';
extension_loaded('mbstring') || $missingExtensions[] = 'mbstring';
if ($missingExtensions) {
$issues[] = 'Your Composer dependencies require the following PHP extensions to be installed: ' . implode(', ', $missingExtensions);
}
if ($issues) {
echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues);
exit(104);
}

View File

@ -70,6 +70,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap
'azs' => 'application/vnd.airzip.filesecure.azs',
'azv' => 'image/vnd.airzip.accelerator.azv',
'azw' => 'application/vnd.amazon.ebook',
'b16' => 'image/vnd.pco.b16',
'bat' => 'application/x-msdownload',
'bcpio' => 'application/x-bcpio',
'bdf' => 'application/x-font-bdf',

View File

@ -1 +1 @@
6.1.8
6.1.7

View File

@ -28,8 +28,7 @@
"require": {
"php": ">=5.5.0",
"ext-ctype": "*",
"ext-filter": "*",
"ext-hash": "*"
"ext-filter": "*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.2",

View File

@ -8,7 +8,7 @@
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2012 - 2017 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License

View File

@ -15,8 +15,6 @@ $PHPMAILER_LANG['file_open'] = 'Dateifehler: Konnte folgende Datei ni
$PHPMAILER_LANG['from_failed'] = 'Die folgende Absenderadresse ist nicht korrekt: ';
$PHPMAILER_LANG['instantiate'] = 'Mail-Funktion konnte nicht initialisiert werden.';
$PHPMAILER_LANG['invalid_address'] = 'Die Adresse ist ungültig: ';
$PHPMAILER_LANG['invalid_hostentry'] = 'Ungültiger Hosteintrag: ';
$PHPMAILER_LANG['invalid_host'] = 'Ungültiger Host: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wird nicht unterstützt.';
$PHPMAILER_LANG['provide_address'] = 'Bitte geben Sie mindestens eine Empfängeradresse an.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-Fehler: Die folgenden Empfänger sind nicht korrekt: ';

View File

@ -4,7 +4,6 @@
* @package PHPMailer
* @author Cecep Prawiro <cecep.prawiro@gmail.com>
* @author @januridp
* @author Ian Mustafa <mail@ianmustafa.com>
*/
$PHPMAILER_LANG['authenticate'] = 'Kesalahan SMTP: Tidak dapat mengotentikasi.';
@ -12,19 +11,17 @@ $PHPMAILER_LANG['connect_host'] = 'Kesalahan SMTP: Tidak dapat terhubung
$PHPMAILER_LANG['data_not_accepted'] = 'Kesalahan SMTP: Data tidak diterima.';
$PHPMAILER_LANG['empty_message'] = 'Isi pesan kosong';
$PHPMAILER_LANG['encoding'] = 'Pengkodean karakter tidak dikenali: ';
$PHPMAILER_LANG['execute'] = 'Tidak dapat menjalankan proses: ';
$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses berkas: ';
$PHPMAILER_LANG['file_open'] = 'Kesalahan Berkas: Berkas tidak dapat dibuka: ';
$PHPMAILER_LANG['from_failed'] = 'Alamat pengirim berikut mengakibatkan kesalahan: ';
$PHPMAILER_LANG['instantiate'] = 'Tidak dapat menginisialisasi fungsi surel.';
$PHPMAILER_LANG['invalid_address'] = 'Gagal terkirim, alamat surel tidak sesuai: ';
$PHPMAILER_LANG['invalid_hostentry'] = 'Gagal terkirim, entri host tidak sesuai: ';
$PHPMAILER_LANG['invalid_host'] = 'Gagal terkirim, host tidak sesuai: ';
$PHPMAILER_LANG['provide_address'] = 'Harus tersedia minimal satu alamat tujuan';
$PHPMAILER_LANG['execute'] = 'Tidak dapat menjalankan proses : ';
$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses berkas : ';
$PHPMAILER_LANG['file_open'] = 'Kesalahan File: Berkas tidak dapat dibuka : ';
$PHPMAILER_LANG['from_failed'] = 'Alamat pengirim berikut mengakibatkan kesalahan : ';
$PHPMAILER_LANG['instantiate'] = 'Tidak dapat menginisialisasi fungsi surel';
$PHPMAILER_LANG['invalid_address'] = 'Gagal terkirim, alamat surel tidak benar : ';
$PHPMAILER_LANG['provide_address'] = 'Harus disediakan minimal satu alamat tujuan';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer tidak didukung';
$PHPMAILER_LANG['recipients_failed'] = 'Kesalahan SMTP: Alamat tujuan berikut menyebabkan kesalahan: ';
$PHPMAILER_LANG['signing'] = 'Kesalahan dalam penandatangan SSL: ';
$PHPMAILER_LANG['recipients_failed'] = 'Kesalahan SMTP: Alamat tujuan berikut menghasilkan kesalahan : ';
$PHPMAILER_LANG['signing'] = 'Kesalahan dalam tanda tangan : ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() gagal.';
$PHPMAILER_LANG['smtp_error'] = 'Kesalahan pada pelayan SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Tidak dapat mengatur atau mengatur ulang variabel: ';
$PHPMAILER_LANG['extension_missing'] = 'Ekstensi PHP tidak tersedia: ';
$PHPMAILER_LANG['smtp_error'] = 'Kesalahan pada pelayan SMTP : ';
$PHPMAILER_LANG['variable_set'] = 'Tidak dapat mengatur atau mengatur ulang variable : ';
$PHPMAILER_LANG['extension_missing'] = 'Ekstensi hilang: ';

View File

@ -3,25 +3,25 @@
* Tagalog PHPMailer language file: refer to English translation for definitive list
*
* @package PHPMailer
* @author Adriane Justine Tan <eidoriantan@gmail.com>
* @author Adriane Justine Tan <adrianetan12@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Hindi mapatotohanan.';
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Hindi makakonekta sa SMTP host.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Ang datos ay hindi naitanggap.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Ang datos ay hindi maaaring matatanggap.';
$PHPMAILER_LANG['empty_message'] = 'Walang laman ang mensahe';
$PHPMAILER_LANG['encoding'] = 'Hindi alam ang encoding: ';
$PHPMAILER_LANG['execute'] = 'Hindi maisasagawa: ';
$PHPMAILER_LANG['file_access'] = 'Hindi ma-access ang file: ';
$PHPMAILER_LANG['file_open'] = 'File Error: Hindi mabuksan ang file: ';
$PHPMAILER_LANG['file_open'] = 'Hindi mabuksan ang file: ';
$PHPMAILER_LANG['from_failed'] = 'Ang sumusunod na address ay nabigo: ';
$PHPMAILER_LANG['instantiate'] = 'Hindi maisimulan ang instance ng mail function.';
$PHPMAILER_LANG['instantiate'] = 'Hindi maaaring magbigay ng institusyon ang mail';
$PHPMAILER_LANG['invalid_address'] = 'Hindi wasto ang address na naibigay: ';
$PHPMAILER_LANG['mailer_not_supported'] = 'Ang mailer ay hindi suportado.';
$PHPMAILER_LANG['provide_address'] = 'Kailangan mong magbigay ng kahit isang email address na tatanggap.';
$PHPMAILER_LANG['mailer_not_supported'] = 'Ang mailer ay hindi suportado';
$PHPMAILER_LANG['provide_address'] = 'Kailangan mong magbigay ng kahit isang email address na tatanggap';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Ang mga sumusunod na tatanggap ay nabigo: ';
$PHPMAILER_LANG['signing'] = 'Hindi ma-sign: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ang SMTP connect() ay nabigo.';
$PHPMAILER_LANG['smtp_error'] = 'Ang server ng SMTP ay nabigo: ';
$PHPMAILER_LANG['variable_set'] = 'Hindi matatakda o ma-reset ang mga variables: ';
$PHPMAILER_LANG['extension_missing'] = 'Nawawala ang extension: ';
$PHPMAILER_LANG['signing'] = 'Hindi ma-sign';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ang SMTP connect() ay nabigo';
$PHPMAILER_LANG['smtp_error'] = 'Ang server ng SMTP ay nabigo';
$PHPMAILER_LANG['variable_set'] = 'Hindi matatakda ang mga variables: ';
$PHPMAILER_LANG['extension_missing'] = 'Nawawala ang extension';

View File

@ -9,7 +9,7 @@
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2012 - 2017 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License

View File

@ -9,7 +9,7 @@
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2012 - 2015 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License

View File

@ -9,7 +9,7 @@
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2012 - 2019 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
@ -747,7 +747,7 @@ class PHPMailer
*
* @var string
*/
const VERSION = '6.1.8';
const VERSION = '6.1.7';
/**
* Error severity: message only, continue processing.
@ -899,7 +899,6 @@ class PHPMailer
switch ($this->Debugoutput) {
case 'error_log':
//Don't output, just log
/** @noinspection ForgottenDebugOutputInspection */
error_log($str);
break;
case 'html':
@ -1351,7 +1350,7 @@ class PHPMailer
/*
* This is the pattern used in the HTML5 spec for validation of 'email' type form input elements.
*
* @see https://html.spec.whatwg.org/#e-mail-state-(type=email)
* @see http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email)
*/
return (bool) preg_match(
'/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' .
@ -1610,9 +1609,6 @@ class PHPMailer
return $this->mailSend($this->MIMEHeader, $this->MIMEBody);
}
} catch (Exception $exc) {
if ($this->Mailer === 'smtp' && $this->SMTPKeepAlive == true) {
$this->smtp->reset();
}
$this->setError($exc->getMessage());
$this->edebug($exc->getMessage());
if ($this->exceptions) {
@ -1753,23 +1749,6 @@ class PHPMailer
return !preg_match('#^[a-z]+://#i', $path);
}
/**
* Check whether a file path is safe, accessible, and readable.
*
* @param string $path A relative or absolute path to a file
*
* @return bool
*/
protected static function fileIsAccessible($path)
{
$readable = file_exists($path);
//If not a UNC path (expected to start with \\), check read permission, see #2069
if (strpos($path, '\\\\') !== 0) {
$readable = $readable && is_readable($path);
}
return static::isPermittedPath($path) && $readable;
}
/**
* Send mail using the PHP mail() function.
*
@ -2023,12 +2002,7 @@ class PHPMailer
}
$host = $hostinfo[2];
$port = $this->Port;
if (
array_key_exists(3, $hostinfo) &&
is_numeric($hostinfo[3]) &&
$hostinfo[3] > 0 &&
$hostinfo[3] < 65536
) {
if (array_key_exists(3, $hostinfo) && is_numeric($hostinfo[3]) && $hostinfo[3] > 0 && $hostinfo[3] < 65536) {
$port = (int) $hostinfo[3];
}
if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) {
@ -2158,7 +2132,7 @@ class PHPMailer
// There is no English translation file
if ('en' !== $langcode) {
// Make sure language file path is readable
if (!static::fileIsAccessible($lang_file)) {
if (!static::isPermittedPath($lang_file) || !file_exists($lang_file)) {
$foundlang = false;
} else {
// Overwrite language-specific strings.
@ -2406,18 +2380,21 @@ class PHPMailer
$result .= $this->headerLine('Date', '' === $this->MessageDate ? self::rfcDate() : $this->MessageDate);
// The To header is created automatically by mail(), so needs to be omitted here
if ('mail' !== $this->Mailer) {
if ($this->SingleTo) {
// To be created automatically by mail()
if ($this->SingleTo) {
if ('mail' !== $this->Mailer) {
foreach ($this->to as $toaddr) {
$this->SingleToArray[] = $this->addrFormat($toaddr);
}
} elseif (count($this->to) > 0) {
$result .= $this->addrAppend('To', $this->to);
} elseif (count($this->cc) === 0) {
$result .= $this->headerLine('To', 'undisclosed-recipients:;');
}
} elseif (count($this->to) > 0) {
if ('mail' !== $this->Mailer) {
$result .= $this->addrAppend('To', $this->to);
}
} elseif (count($this->cc) === 0) {
$result .= $this->headerLine('To', 'undisclosed-recipients:;');
}
$result .= $this->addrAppend('From', [[trim($this->From), $this->FromName]]);
// sendmail and mail() extract Cc from the header before sending
@ -2972,7 +2949,7 @@ class PHPMailer
* @param string $path Path to the attachment
* @param string $name Overrides the attachment name
* @param string $encoding File encoding (see $Encoding)
* @param string $type MIME type, e.g. `image/jpeg`; determined automatically from $path if not specified
* @param string $type File extension (MIME) type
* @param string $disposition Disposition to use
*
* @throws Exception
@ -2987,7 +2964,7 @@ class PHPMailer
$disposition = 'attachment'
) {
try {
if (!static::fileIsAccessible($path)) {
if (!static::isPermittedPath($path) || !@is_file($path) || !is_readable($path)) {
throw new Exception($this->lang('file_access') . $path, self::STOP_CONTINUE);
}
@ -3161,7 +3138,7 @@ class PHPMailer
protected function encodeFile($path, $encoding = self::ENCODING_BASE64)
{
try {
if (!static::fileIsAccessible($path)) {
if (!static::isPermittedPath($path) || !file_exists($path) || !is_readable($path)) {
throw new Exception($this->lang('file_open') . $path, self::STOP_CONTINUE);
}
$file_buffer = file_get_contents($path);
@ -3547,7 +3524,7 @@ class PHPMailer
$disposition = 'inline'
) {
try {
if (!static::fileIsAccessible($path)) {
if (!static::isPermittedPath($path) || !@is_file($path) || !is_readable($path)) {
throw new Exception($this->lang('file_access') . $path, self::STOP_CONTINUE);
}
@ -4238,7 +4215,6 @@ class PHPMailer
'tiff' => 'image/tiff',
'tif' => 'image/tiff',
'webp' => 'image/webp',
'avif' => 'image/avif',
'heif' => 'image/heif',
'heifs' => 'image/heif-sequence',
'heic' => 'image/heic',

View File

@ -9,7 +9,7 @@
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2012 - 2019 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
@ -45,7 +45,7 @@ class POP3
*
* @var string
*/
const VERSION = '6.1.8';
const VERSION = '6.1.7';
/**
* Default POP3 port number.

View File

@ -9,7 +9,7 @@
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2012 - 2019 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
@ -34,7 +34,7 @@ class SMTP
*
* @var string
*/
const VERSION = '6.1.8';
const VERSION = '6.1.7';
/**
* SMTP line break constant.
@ -417,8 +417,8 @@ class SMTP
// Windows does not have support for this timeout function
if (strpos(PHP_OS, 'WIN') !== 0) {
$max = (int)ini_get('max_execution_time');
// Don't bother if unlimited, or if set_time_limit is disabled
if (0 !== $max && $timeout > $max && strpos(ini_get('disable_functions'), 'set_time_limit') === false) {
// Don't bother if unlimited
if (0 !== $max && $timeout > $max) {
@set_time_limit($timeout);
}
stream_set_timeout($connection, $timeout, 0);

View File

@ -115,10 +115,8 @@ final class Mbstring
return iconv($fromEncoding, $toEncoding.'//IGNORE', $s);
}
public static function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null)
public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars)
{
$vars = array(&$a, &$b, &$c, &$d, &$e, &$f);
$ok = true;
array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) {
if (false === $v = Mbstring::mb_convert_encoding($v, $toEncoding, $fromEncoding)) {
@ -629,10 +627,11 @@ final class Mbstring
{
$encoding = self::getEncoding($encoding);
if ('CP850' === $encoding || 'ASCII' === $encoding) {
return strrchr($haystack, $needle, $part);
$pos = strrpos($haystack, $needle);
} else {
$needle = self::mb_substr($needle, 0, 1, $encoding);
$pos = iconv_strrpos($haystack, $needle, $encoding);
}
$needle = self::mb_substr($needle, 0, 1, $encoding);
$pos = iconv_strrpos($haystack, $needle, $encoding);
return self::getSubpart($pos, $part, $haystack, $encoding);
}

View File

@ -12,28 +12,28 @@
use Symfony\Polyfill\Mbstring as p;
if (!function_exists('mb_convert_encoding')) {
function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); }
function mb_convert_encoding($string, $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); }
}
if (!function_exists('mb_decode_mimeheader')) {
function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); }
function mb_decode_mimeheader($string) { return p\Mbstring::mb_decode_mimeheader($string); }
}
if (!function_exists('mb_encode_mimeheader')) {
function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); }
function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); }
}
if (!function_exists('mb_decode_numericentity')) {
function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); }
function mb_decode_numericentity($string, $map, $encoding = null) { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); }
}
if (!function_exists('mb_encode_numericentity')) {
function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); }
function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); }
}
if (!function_exists('mb_convert_case')) {
function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); }
function mb_convert_case($string, $mode, $encoding = null) { return p\Mbstring::mb_convert_case($string, $mode, $encoding); }
}
if (!function_exists('mb_internal_encoding')) {
function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); }
function mb_internal_encoding($encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); }
}
if (!function_exists('mb_language')) {
function mb_language($lang = null) { return p\Mbstring::mb_language($lang); }
function mb_language($language = null) { return p\Mbstring::mb_language($language); }
}
if (!function_exists('mb_list_encodings')) {
function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); }
@ -42,88 +42,94 @@ if (!function_exists('mb_encoding_aliases')) {
function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); }
}
if (!function_exists('mb_check_encoding')) {
function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); }
function mb_check_encoding($value = null, $encoding = null) { return p\Mbstring::mb_check_encoding($value, $encoding); }
}
if (!function_exists('mb_detect_encoding')) {
function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); }
function mb_detect_encoding($string, $encodings = null, $strict = false) { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); }
}
if (!function_exists('mb_detect_order')) {
function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); }
function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); }
}
if (!function_exists('mb_parse_str')) {
function mb_parse_str($s, &$result = array()) { parse_str($s, $result); }
function mb_parse_str($string, &$result = array()) { parse_str($string, $result); }
}
if (!function_exists('mb_strlen')) {
function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); }
function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); }
}
if (!function_exists('mb_strpos')) {
function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); }
function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); }
}
if (!function_exists('mb_strtolower')) {
function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); }
function mb_strtolower($string, $encoding = null) { return p\Mbstring::mb_strtolower($string, $encoding); }
}
if (!function_exists('mb_strtoupper')) {
function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); }
function mb_strtoupper($string, $encoding = null) { return p\Mbstring::mb_strtoupper($string, $encoding); }
}
if (!function_exists('mb_substitute_character')) {
function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); }
function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); }
}
if (!function_exists('mb_substr')) {
function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); }
function mb_substr($string, $start, $length = 2147483647, $encoding = null) { return p\Mbstring::mb_substr($string, $start, $length, $encoding); }
}
if (!function_exists('mb_stripos')) {
function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); }
function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); }
}
if (!function_exists('mb_stristr')) {
function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); }
function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); }
}
if (!function_exists('mb_strrchr')) {
function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); }
function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); }
}
if (!function_exists('mb_strrichr')) {
function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); }
function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); }
}
if (!function_exists('mb_strripos')) {
function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); }
function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); }
}
if (!function_exists('mb_strrpos')) {
function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); }
function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); }
}
if (!function_exists('mb_strstr')) {
function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); }
function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); }
}
if (!function_exists('mb_get_info')) {
function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); }
}
if (!function_exists('mb_http_output')) {
function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); }
function mb_http_output($encoding = null) { return p\Mbstring::mb_http_output($encoding); }
}
if (!function_exists('mb_strwidth')) {
function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); }
function mb_strwidth($string, $encoding = null) { return p\Mbstring::mb_strwidth($string, $encoding); }
}
if (!function_exists('mb_substr_count')) {
function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); }
function mb_substr_count($haystack, $needle, $encoding = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); }
}
if (!function_exists('mb_output_handler')) {
function mb_output_handler($contents, $status) { return p\Mbstring::mb_output_handler($contents, $status); }
function mb_output_handler($string, $status) { return p\Mbstring::mb_output_handler($string, $status); }
}
if (!function_exists('mb_http_input')) {
function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); }
}
if (!function_exists('mb_convert_variables')) {
function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f); }
if (PHP_VERSION_ID >= 80000) {
function mb_convert_variables($to_encoding, $from_encoding, &$var, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, $var, ...$vars); }
} else {
function mb_convert_variables($to_encoding, $from_encoding, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); }
}
}
if (!function_exists('mb_ord')) {
function mb_ord($s, $enc = null) { return p\Mbstring::mb_ord($s, $enc); }
function mb_ord($string, $encoding = null) { return p\Mbstring::mb_ord($string, $encoding); }
}
if (!function_exists('mb_chr')) {
function mb_chr($code, $enc = null) { return p\Mbstring::mb_chr($code, $enc); }
function mb_chr($codepoint, $encoding = null) { return p\Mbstring::mb_chr($codepoint, $encoding); }
}
if (!function_exists('mb_scrub')) {
function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); }
function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); }
}
if (!function_exists('mb_str_split')) {
function mb_str_split($string, $split_length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $split_length, $encoding); }
function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); }
}
if (extension_loaded('mbstring')) {

View File

@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=7.1"
},
"autoload": {
"psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" },
@ -28,7 +28,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.18-dev"
"dev-main": "1.20-dev"
},
"thanks": {
"name": "symfony/polyfill",

View File

@ -191,7 +191,7 @@ final class Php72
public static function mb_ord($s, $encoding = null)
{
if (null == $encoding) {
if (null === $encoding) {
$s = mb_convert_encoding($s, 'UTF-8');
} elseif ('UTF-8' !== $encoding) {
$s = mb_convert_encoding($s, 'UTF-8', $encoding);

View File

@ -38,20 +38,20 @@ if (!function_exists('stream_isatty')) {
function stream_isatty($stream) { return p\Php72::stream_isatty($stream); }
}
if (!function_exists('utf8_encode')) {
function utf8_encode($s) { return p\Php72::utf8_encode($s); }
function utf8_encode($string) { return p\Php72::utf8_encode($string); }
}
if (!function_exists('utf8_decode')) {
function utf8_decode($s) { return p\Php72::utf8_decode($s); }
function utf8_decode($string) { return p\Php72::utf8_decode($string); }
}
if (!function_exists('spl_object_id')) {
function spl_object_id($s) { return p\Php72::spl_object_id($s); }
function spl_object_id($object) { return p\Php72::spl_object_id($object); }
}
if (!function_exists('mb_ord')) {
function mb_ord($s, $enc = null) { return p\Php72::mb_ord($s, $enc); }
function mb_ord($string, $encoding = null) { return p\Php72::mb_ord($string, $encoding); }
}
if (!function_exists('mb_chr')) {
function mb_chr($code, $enc = null) { return p\Php72::mb_chr($code, $enc); }
function mb_chr($codepoint, $encoding = null) { return p\Php72::mb_chr($codepoint, $encoding); }
}
if (!function_exists('mb_scrub')) {
function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); }
function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); }
}

View File

@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3"
"php": ">=7.1"
},
"autoload": {
"psr-4": { "Symfony\\Polyfill\\Php72\\": "" },
@ -25,7 +25,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.18-dev"
"dev-main": "1.20-dev"
},
"thanks": {
"name": "symfony/polyfill",

View File

@ -0,0 +1,22 @@
<?php
#[Attribute(Attribute::TARGET_CLASS)]
final class Attribute
{
const TARGET_CLASS = 1;
const TARGET_FUNCTION = 2;
const TARGET_METHOD = 4;
const TARGET_PROPERTY = 8;
const TARGET_CLASS_CONSTANT = 16;
const TARGET_PARAMETER = 32;
const TARGET_ALL = 63;
const IS_REPEATABLE = 64;
/** @var int */
public $flags;
public function __construct(int $flags = Attribute::TARGET_ALL)
{
$this->flags = $flags;
}
}

View File

@ -1,9 +1,11 @@
<?php
interface Stringable
{
/**
* @return string
*/
public function __toString();
if (\PHP_VERSION_ID < 80000) {
interface Stringable
{
/**
* @return string
*/
public function __toString();
}
}

View File

@ -20,7 +20,7 @@ if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) {
}
if (!function_exists('fdiv')) {
function fdiv(float $dividend, float $divisor): float { return p\Php80::fdiv($dividend, $divisor); }
function fdiv(float $num1, float $num2): float { return p\Php80::fdiv($num1, $num2); }
}
if (!function_exists('preg_last_error_msg')) {
function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); }

View File

@ -20,7 +20,7 @@
}
],
"require": {
"php": ">=7.0.8"
"php": ">=7.1"
},
"autoload": {
"psr-4": { "Symfony\\Polyfill\\Php80\\": "" },
@ -30,7 +30,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "1.18-dev"
"dev-main": "1.20-dev"
},
"thanks": {
"name": "symfony/polyfill",

View File

@ -240,7 +240,7 @@ class VarCloner extends AbstractCloner
$stub->position = $len++;
} elseif ($pos < $maxItems) {
if ($maxItems < $pos += \count($a)) {
$a = \array_slice($a, 0, $maxItems - $pos);
$a = \array_slice($a, 0, $maxItems - $pos, true);
if ($stub->cut >= 0) {
$stub->cut += $pos - $maxItems;
}

View File

@ -46,10 +46,5 @@
"bin": [
"Resources/bin/var-dump-server"
],
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "4.4-dev"
}
}
"minimum-stability": "dev"
}

View File

@ -39,7 +39,7 @@ use think\initializer\RegisterService;
*/
class App extends Container
{
const VERSION = '6.0.4';
const VERSION = '6.0.5';
/**
* 应用调试模式

View File

@ -48,7 +48,8 @@ abstract class Manager
if (is_null($name)) {
throw new InvalidArgumentException(sprintf(
'Unable to resolve NULL driver for [%s].', static::class
'Unable to resolve NULL driver for [%s].',
static::class
));
}

View File

@ -60,7 +60,8 @@ class Pipeline
} catch (Throwable | Exception $e) {
return $this->handleException($passable, $e);
}
});
}
);
return $pipeline($this->passable);
}

View File

@ -680,9 +680,9 @@ class Route
*/
public function redirect(string $rule, string $route = '', int $status = 301): RuleItem
{
return $this->rule($rule, function () use ($status, $route) {
return $this->rule($rule, function (Request $request) use ($status, $route) {
$search = $replace = [];
$matches = $this->request->rule()->getVars();
$matches = $request->rule()->getVars();
foreach ($matches as $key => $value) {
$search[] = '<' . $key . '>';

View File

@ -484,6 +484,7 @@ class Validate
foreach ($this->append as $key => $rule) {
if (!isset($rules[$key])) {
$rules[$key] = $rule;
unset($this->append[$key]);
}
}

View File

@ -185,9 +185,6 @@ abstract class Driver implements CacheInterface, CacheHandlerInterface
$key = implode('-', $name);
if (!isset($this->tag[$key])) {
$name = array_map(function ($val) {
return $this->getTagKey($val);
}, $name);
$this->tag[$key] = new TagSet($name, $this);
}
@ -202,7 +199,8 @@ abstract class Driver implements CacheInterface, CacheHandlerInterface
*/
public function getTagItems(string $tag): array
{
return $this->get($tag, []);
$name = $this->getTagKey($tag);
return $this->get($name, []);
}
/**

View File

@ -69,7 +69,8 @@ class TagSet
$name = $this->handler->getCacheKey($name);
foreach ($this->tag as $tag) {
$this->handler->push($tag, $name);
$key = $this->handler->getTagKey($tag);
$this->handler->push($key, $name);
}
}
@ -120,9 +121,10 @@ class TagSet
// 指定标签清除
foreach ($this->tag as $tag) {
$names = $this->handler->getTagItems($tag);
$this->handler->clearTag($names);
$this->handler->delete($tag);
$key = $this->handler->getTagKey($tag);
$this->handler->delete($key);
}
return true;

View File

@ -108,7 +108,7 @@ class File extends Driver
$content = gzuncompress($content);
}
return ['content' => $content, 'expire' => $expire];
return is_string($content) ? ['content' => $content, 'expire' => $expire] : null;
}
}

View File

@ -87,7 +87,7 @@ class Redis extends Driver
}
if (0 != $this->options['select']) {
$this->handler->select( (int) $this->options['select']);
$this->handler->select((int) $this->options['select']);
}
}
@ -112,8 +112,8 @@ class Redis extends Driver
public function get($name, $default = null)
{
$this->readTimes++;
$value = $this->handler->get($this->getCacheKey($name));
$key = $this->getCacheKey($name);
$value = $this->handler->get($key);
if (false === $value || is_null($value)) {
return $default;
@ -161,7 +161,6 @@ class Redis extends Driver
public function inc(string $name, int $step = 1)
{
$this->writeTimes++;
$key = $this->getCacheKey($name);
return $this->handler->incrby($key, $step);
@ -177,7 +176,6 @@ class Redis extends Driver
public function dec(string $name, int $step = 1)
{
$this->writeTimes++;
$key = $this->getCacheKey($name);
return $this->handler->decrby($key, $step);
@ -193,7 +191,8 @@ class Redis extends Driver
{
$this->writeTimes++;
$result = $this->handler->del($this->getCacheKey($name));
$key = $this->getCacheKey($name);
$result = $this->handler->del($key);
return $result > 0;
}
@ -205,7 +204,6 @@ class Redis extends Driver
public function clear(): bool
{
$this->writeTimes++;
$this->handler->flushDB();
return true;
}
@ -231,7 +229,8 @@ class Redis extends Driver
*/
public function push(string $name, $value): void
{
$this->handler->sAdd($name, $value);
$key = $this->getCacheKey($name);
$this->handler->sAdd($key, $value);
}
/**
@ -242,7 +241,9 @@ class Redis extends Driver
*/
public function getTagItems(string $tag): array
{
return $this->handler->sMembers($tag);
$name = $this->getTagKey($tag);
$key = $this->getCacheKey($name);
return $this->handler->sMembers($key);
}
}

View File

@ -32,7 +32,8 @@ class Help extends Command
$this->setName('help')->setDefinition([
new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'),
new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'),
])->setDescription('Displays help for a command')->setHelp(<<<EOF
])->setDescription('Displays help for a command')->setHelp(
<<<EOF
The <info>%command.name%</info> command displays help for a given command:
<info>php %command.full_name% list</info>

View File

@ -25,7 +25,8 @@ class Lists extends Command
*/
protected function configure()
{
$this->setName('list')->setDefinition($this->createDefinition())->setDescription('Lists commands')->setHelp(<<<EOF
$this->setName('list')->setDefinition($this->createDefinition())->setDescription('Lists commands')->setHelp(
<<<EOF
The <info>%command.name%</info> command lists all commands:
<info>php %command.full_name%</info>

View File

@ -22,12 +22,27 @@ class RunServer extends Command
public function configure()
{
$this->setName('run')
->addOption('host', 'H', Option::VALUE_OPTIONAL,
'The host to server the application on', '0.0.0.0')
->addOption('port', 'p', Option::VALUE_OPTIONAL,
'The port to server the application on', 8000)
->addOption('root', 'r', Option::VALUE_OPTIONAL,
'The document root of the application', '')
->addOption(
'host',
'H',
Option::VALUE_OPTIONAL,
'The host to server the application on',
'0.0.0.0'
)
->addOption(
'port',
'p',
Option::VALUE_OPTIONAL,
'The port to server the application on',
8000
)
->addOption(
'root',
'r',
Option::VALUE_OPTIONAL,
'The document root of the application',
''
)
->setDescription('PHP Built-in Server for ThinkPHP');
}

View File

@ -28,6 +28,10 @@ class ServiceDiscover extends Command
{
if (is_file($path = $this->app->getRootPath() . 'vendor/composer/installed.json')) {
$packages = json_decode(@file_get_contents($path), true);
// Compatibility with Composer 2.0
if (isset($packages['packages'])) {
$packages = $packages['packages'];
}
$services = [];
foreach ($packages as $package) {

View File

@ -35,7 +35,10 @@ class Local extends Driver
: LocalAdapter::DISALLOW_LINKS;
return new LocalAdapter(
$this->config['root'], LOCK_EX, $links, $permissions
$this->config['root'],
LOCK_EX,
$links,
$permissions
);
}
}

View File

@ -223,7 +223,8 @@ class RouteTest extends TestCase
{
$this->route->redirect('foo', 'http://localhost', 302);
$request = $this->makeRequest('foo');
$request = $this->makeRequest('foo');
$this->app->shouldReceive('make')->with(Request::class)->andReturn($request);
$response = $this->route->dispatch($request);
$this->assertInstanceOf(Redirect::class, $response);