From b96b5c2c55c9e2ed5059249a58108f526374b3c8 Mon Sep 17 00:00:00 2001 From: zhongshaofa <2286732552@qq.com> Date: Sat, 4 Sep 2021 01:03:35 +0800 Subject: [PATCH 1/7] =?UTF-8?q?[feat]=E5=B8=B8=E7=94=A8=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=94=B9=E7=94=A8composer=E5=BC=95=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/system/Node.php | 2 +- app/admin/service/NodeService.php | 37 + app/common/command/Node.php | 2 +- app/service.php | 7 + composer.json | 9 +- composer.lock | 123 +- vendor/composer/ClassLoader.php | 44 +- vendor/composer/InstalledVersions.php | 337 ++ vendor/composer/autoload_classmap.php | 1 + vendor/composer/autoload_psr4.php | 4 +- vendor/composer/autoload_real.php | 9 +- vendor/composer/autoload_static.php | 24 +- vendor/composer/installed.json | 4960 +++++++++-------- vendor/composer/installed.php | 389 ++ vendor/composer/platform_check.php | 26 + vendor/doctrine/annotations/CHANGELOG.md | 162 - vendor/doctrine/annotations/README.md | 9 +- vendor/doctrine/annotations/composer.json | 21 +- .../annotations/docs/en/annotations.rst | 207 +- .../doctrine/annotations/docs/en/custom.rst | 158 +- vendor/doctrine/annotations/docs/en/index.rst | 55 +- .../Common/Annotations/Annotation.php | 46 +- .../Annotations/Annotation/Attribute.php | 32 +- .../Annotations/Annotation/Attributes.php | 24 +- .../Common/Annotations/Annotation/Enum.php | 59 +- .../Annotation/IgnoreAnnotation.php | 43 +- .../Annotation/NamedArgumentConstructor.php | 13 + .../Annotations/Annotation/Required.php | 20 - .../Common/Annotations/Annotation/Target.php | 92 +- .../Annotations/AnnotationException.php | 56 +- .../Common/Annotations/AnnotationReader.php | 272 +- .../Common/Annotations/AnnotationRegistry.php | 144 +- .../Common/Annotations/CachedReader.php | 156 +- .../Doctrine/Common/Annotations/DocLexer.php | 86 +- .../Doctrine/Common/Annotations/DocParser.php | 888 +-- .../Common/Annotations/FileCacheReader.php | 195 +- .../ImplicitlyIgnoredAnnotationNames.php | 177 + .../Common/Annotations/IndexedReader.php | 51 +- .../NamedArgumentConstructorAnnotation.php | 14 + .../Doctrine/Common/Annotations/PhpParser.php | 79 +- .../Common/Annotations/PsrCachedReader.php | 232 + .../Doctrine/Common/Annotations/Reader.php | 79 +- .../Annotations/SimpleAnnotationReader.php | 55 +- .../Common/Annotations/TokenParser.php | 116 +- .../doctrine/annotations/phpbench.json.dist | 4 - vendor/doctrine/annotations/phpstan.neon | 14 - vendor/doctrine/lexer/README.md | 2 + vendor/doctrine/lexer/composer.json | 4 +- .../Doctrine/Common/Lexer/AbstractLexer.php | 2 +- vendor/services.php | 4 +- vendor/zhongshaofa/easy-admin/.gitignore | 3 + vendor/zhongshaofa/easy-admin/composer.json | 32 + vendor/zhongshaofa/easy-admin/composer.lock | 2033 +++++++ .../easy-admin/mock_app/BaseController.php | 10 + .../mock_app/controller/GoodsController.php | 51 + .../mock_app/controller/TestController.php | 35 + .../mock_app/controllerV2/CateController.php | 50 + .../zhongshaofa/easy-admin/src/auth/Node.php | 86 +- .../zhongshaofa/easy-admin/tests/.gitignore | 1 + .../easy-admin/tests/AnnotationTest.php | 38 + 60 files changed, 7812 insertions(+), 4072 deletions(-) create mode 100644 app/admin/service/NodeService.php create mode 100644 app/service.php create mode 100644 vendor/composer/InstalledVersions.php create mode 100644 vendor/composer/installed.php create mode 100644 vendor/composer/platform_check.php delete mode 100644 vendor/doctrine/annotations/CHANGELOG.md create mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php create mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php create mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php create mode 100644 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php delete mode 100644 vendor/doctrine/annotations/phpbench.json.dist delete mode 100644 vendor/doctrine/annotations/phpstan.neon create mode 100644 vendor/zhongshaofa/easy-admin/.gitignore create mode 100644 vendor/zhongshaofa/easy-admin/composer.json create mode 100644 vendor/zhongshaofa/easy-admin/composer.lock create mode 100644 vendor/zhongshaofa/easy-admin/mock_app/BaseController.php create mode 100644 vendor/zhongshaofa/easy-admin/mock_app/controller/GoodsController.php create mode 100644 vendor/zhongshaofa/easy-admin/mock_app/controller/TestController.php create mode 100644 vendor/zhongshaofa/easy-admin/mock_app/controllerV2/CateController.php create mode 100644 vendor/zhongshaofa/easy-admin/tests/.gitignore create mode 100644 vendor/zhongshaofa/easy-admin/tests/AnnotationTest.php diff --git a/app/admin/controller/system/Node.php b/app/admin/controller/system/Node.php index 93b22fe2..4faeb603 100644 --- a/app/admin/controller/system/Node.php +++ b/app/admin/controller/system/Node.php @@ -18,7 +18,7 @@ use app\common\controller\AdminController; use EasyAdmin\annotation\ControllerAnnotation; use EasyAdmin\annotation\NodeAnotation; -use EasyAdmin\auth\Node as NodeService; +use app\admin\service\NodeService; use think\App; /** diff --git a/app/admin/service/NodeService.php b/app/admin/service/NodeService.php new file mode 100644 index 00000000..a5dfd363 --- /dev/null +++ b/app/admin/service/NodeService.php @@ -0,0 +1,37 @@ +getNodelist(); + + return $nodeList; + } +} \ No newline at end of file diff --git a/app/common/command/Node.php b/app/common/command/Node.php index ac484818..62d57fae 100644 --- a/app/common/command/Node.php +++ b/app/common/command/Node.php @@ -18,7 +18,7 @@ use think\console\Input; use think\console\input\Option; use think\console\Output; -use EasyAdmin\auth\Node as NodeService; +use app\admin\service\NodeService; class Node extends Command { diff --git a/app/service.php b/app/service.php new file mode 100644 index 00000000..d6df24bb --- /dev/null +++ b/app/service.php @@ -0,0 +1,7 @@ + 'think\\captcha\\CaptchaService', + 1 => 'think\\app\\Service', +]; \ No newline at end of file diff --git a/composer.json b/composer.json index f1fa8690..22518618 100644 --- a/composer.json +++ b/composer.json @@ -21,13 +21,13 @@ "topthink/think-orm": "^2.0", "topthink/think-multi-app": "^1.0", "topthink/think-view": "^1.0", - "doctrine/annotations": "^1.8", "topthink/think-captcha": "^3.0", "aliyuncs/oss-sdk-php": "^2.3", "qcloud/cos-sdk-v5": "^2.0", "qiniu/php-sdk": "^7.2", "alibabacloud/client": "^1.5", - "jianyan74/php-excel": "^1.0" + "jianyan74/php-excel": "^1.0", + "zhongshaofa/easy-admin": "^1.0" }, "require-dev": { "symfony/var-dumper": "^4.2", @@ -35,10 +35,7 @@ }, "autoload": { "psr-4": { - "app\\": "app", - "addons\\": "addons", - "EasyAdmin\\":"vendor/zhongshaofa/easy-admin/src", - "ServiceSwoole\\":"vendor/zhongshaofa/service-swoole/src" + "app\\": "app" }, "psr-0": { "": "extend/" diff --git a/composer.lock b/composer.lock index f7ce8348..3e6ee590 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "291a649cf2d99244cc243e634f0edff2", + "content-hash": "ac7670016790669e43f1002ec4f549cc", "packages": [ { "name": "adbario/php-dot-notation", @@ -313,16 +313,16 @@ }, { "name": "doctrine/annotations", - "version": "v1.8.0", + "version": "1.13.2", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc" + "reference": "5b668aef16090008790395c02c893b1ba13f7e08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/904dca4eb10715b92569fbcd79e201d5c349b6bc", - "reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08", + "reference": "5b668aef16090008790395c02c893b1ba13f7e08", "shasum": "", "mirrors": [ { @@ -333,18 +333,18 @@ }, "require": { "doctrine/lexer": "1.*", - "php": "^7.1" + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" }, "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "^7.5" + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^6.0 || ^8.1", + "phpstan/phpstan": "^0.12.20", + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", + "symfony/cache": "^4.4 || ^5.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" @@ -377,26 +377,30 @@ } ], "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", "keywords": [ "annotations", "docblock", "parser" ], - "time": "2019-10-01T18:55:10+00:00" + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/1.13.2" + }, + "time": "2021-08-05T19:00:23+00:00" }, { "name": "doctrine/lexer", - "version": "1.1.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "e17f069ede36f7534b95adec71910ed1b49c74ea" + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/e17f069ede36f7534b95adec71910ed1b49c74ea", - "reference": "e17f069ede36f7534b95adec71910ed1b49c74ea", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", "shasum": "", "mirrors": [ { @@ -406,7 +410,7 @@ ] }, "require": { - "php": "^7.2" + "php": "^7.2 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -416,7 +420,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -451,7 +455,25 @@ "parser", "php" ], - "time": "2019-07-30T19:33:28+00:00" + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2020-05-25T17:44:05+00:00" }, { "name": "guzzlehttp/command", @@ -2225,6 +2247,60 @@ ], "description": "thinkphp template driver", "time": "2019-10-07T12:23:10+00:00" + }, + { + "name": "zhongshaofa/easy-admin", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/zhongshaofa/easyadmin-sdk.git", + "reference": "e09be94938283d7c0210a3c04c38287757942a56" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zhongshaofa/easyadmin-sdk/zipball/e09be94938283d7c0210a3c04c38287757942a56", + "reference": "e09be94938283d7c0210a3c04c38287757942a56", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "doctrine/annotations": "^1.13.1", + "ext-json": "*", + "php": ">=7.1.0" + }, + "require-dev": { + "mockery/mockery": "^1.3.0", + "phpunit/phpunit": "^8.5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "EasyAdmin\\": "src", + "MockApp\\": "mock_app", + "Test\\": "tests" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "zhongshaofa", + "email": "2286732552@qq.com" + } + ], + "description": "EasyAdmin工具,https://github.com/zhongshaofa/easyadmin-sdk", + "support": { + "issues": "https://github.com/zhongshaofa/easyadmin-sdk/issues", + "source": "https://github.com/zhongshaofa/easyadmin-sdk/tree/v1.0.1" + }, + "time": "2021-09-03T16:09:14+00:00" } ], "packages-dev": [ @@ -2428,5 +2504,6 @@ "platform": { "php": ">=7.1.0" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.1.0" } diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index fce8549f..6d0c3f2d 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -37,11 +37,13 @@ * * @author Fabien Potencier * @author Jordi Boggiano - * @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 { + private $vendorDir; + // PSR-4 private $prefixLengthsPsr4 = array(); private $prefixDirsPsr4 = array(); @@ -57,10 +59,17 @@ class ClassLoader private $missingClasses = array(); private $apcuPrefix; + private static $registeredLoaders = array(); + + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + } + 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(); @@ -300,6 +309,17 @@ public function getApcuPrefix() public function register($prepend = false) { spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + return; + } + + if ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } } /** @@ -308,13 +328,17 @@ public function register($prepend = false) public function unregister() { spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } } /** * Loads the given class or interface. * * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise + * @return true|null True if loaded, null otherwise */ public function loadClass($class) { @@ -323,6 +347,8 @@ public function loadClass($class) return true; } + + return null; } /** @@ -367,6 +393,16 @@ public function findFile($class) return $file; } + /** + * Returns the currently registered loaders indexed by their corresponding vendor directories. + * + * @return self[] + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + private function findFileWithExtension($class, $ext) { // PSR-4 lookup diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php new file mode 100644 index 00000000..b3a4e161 --- /dev/null +++ b/vendor/composer/InstalledVersions.php @@ -0,0 +1,337 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer; + +use Composer\Autoload\ClassLoader; +use Composer\Semver\VersionParser; + +/** + * This class is copied in every Composer installed project and available to all + * + * See also https://getcomposer.org/doc/07-runtime.md#installed-versions + * + * To require it's presence, you can require `composer-runtime-api ^2.0` + */ +class InstalledVersions +{ + private static $installed; + private static $canGetVendors; + private static $installedByVendor = array(); + + /** + * Returns a list of all package names which are present, either by being installed, replaced or provided + * + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackages() + { + $packages = array(); + foreach (self::getInstalled() as $installed) { + $packages[] = array_keys($installed['versions']); + } + + if (1 === \count($packages)) { + return $packages[0]; + } + + return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); + } + + /** + * Returns a list of all package names with a specific type e.g. 'library' + * + * @param string $type + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackagesByType($type) + { + $packagesByType = array(); + + foreach (self::getInstalled() as $installed) { + foreach ($installed['versions'] as $name => $package) { + if (isset($package['type']) && $package['type'] === $type) { + $packagesByType[] = $name; + } + } + } + + return $packagesByType; + } + + /** + * Checks whether the given package is installed + * + * This also returns true if the package name is provided or replaced by another package + * + * @param string $packageName + * @param bool $includeDevRequirements + * @return bool + */ + public static function isInstalled($packageName, $includeDevRequirements = true) + { + foreach (self::getInstalled() as $installed) { + if (isset($installed['versions'][$packageName])) { + return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); + } + } + + return false; + } + + /** + * Checks whether the given package satisfies a version constraint + * + * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: + * + * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') + * + * @param VersionParser $parser Install composer/semver to have access to this class and functionality + * @param string $packageName + * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package + * @return bool + */ + public static function satisfies(VersionParser $parser, $packageName, $constraint) + { + $constraint = $parser->parseConstraints($constraint); + $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + + return $provided->matches($constraint); + } + + /** + * Returns a version constraint representing all the range(s) which are installed for a given package + * + * It is easier to use this via isInstalled() with the $constraint argument if you need to check + * whether a given version of a package is installed, and not just whether it exists + * + * @param string $packageName + * @return string Version constraint usable with composer/semver + */ + public static function getVersionRanges($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + $ranges = array(); + if (isset($installed['versions'][$packageName]['pretty_version'])) { + $ranges[] = $installed['versions'][$packageName]['pretty_version']; + } + if (array_key_exists('aliases', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); + } + if (array_key_exists('replaced', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); + } + if (array_key_exists('provided', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); + } + + return implode(' || ', $ranges); + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['version'])) { + return null; + } + + return $installed['versions'][$packageName]['version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getPrettyVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['pretty_version'])) { + return null; + } + + return $installed['versions'][$packageName]['pretty_version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference + */ + public static function getReference($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['reference'])) { + return null; + } + + return $installed['versions'][$packageName]['reference']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. + */ + public static function getInstallPath($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @return array + * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string} + */ + public static function getRootPackage() + { + $installed = self::getInstalled(); + + return $installed[0]['root']; + } + + /** + * Returns the raw installed.php data for custom implementations + * + * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. + * @return array[] + * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array} + */ + public static function getRawData() + { + @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = include __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + + return self::$installed; + } + + /** + * Returns the raw data of all installed.php which are currently loaded for custom implementations + * + * @return array[] + * @psalm-return list}> + */ + public static function getAllRawData() + { + return self::getInstalled(); + } + + /** + * Lets you reload the static array from another file + * + * This is only useful for complex integrations in which a project needs to use + * this class but then also needs to execute another project's autoloader in process, + * and wants to ensure both projects have access to their version of installed.php. + * + * A typical case would be PHPUnit, where it would need to make sure it reads all + * the data it needs from this class, then call reload() with + * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure + * the project in which it runs can then also use this class safely, without + * interference between PHPUnit's dependencies and the project's dependencies. + * + * @param array[] $data A vendor/composer/installed.php data set + * @return void + * + * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array} $data + */ + public static function reload($data) + { + self::$installed = $data; + self::$installedByVendor = array(); + } + + /** + * @return array[] + * @psalm-return list}> + */ + private static function getInstalled() + { + if (null === self::$canGetVendors) { + self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); + } + + $installed = array(); + + if (self::$canGetVendors) { + foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { + if (isset(self::$installedByVendor[$vendorDir])) { + $installed[] = self::$installedByVendor[$vendorDir]; + } elseif (is_file($vendorDir.'/composer/installed.php')) { + $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; + if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { + self::$installed = $installed[count($installed) - 1]; + } + } + } + } + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = require __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + $installed[] = self::$installed; + + return $installed; + } +} diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 7a91153b..b26f1b13 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -6,4 +6,5 @@ $baseDir = dirname($vendorDir); return array( + 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 73ab2d5b..23795a44 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -13,12 +13,11 @@ 'jianyan\\excel\\' => array($vendorDir . '/jianyan74/php-excel/src'), 'clagiordano\\weblibs\\configmanager\\' => array($vendorDir . '/clagiordano/weblibs-configmanager/src'), 'app\\' => array($baseDir . '/app'), - 'addons\\' => array($baseDir . '/addons'), + 'Test\\' => array($vendorDir . '/zhongshaofa/easy-admin/tests'), 'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'), 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), 'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'), 'Stringy\\' => array($vendorDir . '/danielstjules/stringy/src'), - 'ServiceSwoole\\' => array($vendorDir . '/zhongshaofa/service-swoole/src'), 'Qiniu\\' => array($vendorDir . '/qiniu/php-sdk/src/Qiniu'), 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), @@ -28,6 +27,7 @@ 'PhpOffice\\PhpSpreadsheet\\' => array($vendorDir . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet'), 'Opis\\Closure\\' => array($vendorDir . '/opis/closure/src'), 'OSS\\' => array($vendorDir . '/aliyuncs/oss-sdk-php/src/OSS'), + 'MockApp\\' => array($vendorDir . '/zhongshaofa/easy-admin/mock_app'), 'Matrix\\' => array($vendorDir . '/markbaker/matrix/classes/src'), 'League\\Flysystem\\Cached\\' => array($vendorDir . '/league/flysystem-cached-adapter/src'), 'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'), diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 6a63d940..9059e90f 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -13,19 +13,24 @@ public static function loadClassLoader($class) } } + /** + * @return \Composer\Autoload\ClassLoader + */ public static function getLoader() { if (null !== self::$loader) { return self::$loader; } + require __DIR__ . '/platform_check.php'; + spl_autoload_register(array('ComposerAutoloaderInit6bad1cb7ba829cb65a670b5323a9e093', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); spl_autoload_unregister(array('ComposerAutoloaderInit6bad1cb7ba829cb65a670b5323a9e093', '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\ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093::getInitializer($loader)); } else { diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 44306ebf..e12692e4 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -101,7 +101,10 @@ class ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093 'a' => array ( 'app\\' => 4, - 'addons\\' => 7, + ), + 'T' => + array ( + 'Test\\' => 5, ), 'S' => array ( @@ -109,7 +112,6 @@ class ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093 'Symfony\\Polyfill\\Mbstring\\' => 26, 'Symfony\\Component\\VarDumper\\' => 28, 'Stringy\\' => 8, - 'ServiceSwoole\\' => 14, ), 'Q' => array ( @@ -131,6 +133,7 @@ class ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093 ), 'M' => array ( + 'MockApp\\' => 8, 'Matrix\\' => 7, ), 'L' => @@ -202,9 +205,9 @@ class ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093 array ( 0 => __DIR__ . '/../..' . '/app', ), - 'addons\\' => + 'Test\\' => array ( - 0 => __DIR__ . '/../..' . '/addons', + 0 => __DIR__ . '/..' . '/zhongshaofa/easy-admin/tests', ), 'Symfony\\Polyfill\\Php72\\' => array ( @@ -222,10 +225,6 @@ class ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093 array ( 0 => __DIR__ . '/..' . '/danielstjules/stringy/src', ), - 'ServiceSwoole\\' => - array ( - 0 => __DIR__ . '/..' . '/zhongshaofa/service-swoole/src', - ), 'Qiniu\\' => array ( 0 => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu', @@ -262,6 +261,10 @@ class ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093 array ( 0 => __DIR__ . '/..' . '/aliyuncs/oss-sdk-php/src/OSS', ), + 'MockApp\\' => + array ( + 0 => __DIR__ . '/..' . '/zhongshaofa/easy-admin/mock_app', + ), 'Matrix\\' => array ( 0 => __DIR__ . '/..' . '/markbaker/matrix/classes/src', @@ -338,6 +341,10 @@ class ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093 0 => __DIR__ . '/../..' . '/extend', ); + public static $classMap = array ( + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + ); + public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { @@ -345,6 +352,7 @@ public static function getInitializer(ClassLoader $loader) $loader->prefixDirsPsr4 = ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093::$prefixDirsPsr4; $loader->prefixesPsr0 = ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093::$prefixesPsr0; $loader->fallbackDirsPsr0 = ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093::$fallbackDirsPsr0; + $loader->classMap = ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index da8fb082..0c65c82c 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,2489 +1,2615 @@ -[ - { - "name": "adbario/php-dot-notation", - "version": "2.2.0", - "version_normalized": "2.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/adbario/php-dot-notation.git", - "reference": "eee4fc81296531e6aafba4c2bbccfc5adab1676e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/adbario/php-dot-notation/zipball/eee4fc81296531e6aafba4c2bbccfc5adab1676e", - "reference": "eee4fc81296531e6aafba4c2bbccfc5adab1676e", - "shasum": "", - "mirrors": [ +{ + "packages": [ + { + "name": "adbario/php-dot-notation", + "version": "2.2.0", + "version_normalized": "2.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/adbario/php-dot-notation.git", + "reference": "eee4fc81296531e6aafba4c2bbccfc5adab1676e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/adbario/php-dot-notation/zipball/eee4fc81296531e6aafba4c2bbccfc5adab1676e", + "reference": "eee4fc81296531e6aafba4c2bbccfc5adab1676e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.0|^5.0|^6.0", + "squizlabs/php_codesniffer": "^3.0" + }, + "time": "2019-01-01T23:59:15+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Adbar\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "Riku Särkinen", + "email": "riku@adbar.io" } - ] - }, - "require": { - "ext-json": "*", - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.0|^5.0|^6.0", - "squizlabs/php_codesniffer": "^3.0" - }, - "time": "2019-01-01T23:59:15+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Adbar\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Riku Särkinen", - "email": "riku@adbar.io" - } - ], - "description": "PHP dot notation access to arrays", - "homepage": "https://github.com/adbario/php-dot-notation", - "keywords": [ - "ArrayAccess", - "dotnotation" - ] - }, - { - "name": "alibabacloud/client", - "version": "1.5.18", - "version_normalized": "1.5.18.0", - "source": { - "type": "git", - "url": "https://github.com/aliyun/openapi-sdk-php-client.git", - "reference": "5dcf7b8fdfa64abdae7a5ca867289baf95e8e12a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/aliyun/openapi-sdk-php-client/zipball/5dcf7b8fdfa64abdae7a5ca867289baf95e8e12a", - "reference": "5dcf7b8fdfa64abdae7a5ca867289baf95e8e12a", - "shasum": "", - "mirrors": [ + ], + "description": "PHP dot notation access to arrays", + "homepage": "https://github.com/adbario/php-dot-notation", + "keywords": [ + "ArrayAccess", + "dotnotation" + ], + "install-path": "../adbario/php-dot-notation" + }, + { + "name": "alibabacloud/client", + "version": "1.5.18", + "version_normalized": "1.5.18.0", + "source": { + "type": "git", + "url": "https://github.com/aliyun/openapi-sdk-php-client.git", + "reference": "5dcf7b8fdfa64abdae7a5ca867289baf95e8e12a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aliyun/openapi-sdk-php-client/zipball/5dcf7b8fdfa64abdae7a5ca867289baf95e8e12a", + "reference": "5dcf7b8fdfa64abdae7a5ca867289baf95e8e12a", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "adbario/php-dot-notation": "^2.2", + "clagiordano/weblibs-configmanager": "^1.0", + "danielstjules/stringy": "^3.1", + "ext-curl": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "ext-xmlwriter": "*", + "guzzlehttp/guzzle": "^6.3", + "mtdowling/jmespath.php": "^2.4", + "php": ">=5.5" + }, + "require-dev": { + "composer/composer": "^1.8", + "drupal/coder": "^8.3", + "ext-dom": "*", + "ext-pcre": "*", + "ext-sockets": "*", + "ext-spl": "*", + "league/climate": "^3.2.4", + "mikey179/vfsstream": "^1.6", + "monolog/monolog": "^1.24", + "phpunit/phpunit": "^4.8.35|^5.4.3", + "psr/cache": "^1.0", + "symfony/dotenv": "^3.4", + "symfony/var-dumper": "^3.4" + }, + "suggest": { + "ext-sockets": "To use client-side monitoring" + }, + "time": "2019-10-11T11:09:47+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "AlibabaCloud\\Client\\": "src" + }, + "files": [ + "src/Functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "Alibaba Cloud SDK", + "email": "sdk-team@alibabacloud.com", + "homepage": "http://www.alibabacloud.com" } - ] - }, - "require": { - "adbario/php-dot-notation": "^2.2", - "clagiordano/weblibs-configmanager": "^1.0", - "danielstjules/stringy": "^3.1", - "ext-curl": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-openssl": "*", - "ext-simplexml": "*", - "ext-xmlwriter": "*", - "guzzlehttp/guzzle": "^6.3", - "mtdowling/jmespath.php": "^2.4", - "php": ">=5.5" - }, - "require-dev": { - "composer/composer": "^1.8", - "drupal/coder": "^8.3", - "ext-dom": "*", - "ext-pcre": "*", - "ext-sockets": "*", - "ext-spl": "*", - "league/climate": "^3.2.4", - "mikey179/vfsstream": "^1.6", - "monolog/monolog": "^1.24", - "phpunit/phpunit": "^4.8.35|^5.4.3", - "psr/cache": "^1.0", - "symfony/dotenv": "^3.4", - "symfony/var-dumper": "^3.4" - }, - "suggest": { - "ext-sockets": "To use client-side monitoring" - }, - "time": "2019-10-11T11:09:47+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "AlibabaCloud\\Client\\": "src" - }, - "files": [ - "src/Functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Alibaba Cloud SDK", - "email": "sdk-team@alibabacloud.com", - "homepage": "http://www.alibabacloud.com" - } - ], - "description": "Alibaba Cloud Client for PHP - Use Alibaba Cloud in your PHP project", - "homepage": "https://www.alibabacloud.com/", - "keywords": [ - "alibaba", - "alibabacloud", - "aliyun", - "client", - "cloud", - "library", - "sdk", - "tool" - ] - }, - { - "name": "aliyuncs/oss-sdk-php", - "version": "v2.3.0", - "version_normalized": "2.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/aliyun/aliyun-oss-php-sdk.git", - "reference": "e69f57916678458642ac9d2fd341ae78a56996c8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/aliyun/aliyun-oss-php-sdk/zipball/e69f57916678458642ac9d2fd341ae78a56996c8", - "reference": "e69f57916678458642ac9d2fd341ae78a56996c8", - "shasum": "", - "mirrors": [ + ], + "description": "Alibaba Cloud Client for PHP - Use Alibaba Cloud in your PHP project", + "homepage": "https://www.alibabacloud.com/", + "keywords": [ + "alibaba", + "alibabacloud", + "aliyun", + "client", + "cloud", + "library", + "sdk", + "tool" + ], + "install-path": "../alibabacloud/client" + }, + { + "name": "aliyuncs/oss-sdk-php", + "version": "v2.3.0", + "version_normalized": "2.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/aliyun/aliyun-oss-php-sdk.git", + "reference": "e69f57916678458642ac9d2fd341ae78a56996c8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aliyun/aliyun-oss-php-sdk/zipball/e69f57916678458642ac9d2fd341ae78a56996c8", + "reference": "e69f57916678458642ac9d2fd341ae78a56996c8", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "~1.0" + }, + "time": "2018-01-08T06:59:35+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "OSS\\": "src/OSS" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "Aliyuncs", + "homepage": "http://www.aliyun.com" } - ] - }, - "require": { - "php": ">=5.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "~1.0" - }, - "time": "2018-01-08T06:59:35+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "OSS\\": "src/OSS" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aliyuncs", - "homepage": "http://www.aliyun.com" - } - ], - "description": "Aliyun OSS SDK for PHP", - "homepage": "http://www.aliyun.com/product/oss/" - }, - { - "name": "clagiordano/weblibs-configmanager", - "version": "v1.0.7", - "version_normalized": "1.0.7.0", - "source": { - "type": "git", - "url": "https://github.com/clagiordano/weblibs-configmanager.git", - "reference": "6ef4c27354368deb2f54b39bbe06601da8c873a0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/clagiordano/weblibs-configmanager/zipball/6ef4c27354368deb2f54b39bbe06601da8c873a0", - "reference": "6ef4c27354368deb2f54b39bbe06601da8c873a0", - "shasum": "", - "mirrors": [ + ], + "description": "Aliyun OSS SDK for PHP", + "homepage": "http://www.aliyun.com/product/oss/", + "install-path": "../aliyuncs/oss-sdk-php" + }, + { + "name": "clagiordano/weblibs-configmanager", + "version": "v1.0.7", + "version_normalized": "1.0.7.0", + "source": { + "type": "git", + "url": "https://github.com/clagiordano/weblibs-configmanager.git", + "reference": "6ef4c27354368deb2f54b39bbe06601da8c873a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clagiordano/weblibs-configmanager/zipball/6ef4c27354368deb2f54b39bbe06601da8c873a0", + "reference": "6ef4c27354368deb2f54b39bbe06601da8c873a0", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "clagiordano/phpunit-result-printer": "^1", + "phpunit/phpunit": "^4.8" + }, + "time": "2019-09-25T22:10:10+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "clagiordano\\weblibs\\configmanager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "Claudio Giordano", + "email": "claudio.giordano@autistici.org", + "role": "Developer" } - ] - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "clagiordano/phpunit-result-printer": "^1", - "phpunit/phpunit": "^4.8" - }, - "time": "2019-09-25T22:10:10+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "clagiordano\\weblibs\\configmanager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Claudio Giordano", - "email": "claudio.giordano@autistici.org", - "role": "Developer" - } - ], - "description": "weblibs-configmanager is a tool library for easily read and access to php config array file and direct read/write configuration file / object", - "keywords": [ - "clagiordano", - "configuration", - "manager", - "tool", - "weblibs" - ] - }, - { - "name": "danielstjules/stringy", - "version": "3.1.0", - "version_normalized": "3.1.0.0", - "source": { - "type": "git", - "url": "https://github.com/danielstjules/Stringy.git", - "reference": "df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/danielstjules/Stringy/zipball/df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e", - "reference": "df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e", - "shasum": "", - "mirrors": [ + ], + "description": "weblibs-configmanager is a tool library for easily read and access to php config array file and direct read/write configuration file / object", + "keywords": [ + "clagiordano", + "configuration", + "manager", + "tool", + "weblibs" + ], + "install-path": "../clagiordano/weblibs-configmanager" + }, + { + "name": "danielstjules/stringy", + "version": "3.1.0", + "version_normalized": "3.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/danielstjules/Stringy.git", + "reference": "df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/danielstjules/Stringy/zipball/df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e", + "reference": "df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.4.0", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "time": "2017-06-12T01:10:27+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Stringy\\": "src/" + }, + "files": [ + "src/Create.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "Daniel St. Jules", + "email": "danielst.jules@gmail.com", + "homepage": "http://www.danielstjules.com" } - ] - }, - "require": { - "php": ">=5.4.0", - "symfony/polyfill-mbstring": "~1.1" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "time": "2017-06-12T01:10:27+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Stringy\\": "src/" - }, - "files": [ - "src/Create.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel St. Jules", - "email": "danielst.jules@gmail.com", - "homepage": "http://www.danielstjules.com" - } - ], - "description": "A string manipulation library with multibyte support", - "homepage": "https://github.com/danielstjules/Stringy", - "keywords": [ - "UTF", - "helpers", - "manipulation", - "methods", - "multibyte", - "string", - "utf-8", - "utility", - "utils" - ] - }, - { - "name": "doctrine/annotations", - "version": "v1.8.0", - "version_normalized": "1.8.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/904dca4eb10715b92569fbcd79e201d5c349b6bc", - "reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc", - "shasum": "", - "mirrors": [ + ], + "description": "A string manipulation library with multibyte support", + "homepage": "https://github.com/danielstjules/Stringy", + "keywords": [ + "UTF", + "helpers", + "manipulation", + "methods", + "multibyte", + "string", + "utf-8", + "utility", + "utils" + ], + "install-path": "../danielstjules/stringy" + }, + { + "name": "doctrine/annotations", + "version": "1.13.2", + "version_normalized": "1.13.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "5b668aef16090008790395c02c893b1ba13f7e08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08", + "reference": "5b668aef16090008790395c02c893b1ba13f7e08", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "doctrine/lexer": "1.*", + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^6.0 || ^8.1", + "phpstan/phpstan": "^0.12.20", + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", + "symfony/cache": "^4.4 || ^5.2" + }, + "time": "2021-08-05T19:00:23+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" } - ] - }, - "require": { - "doctrine/lexer": "1.*", - "php": "^7.1" - }, - "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "^7.5" - }, - "time": "2019-10-01T18:55:10+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "docblock", - "parser" - ] - }, - { - "name": "doctrine/lexer", - "version": "1.1.0", - "version_normalized": "1.1.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "e17f069ede36f7534b95adec71910ed1b49c74ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/e17f069ede36f7534b95adec71910ed1b49c74ea", - "reference": "e17f069ede36f7534b95adec71910ed1b49c74ea", - "shasum": "", - "mirrors": [ + ], + "description": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/1.13.2" + }, + "install-path": "../doctrine/annotations" + }, + { + "name": "doctrine/lexer", + "version": "1.2.1", + "version_normalized": "1.2.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11.8", + "phpunit/phpunit": "^8.2" + }, + "time": "2020-05-25T17:44:05+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" } - ] - }, - "require": { - "php": "^7.2" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpstan/phpstan": "^0.11.8", - "phpunit/phpunit": "^8.2" - }, - "time": "2019-07-30T19:33:28+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ] - }, - { - "name": "eaglewu/swoole-ide-helper", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/wudi/swoole-ide-helper.git", - "reference": "a255daa05feffbf4b88d59897a9470696d2fe259" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wudi/swoole-ide-helper/zipball/a255daa05feffbf4b88d59897a9470696d2fe259", - "reference": "a255daa05feffbf4b88d59897a9470696d2fe259", - "shasum": "", - "mirrors": [ + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.1" + }, + "funding": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" } - ] - }, - "time": "2019-11-02T07:18:22+00:00", - "type": "library", - "installation-source": "dist", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "eagle", - "email": "eaglewudi@gmail.com", - "role": "lead" - } - ], - "description": "Swoole IDE Helper, to improve auto-completion", - "keywords": [ - "autocomplete", - "codeintel", - "helper", - "ide", - "netbeans", - "phpdoc", - "phpstorm", - "sublime", - "swoole" - ] - }, - { - "name": "guzzlehttp/command", - "version": "1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/command.git", - "reference": "2aaa2521a8f8269d6f5dfc13fe2af12c76921034" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/command/zipball/2aaa2521a8f8269d6f5dfc13fe2af12c76921034", - "reference": "2aaa2521a8f8269d6f5dfc13fe2af12c76921034", - "shasum": "", - "mirrors": [ + ], + "install-path": "../doctrine/lexer" + }, + { + "name": "eaglewu/swoole-ide-helper", + "version": "dev-master", + "version_normalized": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/wudi/swoole-ide-helper.git", + "reference": "a255daa05feffbf4b88d59897a9470696d2fe259" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/wudi/swoole-ide-helper/zipball/a255daa05feffbf4b88d59897a9470696d2fe259", + "reference": "a255daa05feffbf4b88d59897a9470696d2fe259", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "time": "2019-11-02T07:18:22+00:00", + "type": "library", + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "eagle", + "email": "eaglewudi@gmail.com", + "role": "lead" } - ] - }, - "require": { - "guzzlehttp/guzzle": "^6.2", - "guzzlehttp/promises": "~1.3", - "guzzlehttp/psr7": "~1.0", - "php": ">=5.5.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0|~5.0" - }, - "time": "2016-11-24T13:34:15+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.9-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\Command\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Jeremy Lindblom", - "email": "jeremeamia@gmail.com", - "homepage": "https://github.com/jeremeamia" - } - ], - "description": "Provides the foundation for building command-based web service clients" - }, - { - "name": "guzzlehttp/guzzle", - "version": "6.4.1", - "version_normalized": "6.4.1.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "0895c932405407fd3a7368b6910c09a24d26db11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0895c932405407fd3a7368b6910c09a24d26db11", - "reference": "0895c932405407fd3a7368b6910c09a24d26db11", - "shasum": "", - "mirrors": [ + ], + "description": "Swoole IDE Helper, to improve auto-completion", + "keywords": [ + "autocomplete", + "codeintel", + "helper", + "ide", + "netbeans", + "phpdoc", + "phpstorm", + "sublime", + "swoole" + ], + "install-path": "../eaglewu/swoole-ide-helper" + }, + { + "name": "guzzlehttp/command", + "version": "1.0.0", + "version_normalized": "1.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/command.git", + "reference": "2aaa2521a8f8269d6f5dfc13fe2af12c76921034" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/command/zipball/2aaa2521a8f8269d6f5dfc13fe2af12c76921034", + "reference": "2aaa2521a8f8269d6f5dfc13fe2af12c76921034", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "guzzlehttp/guzzle": "^6.2", + "guzzlehttp/promises": "~1.3", + "guzzlehttp/psr7": "~1.0", + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "time": "2016-11-24T13:34:15+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.9-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "GuzzleHttp\\Command\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" } - ] - }, - "require": { - "ext-json": "*", - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.6.1", - "php": ">=5.5" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.1" - }, - "suggest": { - "psr/log": "Required for using the Log middleware" - }, - "time": "2019-10-23T15:58:00+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ] - }, - { - "name": "guzzlehttp/guzzle-services", - "version": "1.1.3", - "version_normalized": "1.1.3.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle-services.git", - "reference": "9e3abf20161cbf662d616cbb995f2811771759f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle-services/zipball/9e3abf20161cbf662d616cbb995f2811771759f7", - "reference": "9e3abf20161cbf662d616cbb995f2811771759f7", - "shasum": "", - "mirrors": [ + ], + "description": "Provides the foundation for building command-based web service clients", + "install-path": "../guzzlehttp/command" + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.4.1", + "version_normalized": "6.4.1.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "0895c932405407fd3a7368b6910c09a24d26db11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0895c932405407fd3a7368b6910c09a24d26db11", + "reference": "0895c932405407fd3a7368b6910c09a24d26db11", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.6.1", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.1" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "time": "2019-10-23T15:58:00+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "GuzzleHttp\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" } - ] - }, - "require": { - "guzzlehttp/command": "~1.0", - "guzzlehttp/guzzle": "^6.2", - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "gimler/guzzle-description-loader": "^0.0.4" - }, - "time": "2017-10-06T14:32:02+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\Command\\Guzzle\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Jeremy Lindblom", - "email": "jeremeamia@gmail.com", - "homepage": "https://github.com/jeremeamia" - }, - { - "name": "Stefano Kowalke", - "email": "blueduck@mail.org", - "homepage": "https://github.com/konafets" - } - ], - "description": "Provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures." - }, - { - "name": "guzzlehttp/promises", - "version": "v1.3.1", - "version_normalized": "1.3.1.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "shasum": "", - "mirrors": [ + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "install-path": "../guzzlehttp/guzzle" + }, + { + "name": "guzzlehttp/guzzle-services", + "version": "1.1.3", + "version_normalized": "1.1.3.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle-services.git", + "reference": "9e3abf20161cbf662d616cbb995f2811771759f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle-services/zipball/9e3abf20161cbf662d616cbb995f2811771759f7", + "reference": "9e3abf20161cbf662d616cbb995f2811771759f7", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "guzzlehttp/command": "~1.0", + "guzzlehttp/guzzle": "^6.2", + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "gimler/guzzle-description-loader": "^0.0.4" + }, + "time": "2017-10-06T14:32:02+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "GuzzleHttp\\Command\\Guzzle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "Stefano Kowalke", + "email": "blueduck@mail.org", + "homepage": "https://github.com/konafets" } - ] - }, - "require": { - "php": ">=5.5.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0" - }, - "time": "2016-12-20T10:07:11+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ] - }, - { - "name": "guzzlehttp/psr7", - "version": "1.6.1", - "version_normalized": "1.6.1.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a", - "shasum": "", - "mirrors": [ + ], + "description": "Provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures.", + "install-path": "../guzzlehttp/guzzle-services" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "version_normalized": "1.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "time": "2016-12-20T10:07:11+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" } - ] - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" - }, - "suggest": { - "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" - }, - "time": "2019-07-01T23:21:34+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ] - }, - { - "name": "jianyan74/php-excel", - "version": "1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/jianyan74/php-excel.git", - "reference": "5b569e16ba35fa48ff7449a7f593172f8284f66b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jianyan74/php-excel/zipball/5b569e16ba35fa48ff7449a7f593172f8284f66b", - "reference": "5b569e16ba35fa48ff7449a7f593172f8284f66b", - "shasum": "", - "mirrors": [ + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "install-path": "../guzzlehttp/promises" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.6.1", + "version_normalized": "1.6.1.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "suggest": { + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + }, + "time": "2019-07-01T23:21:34+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" } - ] - }, - "require": { - "php": ">=7.0", - "phpoffice/phpspreadsheet": "^1.3" - }, - "time": "2020-03-17T03:37:43+00:00", - "type": "extension", - "installation-source": "dist", - "autoload": { - "psr-4": { - "jianyan\\excel\\": "./src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "jianyan74" - } - ], - "description": "php excel 导入导出", - "keywords": [ - "csv", - "excel", - "html", - "jianyan74", - "xls", - "xlsx" - ] - }, - { - "name": "league/flysystem", - "version": "1.0.57", - "version_normalized": "1.0.57.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/flysystem.git", - "reference": "0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a", - "reference": "0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a", - "shasum": "", - "mirrors": [ + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "install-path": "../guzzlehttp/psr7" + }, + { + "name": "jianyan74/php-excel", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/jianyan74/php-excel.git", + "reference": "5b569e16ba35fa48ff7449a7f593172f8284f66b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jianyan74/php-excel/zipball/5b569e16ba35fa48ff7449a7f593172f8284f66b", + "reference": "5b569e16ba35fa48ff7449a7f593172f8284f66b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.0", + "phpoffice/phpspreadsheet": "^1.3" + }, + "time": "2020-03-17T03:37:43+00:00", + "type": "extension", + "installation-source": "dist", + "autoload": { + "psr-4": { + "jianyan\\excel\\": "./src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "jianyan74" } - ] - }, - "require": { - "ext-fileinfo": "*", - "php": ">=5.5.9" - }, - "conflict": { - "league/flysystem-sftp": "<1.0.6" - }, - "require-dev": { - "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7.10" - }, - "suggest": { - "ext-fileinfo": "Required for MimeType", - "ext-ftp": "Allows you to use FTP server storage", - "ext-openssl": "Allows you to use FTPS server storage", - "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", - "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", - "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", - "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", - "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", - "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", - "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", - "league/flysystem-webdav": "Allows you to use WebDAV storage", - "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", - "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", - "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" - }, - "time": "2019-10-16T21:01:05+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "League\\Flysystem\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frank de Jonge", - "email": "info@frenky.net" - } - ], - "description": "Filesystem abstraction: Many filesystems, one API.", - "keywords": [ - "Cloud Files", - "WebDAV", - "abstraction", - "aws", - "cloud", - "copy.com", - "dropbox", - "file systems", - "files", - "filesystem", - "filesystems", - "ftp", - "rackspace", - "remote", - "s3", - "sftp", - "storage" - ] - }, - { - "name": "league/flysystem-cached-adapter", - "version": "1.0.9", - "version_normalized": "1.0.9.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/flysystem-cached-adapter.git", - "reference": "08ef74e9be88100807a3b92cc9048a312bf01d6f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/08ef74e9be88100807a3b92cc9048a312bf01d6f", - "reference": "08ef74e9be88100807a3b92cc9048a312bf01d6f", - "shasum": "", - "mirrors": [ + ], + "description": "php excel 导入导出", + "keywords": [ + "csv", + "excel", + "html", + "jianyan74", + "xls", + "xlsx" + ], + "install-path": "../jianyan74/php-excel" + }, + { + "name": "league/flysystem", + "version": "1.0.57", + "version_normalized": "1.0.57.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a", + "reference": "0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-fileinfo": "*", + "php": ">=5.5.9" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "phpspec/phpspec": "^3.4", + "phpunit/phpunit": "^5.7.10" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "ext-ftp": "Allows you to use FTP server storage", + "ext-openssl": "Allows you to use FTPS server storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + }, + "time": "2019-10-16T21:01:05+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "install-path": "../league/flysystem" + }, + { + "name": "league/flysystem-cached-adapter", + "version": "1.0.9", + "version_normalized": "1.0.9.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-cached-adapter.git", + "reference": "08ef74e9be88100807a3b92cc9048a312bf01d6f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/08ef74e9be88100807a3b92cc9048a312bf01d6f", + "reference": "08ef74e9be88100807a3b92cc9048a312bf01d6f", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "league/flysystem": "~1.0", + "psr/cache": "^1.0.0" + }, + "require-dev": { + "mockery/mockery": "~0.9", + "phpspec/phpspec": "^3.4", + "phpunit/phpunit": "^5.7", + "predis/predis": "~1.0", + "tedivm/stash": "~0.12" + }, + "suggest": { + "ext-phpredis": "Pure C implemented extension for PHP" + }, + "time": "2018-07-09T20:51:04+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "League\\Flysystem\\Cached\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "frankdejonge", + "email": "info@frenky.net" + } + ], + "description": "An adapter decorator to enable meta-data caching.", + "install-path": "../league/flysystem-cached-adapter" + }, + { + "name": "markbaker/complex", + "version": "1.4.8", + "version_normalized": "1.4.8.0", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "8eaa40cceec7bf0518187530b2e63871be661b72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/8eaa40cceec7bf0518187530b2e63871be661b72", + "reference": "8eaa40cceec7bf0518187530b2e63871be661b72", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", + "phpcompatibility/php-compatibility": "^9.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "2.*", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^4.8.35|^5.4.0", + "sebastian/phpcpd": "2.*", + "squizlabs/php_codesniffer": "^3.4.0" + }, + "time": "2020-03-11T20:15:49+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + }, + "files": [ + "classes/src/functions/abs.php", + "classes/src/functions/acos.php", + "classes/src/functions/acosh.php", + "classes/src/functions/acot.php", + "classes/src/functions/acoth.php", + "classes/src/functions/acsc.php", + "classes/src/functions/acsch.php", + "classes/src/functions/argument.php", + "classes/src/functions/asec.php", + "classes/src/functions/asech.php", + "classes/src/functions/asin.php", + "classes/src/functions/asinh.php", + "classes/src/functions/atan.php", + "classes/src/functions/atanh.php", + "classes/src/functions/conjugate.php", + "classes/src/functions/cos.php", + "classes/src/functions/cosh.php", + "classes/src/functions/cot.php", + "classes/src/functions/coth.php", + "classes/src/functions/csc.php", + "classes/src/functions/csch.php", + "classes/src/functions/exp.php", + "classes/src/functions/inverse.php", + "classes/src/functions/ln.php", + "classes/src/functions/log2.php", + "classes/src/functions/log10.php", + "classes/src/functions/negative.php", + "classes/src/functions/pow.php", + "classes/src/functions/rho.php", + "classes/src/functions/sec.php", + "classes/src/functions/sech.php", + "classes/src/functions/sin.php", + "classes/src/functions/sinh.php", + "classes/src/functions/sqrt.php", + "classes/src/functions/tan.php", + "classes/src/functions/tanh.php", + "classes/src/functions/theta.php", + "classes/src/operations/add.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ], + "install-path": "../markbaker/complex" + }, + { + "name": "markbaker/matrix", + "version": "1.2.0", + "version_normalized": "1.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "5348c5a67e3b75cd209d70103f916a93b1f1ed21" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/5348c5a67e3b75cd209d70103f916a93b1f1ed21", + "reference": "5348c5a67e3b75cd209d70103f916a93b1f1ed21", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "dev-master", + "phploc/phploc": "^4", + "phpmd/phpmd": "dev-master", + "phpunit/phpunit": "^5.7", + "sebastian/phpcpd": "^3.0", + "squizlabs/php_codesniffer": "^3.0@dev" + }, + "time": "2019-10-06T11:29:25+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + }, + "files": [ + "classes/src/functions/adjoint.php", + "classes/src/functions/antidiagonal.php", + "classes/src/functions/cofactors.php", + "classes/src/functions/determinant.php", + "classes/src/functions/diagonal.php", + "classes/src/functions/identity.php", + "classes/src/functions/inverse.php", + "classes/src/functions/minors.php", + "classes/src/functions/trace.php", + "classes/src/functions/transpose.php", + "classes/src/operations/add.php", + "classes/src/operations/directsum.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ], + "install-path": "../markbaker/matrix" + }, + { + "name": "mtdowling/jmespath.php", + "version": "2.4.0", + "version_normalized": "2.4.0.0", + "source": { + "type": "git", + "url": "https://github.com/jmespath/jmespath.php.git", + "reference": "adcc9531682cf87dfda21e1fd5d0e7a41d292fac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/adcc9531682cf87dfda21e1fd5d0e7a41d292fac", + "reference": "adcc9531682cf87dfda21e1fd5d0e7a41d292fac", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "time": "2016-12-03T22:08:25+00:00", + "bin": [ + "bin/jp.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "JmesPath\\": "src/" + }, + "files": [ + "src/JmesPath.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Declaratively specify how to extract elements from a JSON document", + "keywords": [ + "json", + "jsonpath" + ], + "install-path": "../mtdowling/jmespath.php" + }, + { + "name": "opis/closure", + "version": "3.4.1", + "version_normalized": "3.4.1.0", + "source": { + "type": "git", + "url": "https://github.com/opis/closure.git", + "reference": "e79f851749c3caa836d7ccc01ede5828feb762c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/opis/closure/zipball/e79f851749c3caa836d7ccc01ede5828feb762c7", + "reference": "e79f851749c3caa836d7ccc01ede5828feb762c7", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.4 || ^7.0" + }, + "require-dev": { + "jeremeamia/superclosure": "^2.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "time": "2019-10-19T18:38:51+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Opis\\Closure\\": "src/" + }, + "files": [ + "functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marius Sarca", + "email": "marius.sarca@gmail.com" + }, + { + "name": "Sorin Sarca", + "email": "sarca_sorin@hotmail.com" + } + ], + "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", + "homepage": "https://opis.io/closure", + "keywords": [ + "anonymous functions", + "closure", + "function", + "serializable", + "serialization", + "serialize" + ], + "install-path": "../opis/closure" + }, + { + "name": "phpoffice/phpspreadsheet", + "version": "1.12.0", + "version_normalized": "1.12.0.0", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "f79611d6dc1f6b7e8e30b738fc371b392001dbfd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/f79611d6dc1f6b7e8e30b738fc371b392001dbfd", + "reference": "f79611d6dc1f6b7e8e30b738fc371b392001dbfd", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-ctype": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "markbaker/complex": "^1.4", + "markbaker/matrix": "^1.2", + "php": "^7.1", + "psr/simple-cache": "^1.0" + }, + "require-dev": { + "dompdf/dompdf": "^0.8.3", + "friendsofphp/php-cs-fixer": "^2.16", + "jpgraph/jpgraph": "^4.0", + "mpdf/mpdf": "^8.0", + "phpcompatibility/php-compatibility": "^9.3", + "phpunit/phpunit": "^7.5", + "squizlabs/php_codesniffer": "^3.5", + "tecnickcom/tcpdf": "^6.3" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" + }, + "time": "2020-04-27T08:12:48+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker", + "homepage": "https://markbakeruk.net" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Adrien Crivelli" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "install-path": "../phpoffice/phpspreadsheet" + }, + { + "name": "psr/cache", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2016-08-06T20:24:11+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "install-path": "../psr/cache" + }, + { + "name": "psr/container", + "version": "1.0.0", + "version_normalized": "1.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2017-02-14T16:28:37+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "install-path": "../psr/container" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2016-08-06T14:39:51+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "install-path": "../psr/http-message" + }, + { + "name": "psr/log", + "version": "1.1.2", + "version_normalized": "1.1.2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", + "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2019-11-01T11:05:21+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "install-path": "../psr/log" + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2017-10-23T01:57:42+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "install-path": "../psr/simple-cache" + }, + { + "name": "qcloud/cos-sdk-v5", + "version": "v2.0.3", + "version_normalized": "2.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/tencentyun/cos-php-sdk-v5.git", + "reference": "5dea6bc8be6f8e48fb95a5c4670800d1d796ac42" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tencentyun/cos-php-sdk-v5/zipball/5dea6bc8be6f8e48fb95a5c4670800d1d796ac42", + "reference": "5dea6bc8be6f8e48fb95a5c4670800d1d796ac42", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "guzzlehttp/guzzle": "~6.3", + "guzzlehttp/guzzle-services": "~1.1", + "php": ">=5.3.0" + }, + "time": "2019-11-07T11:55:10+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "Qcloud\\Cos\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "league/flysystem": "~1.0", - "psr/cache": "^1.0.0" - }, - "require-dev": { - "mockery/mockery": "~0.9", - "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7", - "predis/predis": "~1.0", - "tedivm/stash": "~0.12" - }, - "suggest": { - "ext-phpredis": "Pure C implemented extension for PHP" - }, - "time": "2018-07-09T20:51:04+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "League\\Flysystem\\Cached\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "frankdejonge", - "email": "info@frenky.net" - } - ], - "description": "An adapter decorator to enable meta-data caching." - }, - { - "name": "markbaker/complex", - "version": "1.4.8", - "version_normalized": "1.4.8.0", - "source": { - "type": "git", - "url": "https://github.com/MarkBaker/PHPComplex.git", - "reference": "8eaa40cceec7bf0518187530b2e63871be661b72" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/8eaa40cceec7bf0518187530b2e63871be661b72", - "reference": "8eaa40cceec7bf0518187530b2e63871be661b72", - "shasum": "", - "mirrors": [ + "name": "yaozongyou", + "email": "yaozongyou@vip.qq.com" + }, { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "lewzylu", + "email": "327874225@qq.com" } - ] - }, - "require": { - "php": "^5.6.0|^7.0.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", - "phpcompatibility/php-compatibility": "^9.0", - "phpdocumentor/phpdocumentor": "2.*", - "phploc/phploc": "2.*", - "phpmd/phpmd": "2.*", - "phpunit/phpunit": "^4.8.35|^5.4.0", - "sebastian/phpcpd": "2.*", - "squizlabs/php_codesniffer": "^3.4.0" - }, - "time": "2020-03-11T20:15:49+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Complex\\": "classes/src/" - }, - "files": [ - "classes/src/functions/abs.php", - "classes/src/functions/acos.php", - "classes/src/functions/acosh.php", - "classes/src/functions/acot.php", - "classes/src/functions/acoth.php", - "classes/src/functions/acsc.php", - "classes/src/functions/acsch.php", - "classes/src/functions/argument.php", - "classes/src/functions/asec.php", - "classes/src/functions/asech.php", - "classes/src/functions/asin.php", - "classes/src/functions/asinh.php", - "classes/src/functions/atan.php", - "classes/src/functions/atanh.php", - "classes/src/functions/conjugate.php", - "classes/src/functions/cos.php", - "classes/src/functions/cosh.php", - "classes/src/functions/cot.php", - "classes/src/functions/coth.php", - "classes/src/functions/csc.php", - "classes/src/functions/csch.php", - "classes/src/functions/exp.php", - "classes/src/functions/inverse.php", - "classes/src/functions/ln.php", - "classes/src/functions/log2.php", - "classes/src/functions/log10.php", - "classes/src/functions/negative.php", - "classes/src/functions/pow.php", - "classes/src/functions/rho.php", - "classes/src/functions/sec.php", - "classes/src/functions/sech.php", - "classes/src/functions/sin.php", - "classes/src/functions/sinh.php", - "classes/src/functions/sqrt.php", - "classes/src/functions/tan.php", - "classes/src/functions/tanh.php", - "classes/src/functions/theta.php", - "classes/src/operations/add.php", - "classes/src/operations/subtract.php", - "classes/src/operations/multiply.php", - "classes/src/operations/divideby.php", - "classes/src/operations/divideinto.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mark Baker", - "email": "mark@lange.demon.co.uk" - } - ], - "description": "PHP Class for working with complex numbers", - "homepage": "https://github.com/MarkBaker/PHPComplex", - "keywords": [ - "complex", - "mathematics" - ] - }, - { - "name": "markbaker/matrix", - "version": "1.2.0", - "version_normalized": "1.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/MarkBaker/PHPMatrix.git", - "reference": "5348c5a67e3b75cd209d70103f916a93b1f1ed21" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/5348c5a67e3b75cd209d70103f916a93b1f1ed21", - "reference": "5348c5a67e3b75cd209d70103f916a93b1f1ed21", - "shasum": "", - "mirrors": [ + ], + "description": "PHP SDK for QCloud COS", + "keywords": [ + "cos", + "php", + "qcloud" + ], + "install-path": "../qcloud/cos-sdk-v5" + }, + { + "name": "qiniu/php-sdk", + "version": "v7.2.10", + "version_normalized": "7.2.10.0", + "source": { + "type": "git", + "url": "https://github.com/qiniu/php-sdk.git", + "reference": "d89987163f560ebf9dfa5bb25de9bd9b1a3b2bd8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/qiniu/php-sdk/zipball/d89987163f560ebf9dfa5bb25de9bd9b1a3b2bd8", + "reference": "d89987163f560ebf9dfa5bb25de9bd9b1a3b2bd8", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.3" + }, + "time": "2019-10-28T10:23:23+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Qiniu\\": "src/Qiniu" + }, + "files": [ + "src/Qiniu/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "Qiniu", + "email": "sdk@qiniu.com", + "homepage": "http://www.qiniu.com" } - ] - }, - "require": { - "php": "^5.6.0|^7.0.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "dev-master", - "phpcompatibility/php-compatibility": "dev-master", - "phploc/phploc": "^4", - "phpmd/phpmd": "dev-master", - "phpunit/phpunit": "^5.7", - "sebastian/phpcpd": "^3.0", - "squizlabs/php_codesniffer": "^3.0@dev" - }, - "time": "2019-10-06T11:29:25+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Matrix\\": "classes/src/" - }, - "files": [ - "classes/src/functions/adjoint.php", - "classes/src/functions/antidiagonal.php", - "classes/src/functions/cofactors.php", - "classes/src/functions/determinant.php", - "classes/src/functions/diagonal.php", - "classes/src/functions/identity.php", - "classes/src/functions/inverse.php", - "classes/src/functions/minors.php", - "classes/src/functions/trace.php", - "classes/src/functions/transpose.php", - "classes/src/operations/add.php", - "classes/src/operations/directsum.php", - "classes/src/operations/subtract.php", - "classes/src/operations/multiply.php", - "classes/src/operations/divideby.php", - "classes/src/operations/divideinto.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mark Baker", - "email": "mark@lange.demon.co.uk" - } - ], - "description": "PHP Class for working with matrices", - "homepage": "https://github.com/MarkBaker/PHPMatrix", - "keywords": [ - "mathematics", - "matrix", - "vector" - ] - }, - { - "name": "mtdowling/jmespath.php", - "version": "2.4.0", - "version_normalized": "2.4.0.0", - "source": { - "type": "git", - "url": "https://github.com/jmespath/jmespath.php.git", - "reference": "adcc9531682cf87dfda21e1fd5d0e7a41d292fac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/adcc9531682cf87dfda21e1fd5d0e7a41d292fac", - "reference": "adcc9531682cf87dfda21e1fd5d0e7a41d292fac", - "shasum": "", - "mirrors": [ + ], + "description": "Qiniu Resource (Cloud) Storage SDK for PHP", + "homepage": "http://developer.qiniu.com/", + "keywords": [ + "cloud", + "qiniu", + "sdk", + "storage" + ], + "install-path": "../qiniu/php-sdk" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "version_normalized": "3.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "time": "2019-03-08T08:55:37+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" } - ] - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "time": "2016-12-03T22:08:25+00:00", - "bin": [ - "bin/jp.php" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "JmesPath\\": "src/" - }, - "files": [ - "src/JmesPath.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Declaratively specify how to extract elements from a JSON document", - "keywords": [ - "json", - "jsonpath" - ] - }, - { - "name": "opis/closure", - "version": "3.4.1", - "version_normalized": "3.4.1.0", - "source": { - "type": "git", - "url": "https://github.com/opis/closure.git", - "reference": "e79f851749c3caa836d7ccc01ede5828feb762c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/e79f851749c3caa836d7ccc01ede5828feb762c7", - "reference": "e79f851749c3caa836d7ccc01ede5828feb762c7", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + ], + "description": "A polyfill for getallheaders.", + "install-path": "../ralouphie/getallheaders" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.16.0", + "version_normalized": "1.16.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "a54881ec0ab3b2005c406aed0023c062879031e7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a54881ec0ab3b2005c406aed0023c062879031e7", + "reference": "a54881ec0ab3b2005c406aed0023c062879031e7", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "time": "2020-05-08T16:50:20+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.16-dev" } - ] - }, - "require": { - "php": "^5.4 || ^7.0" - }, - "require-dev": { - "jeremeamia/superclosure": "^2.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "time": "2019-10-19T18:38:51+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Opis\\Closure\\": "src/" - }, - "files": [ - "functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marius Sarca", - "email": "marius.sarca@gmail.com" - }, - { - "name": "Sorin Sarca", - "email": "sarca_sorin@hotmail.com" - } - ], - "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", - "homepage": "https://opis.io/closure", - "keywords": [ - "anonymous functions", - "closure", - "function", - "serializable", - "serialization", - "serialize" - ] - }, - { - "name": "phpoffice/phpspreadsheet", - "version": "1.12.0", - "version_normalized": "1.12.0.0", - "source": { - "type": "git", - "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "f79611d6dc1f6b7e8e30b738fc371b392001dbfd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/f79611d6dc1f6b7e8e30b738fc371b392001dbfd", - "reference": "f79611d6dc1f6b7e8e30b738fc371b392001dbfd", - "shasum": "", - "mirrors": [ + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "ext-ctype": "*", - "ext-dom": "*", - "ext-fileinfo": "*", - "ext-gd": "*", - "ext-iconv": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-simplexml": "*", - "ext-xml": "*", - "ext-xmlreader": "*", - "ext-xmlwriter": "*", - "ext-zip": "*", - "ext-zlib": "*", - "markbaker/complex": "^1.4", - "markbaker/matrix": "^1.2", - "php": "^7.1", - "psr/simple-cache": "^1.0" - }, - "require-dev": { - "dompdf/dompdf": "^0.8.3", - "friendsofphp/php-cs-fixer": "^2.16", - "jpgraph/jpgraph": "^4.0", - "mpdf/mpdf": "^8.0", - "phpcompatibility/php-compatibility": "^9.3", - "phpunit/phpunit": "^7.5", - "squizlabs/php_codesniffer": "^3.5", - "tecnickcom/tcpdf": "^6.3" - }, - "suggest": { - "dompdf/dompdf": "Option for rendering PDF with PDF Writer", - "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", - "mpdf/mpdf": "Option for rendering PDF with PDF Writer", - "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" - }, - "time": "2020-04-27T08:12:48+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Maarten Balliauw", - "homepage": "https://blog.maartenballiauw.be" - }, - { - "name": "Mark Baker", - "homepage": "https://markbakeruk.net" - }, - { - "name": "Franck Lefevre", - "homepage": "https://rootslabs.net" - }, - { - "name": "Erik Tilt" - }, - { - "name": "Adrien Crivelli" - } - ], - "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", - "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", - "keywords": [ - "OpenXML", - "excel", - "gnumeric", - "ods", - "php", - "spreadsheet", - "xls", - "xlsx" - ] - }, - { - "name": "psr/cache", - "version": "1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", - "shasum": "", - "mirrors": [ + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } - ] - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2016-08-06T20:24:11+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ] - }, - { - "name": "psr/container", - "version": "1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "install-path": "../symfony/polyfill-mbstring" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.12.0", + "version_normalized": "1.12.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "04ce3335667451138df4307d6a9b61565560199e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/04ce3335667451138df4307d6a9b61565560199e", + "reference": "04ce3335667451138df4307d6a9b61565560199e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "time": "2019-08-06T08:03:45+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" } - ] - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2017-02-14T16:28:37+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ] - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "", - "mirrors": [ + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2016-08-06T14:39:51+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ] - }, - { - "name": "psr/log", - "version": "1.1.2", - "version_normalized": "1.1.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", - "shasum": "", - "mirrors": [ + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } - ] - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2019-11-01T11:05:21+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ] - }, - { - "name": "psr/simple-cache", - "version": "1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "install-path": "../symfony/polyfill-php72" + }, + { + "name": "symfony/var-dumper", + "version": "v4.3.6", + "version_normalized": "4.3.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "ea4940845535c85ff5c505e13b3205b0076d07bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ea4940845535c85ff5c505e13b3205b0076d07bf", + "reference": "ea4940845535c85ff5c505e13b3205b0076d07bf", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php72": "~1.5" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", + "symfony/console": "<3.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0", + "twig/twig": "~1.34|~2.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "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": "2019-10-13T12:02:04+00:00", + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" } - ] - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2017-10-23T01:57:42+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ] - }, - { - "name": "qcloud/cos-sdk-v5", - "version": "v2.0.3", - "version_normalized": "2.0.3.0", - "source": { - "type": "git", - "url": "https://github.com/tencentyun/cos-php-sdk-v5.git", - "reference": "5dea6bc8be6f8e48fb95a5c4670800d1d796ac42" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/tencentyun/cos-php-sdk-v5/zipball/5dea6bc8be6f8e48fb95a5c4670800d1d796ac42", - "reference": "5dea6bc8be6f8e48fb95a5c4670800d1d796ac42", - "shasum": "", - "mirrors": [ + }, + "installation-source": "dist", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "guzzlehttp/guzzle": "~6.3", - "guzzlehttp/guzzle-services": "~1.1", - "php": ">=5.3.0" - }, - "time": "2019-11-07T11:55:10+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Qcloud\\Cos\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "yaozongyou", - "email": "yaozongyou@vip.qq.com" - }, - { - "name": "lewzylu", - "email": "327874225@qq.com" - } - ], - "description": "PHP SDK for QCloud COS", - "keywords": [ - "cos", - "php", - "qcloud" - ] - }, - { - "name": "qiniu/php-sdk", - "version": "v7.2.10", - "version_normalized": "7.2.10.0", - "source": { - "type": "git", - "url": "https://github.com/qiniu/php-sdk.git", - "reference": "d89987163f560ebf9dfa5bb25de9bd9b1a3b2bd8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/qiniu/php-sdk/zipball/d89987163f560ebf9dfa5bb25de9bd9b1a3b2bd8", - "reference": "d89987163f560ebf9dfa5bb25de9bd9b1a3b2bd8", - "shasum": "", - "mirrors": [ + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } - ] - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.3" - }, - "time": "2019-10-28T10:23:23+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Qiniu\\": "src/Qiniu" - }, - "files": [ - "src/Qiniu/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Qiniu", - "email": "sdk@qiniu.com", - "homepage": "http://www.qiniu.com" - } - ], - "description": "Qiniu Resource (Cloud) Storage SDK for PHP", - "homepage": "http://developer.qiniu.com/", - "keywords": [ - "cloud", - "qiniu", - "sdk", - "storage" - ] - }, - { - "name": "ralouphie/getallheaders", - "version": "3.0.3", - "version_normalized": "3.0.3.0", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + ], + "description": "Symfony mechanism for exploring and dumping PHP variables", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "install-path": "../symfony/var-dumper" + }, + { + "name": "topthink/framework", + "version": "v6.0.0", + "version_normalized": "6.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/top-think/framework.git", + "reference": "79c555aab0313d1a33ddcdb3c395f2c47f37f597" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/framework/zipball/79c555aab0313d1a33ddcdb3c395f2c47f37f597", + "reference": "79c555aab0313d1a33ddcdb3c395f2c47f37f597", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "league/flysystem": "^1.0", + "league/flysystem-cached-adapter": "^1.0", + "opis/closure": "^3.1", + "php": ">=7.1.0", + "psr/container": "~1.0", + "psr/log": "~1.0", + "psr/simple-cache": "^1.0", + "topthink/think-helper": "^3.1.1", + "topthink/think-orm": "^2.0" + }, + "require-dev": { + "mikey179/vfsstream": "^1.6", + "mockery/mockery": "^1.2", + "phpunit/phpunit": "^7.0" + }, + "time": "2019-10-23T23:28:43+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [], + "psr-4": { + "think\\": "src/think/" } - ] - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" - }, - "time": "2019-03-08T08:55:37+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "src/getallheaders.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "description": "A polyfill for getallheaders." - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.16.0", - "version_normalized": "1.16.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "a54881ec0ab3b2005c406aed0023c062879031e7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a54881ec0ab3b2005c406aed0023c062879031e7", - "reference": "a54881ec0ab3b2005c406aed0023c062879031e7", - "shasum": "", - "mirrors": [ + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "time": "2020-05-08T16:50:20+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.16-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ] - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.12.0", - "version_normalized": "1.12.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "04ce3335667451138df4307d6a9b61565560199e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/04ce3335667451138df4307d6a9b61565560199e", - "reference": "04ce3335667451138df4307d6a9b61565560199e", - "shasum": "", - "mirrors": [ + "name": "liu21st", + "email": "liu21st@gmail.com" + }, { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "yunwuxin", + "email": "448901948@qq.com" } - ] - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2019-08-06T08:03:45+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.12-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ] - }, - { - "name": "symfony/var-dumper", - "version": "v4.3.6", - "version_normalized": "4.3.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-dumper.git", - "reference": "ea4940845535c85ff5c505e13b3205b0076d07bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ea4940845535c85ff5c505e13b3205b0076d07bf", - "reference": "ea4940845535c85ff5c505e13b3205b0076d07bf", - "shasum": "", - "mirrors": [ + ], + "description": "The ThinkPHP Framework.", + "homepage": "http://thinkphp.cn/", + "keywords": [ + "framework", + "orm", + "thinkphp" + ], + "install-path": "../topthink/framework" + }, + { + "name": "topthink/think-captcha", + "version": "v3.0.2", + "version_normalized": "3.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-captcha.git", + "reference": "0b4305da19e118cefd934007875a8112f9352f01" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/think-captcha/zipball/0b4305da19e118cefd934007875a8112f9352f01", + "reference": "0b4305da19e118cefd934007875a8112f9352f01", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "topthink/framework": "^6.0.0" + }, + "time": "2019-10-03T07:45:11+00:00", + "type": "library", + "extra": { + "think": { + "services": [ + "think\\captcha\\CaptchaService" + ], + "config": { + "captcha": "src/config.php" + } + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "think\\captcha\\": "src/" + }, + "files": [ + "src/helper.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "yunwuxin", + "email": "448901948@qq.com" } - ] - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php72": "~1.5" - }, - "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", - "symfony/console": "<3.4" - }, - "require-dev": { - "ext-iconv": "*", - "symfony/console": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0", - "twig/twig": "~1.34|~2.4" - }, - "suggest": { - "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", - "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": "2019-10-13T12:02:04+00:00", - "bin": [ - "Resources/bin/var-dump-server" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "Resources/functions/dump.php" ], - "psr-4": { - "Symfony\\Component\\VarDumper\\": "" + "description": "captcha package for thinkphp", + "install-path": "../topthink/think-captcha" + }, + { + "name": "topthink/think-helper", + "version": "v3.1.4", + "version_normalized": "3.1.4.0", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-helper.git", + "reference": "c28d37743bda4a0455286ca85b17b5791d626e10" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony mechanism for exploring and dumping PHP variables", - "homepage": "https://symfony.com", - "keywords": [ - "debug", - "dump" - ] - }, - { - "name": "topthink/framework", - "version": "v6.0.0", - "version_normalized": "6.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/top-think/framework.git", - "reference": "79c555aab0313d1a33ddcdb3c395f2c47f37f597" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/framework/zipball/79c555aab0313d1a33ddcdb3c395f2c47f37f597", - "reference": "79c555aab0313d1a33ddcdb3c395f2c47f37f597", - "shasum": "", - "mirrors": [ + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/think-helper/zipball/c28d37743bda4a0455286ca85b17b5791d626e10", + "reference": "c28d37743bda4a0455286ca85b17b5791d626e10", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1.0" + }, + "time": "2019-11-08T08:01:10+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "think\\": "src" + }, + "files": [ + "src/helper.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "yunwuxin", + "email": "448901948@qq.com" } - ] - }, - "require": { - "ext-json": "*", - "ext-mbstring": "*", - "league/flysystem": "^1.0", - "league/flysystem-cached-adapter": "^1.0", - "opis/closure": "^3.1", - "php": ">=7.1.0", - "psr/container": "~1.0", - "psr/log": "~1.0", - "psr/simple-cache": "^1.0", - "topthink/think-helper": "^3.1.1", - "topthink/think-orm": "^2.0" - }, - "require-dev": { - "mikey179/vfsstream": "^1.6", - "mockery/mockery": "^1.2", - "phpunit/phpunit": "^7.0" - }, - "time": "2019-10-23T23:28:43+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [], - "psr-4": { - "think\\": "src/think/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - }, - { - "name": "yunwuxin", - "email": "448901948@qq.com" - } - ], - "description": "The ThinkPHP Framework.", - "homepage": "http://thinkphp.cn/", - "keywords": [ - "framework", - "orm", - "thinkphp" - ] - }, - { - "name": "topthink/think-captcha", - "version": "v3.0.2", - "version_normalized": "3.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-captcha.git", - "reference": "0b4305da19e118cefd934007875a8112f9352f01" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-captcha/zipball/0b4305da19e118cefd934007875a8112f9352f01", - "reference": "0b4305da19e118cefd934007875a8112f9352f01", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + ], + "description": "The ThinkPHP6 Helper Package", + "install-path": "../topthink/think-helper" + }, + { + "name": "topthink/think-multi-app", + "version": "v1.0.11", + "version_normalized": "1.0.11.0", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-multi-app.git", + "reference": "215f4a6bb88e53ad41b448c61957336eb55ce6f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/think-multi-app/zipball/215f4a6bb88e53ad41b448c61957336eb55ce6f9", + "reference": "215f4a6bb88e53ad41b448c61957336eb55ce6f9", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1.0", + "topthink/framework": "^6.0.0" + }, + "time": "2019-10-29T06:34:59+00:00", + "type": "library", + "extra": { + "think": { + "services": [ + "think\\app\\Service" + ] } - ] - }, - "require": { - "topthink/framework": "^6.0.0" - }, - "time": "2019-10-03T07:45:11+00:00", - "type": "library", - "extra": { - "think": { - "services": [ - "think\\captcha\\CaptchaService" - ], - "config": { - "captcha": "src/config.php" + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "think\\app\\": "src" } - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "think\\captcha\\": "src/" - }, - "files": [ - "src/helper.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "yunwuxin", - "email": "448901948@qq.com" - } - ], - "description": "captcha package for thinkphp" - }, - { - "name": "topthink/think-helper", - "version": "v3.1.4", - "version_normalized": "3.1.4.0", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-helper.git", - "reference": "c28d37743bda4a0455286ca85b17b5791d626e10" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-helper/zipball/c28d37743bda4a0455286ca85b17b5791d626e10", - "reference": "c28d37743bda4a0455286ca85b17b5791d626e10", - "shasum": "", - "mirrors": [ + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "liu21st", + "email": "liu21st@gmail.com" } - ] - }, - "require": { - "php": ">=7.1.0" - }, - "time": "2019-11-08T08:01:10+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "think\\": "src" - }, - "files": [ - "src/helper.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "yunwuxin", - "email": "448901948@qq.com" - } - ], - "description": "The ThinkPHP6 Helper Package" - }, - { - "name": "topthink/think-multi-app", - "version": "v1.0.11", - "version_normalized": "1.0.11.0", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-multi-app.git", - "reference": "215f4a6bb88e53ad41b448c61957336eb55ce6f9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-multi-app/zipball/215f4a6bb88e53ad41b448c61957336eb55ce6f9", - "reference": "215f4a6bb88e53ad41b448c61957336eb55ce6f9", - "shasum": "", - "mirrors": [ + ], + "description": "thinkphp6 multi app support", + "install-path": "../topthink/think-multi-app" + }, + { + "name": "topthink/think-orm", + "version": "v2.0.27", + "version_normalized": "2.0.27.0", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-orm.git", + "reference": "02affaaccade2cdd8bbb2d2f5d15e46113e6eb50" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/think-orm/zipball/02affaaccade2cdd8bbb2d2f5d15e46113e6eb50", + "reference": "02affaaccade2cdd8bbb2d2f5d15e46113e6eb50", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "php": ">=7.1.0", + "psr/log": "~1.0", + "psr/simple-cache": "^1.0", + "topthink/think-helper": "^3.1" + }, + "time": "2019-10-23T02:16:50+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "think\\": "src" + }, + "files": [] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "liu21st", + "email": "liu21st@gmail.com" } - ] - }, - "require": { - "php": ">=7.1.0", - "topthink/framework": "^6.0.0" - }, - "time": "2019-10-29T06:34:59+00:00", - "type": "library", - "extra": { - "think": { - "services": [ - "think\\app\\Service" + ], + "description": "think orm", + "keywords": [ + "database", + "orm" + ], + "install-path": "../topthink/think-orm" + }, + { + "name": "topthink/think-template", + "version": "v2.0.7", + "version_normalized": "2.0.7.0", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-template.git", + "reference": "e98bdbb4a4c94b442f17dfceba81e0134d4fbd19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/think-template/zipball/e98bdbb4a4c94b442f17dfceba81e0134d4fbd19", + "reference": "e98bdbb4a4c94b442f17dfceba81e0134d4fbd19", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } ] - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "think\\app\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - } - ], - "description": "thinkphp6 multi app support" - }, - { - "name": "topthink/think-orm", - "version": "v2.0.27", - "version_normalized": "2.0.27.0", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-orm.git", - "reference": "02affaaccade2cdd8bbb2d2f5d15e46113e6eb50" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-orm/zipball/02affaaccade2cdd8bbb2d2f5d15e46113e6eb50", - "reference": "02affaaccade2cdd8bbb2d2f5d15e46113e6eb50", - "shasum": "", - "mirrors": [ + }, + "require": { + "php": ">=7.1.0", + "psr/simple-cache": "^1.0" + }, + "time": "2019-09-20T15:31:04+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "think\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "liu21st", + "email": "liu21st@gmail.com" } - ] - }, - "require": { - "ext-json": "*", - "php": ">=7.1.0", - "psr/log": "~1.0", - "psr/simple-cache": "^1.0", - "topthink/think-helper": "^3.1" - }, - "time": "2019-10-23T02:16:50+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "think\\": "src" - }, - "files": [] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - } - ], - "description": "think orm", - "keywords": [ - "database", - "orm" - ] - }, - { - "name": "topthink/think-template", - "version": "v2.0.7", - "version_normalized": "2.0.7.0", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-template.git", - "reference": "e98bdbb4a4c94b442f17dfceba81e0134d4fbd19" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-template/zipball/e98bdbb4a4c94b442f17dfceba81e0134d4fbd19", - "reference": "e98bdbb4a4c94b442f17dfceba81e0134d4fbd19", - "shasum": "", - "mirrors": [ + ], + "description": "the php template engine", + "install-path": "../topthink/think-template" + }, + { + "name": "topthink/think-view", + "version": "v1.0.13", + "version_normalized": "1.0.13.0", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-view.git", + "reference": "90803b73f781db5d42619082c4597afc58b2d4c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/think-view/zipball/90803b73f781db5d42619082c4597afc58b2d4c5", + "reference": "90803b73f781db5d42619082c4597afc58b2d4c5", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1.0", + "topthink/think-template": "^2.0" + }, + "time": "2019-10-07T12:23:10+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "think\\view\\driver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "liu21st", + "email": "liu21st@gmail.com" } - ] - }, - "require": { - "php": ">=7.1.0", - "psr/simple-cache": "^1.0" - }, - "time": "2019-09-20T15:31:04+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "think\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - } - ], - "description": "the php template engine" - }, - { - "name": "topthink/think-view", - "version": "v1.0.13", - "version_normalized": "1.0.13.0", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-view.git", - "reference": "90803b73f781db5d42619082c4597afc58b2d4c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-view/zipball/90803b73f781db5d42619082c4597afc58b2d4c5", - "reference": "90803b73f781db5d42619082c4597afc58b2d4c5", - "shasum": "", - "mirrors": [ + ], + "description": "thinkphp template driver", + "install-path": "../topthink/think-view" + }, + { + "name": "zhongshaofa/easy-admin", + "version": "v1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/zhongshaofa/easyadmin-sdk.git", + "reference": "e09be94938283d7c0210a3c04c38287757942a56" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zhongshaofa/easyadmin-sdk/zipball/e09be94938283d7c0210a3c04c38287757942a56", + "reference": "e09be94938283d7c0210a3c04c38287757942a56", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "doctrine/annotations": "^1.13.1", + "ext-json": "*", + "php": ">=7.1.0" + }, + "require-dev": { + "mockery/mockery": "^1.3.0", + "phpunit/phpunit": "^8.5.0" + }, + "time": "2021-09-03T16:09:14+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "EasyAdmin\\": "src", + "MockApp\\": "mock_app", + "Test\\": "tests" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true + "name": "zhongshaofa", + "email": "2286732552@qq.com" } - ] - }, - "require": { - "php": ">=7.1.0", - "topthink/think-template": "^2.0" - }, - "time": "2019-10-07T12:23:10+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "think\\view\\driver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - } - ], - "description": "thinkphp template driver" - } -] + ], + "description": "EasyAdmin工具,https://github.com/zhongshaofa/easyadmin-sdk", + "support": { + "issues": "https://github.com/zhongshaofa/easyadmin-sdk/issues", + "source": "https://github.com/zhongshaofa/easyadmin-sdk/tree/v1.0.1" + }, + "install-path": "../zhongshaofa/easy-admin" + } + ], + "dev": true, + "dev-package-names": [ + "eaglewu/swoole-ide-helper", + "symfony/polyfill-php72", + "symfony/var-dumper" + ] +} diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php new file mode 100644 index 00000000..334cc63d --- /dev/null +++ b/vendor/composer/installed.php @@ -0,0 +1,389 @@ + array( + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'type' => 'project', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'reference' => NULL, + 'name' => 'topthink/think', + 'dev' => true, + ), + 'versions' => array( + 'adbario/php-dot-notation' => array( + 'pretty_version' => '2.2.0', + 'version' => '2.2.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../adbario/php-dot-notation', + 'aliases' => array(), + 'reference' => 'eee4fc81296531e6aafba4c2bbccfc5adab1676e', + 'dev_requirement' => false, + ), + 'alibabacloud/client' => array( + 'pretty_version' => '1.5.18', + 'version' => '1.5.18.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../alibabacloud/client', + 'aliases' => array(), + 'reference' => '5dcf7b8fdfa64abdae7a5ca867289baf95e8e12a', + 'dev_requirement' => false, + ), + 'aliyuncs/oss-sdk-php' => array( + 'pretty_version' => 'v2.3.0', + 'version' => '2.3.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../aliyuncs/oss-sdk-php', + 'aliases' => array(), + 'reference' => 'e69f57916678458642ac9d2fd341ae78a56996c8', + 'dev_requirement' => false, + ), + 'clagiordano/weblibs-configmanager' => array( + 'pretty_version' => 'v1.0.7', + 'version' => '1.0.7.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../clagiordano/weblibs-configmanager', + 'aliases' => array(), + 'reference' => '6ef4c27354368deb2f54b39bbe06601da8c873a0', + 'dev_requirement' => false, + ), + 'danielstjules/stringy' => array( + 'pretty_version' => '3.1.0', + 'version' => '3.1.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../danielstjules/stringy', + 'aliases' => array(), + 'reference' => 'df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e', + 'dev_requirement' => false, + ), + 'doctrine/annotations' => array( + 'pretty_version' => '1.13.2', + 'version' => '1.13.2.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/annotations', + 'aliases' => array(), + 'reference' => '5b668aef16090008790395c02c893b1ba13f7e08', + 'dev_requirement' => false, + ), + 'doctrine/lexer' => array( + 'pretty_version' => '1.2.1', + 'version' => '1.2.1.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/lexer', + 'aliases' => array(), + 'reference' => 'e864bbf5904cb8f5bb334f99209b48018522f042', + 'dev_requirement' => false, + ), + 'eaglewu/swoole-ide-helper' => array( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'type' => 'library', + 'install_path' => __DIR__ . '/../eaglewu/swoole-ide-helper', + 'aliases' => array(), + 'reference' => 'a255daa05feffbf4b88d59897a9470696d2fe259', + 'dev_requirement' => true, + ), + 'guzzlehttp/command' => array( + 'pretty_version' => '1.0.0', + 'version' => '1.0.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../guzzlehttp/command', + 'aliases' => array(), + 'reference' => '2aaa2521a8f8269d6f5dfc13fe2af12c76921034', + 'dev_requirement' => false, + ), + 'guzzlehttp/guzzle' => array( + 'pretty_version' => '6.4.1', + 'version' => '6.4.1.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', + 'aliases' => array(), + 'reference' => '0895c932405407fd3a7368b6910c09a24d26db11', + 'dev_requirement' => false, + ), + 'guzzlehttp/guzzle-services' => array( + 'pretty_version' => '1.1.3', + 'version' => '1.1.3.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../guzzlehttp/guzzle-services', + 'aliases' => array(), + 'reference' => '9e3abf20161cbf662d616cbb995f2811771759f7', + 'dev_requirement' => false, + ), + 'guzzlehttp/promises' => array( + 'pretty_version' => 'v1.3.1', + 'version' => '1.3.1.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../guzzlehttp/promises', + 'aliases' => array(), + 'reference' => 'a59da6cf61d80060647ff4d3eb2c03a2bc694646', + 'dev_requirement' => false, + ), + 'guzzlehttp/psr7' => array( + 'pretty_version' => '1.6.1', + 'version' => '1.6.1.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../guzzlehttp/psr7', + 'aliases' => array(), + 'reference' => '239400de7a173fe9901b9ac7c06497751f00727a', + 'dev_requirement' => false, + ), + 'jianyan74/php-excel' => array( + 'pretty_version' => '1.0.1', + 'version' => '1.0.1.0', + 'type' => 'extension', + 'install_path' => __DIR__ . '/../jianyan74/php-excel', + 'aliases' => array(), + 'reference' => '5b569e16ba35fa48ff7449a7f593172f8284f66b', + 'dev_requirement' => false, + ), + 'league/flysystem' => array( + 'pretty_version' => '1.0.57', + 'version' => '1.0.57.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../league/flysystem', + 'aliases' => array(), + 'reference' => '0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a', + 'dev_requirement' => false, + ), + 'league/flysystem-cached-adapter' => array( + 'pretty_version' => '1.0.9', + 'version' => '1.0.9.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../league/flysystem-cached-adapter', + 'aliases' => array(), + 'reference' => '08ef74e9be88100807a3b92cc9048a312bf01d6f', + 'dev_requirement' => false, + ), + 'markbaker/complex' => array( + 'pretty_version' => '1.4.8', + 'version' => '1.4.8.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../markbaker/complex', + 'aliases' => array(), + 'reference' => '8eaa40cceec7bf0518187530b2e63871be661b72', + 'dev_requirement' => false, + ), + 'markbaker/matrix' => array( + 'pretty_version' => '1.2.0', + 'version' => '1.2.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../markbaker/matrix', + 'aliases' => array(), + 'reference' => '5348c5a67e3b75cd209d70103f916a93b1f1ed21', + 'dev_requirement' => false, + ), + 'mtdowling/jmespath.php' => array( + 'pretty_version' => '2.4.0', + 'version' => '2.4.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../mtdowling/jmespath.php', + 'aliases' => array(), + 'reference' => 'adcc9531682cf87dfda21e1fd5d0e7a41d292fac', + 'dev_requirement' => false, + ), + 'opis/closure' => array( + 'pretty_version' => '3.4.1', + 'version' => '3.4.1.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../opis/closure', + 'aliases' => array(), + 'reference' => 'e79f851749c3caa836d7ccc01ede5828feb762c7', + 'dev_requirement' => false, + ), + 'phpoffice/phpspreadsheet' => array( + 'pretty_version' => '1.12.0', + 'version' => '1.12.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../phpoffice/phpspreadsheet', + 'aliases' => array(), + 'reference' => 'f79611d6dc1f6b7e8e30b738fc371b392001dbfd', + 'dev_requirement' => false, + ), + 'psr/cache' => array( + 'pretty_version' => '1.0.1', + 'version' => '1.0.1.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/cache', + 'aliases' => array(), + 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8', + 'dev_requirement' => false, + ), + 'psr/container' => array( + 'pretty_version' => '1.0.0', + 'version' => '1.0.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/container', + 'aliases' => array(), + 'reference' => 'b7ce3b176482dbbc1245ebf52b181af44c2cf55f', + 'dev_requirement' => false, + ), + 'psr/http-message' => array( + 'pretty_version' => '1.0.1', + 'version' => '1.0.1.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/http-message', + 'aliases' => array(), + 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', + 'dev_requirement' => false, + ), + 'psr/http-message-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.0', + ), + ), + 'psr/log' => array( + 'pretty_version' => '1.1.2', + 'version' => '1.1.2.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/log', + 'aliases' => array(), + 'reference' => '446d54b4cb6bf489fc9d75f55843658e6f25d801', + 'dev_requirement' => false, + ), + 'psr/simple-cache' => array( + 'pretty_version' => '1.0.1', + 'version' => '1.0.1.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/simple-cache', + 'aliases' => array(), + 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b', + 'dev_requirement' => false, + ), + 'qcloud/cos-sdk-v5' => array( + 'pretty_version' => 'v2.0.3', + 'version' => '2.0.3.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../qcloud/cos-sdk-v5', + 'aliases' => array(), + 'reference' => '5dea6bc8be6f8e48fb95a5c4670800d1d796ac42', + 'dev_requirement' => false, + ), + 'qiniu/php-sdk' => array( + 'pretty_version' => 'v7.2.10', + 'version' => '7.2.10.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../qiniu/php-sdk', + 'aliases' => array(), + 'reference' => 'd89987163f560ebf9dfa5bb25de9bd9b1a3b2bd8', + 'dev_requirement' => false, + ), + 'ralouphie/getallheaders' => array( + 'pretty_version' => '3.0.3', + 'version' => '3.0.3.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../ralouphie/getallheaders', + 'aliases' => array(), + 'reference' => '120b605dfeb996808c31b6477290a714d356e822', + 'dev_requirement' => false, + ), + 'symfony/polyfill-mbstring' => array( + 'pretty_version' => 'v1.16.0', + 'version' => '1.16.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', + 'aliases' => array(), + 'reference' => 'a54881ec0ab3b2005c406aed0023c062879031e7', + 'dev_requirement' => false, + ), + 'symfony/polyfill-php72' => array( + 'pretty_version' => 'v1.12.0', + 'version' => '1.12.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-php72', + 'aliases' => array(), + 'reference' => '04ce3335667451138df4307d6a9b61565560199e', + 'dev_requirement' => true, + ), + 'symfony/var-dumper' => array( + 'pretty_version' => 'v4.3.6', + 'version' => '4.3.6.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/var-dumper', + 'aliases' => array(), + 'reference' => 'ea4940845535c85ff5c505e13b3205b0076d07bf', + 'dev_requirement' => true, + ), + 'topthink/framework' => array( + 'pretty_version' => 'v6.0.0', + 'version' => '6.0.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../topthink/framework', + 'aliases' => array(), + 'reference' => '79c555aab0313d1a33ddcdb3c395f2c47f37f597', + 'dev_requirement' => false, + ), + 'topthink/think' => array( + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'type' => 'project', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'reference' => NULL, + 'dev_requirement' => false, + ), + 'topthink/think-captcha' => array( + 'pretty_version' => 'v3.0.2', + 'version' => '3.0.2.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../topthink/think-captcha', + 'aliases' => array(), + 'reference' => '0b4305da19e118cefd934007875a8112f9352f01', + 'dev_requirement' => false, + ), + 'topthink/think-helper' => array( + 'pretty_version' => 'v3.1.4', + 'version' => '3.1.4.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../topthink/think-helper', + 'aliases' => array(), + 'reference' => 'c28d37743bda4a0455286ca85b17b5791d626e10', + 'dev_requirement' => false, + ), + 'topthink/think-multi-app' => array( + 'pretty_version' => 'v1.0.11', + 'version' => '1.0.11.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../topthink/think-multi-app', + 'aliases' => array(), + 'reference' => '215f4a6bb88e53ad41b448c61957336eb55ce6f9', + 'dev_requirement' => false, + ), + 'topthink/think-orm' => array( + 'pretty_version' => 'v2.0.27', + 'version' => '2.0.27.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../topthink/think-orm', + 'aliases' => array(), + 'reference' => '02affaaccade2cdd8bbb2d2f5d15e46113e6eb50', + 'dev_requirement' => false, + ), + 'topthink/think-template' => array( + 'pretty_version' => 'v2.0.7', + 'version' => '2.0.7.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../topthink/think-template', + 'aliases' => array(), + 'reference' => 'e98bdbb4a4c94b442f17dfceba81e0134d4fbd19', + 'dev_requirement' => false, + ), + 'topthink/think-view' => array( + 'pretty_version' => 'v1.0.13', + 'version' => '1.0.13.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../topthink/think-view', + 'aliases' => array(), + 'reference' => '90803b73f781db5d42619082c4597afc58b2d4c5', + 'dev_requirement' => false, + ), + 'zhongshaofa/easy-admin' => array( + 'pretty_version' => 'v1.0.1', + 'version' => '1.0.1.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../zhongshaofa/easy-admin', + 'aliases' => array(), + 'reference' => 'e09be94938283d7c0210a3c04c38287757942a56', + 'dev_requirement' => false, + ), + ), +); diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php new file mode 100644 index 00000000..589e9e77 --- /dev/null +++ b/vendor/composer/platform_check.php @@ -0,0 +1,26 @@ += 70200)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.0". You are running ' . PHP_VERSION . '.'; +} + +if ($issues) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); + } elseif (!headers_sent()) { + echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; + } + } + trigger_error( + 'Composer detected issues in your platform: ' . implode(' ', $issues), + E_USER_ERROR + ); +} diff --git a/vendor/doctrine/annotations/CHANGELOG.md b/vendor/doctrine/annotations/CHANGELOG.md deleted file mode 100644 index 0b0ba1a7..00000000 --- a/vendor/doctrine/annotations/CHANGELOG.md +++ /dev/null @@ -1,162 +0,0 @@ -## Changelog - -### 1.6.1 - -This release fixes an issue in which annotations such as `@foo-bar` -and `@foo-` were incorrectly recognised as valid, and both erroneously -parsed as `@foo`. - -Any annotation with `@name-*` format will now silently be ignored, -allowing vendor-specific annotations to be prefixed with the tool -name. - -Total issues resolved: **3** - -- [165: Update the composer branch alias](https://github.com/doctrine/annotations/pull/165) thanks to @mikeSimonson -- [209: Change Annotation::value typehint to mixed](https://github.com/doctrine/annotations/pull/209) thanks to @malarzm -- [257: Skip parsing annotations containing dashes, such as `@Foo-bar`, or `@Foo-`](https://github.com/doctrine/annotations/pull/257) thanks to @Ocramius - -### 1.6.0 - -This release brings a new endpoint that make sure that you can't shoot yourself in the foot by calling ```registerLoader``` multiple times and a few tests improvements. - -Total issues resolved: **7** - -- [145: Memory leak in AnnotationRegistry::registerLoader() when called multiple times](https://github.com/doctrine/annotations/issues/145) thanks to @TriAnMan -- [146: Import error on @experimental Annotation](https://github.com/doctrine/annotations/issues/146) thanks to @aturki -- [147: Ignoring @experimental annotation used by Symfony 3.3 CacheAdapter](https://github.com/doctrine/annotations/pull/147) thanks to @aturki -- [151: Remove duplicate code in `DCOM58Test`](https://github.com/doctrine/annotations/pull/151) thanks to @tuanphpvn -- [161: Prevent loading class_exists multiple times](https://github.com/doctrine/annotations/pull/161) thanks to @jrjohnson -- [162: Add registerUniqueLoader to AnnotationRegistry](https://github.com/doctrine/annotations/pull/162) thanks to @jrjohnson -- [163: Use assertDirectoryExists and assertDirectoryNotExists](https://github.com/doctrine/annotations/pull/163) thanks to @carusogabriel - -Thanks to everyone involved in this release. - -### 1.5.0 - -This release increments the minimum supported PHP version to 7.1.0. - -Also, HHVM official support has been dropped. - -Some noticeable performance improvements to annotation autoloading -have been applied, making failed annotation autoloading less heavy -on the filesystem access. - -- [133: Add @throws annotation in AnnotationReader#__construct()](https://github.com/doctrine/annotations/issues/133) thanks to @SenseException -- [134: Require PHP 7.1, drop HHVM support](https://github.com/doctrine/annotations/issues/134) thanks to @lcobucci -- [135: Prevent the same loader from being registered twice](https://github.com/doctrine/annotations/issues/135) thanks to @jrjohnson -- [137: #135 optimise multiple class load attempts in AnnotationRegistry](https://github.com/doctrine/annotations/issues/137) thanks to @Ocramius - - -### 1.4.0 - -This release fix an issue were some annotations could be not loaded if the namespace in the use statement started with a backslash. -It also update the tests and drop the support for php 5.X - -- [115: Missing annotations with the latest composer version](https://github.com/doctrine/annotations/issues/115) thanks to @pascalporedda -- [120: Missing annotations with the latest composer version](https://github.com/doctrine/annotations/pull/120) thanks to @gnat42 -- [121: Adding a more detailed explanation of the test](https://github.com/doctrine/annotations/pull/121) thanks to @mikeSimonson -- [101: Test annotation parameters containing space](https://github.com/doctrine/annotations/pull/101) thanks to @mikeSimonson -- [111: Cleanup: move to correct phpunit assertions](https://github.com/doctrine/annotations/pull/111) thanks to @Ocramius -- [112: Removes support for PHP 5.x](https://github.com/doctrine/annotations/pull/112) thanks to @railto -- [113: bumped phpunit version to 5.7](https://github.com/doctrine/annotations/pull/113) thanks to @gabbydgab -- [114: Enhancement: Use SVG Travis build badge](https://github.com/doctrine/annotations/pull/114) thanks to @localheinz -- [118: Integrating PHPStan](https://github.com/doctrine/annotations/pull/118) thanks to @ondrejmirtes - -### 1.3.1 - 2016-12-30 - -This release fixes an issue with ignored annotations that were already -autoloaded, causing the `SimpleAnnotationReader` to pick them up -anyway. [#110](https://github.com/doctrine/annotations/pull/110) - -Additionally, an issue was fixed in the `CachedReader`, which was -not correctly checking the freshness of cached annotations when -traits were defined on a class. [#105](https://github.com/doctrine/annotations/pull/105) - -Total issues resolved: **2** - -- [105: Return single max timestamp](https://github.com/doctrine/annotations/pull/105) -- [110: setIgnoreNotImportedAnnotations(true) didn’t work for existing classes](https://github.com/doctrine/annotations/pull/110) - -### 1.3.0 - -This release introduces a PHP version bump. `doctrine/annotations` now requires PHP -5.6 or later to be installed. - -A series of additional improvements have been introduced: - - * support for PHP 7 "grouped use statements" - * support for ignoring entire namespace names - via `Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredNamespace()` and - `Doctrine\Common\Annotations\DocParser::setIgnoredAnnotationNamespaces()`. This will - allow you to ignore annotations from namespaces that you cannot autoload - * testing all parent classes and interfaces when checking if the annotation cache - in the `CachedReader` is fresh - * simplifying the cache keys used by the `CachedReader`: keys are no longer artificially - namespaced, since `Doctrine\Common\Cache` already supports that - * corrected parsing of multibyte strings when `mbstring.func_overload` is enabled - * corrected parsing of annotations when `"\t"` is put before the first annotation - in a docblock - * allow skipping non-imported annotations when a custom `DocParser` is passed to - the `AnnotationReader` constructor - -Total issues resolved: **15** - -- [45: DocParser can now ignore whole namespaces](https://github.com/doctrine/annotations/pull/45) -- [57: Switch to the docker-based infrastructure on Travis](https://github.com/doctrine/annotations/pull/57) -- [59: opcache.load_comments has been removed from PHP 7](https://github.com/doctrine/annotations/pull/59) -- [62: [CachedReader\ Test traits and parent class to see if cache is fresh](https://github.com/doctrine/annotations/pull/62) -- [65: Remove cache salt making key unnecessarily long](https://github.com/doctrine/annotations/pull/65) -- [66: Fix of incorrect parsing multibyte strings](https://github.com/doctrine/annotations/pull/66) -- [68: Annotations that are indented by tab are not processed.](https://github.com/doctrine/annotations/issues/68) -- [69: Support for Group Use Statements](https://github.com/doctrine/annotations/pull/69) -- [70: Allow tab character before first annotation in DocBlock](https://github.com/doctrine/annotations/pull/70) -- [74: Ignore not registered annotations fix](https://github.com/doctrine/annotations/pull/74) -- [92: Added tests for AnnotationRegistry class.](https://github.com/doctrine/annotations/pull/92) -- [96: Fix/#62 check trait and parent class ttl in annotations](https://github.com/doctrine/annotations/pull/96) -- [97: Feature - #45 - allow ignoring entire namespaces](https://github.com/doctrine/annotations/pull/97) -- [98: Enhancement/#65 remove cache salt from cached reader](https://github.com/doctrine/annotations/pull/98) -- [99: Fix - #70 - allow tab character before first annotation in docblock](https://github.com/doctrine/annotations/pull/99) - -### 1.2.4 - -Total issues resolved: **1** - -- [51: FileCacheReader::saveCacheFile::unlink fix](https://github.com/doctrine/annotations/pull/51) - -### 1.2.3 - -Total issues resolved: [**2**](https://github.com/doctrine/annotations/milestones/v1.2.3) - -- [49: #46 - applying correct `chmod()` to generated cache file](https://github.com/doctrine/annotations/pull/49) -- [50: Hotfix: match escaped quotes (revert #44)](https://github.com/doctrine/annotations/pull/50) - -### 1.2.2 - -Total issues resolved: **4** - -- [43: Exclude files from distribution with .gitattributes](https://github.com/doctrine/annotations/pull/43) -- [44: Update DocLexer.php](https://github.com/doctrine/annotations/pull/44) -- [46: A plain "file_put_contents" can cause havoc](https://github.com/doctrine/annotations/pull/46) -- [48: Deprecating the `FileCacheReader` in 1.2.2: will be removed in 2.0.0](https://github.com/doctrine/annotations/pull/48) - -### 1.2.1 - -Total issues resolved: **4** - -- [38: fixes doctrine/common#326](https://github.com/doctrine/annotations/pull/38) -- [39: Remove superfluous NS](https://github.com/doctrine/annotations/pull/39) -- [41: Warn if load_comments is not enabled.](https://github.com/doctrine/annotations/pull/41) -- [42: Clean up unused uses](https://github.com/doctrine/annotations/pull/42) - -### 1.2.0 - - * HHVM support - * Allowing dangling comma in annotations - * Excluded annotations are no longer autoloaded - * Importing namespaces also in traits - * Added support for `::class` 5.5-style constant, works also in 5.3 and 5.4 - -### 1.1.0 - - * Add Exception when ZendOptimizer+ or Opcache is configured to drop comments diff --git a/vendor/doctrine/annotations/README.md b/vendor/doctrine/annotations/README.md index a53b91f2..c2c7eb7b 100644 --- a/vendor/doctrine/annotations/README.md +++ b/vendor/doctrine/annotations/README.md @@ -1,10 +1,10 @@ # Doctrine Annotations -[![Build Status](https://travis-ci.org/doctrine/annotations.svg?branch=master)](https://travis-ci.org/doctrine/annotations) +[![Build Status](https://github.com/doctrine/annotations/workflows/Continuous%20Integration/badge.svg?label=build)](https://github.com/doctrine/persistence/actions) [![Dependency Status](https://www.versioneye.com/package/php--doctrine--annotations/badge.png)](https://www.versioneye.com/package/php--doctrine--annotations) [![Reference Status](https://www.versioneye.com/php/doctrine:annotations/reference_badge.svg)](https://www.versioneye.com/php/doctrine:annotations/references) [![Total Downloads](https://poser.pugx.org/doctrine/annotations/downloads.png)](https://packagist.org/packages/doctrine/annotations) -[![Latest Stable Version](https://poser.pugx.org/doctrine/annotations/v/stable.png)](https://packagist.org/packages/doctrine/annotations) +[![Latest Stable Version](https://img.shields.io/packagist/v/doctrine/annotations.svg?label=stable)](https://packagist.org/packages/doctrine/annotations) Docblock Annotations Parser library (extracted from [Doctrine Common](https://github.com/doctrine/common)). @@ -12,6 +12,7 @@ Docblock Annotations Parser library (extracted from [Doctrine Common](https://gi See the [doctrine-project website](https://www.doctrine-project.org/projects/doctrine-annotations/en/latest/index.html). -## Changelog +## Contributing -See [CHANGELOG.md](CHANGELOG.md). +When making a pull request, make sure your changes follow the +[Coding Standard Guidelines](https://www.doctrine-project.org/projects/doctrine-coding-standard/en/current/reference/index.html#introduction). diff --git a/vendor/doctrine/annotations/composer.json b/vendor/doctrine/annotations/composer.json index 36fd562d..00d02310 100644 --- a/vendor/doctrine/annotations/composer.json +++ b/vendor/doctrine/annotations/composer.json @@ -3,7 +3,7 @@ "type": "library", "description": "Docblock Annotations Parser", "keywords": ["annotations", "docblock", "parser"], - "homepage": "http://www.doctrine-project.org", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", "license": "MIT", "authors": [ {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, @@ -13,12 +13,17 @@ {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} ], "require": { - "php": "^7.1", - "doctrine/lexer": "1.*" + "php": "^7.1 || ^8.0", + "ext-tokenizer": "*", + "doctrine/lexer": "1.*", + "psr/cache": "^1 || ^2 || ^3" }, "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "^7.5" + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^6.0 || ^8.1", + "phpstan/phpstan": "^0.12.20", + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", + "symfony/cache": "^4.4 || ^5.2" }, "config": { "sort-packages": true @@ -32,12 +37,8 @@ "Doctrine\\Tests\\Common\\Annotations\\": "tests/Doctrine/Tests/Common/Annotations" }, "files": [ + "tests/Doctrine/Tests/Common/Annotations/Fixtures/functions.php", "tests/Doctrine/Tests/Common/Annotations/Fixtures/SingleClassLOC1000.php" ] - }, - "extra": { - "branch-alias": { - "dev-master": "1.7.x-dev" - } } } diff --git a/vendor/doctrine/annotations/docs/en/annotations.rst b/vendor/doctrine/annotations/docs/en/annotations.rst index 99da3e26..2c3c4286 100644 --- a/vendor/doctrine/annotations/docs/en/annotations.rst +++ b/vendor/doctrine/annotations/docs/en/annotations.rst @@ -1,9 +1,10 @@ Handling Annotations ==================== -There are several different approaches to handling annotations in PHP. Doctrine Annotations -maps docblock annotations to PHP classes. Because not all docblock annotations are used -for metadata purposes a filter is applied to ignore or skip classes that are not Doctrine annotations. +There are several different approaches to handling annotations in PHP. +Doctrine Annotations maps docblock annotations to PHP classes. Because +not all docblock annotations are used for metadata purposes a filter is +applied to ignore or skip classes that are not Doctrine annotations. Take a look at the following code snippet: @@ -12,7 +13,7 @@ Take a look at the following code snippet: namespace MyProject\Entities; use Doctrine\ORM\Mapping AS ORM; - use Symfony\Component\Validation\Constraints AS Assert; + use Symfony\Component\Validator\Constraints AS Assert; /** * @author Benjamin Eberlei @@ -39,21 +40,41 @@ Take a look at the following code snippet: In this snippet you can see a variety of different docblock annotations: -- Documentation annotations such as ``@var`` and ``@author``. These annotations are on a blacklist and never considered for throwing an exception due to wrongly used annotations. -- Annotations imported through use statements. The statement ``use Doctrine\ORM\Mapping AS ORM`` makes all classes under that namespace available as ``@ORM\ClassName``. Same goes for the import of ``@Assert``. -- The ``@dummy`` annotation. It is not a documentation annotation and not blacklisted. For Doctrine Annotations it is not entirely clear how to handle this annotation. Depending on the configuration an exception (unknown annotation) will be thrown when parsing this annotation. -- The fully qualified annotation ``@MyProject\Annotations\Foobarable``. This is transformed directly into the given class name. - -How are these annotations loaded? From looking at the code you could guess that the ORM Mapping, Assert Validation and the fully qualified annotation can just be loaded using -the defined PHP autoloaders. This is not the case however: For error handling reasons every check for class existence inside the AnnotationReader sets the second parameter $autoload -of ``class_exists($name, $autoload)`` to false. To work flawlessly the AnnotationReader requires silent autoloaders which many autoloaders are not. Silent autoloading is NOT -part of the `PSR-0 specification `_ for autoloading. - -This is why Doctrine Annotations uses its own autoloading mechanism through a global registry. If you are wondering about the annotation registry being global, -there is no other way to solve the architectural problems of autoloading annotation classes in a straightforward fashion. Additionally if you think about PHP -autoloading then you recognize it is a global as well. - -To anticipate the configuration section, making the above PHP class work with Doctrine Annotations requires this setup: +- Documentation annotations such as ``@var`` and ``@author``. These + annotations are ignored and never considered for throwing an + exception due to wrongly used annotations. +- Annotations imported through use statements. The statement ``use + Doctrine\ORM\Mapping AS ORM`` makes all classes under that namespace + available as ``@ORM\ClassName``. Same goes for the import of + ``@Assert``. +- The ``@dummy`` annotation. It is not a documentation annotation and + not ignored. For Doctrine Annotations it is not entirely clear how + to handle this annotation. Depending on the configuration an exception + (unknown annotation) will be thrown when parsing this annotation. +- The fully qualified annotation ``@MyProject\Annotations\Foobarable``. + This is transformed directly into the given class name. + +How are these annotations loaded? From looking at the code you could +guess that the ORM Mapping, Assert Validation and the fully qualified +annotation can just be loaded using +the defined PHP autoloaders. This is not the case however: For error +handling reasons every check for class existence inside the +``AnnotationReader`` sets the second parameter $autoload +of ``class_exists($name, $autoload)`` to false. To work flawlessly the +``AnnotationReader`` requires silent autoloaders which many autoloaders are +not. Silent autoloading is NOT part of the `PSR-0 specification +`_ +for autoloading. + +This is why Doctrine Annotations uses its own autoloading mechanism +through a global registry. If you are wondering about the annotation +registry being global, there is no other way to solve the architectural +problems of autoloading annotation classes in a straightforward fashion. +Additionally if you think about PHP autoloading then you recognize it is +a global as well. + +To anticipate the configuration section, making the above PHP class work +with Doctrine Annotations requires this setup: .. code-block:: php @@ -67,74 +88,68 @@ To anticipate the configuration section, making the above PHP class work with Do $reader = new AnnotationReader(); AnnotationReader::addGlobalIgnoredName('dummy'); -The second block with the annotation registry calls registers all the three different annotation namespaces that are used. -Doctrine saves all its annotations in a single file, that is why ``AnnotationRegistry#registerFile`` is used in contrast to -``AnnotationRegistry#registerAutoloadNamespace`` which creates a PSR-0 compatible loading mechanism for class to file names. +The second block with the annotation registry calls registers all the +three different annotation namespaces that are used. +Doctrine Annotations saves all its annotations in a single file, that is +why ``AnnotationRegistry#registerFile`` is used in contrast to +``AnnotationRegistry#registerAutoloadNamespace`` which creates a PSR-0 +compatible loading mechanism for class to file names. -In the third block, we create the actual AnnotationReader instance. Note that we also add "dummy" to the global list of annotations -for which we do not throw exceptions. Setting this is necessary in our example case, otherwise ``@dummy`` would trigger an exception to -be thrown during the parsing of the docblock of ``MyProject\Entities\User#id``. +In the third block, we create the actual ``AnnotationReader`` instance. +Note that we also add ``dummy`` to the global list of ignored +annotations for which we do not throw exceptions. Setting this is +necessary in our example case, otherwise ``@dummy`` would trigger an +exception to be thrown during the parsing of the docblock of +``MyProject\Entities\User#id``. Setup and Configuration ----------------------- -To use the annotations library is simple, you just need to create a new ``AnnotationReader`` instance: +To use the annotations library is simple, you just need to create a new +``AnnotationReader`` instance: .. code-block:: php $reader = new \Doctrine\Common\Annotations\AnnotationReader(); -This creates a simple annotation reader with no caching other than in memory (in php arrays). -Since parsing docblocks can be expensive you should cache this process by using -a caching reader. +This creates a simple annotation reader with no caching other than in +memory (in php arrays). Since parsing docblocks can be expensive you +should cache this process by using a caching reader. -You can use a file caching reader: +To cache annotations, you can create a ``Doctrine\Common\Annotations\PsrCachedReader``. +This reader decorates the original reader and stores all annotations in a PSR-6 +cache: .. code-block:: php - use Doctrine\Common\Annotations\FileCacheReader; use Doctrine\Common\Annotations\AnnotationReader; + use Doctrine\Common\Annotations\PsrCachedReader; - $reader = new FileCacheReader( - new AnnotationReader(), - "/path/to/cache", - $debug = true - ); - -If you set the debug flag to true the cache reader will check for changes in the original files, which -is very important during development. If you don't set it to true you have to delete the directory to clear the cache. -This gives faster performance, however should only be used in production, because of its inconvenience -during development. + $cache = ... // instantiate a PSR-6 Cache pool -You can also use one of the ``Doctrine\Common\Cache\Cache`` cache implementations to cache the annotations: - -.. code-block:: php - - use Doctrine\Common\Annotations\AnnotationReader; - use Doctrine\Common\Annotations\CachedReader; - use Doctrine\Common\Cache\ApcCache; - - $reader = new CachedReader( + $reader = new PsrCachedReader( new AnnotationReader(), - new ApcCache(), + $cache, $debug = true ); -The debug flag is used here as well to invalidate the cache files when the PHP class with annotations changed -and should be used during development. +The ``debug`` flag is used here as well to invalidate the cache files +when the PHP class with annotations changed and should be used during +development. .. warning :: - The AnnotationReader works and caches under the + The ``AnnotationReader`` works and caches under the assumption that all annotations of a doc-block are processed at once. That means that annotation classes that do not exist and - aren't loaded and cannot be autoloaded (using the AnnotationRegistry) would never be visible and not - accessible if a cache is used unless the cache is cleared and the - annotations requested again, this time with all annotations - defined. + aren't loaded and cannot be autoloaded (using the + AnnotationRegistry) would never be visible and not accessible if a + cache is used unless the cache is cleared and the annotations + requested again, this time with all annotations defined. -By default the annotation reader returns a list of annotations with numeric indexes. If you want your annotations -to be indexed by their class name you can wrap the reader in an IndexedReader: +By default the annotation reader returns a list of annotations with +numeric indexes. If you want your annotations to be indexed by their +class name you can wrap the reader in an ``IndexedReader``: .. code-block:: php @@ -145,31 +160,41 @@ to be indexed by their class name you can wrap the reader in an IndexedReader: .. warning:: - You should never wrap the indexed reader inside a cached reader only the other way around. This way you can re-use - the cache with indexed or numeric keys, otherwise your code may experience failures due to caching in an numerical - or indexed format. + You should never wrap the indexed reader inside a cached reader, + only the other way around. This way you can re-use the cache with + indexed or numeric keys, otherwise your code may experience failures + due to caching in a numerical or indexed format. Registering Annotations ~~~~~~~~~~~~~~~~~~~~~~~ -As explained in the Introduction Doctrine Annotations uses its own autoloading mechanism to determine if a -given annotation has a corresponding PHP class that can be autoloaded. For Annotation Autoloading you have -to configure the ``Doctrine\Common\Annotations\AnnotationRegistry``. There are three different mechanisms -to configure annotation autoloading: - -- Calling ``AnnotationRegistry#registerFile($file)`` to register a file that contains one or more Annotation classes. -- Calling ``AnnotationRegistry#registerNamespace($namespace, $dirs = null)`` to register that the given namespace - contains annotations and that their base directory is located at the given $dirs or in the include path if NULL is passed. - The given directories should *NOT* be the directory where classes of the namespace are in, but the base directory - of the root namespace. The AnnotationRegistry uses a namespace to directory separator approach to resolve the correct path. -- Calling ``AnnotationRegistry#registerLoader($callable)`` to register an autoloader callback. The callback accepts the - class as first and only parameter and has to return true if the corresponding file was found and included. +As explained in the introduction, Doctrine Annotations uses its own +autoloading mechanism to determine if a given annotation has a +corresponding PHP class that can be autoloaded. For annotation +autoloading you have to configure the +``Doctrine\Common\Annotations\AnnotationRegistry``. There are three +different mechanisms to configure annotation autoloading: + +- Calling ``AnnotationRegistry#registerFile($file)`` to register a file + that contains one or more annotation classes. +- Calling ``AnnotationRegistry#registerNamespace($namespace, $dirs = + null)`` to register that the given namespace contains annotations and + that their base directory is located at the given $dirs or in the + include path if ``NULL`` is passed. The given directories should *NOT* + be the directory where classes of the namespace are in, but the base + directory of the root namespace. The AnnotationRegistry uses a + namespace to directory separator approach to resolve the correct path. +- Calling ``AnnotationRegistry#registerLoader($callable)`` to register + an autoloader callback. The callback accepts the class as first and + only parameter and has to return ``true`` if the corresponding file + was found and included. .. note:: - Loaders have to fail silently, if a class is not found even if it matches for example the namespace prefix of that loader. - Never is a loader to throw a warning or exception if the loading failed otherwise parsing doc block annotations will become - a huge pain. + Loaders have to fail silently, if a class is not found even if it + matches for example the namespace prefix of that loader. Never is a + loader to throw a warning or exception if the loading failed + otherwise parsing doc block annotations will become a huge pain. A sample loader callback could look like: @@ -182,7 +207,7 @@ A sample loader callback could look like: $file = str_replace("\\", DIRECTORY_SEPARATOR, $class) . ".php"; if (file_exists("/my/base/path/" . $file)) { - // file exists makes sure that the loader fails silently + // file_exists() makes sure that the loader fails silently require "/my/base/path/" . $file; } }); @@ -194,13 +219,15 @@ A sample loader callback could look like: Ignoring missing exceptions ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -By default an exception is thrown from the AnnotationReader if an annotation was found that: +By default an exception is thrown from the ``AnnotationReader`` if an +annotation was found that: -- Is not part of the blacklist of ignored "documentation annotations". -- Was not imported through a use statement -- Is not a fully qualified class that exists +- is not part of the list of ignored "documentation annotations"; +- was not imported through a use statement; +- is not a fully qualified class that exists. -You can disable this behavior for specific names if your docblocks do not follow strict requirements: +You can disable this behavior for specific names if your docblocks do +not follow strict requirements: .. code-block:: php @@ -210,12 +237,14 @@ You can disable this behavior for specific names if your docblocks do not follow PHP Imports ~~~~~~~~~~~ -By default the annotation reader parses the use-statement of a php file to gain access to the import rules -and register them for the annotation processing. Only if you are using PHP Imports you can validate the correct -usage of annotations and throw exceptions if you misspelled an annotation. This mechanism is enabled by default. +By default the annotation reader parses the use-statement of a php file +to gain access to the import rules and register them for the annotation +processing. Only if you are using PHP Imports can you validate the +correct usage of annotations and throw exceptions if you misspelled an +annotation. This mechanism is enabled by default. -To ease the upgrade path, we still allow you to disable this mechanism. Note however that we will remove this -in future versions: +To ease the upgrade path, we still allow you to disable this mechanism. +Note however that we will remove this in future versions: .. code-block:: php diff --git a/vendor/doctrine/annotations/docs/en/custom.rst b/vendor/doctrine/annotations/docs/en/custom.rst index 860c6e67..11fbe1a3 100644 --- a/vendor/doctrine/annotations/docs/en/custom.rst +++ b/vendor/doctrine/annotations/docs/en/custom.rst @@ -1,8 +1,10 @@ Custom Annotation Classes ========================= -If you want to define your own annotations you just have to group them in a namespace and register this namespace -in the AnnotationRegistry. Annotation classes have to contain a class-level docblock with the text ``@Annotation``: +If you want to define your own annotations, you just have to group them +in a namespace and register this namespace in the ``AnnotationRegistry``. +Annotation classes have to contain a class-level docblock with the text +``@Annotation``: .. code-block:: php @@ -17,8 +19,9 @@ in the AnnotationRegistry. Annotation classes have to contain a class-level docb Inject annotation values ------------------------ -The annotation parser check if the annotation constructor has arguments, -if so then we will pass the value array, otherwise will try to inject values into public properties directly: +The annotation parser checks if the annotation constructor has arguments, +if so then it will pass the value array, otherwise it will try to inject +values into public properties directly: .. code-block:: php @@ -50,19 +53,96 @@ if so then we will pass the value array, otherwise will try to inject values int public $bar; } +Optional: Constructors with Named Parameters +-------------------------------------------- + +Starting with Annotations v1.11 a new annotation instantiation strategy +is available that aims at compatibility of Annotation classes with the PHP 8 +attribute feature. You need to declare a constructor with regular parameter +names that match the named arguments in the annotation syntax. + +To enable this feature, you can tag your annotation class with +``@NamedArgumentConstructor`` (available from v1.12) or implement the +``Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation`` interface +(available from v1.11 and deprecated as of v1.12). +When using the ``@NamedArgumentConstructor`` tag, the first argument of the +constructor is considered as the default one. + + +Usage with the ``@NamedArgumentContrustor`` tag + +.. code-block:: php + + namespace MyCompany\Annotations; + + /** + * @Annotation + * @NamedArgumentConstructor + */ + class Bar implements NamedArgumentConstructorAnnotation + { + private $foo; + + public function __construct(string $foo) + { + $this->foo = $foo; + } + } + + /** Usable with @Bar(foo="baz") */ + /** Usable with @Bar("baz") */ + +In combination with PHP 8's constructor property promotion feature +you can simplify this to: + +.. code-block:: php + + namespace MyCompany\Annotations; + + /** + * @Annotation + * @NamedArgumentConstructor + */ + class Bar implements NamedArgumentConstructorAnnotation + { + public function __construct(private string $foo) {} + } + + +Usage with the +``Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation`` +interface (v1.11, deprecated as of v1.12): +.. code-block:: php + + namespace MyCompany\Annotations; + + use Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation; + + /** @Annotation */ + class Bar implements NamedArgumentConstructorAnnotation + { + private $foo; + + public function __construct(private string $foo) {} + } + + /** Usable with @Bar(foo="baz") */ + Annotation Target ----------------- -``@Target`` indicates the kinds of class element to which an annotation type is applicable. -Then you could define one or more targets: +``@Target`` indicates the kinds of class elements to which an annotation +type is applicable. Then you could define one or more targets: -- ``CLASS`` Allowed in the class docblock -- ``PROPERTY`` Allowed in the property docblock -- ``METHOD`` Allowed in the method docblock -- ``ALL`` Allowed in the class, property and method docblock +- ``CLASS`` Allowed in class docblocks +- ``PROPERTY`` Allowed in property docblocks +- ``METHOD`` Allowed in the method docblocks +- ``FUNCTION`` Allowed in function dockblocks +- ``ALL`` Allowed in class, property, method and function docblocks - ``ANNOTATION`` Allowed inside other annotations -If the annotations is not allowed in the current context you got an ``AnnotationException`` +If the annotations is not allowed in the current context, an +``AnnotationException`` is thrown. .. code-block:: php @@ -89,11 +169,12 @@ If the annotations is not allowed in the current context you got an ``Annotation Attribute types --------------- -Annotation parser check the given parameters using the phpdoc annotation ``@var``, -The data type could be validated using the ``@var`` annotation on the annotation properties -or using the annotations ``@Attributes`` and ``@Attribute``. +The annotation parser checks the given parameters using the phpdoc +annotation ``@var``, The data type could be validated using the ``@var`` +annotation on the annotation properties or using the ``@Attributes`` and +``@Attribute`` annotations. -If the data type not match you got an ``AnnotationException`` +If the data type does not match you get an ``AnnotationException`` .. code-block:: php @@ -158,8 +239,9 @@ If the data type not match you got an ``AnnotationException`` Annotation Required ------------------- -``@Required`` indicates that the field must be specified when the annotation is used. -If it is not used you get an ``AnnotationException`` stating that this value can not be null. +``@Required`` indicates that the field must be specified when the +annotation is used. If it is not used you get an ``AnnotationException`` +stating that this value can not be null. Declaring a required field: @@ -189,9 +271,12 @@ Usage: Enumerated values ----------------- -- An annotation property marked with ``@Enum`` is a field that accept a fixed set of scalar values. -- You should use ``@Enum`` fields any time you need to represent fixed values. -- The annotation parser check the given value and throws an ``AnnotationException`` if the value not match. +- An annotation property marked with ``@Enum`` is a field that accepts a + fixed set of scalar values. +- You should use ``@Enum`` fields any time you need to represent fixed + values. +- The annotation parser checks the given value and throws an + ``AnnotationException`` if the value does not match. Declaring an enumerated property: @@ -224,9 +309,10 @@ Annotation usage: Constants --------- -The use of constants and class constants are available on the annotations parser. +The use of constants and class constants is available on the annotations +parser. -The following usage are allowed: +The following usages are allowed: .. code-block:: php @@ -251,15 +337,17 @@ Be careful with constants and the cache ! .. note:: - The cached reader will not re-evaluate each time an annotation is loaded from cache. - When a constant is changed the cache must be cleaned. + The cached reader will not re-evaluate each time an annotation is + loaded from cache. When a constant is changed the cache must be + cleaned. Usage ----- -Using the library API is simple. Using the annotations described in the previous section -you can now annotate other classes with your annotations: +Using the library API is simple. Using the annotations described in the +previous section, you can now annotate other classes with your +annotations: .. code-block:: php @@ -291,8 +379,8 @@ Now we can write a script to get the annotations above: } } -You have a complete API for retrieving annotation class instances -from a class, property or method docblock: +You have a complete API for retrieving annotation class instances from a +class, property or method docblock: Reader API @@ -339,3 +427,17 @@ Access one annotation of a property .. code-block:: php public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName); + +Access all annotations of a function +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: php + + public function getFunctionAnnotations(\ReflectionFunction $property); + +Access one annotation of a function +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: php + + public function getFunctionAnnotation(\ReflectionFunction $property, $annotationName); diff --git a/vendor/doctrine/annotations/docs/en/index.rst b/vendor/doctrine/annotations/docs/en/index.rst index 3ac67033..95476c31 100644 --- a/vendor/doctrine/annotations/docs/en/index.rst +++ b/vendor/doctrine/annotations/docs/en/index.rst @@ -1,8 +1,8 @@ Introduction ============ -Doctrine Annotations offers to implement custom annotation -functionality for PHP classes. +Doctrine Annotations allows to implement custom annotation +functionality for PHP classes and functions. .. code-block:: php @@ -14,14 +14,13 @@ functionality for PHP classes. private $bar; } -Annotations aren't implemented in PHP itself which is why -this component offers a way to use the PHP doc-blocks as a -place for the well known annotation syntax using the -``@`` char. +Annotations aren't implemented in PHP itself which is why this component +offers a way to use the PHP doc-blocks as a place for the well known +annotation syntax using the ``@`` char. -Annotations in Doctrine are used for the ORM -configuration to build the class mapping, but it can -be used in other projects for other purposes too. +Annotations in Doctrine are used for the ORM configuration to build the +class mapping, but it can be used in other projects for other purposes +too. Installation ============ @@ -35,9 +34,9 @@ You can install the Annotation component with composer: Create an annotation class ========================== -An annotation class is a representation of the later -used annotation configuration in classes. The annotation -class of the previous example looks like this: +An annotation class is a representation of the later used annotation +configuration in classes. The annotation class of the previous example +looks like this: .. code-block:: php @@ -49,32 +48,44 @@ class of the previous example looks like this: public $myProperty; } -The annotation class is declared as an annotation by -``@Annotation``. +The annotation class is declared as an annotation by ``@Annotation``. :ref:`Read more about custom annotations. ` Reading annotations =================== -The access to the annotations happens by reflection of the class +The access to the annotations happens by reflection of the class or function containing them. There are multiple reader-classes implementing the -``Doctrine\Common\Annotations\Reader`` interface, that can -access the annotations of a class. A common one is +``Doctrine\Common\Annotations\Reader`` interface, that can access the +annotations of a class. A common one is ``Doctrine\Common\Annotations\AnnotationReader``: .. code-block:: php + use Doctrine\Common\Annotations\AnnotationReader; + use Doctrine\Common\Annotations\AnnotationRegistry; + + // Deprecated and will be removed in 2.0 but currently needed + AnnotationRegistry::registerLoader('class_exists'); + $reflectionClass = new ReflectionClass(Foo::class); $property = $reflectionClass->getProperty('bar'); $reader = new AnnotationReader(); - $myAnnotation = $reader->getPropertyAnnotation($property, 'bar'); + $myAnnotation = $reader->getPropertyAnnotation( + $property, + MyAnnotation::class + ); echo $myAnnotation->myProperty; // result: "value" -A reader has multiple methods to access the annotations -of a class. +Note that ``AnnotationRegistry::registerLoader('class_exists')`` only works +if you already have an autoloader configured (i.e. composer autoloader). +Otherwise, :ref:`please take a look to the other annotation autoload mechanisms `. + +A reader has multiple methods to access the annotations of a class or +function. :ref:`Read more about handling annotations. ` @@ -83,8 +94,8 @@ IDE Support Some IDEs already provide support for annotations: -- Eclipse via the `Symfony2 Plugin `_ -- PHPStorm via the `PHP Annotations Plugin `_ or the `Symfony2 Plugin `_ +- Eclipse via the `Symfony2 Plugin `_ +- PhpStorm via the `PHP Annotations Plugin `_ or the `Symfony Plugin `_ .. _Read more about handling annotations.: annotations .. _Read more about custom annotations.: custom diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php index a79a0f8f..750270e4 100644 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php @@ -1,47 +1,27 @@ . - */ namespace Doctrine\Common\Annotations; +use BadMethodCallException; + +use function sprintf; + /** * Annotations class. - * - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel */ class Annotation { /** * Value property. Common among all derived classes. * - * @var string + * @var mixed */ public $value; /** - * Constructor. - * - * @param array $data Key-value for properties to be defined in this class. + * @param array $data Key-value for properties to be defined in this class. */ - public final function __construct(array $data) + final public function __construct(array $data) { foreach ($data as $key => $value) { $this->$key = $value; @@ -53,12 +33,12 @@ public final function __construct(array $data) * * @param string $name Unknown property name. * - * @throws \BadMethodCallException + * @throws BadMethodCallException */ public function __get($name) { - throw new \BadMethodCallException( - sprintf("Unknown property '%s' on annotation '%s'.", $name, get_class($this)) + throw new BadMethodCallException( + sprintf("Unknown property '%s' on annotation '%s'.", $name, static::class) ); } @@ -68,12 +48,12 @@ public function __get($name) * @param string $name Unknown property name. * @param mixed $value Property value. * - * @throws \BadMethodCallException + * @throws BadMethodCallException */ public function __set($name, $value) { - throw new \BadMethodCallException( - sprintf("Unknown property '%s' on annotation '%s'.", $name, get_class($this)) + throw new BadMethodCallException( + sprintf("Unknown property '%s' on annotation '%s'.", $name, static::class) ); } } diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php index dbef6df0..b1f85140 100644 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php @@ -1,47 +1,21 @@ . - */ - namespace Doctrine\Common\Annotations\Annotation; /** * Annotation that can be used to signal to the parser * to check the attribute type during the parsing process. * - * @author Fabio B. Silva - * * @Annotation */ final class Attribute { - /** - * @var string - */ + /** @var string */ public $name; - /** - * @var string - */ + /** @var string */ public $type; - /** - * @var boolean - */ + /** @var bool */ public $required = false; } diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php index 53134e30..8f758f3f 100644 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php @@ -1,37 +1,15 @@ . - */ - namespace Doctrine\Common\Annotations\Annotation; /** * Annotation that can be used to signal to the parser * to check the types of all declared attributes during the parsing process. * - * @author Fabio B. Silva - * * @Annotation */ final class Attributes { - /** - * @var array - */ + /** @var array */ public $value; } diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php index 82f6241e..35d6410b 100644 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php @@ -1,32 +1,20 @@ . - */ - namespace Doctrine\Common\Annotations\Annotation; +use InvalidArgumentException; + +use function get_class; +use function gettype; +use function in_array; +use function is_object; +use function is_scalar; +use function sprintf; + /** * Annotation that can be used to signal to the parser * to check the available values during the parsing process. * - * @since 2.4 - * @author Fabio B. Silva - * * @Annotation * @Attributes({ * @Attribute("value", required = true, type = "array"), @@ -35,34 +23,30 @@ */ final class Enum { - /** - * @var array - */ + /** @phpstan-var list */ public $value; /** * Literal target declaration. * - * @var array + * @var mixed[] */ public $literal; /** - * Annotation constructor. - * - * @param array $values + * @throws InvalidArgumentException * - * @throws \InvalidArgumentException + * @phpstan-param array{literal?: mixed[], value: list} $values */ public function __construct(array $values) { - if ( ! isset($values['literal'])) { + if (! isset($values['literal'])) { $values['literal'] = []; } foreach ($values['value'] as $var) { - if( ! is_scalar($var)) { - throw new \InvalidArgumentException(sprintf( + if (! is_scalar($var)) { + throw new InvalidArgumentException(sprintf( '@Enum supports only scalar values "%s" given.', is_object($var) ? get_class($var) : gettype($var) )); @@ -70,15 +54,16 @@ public function __construct(array $values) } foreach ($values['literal'] as $key => $var) { - if( ! in_array($key, $values['value'])) { - throw new \InvalidArgumentException(sprintf( + if (! in_array($key, $values['value'])) { + throw new InvalidArgumentException(sprintf( 'Undefined enumerator value "%s" for literal "%s".', - $key , $var + $key, + $var )); } } - $this->value = $values['value']; - $this->literal = $values['literal']; + $this->value = $values['value']; + $this->literal = $values['literal']; } } diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php index 85ec3d6d..ae60f7d5 100644 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php @@ -1,52 +1,41 @@ . - */ namespace Doctrine\Common\Annotations\Annotation; +use RuntimeException; + +use function is_array; +use function is_string; +use function json_encode; +use function sprintf; + /** * Annotation that can be used to signal to the parser to ignore specific * annotations during the parsing process. * * @Annotation - * @author Johannes M. Schmitt */ final class IgnoreAnnotation { - /** - * @var array - */ + /** @phpstan-var list */ public $names; /** - * Constructor. + * @throws RuntimeException * - * @param array $values - * - * @throws \RuntimeException + * @phpstan-param array{value: string|list} $values */ public function __construct(array $values) { if (is_string($values['value'])) { $values['value'] = [$values['value']]; } - if (!is_array($values['value'])) { - throw new \RuntimeException(sprintf('@IgnoreAnnotation expects either a string name, or an array of strings, but got %s.', json_encode($values['value']))); + + if (! is_array($values['value'])) { + throw new RuntimeException(sprintf( + '@IgnoreAnnotation expects either a string name, or an array of strings, but got %s.', + json_encode($values['value']) + )); } $this->names = $values['value']; diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php new file mode 100644 index 00000000..16906010 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php @@ -0,0 +1,13 @@ +. - */ - namespace Doctrine\Common\Annotations\Annotation; /** * Annotation that can be used to signal to the parser * to check if that attribute is required during the parsing process. * - * @author Fabio B. Silva - * * @Annotation */ final class Required diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php index a52972b8..7fd75e2b 100644 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php @@ -1,89 +1,79 @@ . - */ - namespace Doctrine\Common\Annotations\Annotation; +use InvalidArgumentException; + +use function array_keys; +use function get_class; +use function gettype; +use function implode; +use function is_array; +use function is_object; +use function is_string; +use function sprintf; + /** * Annotation that can be used to signal to the parser * to check the annotation target during the parsing process. * - * @author Fabio B. Silva - * * @Annotation */ final class Target { - const TARGET_CLASS = 1; - const TARGET_METHOD = 2; - const TARGET_PROPERTY = 4; - const TARGET_ANNOTATION = 8; - const TARGET_ALL = 15; + public const TARGET_CLASS = 1; + public const TARGET_METHOD = 2; + public const TARGET_PROPERTY = 4; + public const TARGET_ANNOTATION = 8; + public const TARGET_FUNCTION = 16; + public const TARGET_ALL = 31; - /** - * @var array - */ + /** @var array */ private static $map = [ 'ALL' => self::TARGET_ALL, 'CLASS' => self::TARGET_CLASS, 'METHOD' => self::TARGET_METHOD, 'PROPERTY' => self::TARGET_PROPERTY, + 'FUNCTION' => self::TARGET_FUNCTION, 'ANNOTATION' => self::TARGET_ANNOTATION, ]; - /** - * @var array - */ + /** @phpstan-var list */ public $value; /** * Targets as bitmask. * - * @var integer + * @var int */ public $targets; /** * Literal target declaration. * - * @var integer + * @var string */ public $literal; /** - * Annotation constructor. - * - * @param array $values + * @throws InvalidArgumentException * - * @throws \InvalidArgumentException + * @phpstan-param array{value?: string|list} $values */ public function __construct(array $values) { - if (!isset($values['value'])){ + if (! isset($values['value'])) { $values['value'] = null; } - if (is_string($values['value'])){ + + if (is_string($values['value'])) { $values['value'] = [$values['value']]; } - if (!is_array($values['value'])){ - throw new \InvalidArgumentException( - sprintf('@Target expects either a string value, or an array of strings, "%s" given.', + + if (! is_array($values['value'])) { + throw new InvalidArgumentException( + sprintf( + '@Target expects either a string value, or an array of strings, "%s" given.', is_object($values['value']) ? get_class($values['value']) : gettype($values['value']) ) ); @@ -91,17 +81,21 @@ public function __construct(array $values) $bitmask = 0; foreach ($values['value'] as $literal) { - if(!isset(self::$map[$literal])){ - throw new \InvalidArgumentException( - sprintf('Invalid Target "%s". Available targets: [%s]', - $literal, implode(', ', array_keys(self::$map))) + if (! isset(self::$map[$literal])) { + throw new InvalidArgumentException( + sprintf( + 'Invalid Target "%s". Available targets: [%s]', + $literal, + implode(', ', array_keys(self::$map)) + ) ); } + $bitmask |= self::$map[$literal]; } - $this->targets = $bitmask; - $this->value = $values['value']; - $this->literal = implode(', ', $this->value); + $this->targets = $bitmask; + $this->value = $values['value']; + $this->literal = implode(', ', $this->value); } } diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php index d06fe663..b1ea64e6 100644 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php @@ -1,34 +1,19 @@ . - */ namespace Doctrine\Common\Annotations; +use Exception; + +use function get_class; +use function gettype; +use function implode; +use function is_object; +use function sprintf; + /** * Description of AnnotationException - * - * @since 2.0 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel */ -class AnnotationException extends \Exception +class AnnotationException extends Exception { /** * Creates a new AnnotationException describing a Syntax error. @@ -58,8 +43,6 @@ public static function semanticalError($message) * Creates a new AnnotationException describing an error which occurred during * the creation of the annotation. * - * @since 2.2 - * * @param string $message * * @return AnnotationException @@ -72,8 +55,6 @@ public static function creationError($message) /** * Creates a new AnnotationException describing a type error. * - * @since 1.1 - * * @param string $message * * @return AnnotationException @@ -86,8 +67,6 @@ public static function typeError($message) /** * Creates a new AnnotationException describing a constant semantical error. * - * @since 2.3 - * * @param string $identifier * @param string $context * @@ -105,8 +84,6 @@ public static function semanticalErrorConstants($identifier, $context = null) /** * Creates a new AnnotationException describing an type error of an attribute. * - * @since 2.2 - * * @param string $attributeName * @param string $annotationName * @param string $context @@ -130,8 +107,6 @@ public static function attributeTypeError($attributeName, $annotationName, $cont /** * Creates a new AnnotationException describing an required error of an attribute. * - * @since 2.2 - * * @param string $attributeName * @param string $annotationName * @param string $context @@ -153,21 +128,20 @@ public static function requiredError($attributeName, $annotationName, $context, /** * Creates a new AnnotationException describing a invalid enummerator. * - * @since 2.4 - * * @param string $attributeName * @param string $annotationName * @param string $context - * @param array $available * @param mixed $given * * @return AnnotationException + * + * @phpstan-param list $available */ public static function enumeratorError($attributeName, $annotationName, $context, $available, $given) { return new self(sprintf( - '[Enum Error] Attribute "%s" of @%s declared on %s accept only [%s], but got %s.', - $attributeName, + '[Enum Error] Attribute "%s" of @%s declared on %s accepts only [%s], but got %s.', + $attributeName, $annotationName, $context, implode(', ', $available), @@ -181,7 +155,7 @@ public static function enumeratorError($attributeName, $annotationName, $context public static function optimizerPlusSaveComments() { return new self( - "You have to enable opcache.save_comments=1 or zend_optimizerplus.save_comments=1." + 'You have to enable opcache.save_comments=1 or zend_optimizerplus.save_comments=1.' ); } @@ -191,7 +165,7 @@ public static function optimizerPlusSaveComments() public static function optimizerPlusLoadComments() { return new self( - "You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1." + 'You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1.' ); } } diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php index 0b904298..1f538ee5 100644 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php @@ -1,48 +1,31 @@ . - */ namespace Doctrine\Common\Annotations; use Doctrine\Common\Annotations\Annotation\IgnoreAnnotation; use Doctrine\Common\Annotations\Annotation\Target; use ReflectionClass; +use ReflectionFunction; use ReflectionMethod; use ReflectionProperty; +use function array_merge; +use function class_exists; +use function extension_loaded; +use function ini_get; + /** * A reader for docblock annotations. - * - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Johannes M. Schmitt */ class AnnotationReader implements Reader { /** * Global map for imports. * - * @var array + * @var array */ private static $globalImports = [ - 'ignoreannotation' => 'Doctrine\Common\Annotations\Annotation\IgnoreAnnotation', + 'ignoreannotation' => Annotation\IgnoreAnnotation::class, ]; /** @@ -50,71 +33,16 @@ class AnnotationReader implements Reader * * The names are case sensitive. * - * @var array + * @var array */ - private static $globalIgnoredNames = [ - // Annotation tags - 'Annotation' => true, 'Attribute' => true, 'Attributes' => true, - /* Can we enable this? 'Enum' => true, */ - 'Required' => true, - 'Target' => true, - // Widely used tags (but not existent in phpdoc) - 'fix' => true , 'fixme' => true, - 'override' => true, - // PHPDocumentor 1 tags - 'abstract'=> true, 'access'=> true, - 'code' => true, - 'deprec'=> true, - 'endcode' => true, 'exception'=> true, - 'final'=> true, - 'ingroup' => true, 'inheritdoc'=> true, 'inheritDoc'=> true, - 'magic' => true, - 'name'=> true, - 'toc' => true, 'tutorial'=> true, - 'private' => true, - 'static'=> true, 'staticvar'=> true, 'staticVar'=> true, - 'throw' => true, - // PHPDocumentor 2 tags. - 'api' => true, 'author'=> true, - 'category'=> true, 'copyright'=> true, - 'deprecated'=> true, - 'example'=> true, - 'filesource'=> true, - 'global'=> true, - 'ignore'=> true, /* Can we enable this? 'index' => true, */ 'internal'=> true, - 'license'=> true, 'link'=> true, - 'method' => true, - 'package'=> true, 'param'=> true, 'property' => true, 'property-read' => true, 'property-write' => true, - 'return'=> true, - 'see'=> true, 'since'=> true, 'source' => true, 'subpackage'=> true, - 'throws'=> true, 'todo'=> true, 'TODO'=> true, - 'usedby'=> true, 'uses' => true, - 'var'=> true, 'version'=> true, - // PHPUnit tags - 'codeCoverageIgnore' => true, 'codeCoverageIgnoreStart' => true, 'codeCoverageIgnoreEnd' => true, - // PHPCheckStyle - 'SuppressWarnings' => true, - // PHPStorm - 'noinspection' => true, - // PEAR - 'package_version' => true, - // PlantUML - 'startuml' => true, 'enduml' => true, - // Symfony 3.3 Cache Adapter - 'experimental' => true, - // Slevomat Coding Standard - 'phpcsSuppress' => true, - // PHP CodeSniffer - 'codingStandardsIgnoreStart' => true, - 'codingStandardsIgnoreEnd' => true, - ]; + private static $globalIgnoredNames = ImplicitlyIgnoredAnnotationNames::LIST; /** * A list with annotations that are not causing exceptions when not resolved to an annotation class. * * The names are case sensitive. * - * @var array + * @var array */ private static $globalIgnoredNamespaces = []; @@ -123,7 +51,7 @@ class AnnotationReader implements Reader * * @param string $name */ - static public function addGlobalIgnoredName($name) + public static function addGlobalIgnoredName($name) { self::$globalIgnoredNames[$name] = true; } @@ -133,7 +61,7 @@ static public function addGlobalIgnoredName($name) * * @param string $namespace */ - static public function addGlobalIgnoredNamespace($namespace) + public static function addGlobalIgnoredNamespace($namespace) { self::$globalIgnoredNamespaces[$namespace] = true; } @@ -141,68 +69,68 @@ static public function addGlobalIgnoredNamespace($namespace) /** * Annotations parser. * - * @var \Doctrine\Common\Annotations\DocParser + * @var DocParser */ private $parser; /** * Annotations parser used to collect parsing metadata. * - * @var \Doctrine\Common\Annotations\DocParser + * @var DocParser */ private $preParser; /** * PHP parser used to collect imports. * - * @var \Doctrine\Common\Annotations\PhpParser + * @var PhpParser */ private $phpParser; /** * In-memory cache mechanism to store imported annotations per class. * - * @var array + * @psalm-var array<'class'|'function', array>> */ private $imports = []; /** * In-memory cache mechanism to store ignored annotations per class. * - * @var array + * @psalm-var array<'class'|'function', array>> */ private $ignoredAnnotationNames = []; /** - * Constructor. - * * Initializes a new AnnotationReader. * - * @param DocParser $parser - * * @throws AnnotationException */ - public function __construct(DocParser $parser = null) + public function __construct(?DocParser $parser = null) { - if (extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.save_comments') === "0" || ini_get('opcache.save_comments') === "0")) { + if ( + extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.save_comments') === '0' || + ini_get('opcache.save_comments') === '0') + ) { throw AnnotationException::optimizerPlusSaveComments(); } - if (extension_loaded('Zend OPcache') && ini_get('opcache.save_comments') == 0) { + if (extension_loaded('Zend OPcache') && ini_get('opcache.save_comments') === 0) { throw AnnotationException::optimizerPlusSaveComments(); } - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/IgnoreAnnotation.php'); + // Make sure that the IgnoreAnnotation annotation is loaded + class_exists(IgnoreAnnotation::class); $this->parser = $parser ?: new DocParser(); - $this->preParser = new DocParser; + $this->preParser = new DocParser(); $this->preParser->setImports(self::$globalImports); $this->preParser->setIgnoreNotImportedAnnotations(true); $this->preParser->setIgnoredAnnotationNames(self::$globalIgnoredNames); - $this->phpParser = new PhpParser; + $this->phpParser = new PhpParser(); } /** @@ -211,7 +139,7 @@ public function __construct(DocParser $parser = null) public function getClassAnnotations(ReflectionClass $class) { $this->parser->setTarget(Target::TARGET_CLASS); - $this->parser->setImports($this->getClassImports($class)); + $this->parser->setImports($this->getImports($class)); $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); @@ -240,7 +168,7 @@ public function getClassAnnotation(ReflectionClass $class, $annotationName) public function getPropertyAnnotations(ReflectionProperty $property) { $class = $property->getDeclaringClass(); - $context = 'property ' . $class->getName() . "::\$" . $property->getName(); + $context = 'property ' . $class->getName() . '::$' . $property->getName(); $this->parser->setTarget(Target::TARGET_PROPERTY); $this->parser->setImports($this->getPropertyImports($property)); @@ -299,63 +227,103 @@ public function getMethodAnnotation(ReflectionMethod $method, $annotationName) } /** - * Returns the ignored annotations for the given class. + * Gets the annotations applied to a function. + * + * @phpstan-return list An array of Annotations. + */ + public function getFunctionAnnotations(ReflectionFunction $function): array + { + $context = 'function ' . $function->getName(); + + $this->parser->setTarget(Target::TARGET_FUNCTION); + $this->parser->setImports($this->getImports($function)); + $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($function)); + $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces); + + return $this->parser->parse($function->getDocComment(), $context); + } + + /** + * Gets a function annotation. + * + * @return object|null The Annotation or NULL, if the requested annotation does not exist. + */ + public function getFunctionAnnotation(ReflectionFunction $function, string $annotationName) + { + $annotations = $this->getFunctionAnnotations($function); + + foreach ($annotations as $annotation) { + if ($annotation instanceof $annotationName) { + return $annotation; + } + } + + return null; + } + + /** + * Returns the ignored annotations for the given class or function. * - * @param \ReflectionClass $class + * @param ReflectionClass|ReflectionFunction $reflection * - * @return array + * @return array */ - private function getIgnoredAnnotationNames(ReflectionClass $class) + private function getIgnoredAnnotationNames($reflection): array { - $name = $class->getName(); - if (isset($this->ignoredAnnotationNames[$name])) { - return $this->ignoredAnnotationNames[$name]; + $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; + $name = $reflection->getName(); + + if (isset($this->ignoredAnnotationNames[$type][$name])) { + return $this->ignoredAnnotationNames[$type][$name]; } - $this->collectParsingMetadata($class); + $this->collectParsingMetadata($reflection); - return $this->ignoredAnnotationNames[$name]; + return $this->ignoredAnnotationNames[$type][$name]; } /** - * Retrieves imports. + * Retrieves imports for a class or a function. * - * @param \ReflectionClass $class + * @param ReflectionClass|ReflectionFunction $reflection * - * @return array + * @return array */ - private function getClassImports(ReflectionClass $class) + private function getImports($reflection): array { - $name = $class->getName(); - if (isset($this->imports[$name])) { - return $this->imports[$name]; + $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; + $name = $reflection->getName(); + + if (isset($this->imports[$type][$name])) { + return $this->imports[$type][$name]; } - $this->collectParsingMetadata($class); + $this->collectParsingMetadata($reflection); - return $this->imports[$name]; + return $this->imports[$type][$name]; } /** * Retrieves imports for methods. * - * @param \ReflectionMethod $method - * - * @return array + * @return array */ private function getMethodImports(ReflectionMethod $method) { - $class = $method->getDeclaringClass(); - $classImports = $this->getClassImports($class); + $class = $method->getDeclaringClass(); + $classImports = $this->getImports($class); $traitImports = []; foreach ($class->getTraits() as $trait) { - if ($trait->hasMethod($method->getName()) - && $trait->getFileName() === $method->getFileName() + if ( + ! $trait->hasMethod($method->getName()) + || $trait->getFileName() !== $method->getFileName() ) { - $traitImports = array_merge($traitImports, $this->phpParser->parseClass($trait)); + continue; } + + $traitImports = array_merge($traitImports, $this->phpParser->parseUseStatements($trait)); } return array_merge($classImports, $traitImports); @@ -364,52 +332,58 @@ private function getMethodImports(ReflectionMethod $method) /** * Retrieves imports for properties. * - * @param \ReflectionProperty $property - * - * @return array + * @return array */ private function getPropertyImports(ReflectionProperty $property) { - $class = $property->getDeclaringClass(); - $classImports = $this->getClassImports($class); + $class = $property->getDeclaringClass(); + $classImports = $this->getImports($class); $traitImports = []; foreach ($class->getTraits() as $trait) { - if ($trait->hasProperty($property->getName())) { - $traitImports = array_merge($traitImports, $this->phpParser->parseClass($trait)); + if (! $trait->hasProperty($property->getName())) { + continue; } + + $traitImports = array_merge($traitImports, $this->phpParser->parseUseStatements($trait)); } return array_merge($classImports, $traitImports); } /** - * Collects parsing metadata for a given class. + * Collects parsing metadata for a given class or function. * - * @param \ReflectionClass $class + * @param ReflectionClass|ReflectionFunction $reflection */ - private function collectParsingMetadata(ReflectionClass $class) + private function collectParsingMetadata($reflection): void { + $type = $reflection instanceof ReflectionClass ? 'class' : 'function'; + $name = $reflection->getName(); + $ignoredAnnotationNames = self::$globalIgnoredNames; - $annotations = $this->preParser->parse($class->getDocComment(), 'class ' . $class->name); + $annotations = $this->preParser->parse($reflection->getDocComment(), $type . ' ' . $name); foreach ($annotations as $annotation) { - if ($annotation instanceof IgnoreAnnotation) { - foreach ($annotation->names AS $annot) { - $ignoredAnnotationNames[$annot] = true; - } + if (! ($annotation instanceof IgnoreAnnotation)) { + continue; } - } - $name = $class->getName(); + foreach ($annotation->names as $annot) { + $ignoredAnnotationNames[$annot] = true; + } + } - $this->imports[$name] = array_merge( + $this->imports[$type][$name] = array_merge( self::$globalImports, - $this->phpParser->parseClass($class), - ['__NAMESPACE__' => $class->getNamespaceName()] + $this->phpParser->parseUseStatements($reflection), + [ + '__NAMESPACE__' => $reflection->getNamespaceName(), + 'self' => $name, + ] ); - $this->ignoredAnnotationNames[$name] = $ignoredAnnotationNames; + $this->ignoredAnnotationNames[$type][$name] = $ignoredAnnotationNames; } } diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php index 13abaf50..259d497d 100644 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php @@ -1,24 +1,18 @@ . - */ namespace Doctrine\Common\Annotations; +use function array_key_exists; +use function array_merge; +use function class_exists; +use function in_array; +use function is_file; +use function str_replace; +use function stream_resolve_include_path; +use function strpos; + +use const DIRECTORY_SEPARATOR; + final class AnnotationRegistry { /** @@ -31,38 +25,47 @@ final class AnnotationRegistry * * @var string[][]|string[]|null[] */ - static private $autoloadNamespaces = []; + private static $autoloadNamespaces = []; /** * A map of autoloader callables. * * @var callable[] */ - static private $loaders = []; + private static $loaders = []; /** * An array of classes which cannot be found * * @var null[] indexed by class name */ - static private $failedToAutoload = []; + private static $failedToAutoload = []; + + /** + * Whenever registerFile() was used. Disables use of standard autoloader. + * + * @var bool + */ + private static $registerFileUsed = false; - public static function reset() : void + public static function reset(): void { self::$autoloadNamespaces = []; self::$loaders = []; self::$failedToAutoload = []; + self::$registerFileUsed = false; } /** * Registers file. * - * @deprecated this method is deprecated and will be removed in doctrine/annotations 2.0 - * autoloading should be deferred to the globally registered autoloader by then. For now, - * use @example AnnotationRegistry::registerLoader('class_exists') + * @deprecated This method is deprecated and will be removed in + * doctrine/annotations 2.0. Annotations will be autoloaded in 2.0. */ - public static function registerFile(string $file) : void + public static function registerFile(string $file): void { + self::$registerFileUsed = true; + require_once $file; } @@ -71,14 +74,12 @@ public static function registerFile(string $file) : void * * Loading of this namespaces will be done with a PSR-0 namespace loading algorithm. * - * @param string $namespace - * @param string|array|null $dirs + * @deprecated This method is deprecated and will be removed in + * doctrine/annotations 2.0. Annotations will be autoloaded in 2.0. * - * @deprecated this method is deprecated and will be removed in doctrine/annotations 2.0 - * autoloading should be deferred to the globally registered autoloader by then. For now, - * use @example AnnotationRegistry::registerLoader('class_exists') + * @phpstan-param string|list|null $dirs */ - public static function registerAutoloadNamespace(string $namespace, $dirs = null) : void + public static function registerAutoloadNamespace(string $namespace, $dirs = null): void { self::$autoloadNamespaces[$namespace] = $dirs; } @@ -88,15 +89,14 @@ public static function registerAutoloadNamespace(string $namespace, $dirs = null * * Loading of this namespaces will be done with a PSR-0 namespace loading algorithm. * - * @param string[][]|string[]|null[] $namespaces indexed by namespace name + * @deprecated This method is deprecated and will be removed in + * doctrine/annotations 2.0. Annotations will be autoloaded in 2.0. * - * @deprecated this method is deprecated and will be removed in doctrine/annotations 2.0 - * autoloading should be deferred to the globally registered autoloader by then. For now, - * use @example AnnotationRegistry::registerLoader('class_exists') + * @param string[][]|string[]|null[] $namespaces indexed by namespace name */ - public static function registerAutoloadNamespaces(array $namespaces) : void + public static function registerAutoloadNamespaces(array $namespaces): void { - self::$autoloadNamespaces = \array_merge(self::$autoloadNamespaces, $namespaces); + self::$autoloadNamespaces = array_merge(self::$autoloadNamespaces, $namespaces); } /** @@ -105,68 +105,84 @@ public static function registerAutoloadNamespaces(array $namespaces) : void * NOTE: These class loaders HAVE to be silent when a class was not found! * IMPORTANT: Loaders have to return true if they loaded a class that could contain the searched annotation class. * - * @deprecated this method is deprecated and will be removed in doctrine/annotations 2.0 - * autoloading should be deferred to the globally registered autoloader by then. For now, - * use @example AnnotationRegistry::registerLoader('class_exists') + * @deprecated This method is deprecated and will be removed in + * doctrine/annotations 2.0. Annotations will be autoloaded in 2.0. */ - public static function registerLoader(callable $callable) : void + public static function registerLoader(callable $callable): void { // Reset our static cache now that we have a new loader to work with - self::$failedToAutoload = []; - self::$loaders[] = $callable; + self::$failedToAutoload = []; + self::$loaders[] = $callable; } /** * Registers an autoloading callable for annotations, if it is not already registered * - * @deprecated this method is deprecated and will be removed in doctrine/annotations 2.0 + * @deprecated This method is deprecated and will be removed in + * doctrine/annotations 2.0. Annotations will be autoloaded in 2.0. */ - public static function registerUniqueLoader(callable $callable) : void + public static function registerUniqueLoader(callable $callable): void { - if ( ! in_array($callable, self::$loaders, true) ) { - self::registerLoader($callable); + if (in_array($callable, self::$loaders, true)) { + return; } + + self::registerLoader($callable); } /** * Autoloads an annotation class silently. */ - public static function loadAnnotationClass(string $class) : bool + public static function loadAnnotationClass(string $class): bool { - if (\class_exists($class, false)) { + if (class_exists($class, false)) { return true; } - if (\array_key_exists($class, self::$failedToAutoload)) { + if (array_key_exists($class, self::$failedToAutoload)) { return false; } - foreach (self::$autoloadNamespaces AS $namespace => $dirs) { - if (\strpos($class, $namespace) === 0) { - $file = \str_replace('\\', \DIRECTORY_SEPARATOR, $class) . '.php'; + foreach (self::$autoloadNamespaces as $namespace => $dirs) { + if (strpos($class, $namespace) !== 0) { + continue; + } + + $file = str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php'; + + if ($dirs === null) { + $path = stream_resolve_include_path($file); + if ($path) { + require $path; + + return true; + } + } else { + foreach ((array) $dirs as $dir) { + if (is_file($dir . DIRECTORY_SEPARATOR . $file)) { + require $dir . DIRECTORY_SEPARATOR . $file; - if ($dirs === null) { - if ($path = stream_resolve_include_path($file)) { - require $path; return true; } - } else { - foreach((array) $dirs AS $dir) { - if (is_file($dir . \DIRECTORY_SEPARATOR . $file)) { - require $dir . \DIRECTORY_SEPARATOR . $file; - return true; - } - } } } } - foreach (self::$loaders AS $loader) { + foreach (self::$loaders as $loader) { if ($loader($class) === true) { return true; } } + if ( + self::$loaders === [] && + self::$autoloadNamespaces === [] && + self::$registerFileUsed === false && + class_exists($class) + ) { + return true; + } + self::$failedToAutoload[$class] = null; return false; diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php index 674b66be..c036b2da 100644 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php @@ -1,67 +1,51 @@ . - */ namespace Doctrine\Common\Annotations; use Doctrine\Common\Cache\Cache; use ReflectionClass; +use ReflectionMethod; +use ReflectionProperty; + +use function array_map; +use function array_merge; +use function assert; +use function filemtime; +use function max; +use function time; /** * A cache aware annotation reader. * - * @author Johannes M. Schmitt - * @author Benjamin Eberlei + * @deprecated the CachedReader is deprecated and will be removed + * in version 2.0.0 of doctrine/annotations. Please use the + * {@see \Doctrine\Common\Annotations\PsrCachedReader} instead. */ final class CachedReader implements Reader { - /** - * @var Reader - */ + /** @var Reader */ private $delegate; - /** - * @var Cache - */ + /** @var Cache */ private $cache; - /** - * @var boolean - */ + /** @var bool */ private $debug; - /** - * @var array - */ + /** @var array> */ private $loadedAnnotations = []; + /** @var int[] */ + private $loadedFilemtimes = []; + /** - * Constructor. - * - * @param Reader $reader - * @param Cache $cache - * @param bool $debug + * @param bool $debug */ public function __construct(Reader $reader, Cache $cache, $debug = false) { $this->delegate = $reader; - $this->cache = $cache; - $this->debug = (boolean) $debug; + $this->cache = $cache; + $this->debug = (bool) $debug; } /** @@ -75,7 +59,8 @@ public function getClassAnnotations(ReflectionClass $class) return $this->loadedAnnotations[$cacheKey]; } - if (false === ($annots = $this->fetchFromCache($cacheKey, $class))) { + $annots = $this->fetchFromCache($cacheKey, $class); + if ($annots === false) { $annots = $this->delegate->getClassAnnotations($class); $this->saveToCache($cacheKey, $annots); } @@ -100,16 +85,17 @@ public function getClassAnnotation(ReflectionClass $class, $annotationName) /** * {@inheritDoc} */ - public function getPropertyAnnotations(\ReflectionProperty $property) + public function getPropertyAnnotations(ReflectionProperty $property) { - $class = $property->getDeclaringClass(); - $cacheKey = $class->getName().'$'.$property->getName(); + $class = $property->getDeclaringClass(); + $cacheKey = $class->getName() . '$' . $property->getName(); if (isset($this->loadedAnnotations[$cacheKey])) { return $this->loadedAnnotations[$cacheKey]; } - if (false === ($annots = $this->fetchFromCache($cacheKey, $class))) { + $annots = $this->fetchFromCache($cacheKey, $class); + if ($annots === false) { $annots = $this->delegate->getPropertyAnnotations($property); $this->saveToCache($cacheKey, $annots); } @@ -120,7 +106,7 @@ public function getPropertyAnnotations(\ReflectionProperty $property) /** * {@inheritDoc} */ - public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName) + public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) { foreach ($this->getPropertyAnnotations($property) as $annot) { if ($annot instanceof $annotationName) { @@ -134,16 +120,17 @@ public function getPropertyAnnotation(\ReflectionProperty $property, $annotation /** * {@inheritDoc} */ - public function getMethodAnnotations(\ReflectionMethod $method) + public function getMethodAnnotations(ReflectionMethod $method) { - $class = $method->getDeclaringClass(); - $cacheKey = $class->getName().'#'.$method->getName(); + $class = $method->getDeclaringClass(); + $cacheKey = $class->getName() . '#' . $method->getName(); if (isset($this->loadedAnnotations[$cacheKey])) { return $this->loadedAnnotations[$cacheKey]; } - if (false === ($annots = $this->fetchFromCache($cacheKey, $class))) { + $annots = $this->fetchFromCache($cacheKey, $class); + if ($annots === false) { $annots = $this->delegate->getMethodAnnotations($method); $this->saveToCache($cacheKey, $annots); } @@ -154,7 +141,7 @@ public function getMethodAnnotations(\ReflectionMethod $method) /** * {@inheritDoc} */ - public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) + public function getMethodAnnotation(ReflectionMethod $method, $annotationName) { foreach ($this->getMethodAnnotations($method) as $annot) { if ($annot instanceof $annotationName) { @@ -173,20 +160,21 @@ public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) public function clearLoadedAnnotations() { $this->loadedAnnotations = []; + $this->loadedFilemtimes = []; } /** * Fetches a value from the cache. * - * @param string $cacheKey The cache key. - * @param ReflectionClass $class The related class. + * @param string $cacheKey The cache key. * * @return mixed The cached value or false when the value is not in cache. */ private function fetchFromCache($cacheKey, ReflectionClass $class) { - if (($data = $this->cache->fetch($cacheKey)) !== false) { - if (!$this->debug || $this->isCacheFresh($cacheKey, $class)) { + $data = $this->cache->fetch($cacheKey); + if ($data !== false) { + if (! $this->debug || $this->isCacheFresh($cacheKey, $class)) { return $data; } } @@ -205,58 +193,76 @@ private function fetchFromCache($cacheKey, ReflectionClass $class) private function saveToCache($cacheKey, $value) { $this->cache->save($cacheKey, $value); - if ($this->debug) { - $this->cache->save('[C]'.$cacheKey, time()); + if (! $this->debug) { + return; } + + $this->cache->save('[C]' . $cacheKey, time()); } /** * Checks if the cache is fresh. * - * @param string $cacheKey - * @param ReflectionClass $class + * @param string $cacheKey * - * @return boolean + * @return bool */ private function isCacheFresh($cacheKey, ReflectionClass $class) { - if (null === $lastModification = $this->getLastModification($class)) { + $lastModification = $this->getLastModification($class); + if ($lastModification === 0) { return true; } - return $this->cache->fetch('[C]'.$cacheKey) >= $lastModification; + return $this->cache->fetch('[C]' . $cacheKey) >= $lastModification; } /** * Returns the time the class was last modified, testing traits and parents - * - * @param ReflectionClass $class - * @return int */ - private function getLastModification(ReflectionClass $class) + private function getLastModification(ReflectionClass $class): int { $filename = $class->getFileName(); - $parent = $class->getParentClass(); - return max(array_merge( + if (isset($this->loadedFilemtimes[$filename])) { + return $this->loadedFilemtimes[$filename]; + } + + $parent = $class->getParentClass(); + + $lastModification = max(array_merge( [$filename ? filemtime($filename) : 0], - array_map([$this, 'getTraitLastModificationTime'], $class->getTraits()), - array_map([$this, 'getLastModification'], $class->getInterfaces()), + array_map(function (ReflectionClass $reflectionTrait): int { + return $this->getTraitLastModificationTime($reflectionTrait); + }, $class->getTraits()), + array_map(function (ReflectionClass $class): int { + return $this->getLastModification($class); + }, $class->getInterfaces()), $parent ? [$this->getLastModification($parent)] : [] )); + + assert($lastModification !== false); + + return $this->loadedFilemtimes[$filename] = $lastModification; } - /** - * @param ReflectionClass $reflectionTrait - * @return int - */ - private function getTraitLastModificationTime(ReflectionClass $reflectionTrait) + private function getTraitLastModificationTime(ReflectionClass $reflectionTrait): int { $fileName = $reflectionTrait->getFileName(); - return max(array_merge( + if (isset($this->loadedFilemtimes[$fileName])) { + return $this->loadedFilemtimes[$fileName]; + } + + $lastModificationTime = max(array_merge( [$fileName ? filemtime($fileName) : 0], - array_map([$this, 'getTraitLastModificationTime'], $reflectionTrait->getTraits()) + array_map(function (ReflectionClass $reflectionTrait): int { + return $this->getTraitLastModificationTime($reflectionTrait); + }, $reflectionTrait->getTraits()) )); + + assert($lastModificationTime !== false); + + return $this->loadedFilemtimes[$fileName] = $lastModificationTime; } } diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php index 8182f6c6..f6567c51 100644 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php @@ -1,61 +1,45 @@ . - */ namespace Doctrine\Common\Annotations; use Doctrine\Common\Lexer\AbstractLexer; +use function ctype_alpha; +use function is_numeric; +use function str_replace; +use function stripos; +use function strlen; +use function strpos; +use function strtolower; +use function substr; + /** * Simple lexer for docblock annotations. - * - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Johannes M. Schmitt */ final class DocLexer extends AbstractLexer { - const T_NONE = 1; - const T_INTEGER = 2; - const T_STRING = 3; - const T_FLOAT = 4; + public const T_NONE = 1; + public const T_INTEGER = 2; + public const T_STRING = 3; + public const T_FLOAT = 4; // All tokens that are also identifiers should be >= 100 - const T_IDENTIFIER = 100; - const T_AT = 101; - const T_CLOSE_CURLY_BRACES = 102; - const T_CLOSE_PARENTHESIS = 103; - const T_COMMA = 104; - const T_EQUALS = 105; - const T_FALSE = 106; - const T_NAMESPACE_SEPARATOR = 107; - const T_OPEN_CURLY_BRACES = 108; - const T_OPEN_PARENTHESIS = 109; - const T_TRUE = 110; - const T_NULL = 111; - const T_COLON = 112; - const T_MINUS = 113; - - /** - * @var array - */ + public const T_IDENTIFIER = 100; + public const T_AT = 101; + public const T_CLOSE_CURLY_BRACES = 102; + public const T_CLOSE_PARENTHESIS = 103; + public const T_COMMA = 104; + public const T_EQUALS = 105; + public const T_FALSE = 106; + public const T_NAMESPACE_SEPARATOR = 107; + public const T_OPEN_CURLY_BRACES = 108; + public const T_OPEN_PARENTHESIS = 109; + public const T_TRUE = 110; + public const T_NULL = 111; + public const T_COLON = 112; + public const T_MINUS = 113; + + /** @var array */ protected $noCase = [ '@' => self::T_AT, ',' => self::T_COMMA, @@ -66,23 +50,21 @@ final class DocLexer extends AbstractLexer '=' => self::T_EQUALS, ':' => self::T_COLON, '-' => self::T_MINUS, - '\\' => self::T_NAMESPACE_SEPARATOR + '\\' => self::T_NAMESPACE_SEPARATOR, ]; - /** - * @var array - */ + /** @var array */ protected $withCase = [ 'true' => self::T_TRUE, 'false' => self::T_FALSE, - 'null' => self::T_NULL + 'null' => self::T_NULL, ]; /** * Whether the next token starts immediately, or if there were * non-captured symbols before that */ - public function nextTokenIsAdjacent() : bool + public function nextTokenIsAdjacent(): bool { return $this->token === null || ($this->lookahead !== null @@ -138,7 +120,7 @@ protected function getType(&$value) // Checking numeric value if (is_numeric($value)) { - return (strpos($value, '.') !== false || stripos($value, 'e') !== false) + return strpos($value, '.') !== false || stripos($value, 'e') !== false ? self::T_FLOAT : self::T_INTEGER; } diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php index f076f36a..ae530c50 100644 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php @@ -1,81 +1,93 @@ . - */ namespace Doctrine\Common\Annotations; use Doctrine\Common\Annotations\Annotation\Attribute; -use ReflectionClass; +use Doctrine\Common\Annotations\Annotation\Attributes; use Doctrine\Common\Annotations\Annotation\Enum; +use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor; use Doctrine\Common\Annotations\Annotation\Target; -use Doctrine\Common\Annotations\Annotation\Attributes; +use ReflectionClass; +use ReflectionException; +use ReflectionProperty; +use RuntimeException; +use stdClass; + +use function array_keys; +use function array_map; +use function array_pop; +use function array_values; +use function class_exists; +use function constant; +use function count; +use function defined; +use function explode; +use function gettype; +use function implode; +use function in_array; +use function interface_exists; +use function is_array; +use function is_object; +use function json_encode; +use function ltrim; +use function preg_match; +use function reset; +use function rtrim; +use function sprintf; +use function stripos; +use function strlen; +use function strpos; +use function strrpos; +use function strtolower; +use function substr; +use function trim; + +use const PHP_VERSION_ID; /** * A parser for docblock annotations. * * It is strongly discouraged to change the default annotation parsing process. - * - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Johannes M. Schmitt - * @author Fabio B. Silva */ final class DocParser { /** * An array of all valid tokens for a class name. * - * @var array + * @phpstan-var list */ private static $classIdentifiers = [ DocLexer::T_IDENTIFIER, DocLexer::T_TRUE, DocLexer::T_FALSE, - DocLexer::T_NULL + DocLexer::T_NULL, ]; /** * The lexer. * - * @var \Doctrine\Common\Annotations\DocLexer + * @var DocLexer */ private $lexer; /** * Current target context. * - * @var integer + * @var int */ private $target; /** * Doc parser used to collect annotation target. * - * @var \Doctrine\Common\Annotations\DocParser + * @var DocParser */ private static $metadataParser; /** * Flag to control if the current annotation is nested or not. * - * @var boolean + * @var bool */ private $isNestedAnnotation = false; @@ -83,7 +95,7 @@ final class DocParser * Hashmap containing all use-statements that are to be used when parsing * the given doc block. * - * @var array + * @var array */ private $imports = []; @@ -91,14 +103,14 @@ final class DocParser * This hashmap is used internally to cache results of class_exists() * look-ups. * - * @var array + * @var array */ private $classExists = []; /** * Whether annotations that have not been imported should be ignored. * - * @var boolean + * @var bool */ private $ignoreNotImportedAnnotations = false; @@ -113,7 +125,6 @@ final class DocParser * A list with annotations that are not causing exceptions when not resolved to an annotation class. * * The names must be the raw names as used in the class, not the fully qualified - * class names. * * @var bool[] indexed by annotation name */ @@ -127,90 +138,88 @@ final class DocParser */ private $ignoredAnnotationNamespaces = []; - /** - * @var string - */ + /** @var string */ private $context = ''; /** * Hash-map for caching annotation metadata. * - * @var array + * @var array */ private static $annotationMetadata = [ - 'Doctrine\Common\Annotations\Annotation\Target' => [ - 'is_annotation' => true, - 'has_constructor' => true, - 'properties' => [], - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => 'value', - 'attribute_types' => [ + Annotation\Target::class => [ + 'is_annotation' => true, + 'has_constructor' => true, + 'has_named_argument_constructor' => false, + 'properties' => [], + 'targets_literal' => 'ANNOTATION_CLASS', + 'targets' => Target::TARGET_CLASS, + 'default_property' => 'value', + 'attribute_types' => [ 'value' => [ - 'required' => false, - 'type' =>'array', - 'array_type'=>'string', - 'value' =>'array' - ] - ], + 'required' => false, + 'type' => 'array', + 'array_type' => 'string', + 'value' => 'array', + ], + ], ], - 'Doctrine\Common\Annotations\Annotation\Attribute' => [ - 'is_annotation' => true, - 'has_constructor' => false, - 'targets_literal' => 'ANNOTATION_ANNOTATION', - 'targets' => Target::TARGET_ANNOTATION, - 'default_property' => 'name', - 'properties' => [ + Annotation\Attribute::class => [ + 'is_annotation' => true, + 'has_constructor' => false, + 'has_named_argument_constructor' => false, + 'targets_literal' => 'ANNOTATION_ANNOTATION', + 'targets' => Target::TARGET_ANNOTATION, + 'default_property' => 'name', + 'properties' => [ 'name' => 'name', 'type' => 'type', - 'required' => 'required' + 'required' => 'required', ], - 'attribute_types' => [ + 'attribute_types' => [ 'value' => [ 'required' => true, - 'type' =>'string', - 'value' =>'string' + 'type' => 'string', + 'value' => 'string', ], 'type' => [ - 'required' =>true, - 'type' =>'string', - 'value' =>'string' + 'required' => true, + 'type' => 'string', + 'value' => 'string', ], 'required' => [ - 'required' =>false, - 'type' =>'boolean', - 'value' =>'boolean' - ] - ], - ], - 'Doctrine\Common\Annotations\Annotation\Attributes' => [ - 'is_annotation' => true, - 'has_constructor' => false, - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => 'value', - 'properties' => [ - 'value' => 'value' + 'required' => false, + 'type' => 'boolean', + 'value' => 'boolean', + ], ], - 'attribute_types' => [ - 'value' => [ - 'type' =>'array', - 'required' =>true, - 'array_type'=>'Doctrine\Common\Annotations\Annotation\Attribute', - 'value' =>'array' - ] - ], ], - 'Doctrine\Common\Annotations\Annotation\Enum' => [ - 'is_annotation' => true, - 'has_constructor' => true, - 'targets_literal' => 'ANNOTATION_PROPERTY', - 'targets' => Target::TARGET_PROPERTY, - 'default_property' => 'value', - 'properties' => [ - 'value' => 'value' + Annotation\Attributes::class => [ + 'is_annotation' => true, + 'has_constructor' => false, + 'has_named_argument_constructor' => false, + 'targets_literal' => 'ANNOTATION_CLASS', + 'targets' => Target::TARGET_CLASS, + 'default_property' => 'value', + 'properties' => ['value' => 'value'], + 'attribute_types' => [ + 'value' => [ + 'type' => 'array', + 'required' => true, + 'array_type' => Annotation\Attribute::class, + 'value' => 'array<' . Annotation\Attribute::class . '>', + ], ], - 'attribute_types' => [ + ], + Annotation\Enum::class => [ + 'is_annotation' => true, + 'has_constructor' => true, + 'has_named_argument_constructor' => false, + 'targets_literal' => 'ANNOTATION_PROPERTY', + 'targets' => Target::TARGET_PROPERTY, + 'default_property' => 'value', + 'properties' => ['value' => 'value'], + 'attribute_types' => [ 'value' => [ 'type' => 'array', 'required' => true, @@ -219,14 +228,24 @@ final class DocParser 'type' => 'array', 'required' => false, ], - ], + ], + ], + Annotation\NamedArgumentConstructor::class => [ + 'is_annotation' => true, + 'has_constructor' => false, + 'has_named_argument_constructor' => false, + 'targets_literal' => 'ANNOTATION_CLASS', + 'targets' => Target::TARGET_CLASS, + 'default_property' => null, + 'properties' => [], + 'attribute_types' => [], ], ]; /** * Hash-map for handle types declaration. * - * @var array + * @var array */ private static $typeMap = [ 'float' => 'double', @@ -241,7 +260,7 @@ final class DocParser */ public function __construct() { - $this->lexer = new DocLexer; + $this->lexer = new DocLexer(); } /** @@ -274,13 +293,13 @@ public function setIgnoredAnnotationNamespaces($ignoredAnnotationNamespaces) /** * Sets ignore on not-imported annotations. * - * @param boolean $bool + * @param bool $bool * * @return void */ public function setIgnoreNotImportedAnnotations($bool) { - $this->ignoreNotImportedAnnotations = (boolean) $bool; + $this->ignoreNotImportedAnnotations = (bool) $bool; } /** @@ -290,12 +309,12 @@ public function setIgnoreNotImportedAnnotations($bool) * * @return void * - * @throws \RuntimeException + * @throws RuntimeException */ public function addNamespace($namespace) { if ($this->imports) { - throw new \RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); + throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); } $this->namespaces[] = $namespace; @@ -304,16 +323,16 @@ public function addNamespace($namespace) /** * Sets the imports. * - * @param array $imports + * @param array $imports * * @return void * - * @throws \RuntimeException + * @throws RuntimeException */ public function setImports(array $imports) { if ($this->namespaces) { - throw new \RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); + throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); } $this->imports = $imports; @@ -322,7 +341,7 @@ public function setImports(array $imports) /** * Sets current target context as bitmask. * - * @param integer $target + * @param int $target * * @return void */ @@ -337,7 +356,10 @@ public function setTarget($target) * @param string $input The docblock string to parse. * @param string $context The parsing context. * - * @return array Array of annotations. If no annotations are found, an empty array is returned. + * @throws AnnotationException + * @throws ReflectionException + * + * @phpstan-return list Array of annotations. If no annotations are found, an empty array is returned. */ public function parse($input, $context = '') { @@ -358,10 +380,8 @@ public function parse($input, $context = '') * Finds the first valid annotation * * @param string $input The docblock string to parse - * - * @return int|null */ - private function findInitialTokenPosition($input) + private function findInitialTokenPosition($input): ?int { $pos = 0; @@ -384,14 +404,16 @@ private function findInitialTokenPosition($input) * Attempts to match the given token with the current lookahead token. * If they match, updates the lookahead token; otherwise raises a syntax error. * - * @param integer $token Type of token. + * @param int $token Type of token. + * + * @return bool True if tokens match; false otherwise. * - * @return boolean True if tokens match; false otherwise. + * @throws AnnotationException */ - private function match($token) + private function match(int $token): bool { - if ( ! $this->lexer->isNextToken($token) ) { - $this->syntaxError($this->lexer->getLiteral($token)); + if (! $this->lexer->isNextToken($token)) { + throw $this->syntaxError($this->lexer->getLiteral($token)); } return $this->lexer->moveNext(); @@ -403,14 +425,14 @@ private function match($token) * If any of them matches, this method updates the lookahead token; otherwise * a syntax error is raised. * - * @param array $tokens + * @throws AnnotationException * - * @return boolean + * @phpstan-param list $tokens */ - private function matchAny(array $tokens) + private function matchAny(array $tokens): bool { - if ( ! $this->lexer->isNextTokenAny($tokens)) { - $this->syntaxError(implode(' or ', array_map([$this->lexer, 'getLiteral'], $tokens))); + if (! $this->lexer->isNextTokenAny($tokens)) { + throw $this->syntaxError(implode(' or ', array_map([$this->lexer, 'getLiteral'], $tokens))); } return $this->lexer->moveNext(); @@ -419,21 +441,17 @@ private function matchAny(array $tokens) /** * Generates a new syntax error. * - * @param string $expected Expected string. - * @param array|null $token Optional token. - * - * @return void - * - * @throws AnnotationException + * @param string $expected Expected string. + * @param mixed[]|null $token Optional token. */ - private function syntaxError($expected, $token = null) + private function syntaxError(string $expected, ?array $token = null): AnnotationException { if ($token === null) { $token = $this->lexer->lookahead; } $message = sprintf('Expected %s, got ', $expected); - $message .= ($this->lexer->lookahead === null) + $message .= $this->lexer->lookahead === null ? 'end of string' : sprintf("'%s' at position %s", $token['value'], $token['position']); @@ -443,18 +461,16 @@ private function syntaxError($expected, $token = null) $message .= '.'; - throw AnnotationException::syntaxError($message); + return AnnotationException::syntaxError($message); } /** * Attempts to check if a class exists or not. This never goes through the PHP autoloading mechanism * but uses the {@link AnnotationRegistry} to load classes. * - * @param string $fqcn - * - * @return boolean + * @param class-string $fqcn */ - private function classExists($fqcn) + private function classExists(string $fqcn): bool { if (isset($this->classExists[$fqcn])) { return $this->classExists[$fqcn]; @@ -472,11 +488,12 @@ private function classExists($fqcn) /** * Collects parsing metadata for a given annotation class * - * @param string $name The annotation name + * @param class-string $name The annotation name * - * @return void + * @throws AnnotationException + * @throws ReflectionException */ - private function collectAnnotationMetadata($name) + private function collectAnnotationMetadata(string $name): void { if (self::$metadataParser === null) { self::$metadataParser = new self(); @@ -484,33 +501,41 @@ private function collectAnnotationMetadata($name) self::$metadataParser->setIgnoreNotImportedAnnotations(true); self::$metadataParser->setIgnoredAnnotationNames($this->ignoredAnnotationNames); self::$metadataParser->setImports([ - 'enum' => 'Doctrine\Common\Annotations\Annotation\Enum', - 'target' => 'Doctrine\Common\Annotations\Annotation\Target', - 'attribute' => 'Doctrine\Common\Annotations\Annotation\Attribute', - 'attributes' => 'Doctrine\Common\Annotations\Annotation\Attributes' + 'enum' => Enum::class, + 'target' => Target::class, + 'attribute' => Attribute::class, + 'attributes' => Attributes::class, + 'namedargumentconstructor' => NamedArgumentConstructor::class, ]); - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Enum.php'); - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Target.php'); - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Attribute.php'); - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Attributes.php'); + // Make sure that annotations from metadata are loaded + class_exists(Enum::class); + class_exists(Target::class); + class_exists(Attribute::class); + class_exists(Attributes::class); + class_exists(NamedArgumentConstructor::class); } - $class = new \ReflectionClass($name); + $class = new ReflectionClass($name); $docComment = $class->getDocComment(); // Sets default values for annotation metadata - $metadata = [ + $constructor = $class->getConstructor(); + $metadata = [ 'default_property' => null, - 'has_constructor' => (null !== $constructor = $class->getConstructor()) && $constructor->getNumberOfParameters() > 0, + 'has_constructor' => $constructor !== null && $constructor->getNumberOfParameters() > 0, + 'constructor_args' => [], 'properties' => [], 'property_types' => [], 'attribute_types' => [], 'targets_literal' => null, 'targets' => Target::TARGET_ALL, - 'is_annotation' => false !== strpos($docComment, '@Annotation'), + 'is_annotation' => strpos($docComment, '@Annotation') !== false, ]; + $metadata['has_named_argument_constructor'] = $metadata['has_constructor'] + && $class->implementsInterface(NamedArgumentConstructorAnnotation::class); + // verify that the class is really meant to be an annotation if ($metadata['is_annotation']) { self::$metadataParser->setTarget(Target::TARGET_CLASS); @@ -523,54 +548,75 @@ private function collectAnnotationMetadata($name) continue; } - if ($annotation instanceof Attributes) { - foreach ($annotation->value as $attribute) { - $this->collectAttributeTypeMetadata($metadata, $attribute); + if ($annotation instanceof NamedArgumentConstructor) { + $metadata['has_named_argument_constructor'] = $metadata['has_constructor']; + if ($metadata['has_named_argument_constructor']) { + // choose the first argument as the default property + $metadata['default_property'] = $constructor->getParameters()[0]->getName(); } } + + if (! ($annotation instanceof Attributes)) { + continue; + } + + foreach ($annotation->value as $attribute) { + $this->collectAttributeTypeMetadata($metadata, $attribute); + } } // if not has a constructor will inject values into public properties - if (false === $metadata['has_constructor']) { + if ($metadata['has_constructor'] === false) { // collect all public properties - foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) { + foreach ($class->getProperties(ReflectionProperty::IS_PUBLIC) as $property) { $metadata['properties'][$property->name] = $property->name; - if (false === ($propertyComment = $property->getDocComment())) { + $propertyComment = $property->getDocComment(); + if ($propertyComment === false) { continue; } $attribute = new Attribute(); - $attribute->required = (false !== strpos($propertyComment, '@Required')); + $attribute->required = (strpos($propertyComment, '@Required') !== false); $attribute->name = $property->name; - $attribute->type = (false !== strpos($propertyComment, '@var') && preg_match('/@var\s+([^\s]+)/',$propertyComment, $matches)) + $attribute->type = (strpos($propertyComment, '@var') !== false && + preg_match('/@var\s+([^\s]+)/', $propertyComment, $matches)) ? $matches[1] : 'mixed'; $this->collectAttributeTypeMetadata($metadata, $attribute); // checks if the property has @Enum - if (false !== strpos($propertyComment, '@Enum')) { - $context = 'property ' . $class->name . "::\$" . $property->name; + if (strpos($propertyComment, '@Enum') === false) { + continue; + } - self::$metadataParser->setTarget(Target::TARGET_PROPERTY); + $context = 'property ' . $class->name . '::$' . $property->name; - foreach (self::$metadataParser->parse($propertyComment, $context) as $annotation) { - if ( ! $annotation instanceof Enum) { - continue; - } + self::$metadataParser->setTarget(Target::TARGET_PROPERTY); - $metadata['enum'][$property->name]['value'] = $annotation->value; - $metadata['enum'][$property->name]['literal'] = ( ! empty($annotation->literal)) - ? $annotation->literal - : $annotation->value; + foreach (self::$metadataParser->parse($propertyComment, $context) as $annotation) { + if (! $annotation instanceof Enum) { + continue; } + + $metadata['enum'][$property->name]['value'] = $annotation->value; + $metadata['enum'][$property->name]['literal'] = (! empty($annotation->literal)) + ? $annotation->literal + : $annotation->value; } } // choose the first property as default property $metadata['default_property'] = reset($metadata['properties']); + } elseif ($metadata['has_named_argument_constructor']) { + foreach ($constructor->getParameters() as $parameter) { + $metadata['constructor_args'][$parameter->getName()] = [ + 'position' => $parameter->getPosition(), + 'default' => $parameter->isOptional() ? $parameter->getDefaultValue() : null, + ]; + } } } @@ -580,46 +626,43 @@ private function collectAnnotationMetadata($name) /** * Collects parsing metadata for a given attribute. * - * @param array $metadata - * @param Attribute $attribute - * - * @return void + * @param mixed[] $metadata */ - private function collectAttributeTypeMetadata(&$metadata, Attribute $attribute) + private function collectAttributeTypeMetadata(array &$metadata, Attribute $attribute): void { // handle internal type declaration $type = self::$typeMap[$attribute->type] ?? $attribute->type; // handle the case if the property type is mixed - if ('mixed' === $type) { + if ($type === 'mixed') { return; } // Evaluate type - switch (true) { + $pos = strpos($type, '<'); + if ($pos !== false) { // Checks if the property has array - case (false !== $pos = strpos($type, '<')): - $arrayType = substr($type, $pos + 1, -1); - $type = 'array'; + $arrayType = substr($type, $pos + 1, -1); + $type = 'array'; - if (isset(self::$typeMap[$arrayType])) { - $arrayType = self::$typeMap[$arrayType]; - } - - $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; - break; + if (isset(self::$typeMap[$arrayType])) { + $arrayType = self::$typeMap[$arrayType]; + } + $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; + } else { // Checks if the property has type[] - case (false !== $pos = strrpos($type, '[')): - $arrayType = substr($type, 0, $pos); - $type = 'array'; + $pos = strrpos($type, '['); + if ($pos !== false) { + $arrayType = substr($type, 0, $pos); + $type = 'array'; if (isset(self::$typeMap[$arrayType])) { $arrayType = self::$typeMap[$arrayType]; } $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType; - break; + } } $metadata['attribute_types'][$attribute->name]['type'] = $type; @@ -630,37 +673,55 @@ private function collectAttributeTypeMetadata(&$metadata, Attribute $attribute) /** * Annotations ::= Annotation {[ "*" ]* [Annotation]}* * - * @return array + * @throws AnnotationException + * @throws ReflectionException + * + * @phpstan-return list */ - private function Annotations() + private function Annotations(): array { $annotations = []; - while (null !== $this->lexer->lookahead) { - if (DocLexer::T_AT !== $this->lexer->lookahead['type']) { + while ($this->lexer->lookahead !== null) { + if ($this->lexer->lookahead['type'] !== DocLexer::T_AT) { $this->lexer->moveNext(); continue; } // make sure the @ is preceded by non-catchable pattern - if (null !== $this->lexer->token && $this->lexer->lookahead['position'] === $this->lexer->token['position'] + strlen($this->lexer->token['value'])) { + if ( + $this->lexer->token !== null && + $this->lexer->lookahead['position'] === $this->lexer->token['position'] + strlen( + $this->lexer->token['value'] + ) + ) { $this->lexer->moveNext(); continue; } // make sure the @ is followed by either a namespace separator, or // an identifier token - if ((null === $peek = $this->lexer->glimpse()) - || (DocLexer::T_NAMESPACE_SEPARATOR !== $peek['type'] && !in_array($peek['type'], self::$classIdentifiers, true)) - || $peek['position'] !== $this->lexer->lookahead['position'] + 1) { + $peek = $this->lexer->glimpse(); + if ( + ($peek === null) + || ($peek['type'] !== DocLexer::T_NAMESPACE_SEPARATOR && ! in_array( + $peek['type'], + self::$classIdentifiers, + true + )) + || $peek['position'] !== $this->lexer->lookahead['position'] + 1 + ) { $this->lexer->moveNext(); continue; } $this->isNestedAnnotation = false; - if (false !== $annot = $this->Annotation()) { - $annotations[] = $annot; + $annot = $this->Annotation(); + if ($annot === false) { + continue; } + + $annotations[] = $annot; } return $annotations; @@ -673,9 +734,10 @@ private function Annotations() * NameSpacePart ::= identifier | null | false | true * SimpleName ::= identifier | null | false | true * - * @return mixed False if it is not a valid annotation. + * @return object|false False if it is not a valid annotation. * * @throws AnnotationException + * @throws ReflectionException */ private function Annotation() { @@ -684,7 +746,8 @@ private function Annotation() // check if we have an annotation $name = $this->Identifier(); - if ($this->lexer->isNextToken(DocLexer::T_MINUS) + if ( + $this->lexer->isNextToken(DocLexer::T_MINUS) && $this->lexer->nextTokenIsAdjacent() ) { // Annotations with dashes, such as "@foo-" or "@foo-bar", are to be discarded @@ -695,67 +758,91 @@ private function Annotation() // fully qualified names must start with a \ $originalName = $name; - if ('\\' !== $name[0]) { - $pos = strpos($name, '\\'); - $alias = (false === $pos)? $name : substr($name, 0, $pos); - $found = false; + if ($name[0] !== '\\') { + $pos = strpos($name, '\\'); + $alias = ($pos === false) ? $name : substr($name, 0, $pos); + $found = false; $loweredAlias = strtolower($alias); if ($this->namespaces) { foreach ($this->namespaces as $namespace) { - if ($this->classExists($namespace.'\\'.$name)) { - $name = $namespace.'\\'.$name; + if ($this->classExists($namespace . '\\' . $name)) { + $name = $namespace . '\\' . $name; $found = true; break; } } } elseif (isset($this->imports[$loweredAlias])) { - $found = true; - $name = (false !== $pos) - ? $this->imports[$loweredAlias] . substr($name, $pos) - : $this->imports[$loweredAlias]; - } elseif ( ! isset($this->ignoredAnnotationNames[$name]) + $namespace = ltrim($this->imports[$loweredAlias], '\\'); + $name = ($pos !== false) + ? $namespace . substr($name, $pos) + : $namespace; + $found = $this->classExists($name); + } elseif ( + ! isset($this->ignoredAnnotationNames[$name]) && isset($this->imports['__NAMESPACE__']) && $this->classExists($this->imports['__NAMESPACE__'] . '\\' . $name) ) { - $name = $this->imports['__NAMESPACE__'].'\\'.$name; + $name = $this->imports['__NAMESPACE__'] . '\\' . $name; $found = true; } elseif (! isset($this->ignoredAnnotationNames[$name]) && $this->classExists($name)) { $found = true; } - if ( ! $found) { + if (! $found) { if ($this->isIgnoredAnnotation($name)) { return false; } - throw AnnotationException::semanticalError(sprintf('The annotation "@%s" in %s was never imported. Did you maybe forget to add a "use" statement for this annotation?', $name, $this->context)); + throw AnnotationException::semanticalError(sprintf( + <<<'EXCEPTION' +The annotation "@%s" in %s was never imported. Did you maybe forget to add a "use" statement for this annotation? +EXCEPTION + , + $name, + $this->context + )); } } - $name = ltrim($name,'\\'); + $name = ltrim($name, '\\'); - if ( ! $this->classExists($name)) { - throw AnnotationException::semanticalError(sprintf('The annotation "@%s" in %s does not exist, or could not be auto-loaded.', $name, $this->context)); + if (! $this->classExists($name)) { + throw AnnotationException::semanticalError(sprintf( + 'The annotation "@%s" in %s does not exist, or could not be auto-loaded.', + $name, + $this->context + )); } // at this point, $name contains the fully qualified class name of the // annotation, and it is also guaranteed that this class exists, and // that it is loaded - // collects the metadata annotation only if there is not yet - if ( ! isset(self::$annotationMetadata[$name])) { + if (! isset(self::$annotationMetadata[$name])) { $this->collectAnnotationMetadata($name); } // verify that the class is really meant to be an annotation and not just any ordinary class if (self::$annotationMetadata[$name]['is_annotation'] === false) { - if ($this->ignoreNotImportedAnnotations || isset($this->ignoredAnnotationNames[$originalName])) { + if ($this->isIgnoredAnnotation($originalName) || $this->isIgnoredAnnotation($name)) { return false; } - throw AnnotationException::semanticalError(sprintf('The class "%s" is not annotated with @Annotation. Are you sure this class can be used as annotation? If so, then you need to add @Annotation to the _class_ doc comment of "%s". If it is indeed no annotation, then you need to add @IgnoreAnnotation("%s") to the _class_ doc comment of %s.', $name, $name, $originalName, $this->context)); + throw AnnotationException::semanticalError(sprintf( + <<<'EXCEPTION' +The class "%s" is not annotated with @Annotation. +Are you sure this class can be used as annotation? +If so, then you need to add @Annotation to the _class_ doc comment of "%s". +If it is indeed no annotation, then you need to add @IgnoreAnnotation("%s") to the _class_ doc comment of %s. +EXCEPTION + , + $name, + $name, + $originalName, + $this->context + )); } //if target is nested annotation @@ -765,36 +852,57 @@ private function Annotation() $this->isNestedAnnotation = true; //if annotation does not support current target - if (0 === (self::$annotationMetadata[$name]['targets'] & $target) && $target) { + if ((self::$annotationMetadata[$name]['targets'] & $target) === 0 && $target) { throw AnnotationException::semanticalError( - sprintf('Annotation @%s is not allowed to be declared on %s. You may only use this annotation on these code elements: %s.', - $originalName, $this->context, self::$annotationMetadata[$name]['targets_literal']) + sprintf( + <<<'EXCEPTION' +Annotation @%s is not allowed to be declared on %s. You may only use this annotation on these code elements: %s. +EXCEPTION + , + $originalName, + $this->context, + self::$annotationMetadata[$name]['targets_literal'] + ) ); } - $values = $this->MethodCall(); + $arguments = $this->MethodCall(); + $values = $this->resolvePositionalValues($arguments, $name); if (isset(self::$annotationMetadata[$name]['enum'])) { // checks all declared attributes foreach (self::$annotationMetadata[$name]['enum'] as $property => $enum) { // checks if the attribute is a valid enumerator if (isset($values[$property]) && ! in_array($values[$property], $enum['value'])) { - throw AnnotationException::enumeratorError($property, $name, $this->context, $enum['literal'], $values[$property]); + throw AnnotationException::enumeratorError( + $property, + $name, + $this->context, + $enum['literal'], + $values[$property] + ); } } } // checks all declared attributes foreach (self::$annotationMetadata[$name]['attribute_types'] as $property => $type) { - if ($property === self::$annotationMetadata[$name]['default_property'] - && !isset($values[$property]) && isset($values['value'])) { + if ( + $property === self::$annotationMetadata[$name]['default_property'] + && ! isset($values[$property]) && isset($values['value']) + ) { $property = 'value'; } // handle a not given attribute or null value - if (!isset($values[$property])) { + if (! isset($values[$property])) { if ($type['required']) { - throw AnnotationException::requiredError($property, $originalName, $this->context, 'a(n) '.$type['value']); + throw AnnotationException::requiredError( + $property, + $originalName, + $this->context, + 'a(n) ' . $type['value'] + ); } continue; @@ -802,21 +910,65 @@ private function Annotation() if ($type['type'] === 'array') { // handle the case of a single value - if ( ! is_array($values[$property])) { + if (! is_array($values[$property])) { $values[$property] = [$values[$property]]; } // checks if the attribute has array type declaration, such as "array" if (isset($type['array_type'])) { foreach ($values[$property] as $item) { - if (gettype($item) !== $type['array_type'] && !$item instanceof $type['array_type']) { - throw AnnotationException::attributeTypeError($property, $originalName, $this->context, 'either a(n) '.$type['array_type'].', or an array of '.$type['array_type'].'s', $item); + if (gettype($item) !== $type['array_type'] && ! $item instanceof $type['array_type']) { + throw AnnotationException::attributeTypeError( + $property, + $originalName, + $this->context, + 'either a(n) ' . $type['array_type'] . ', or an array of ' . $type['array_type'] . 's', + $item + ); } } } - } elseif (gettype($values[$property]) !== $type['type'] && !$values[$property] instanceof $type['type']) { - throw AnnotationException::attributeTypeError($property, $originalName, $this->context, 'a(n) '.$type['value'], $values[$property]); + } elseif (gettype($values[$property]) !== $type['type'] && ! $values[$property] instanceof $type['type']) { + throw AnnotationException::attributeTypeError( + $property, + $originalName, + $this->context, + 'a(n) ' . $type['value'], + $values[$property] + ); + } + } + + if (self::$annotationMetadata[$name]['has_named_argument_constructor']) { + if (PHP_VERSION_ID >= 80000) { + return new $name(...$values); + } + + $positionalValues = []; + foreach (self::$annotationMetadata[$name]['constructor_args'] as $property => $parameter) { + $positionalValues[$parameter['position']] = $parameter['default']; + } + + foreach ($values as $property => $value) { + if (! isset(self::$annotationMetadata[$name]['constructor_args'][$property])) { + throw AnnotationException::creationError(sprintf( + <<<'EXCEPTION' +The annotation @%s declared on %s does not have a property named "%s" +that can be set through its named arguments constructor. +Available named arguments: %s +EXCEPTION + , + $originalName, + $this->context, + $property, + implode(', ', array_keys(self::$annotationMetadata[$name]['constructor_args'])) + )); + } + + $positionalValues[self::$annotationMetadata[$name]['constructor_args'][$property]['position']] = $value; } + + return new $name(...$positionalValues); } // check if the annotation expects values via the constructor, @@ -828,14 +980,30 @@ private function Annotation() $instance = new $name(); foreach ($values as $property => $value) { - if (!isset(self::$annotationMetadata[$name]['properties'][$property])) { - if ('value' !== $property) { - throw AnnotationException::creationError(sprintf('The annotation @%s declared on %s does not have a property named "%s". Available properties: %s', $originalName, $this->context, $property, implode(', ', self::$annotationMetadata[$name]['properties']))); + if (! isset(self::$annotationMetadata[$name]['properties'][$property])) { + if ($property !== 'value') { + throw AnnotationException::creationError(sprintf( + <<<'EXCEPTION' +The annotation @%s declared on %s does not have a property named "%s". +Available properties: %s +EXCEPTION + , + $originalName, + $this->context, + $property, + implode(', ', self::$annotationMetadata[$name]['properties']) + )); } // handle the case if the property has no annotations - if ( ! $property = self::$annotationMetadata[$name]['default_property']) { - throw AnnotationException::creationError(sprintf('The annotation @%s declared on %s does not accept any values, but got %s.', $originalName, $this->context, json_encode($values))); + $property = self::$annotationMetadata[$name]['default_property']; + if (! $property) { + throw AnnotationException::creationError(sprintf( + 'The annotation @%s declared on %s does not accept any values, but got %s.', + $originalName, + $this->context, + json_encode($values) + )); } } @@ -848,19 +1016,22 @@ private function Annotation() /** * MethodCall ::= ["(" [Values] ")"] * - * @return array + * @return mixed[] + * + * @throws AnnotationException + * @throws ReflectionException */ - private function MethodCall() + private function MethodCall(): array { $values = []; - if ( ! $this->lexer->isNextToken(DocLexer::T_OPEN_PARENTHESIS)) { + if (! $this->lexer->isNextToken(DocLexer::T_OPEN_PARENTHESIS)) { return $values; } $this->match(DocLexer::T_OPEN_PARENTHESIS); - if ( ! $this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { + if (! $this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { $values = $this->Values(); } @@ -872,9 +1043,12 @@ private function MethodCall() /** * Values ::= Array | Value {"," Value}* [","] * - * @return array + * @return mixed[] + * + * @throws AnnotationException + * @throws ReflectionException */ - private function Values() + private function Values(): array { $values = [$this->Value()]; @@ -888,30 +1062,20 @@ private function Values() $token = $this->lexer->lookahead; $value = $this->Value(); - if ( ! is_object($value) && ! is_array($value)) { - $this->syntaxError('Value', $token); - } - $values[] = $value; } + $namedArguments = []; + $positionalArguments = []; foreach ($values as $k => $value) { - if (is_object($value) && $value instanceof \stdClass) { - $values[$value->name] = $value->value; - } else if ( ! isset($values['value'])){ - $values['value'] = $value; + if (is_object($value) && $value instanceof stdClass) { + $namedArguments[$value->name] = $value->value; } else { - if ( ! is_array($values['value'])) { - $values['value'] = [$values['value']]; - } - - $values['value'][] = $value; + $positionalArguments[$k] = $value; } - - unset($values[$k]); } - return $values; + return ['named_arguments' => $namedArguments, 'positional_arguments' => $positionalArguments]; } /** @@ -925,72 +1089,100 @@ private function Constant() { $identifier = $this->Identifier(); - if ( ! defined($identifier) && false !== strpos($identifier, '::') && '\\' !== $identifier[0]) { - list($className, $const) = explode('::', $identifier); + if (! defined($identifier) && strpos($identifier, '::') !== false && $identifier[0] !== '\\') { + [$className, $const] = explode('::', $identifier); - $pos = strpos($className, '\\'); - $alias = (false === $pos) ? $className : substr($className, 0, $pos); - $found = false; + $pos = strpos($className, '\\'); + $alias = ($pos === false) ? $className : substr($className, 0, $pos); + $found = false; $loweredAlias = strtolower($alias); switch (true) { - case !empty ($this->namespaces): + case ! empty($this->namespaces): foreach ($this->namespaces as $ns) { - if (class_exists($ns.'\\'.$className) || interface_exists($ns.'\\'.$className)) { - $className = $ns.'\\'.$className; - $found = true; - break; + if (class_exists($ns . '\\' . $className) || interface_exists($ns . '\\' . $className)) { + $className = $ns . '\\' . $className; + $found = true; + break; } } + break; case isset($this->imports[$loweredAlias]): $found = true; - $className = (false !== $pos) + $className = ($pos !== false) ? $this->imports[$loweredAlias] . substr($className, $pos) : $this->imports[$loweredAlias]; break; default: - if(isset($this->imports['__NAMESPACE__'])) { + if (isset($this->imports['__NAMESPACE__'])) { $ns = $this->imports['__NAMESPACE__']; - if (class_exists($ns.'\\'.$className) || interface_exists($ns.'\\'.$className)) { - $className = $ns.'\\'.$className; - $found = true; + if (class_exists($ns . '\\' . $className) || interface_exists($ns . '\\' . $className)) { + $className = $ns . '\\' . $className; + $found = true; } } + break; } if ($found) { - $identifier = $className . '::' . $const; + $identifier = $className . '::' . $const; } } - // checks if identifier ends with ::class, \strlen('::class') === 7 - $classPos = stripos($identifier, '::class'); - if ($classPos === strlen($identifier) - 7) { - return substr($identifier, 0, $classPos); + /** + * Checks if identifier ends with ::class and remove the leading backslash if it exists. + */ + if ( + $this->identifierEndsWithClassConstant($identifier) && + ! $this->identifierStartsWithBackslash($identifier) + ) { + return substr($identifier, 0, $this->getClassConstantPositionInIdentifier($identifier)); + } + + if ($this->identifierEndsWithClassConstant($identifier) && $this->identifierStartsWithBackslash($identifier)) { + return substr($identifier, 1, $this->getClassConstantPositionInIdentifier($identifier) - 1); } - if (!defined($identifier)) { + if (! defined($identifier)) { throw AnnotationException::semanticalErrorConstants($identifier, $this->context); } return constant($identifier); } + private function identifierStartsWithBackslash(string $identifier): bool + { + return $identifier[0] === '\\'; + } + + private function identifierEndsWithClassConstant(string $identifier): bool + { + return $this->getClassConstantPositionInIdentifier($identifier) === strlen($identifier) - strlen('::class'); + } + + /** + * @return int|false + */ + private function getClassConstantPositionInIdentifier(string $identifier) + { + return stripos($identifier, '::class'); + } + /** * Identifier ::= string * - * @return string + * @throws AnnotationException */ - private function Identifier() + private function Identifier(): string { // check if we have an annotation - if ( ! $this->lexer->isNextTokenAny(self::$classIdentifiers)) { - $this->syntaxError('namespace separator or identifier'); + if (! $this->lexer->isNextTokenAny(self::$classIdentifiers)) { + throw $this->syntaxError('namespace separator or identifier'); } $this->lexer->moveNext(); @@ -998,8 +1190,9 @@ private function Identifier() $className = $this->lexer->token['value']; while ( - null !== $this->lexer->lookahead && - $this->lexer->lookahead['position'] === ($this->lexer->token['position'] + strlen($this->lexer->token['value'])) && + $this->lexer->lookahead !== null && + $this->lexer->lookahead['position'] === ($this->lexer->token['position'] + + strlen($this->lexer->token['value'])) && $this->lexer->isNextToken(DocLexer::T_NAMESPACE_SEPARATOR) ) { $this->match(DocLexer::T_NAMESPACE_SEPARATOR); @@ -1015,12 +1208,15 @@ private function Identifier() * Value ::= PlainValue | FieldAssignment * * @return mixed + * + * @throws AnnotationException + * @throws ReflectionException */ private function Value() { $peek = $this->lexer->glimpse(); - if (DocLexer::T_EQUALS === $peek['type']) { + if ($peek['type'] === DocLexer::T_EQUALS) { return $this->FieldAssignment(); } @@ -1031,6 +1227,9 @@ private function Value() * PlainValue ::= integer | string | float | boolean | Array | Annotation * * @return mixed + * + * @throws AnnotationException + * @throws ReflectionException */ private function PlainValue() { @@ -1049,30 +1248,36 @@ private function PlainValue() switch ($this->lexer->lookahead['type']) { case DocLexer::T_STRING: $this->match(DocLexer::T_STRING); + return $this->lexer->token['value']; case DocLexer::T_INTEGER: $this->match(DocLexer::T_INTEGER); - return (int)$this->lexer->token['value']; + + return (int) $this->lexer->token['value']; case DocLexer::T_FLOAT: $this->match(DocLexer::T_FLOAT); - return (float)$this->lexer->token['value']; + + return (float) $this->lexer->token['value']; case DocLexer::T_TRUE: $this->match(DocLexer::T_TRUE); + return true; case DocLexer::T_FALSE: $this->match(DocLexer::T_FALSE); + return false; case DocLexer::T_NULL: $this->match(DocLexer::T_NULL); + return null; default: - $this->syntaxError('PlainValue'); + throw $this->syntaxError('PlainValue'); } } @@ -1080,16 +1285,17 @@ private function PlainValue() * FieldAssignment ::= FieldName "=" PlainValue * FieldName ::= identifier * - * @return \stdClass + * @throws AnnotationException + * @throws ReflectionException */ - private function FieldAssignment() + private function FieldAssignment(): stdClass { $this->match(DocLexer::T_IDENTIFIER); $fieldName = $this->lexer->token['value']; $this->match(DocLexer::T_EQUALS); - $item = new \stdClass(); + $item = new stdClass(); $item->name = $fieldName; $item->value = $this->PlainValue(); @@ -1099,9 +1305,12 @@ private function FieldAssignment() /** * Array ::= "{" ArrayEntry {"," ArrayEntry}* [","] "}" * - * @return array + * @return mixed[] + * + * @throws AnnotationException + * @throws ReflectionException */ - private function Arrayx() + private function Arrayx(): array { $array = $values = []; @@ -1130,7 +1339,7 @@ private function Arrayx() $this->match(DocLexer::T_CLOSE_CURLY_BRACES); foreach ($values as $value) { - list ($key, $val) = $value; + [$key, $val] = $value; if ($key !== null) { $array[$key] = $val; @@ -1147,15 +1356,19 @@ private function Arrayx() * KeyValuePair ::= Key ("=" | ":") PlainValue | Constant * Key ::= string | integer | Constant * - * @return array + * @throws AnnotationException + * @throws ReflectionException + * + * @phpstan-return array{mixed, mixed} */ - private function ArrayEntry() + private function ArrayEntry(): array { $peek = $this->lexer->glimpse(); - if (DocLexer::T_EQUALS === $peek['type'] - || DocLexer::T_COLON === $peek['type']) { - + if ( + $peek['type'] === DocLexer::T_EQUALS + || $peek['type'] === DocLexer::T_COLON + ) { if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { $key = $this->Constant(); } else { @@ -1173,12 +1386,8 @@ private function ArrayEntry() /** * Checks whether the given $name matches any ignored annotation name or namespace - * - * @param string $name - * - * @return bool */ - private function isIgnoredAnnotation($name) + private function isIgnoredAnnotation(string $name): bool { if ($this->ignoreNotImportedAnnotations || isset($this->ignoredAnnotationNames[$name])) { return true; @@ -1187,11 +1396,64 @@ private function isIgnoredAnnotation($name) foreach (array_keys($this->ignoredAnnotationNamespaces) as $ignoredAnnotationNamespace) { $ignoredAnnotationNamespace = rtrim($ignoredAnnotationNamespace, '\\') . '\\'; - if (0 === stripos(rtrim($name, '\\') . '\\', $ignoredAnnotationNamespace)) { + if (stripos(rtrim($name, '\\') . '\\', $ignoredAnnotationNamespace) === 0) { return true; } } return false; } + + /** + * Resolve positional arguments (without name) to named ones + * + * @param array $arguments + * + * @return array + */ + private function resolvePositionalValues(array $arguments, string $name): array + { + $positionalArguments = $arguments['positional_arguments'] ?? []; + $values = $arguments['named_arguments'] ?? []; + + if ( + self::$annotationMetadata[$name]['has_named_argument_constructor'] + && self::$annotationMetadata[$name]['default_property'] !== null + ) { + // We must ensure that we don't have positional arguments after named ones + $positions = array_keys($positionalArguments); + $lastPosition = null; + foreach ($positions as $position) { + if ( + ($lastPosition === null && $position !== 0) || + ($lastPosition !== null && $position !== $lastPosition + 1) + ) { + throw $this->syntaxError('Positional arguments after named arguments is not allowed'); + } + + $lastPosition = $position; + } + + foreach (self::$annotationMetadata[$name]['constructor_args'] as $property => $parameter) { + $position = $parameter['position']; + if (isset($values[$property]) || ! isset($positionalArguments[$position])) { + continue; + } + + $values[$property] = $positionalArguments[$position]; + } + } else { + if (count($positionalArguments) > 0 && ! isset($values['value'])) { + if (count($positionalArguments) === 1) { + $value = array_pop($positionalArguments); + } else { + $value = array_values($positionalArguments); + } + + $values['value'] = $value; + } + } + + return $values; + } } diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php index 40141af2..6c6c22c3 100644 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php @@ -1,89 +1,84 @@ . - */ namespace Doctrine\Common\Annotations; +use InvalidArgumentException; +use ReflectionClass; +use ReflectionMethod; +use ReflectionProperty; +use RuntimeException; + +use function chmod; +use function file_put_contents; +use function filemtime; +use function gettype; +use function is_dir; +use function is_file; +use function is_int; +use function is_writable; +use function mkdir; +use function rename; +use function rtrim; +use function serialize; +use function sha1; +use function sprintf; +use function strtr; +use function tempnam; +use function uniqid; +use function unlink; +use function var_export; + /** * File cache reader for annotations. * - * @author Johannes M. Schmitt - * @author Benjamin Eberlei - * * @deprecated the FileCacheReader is deprecated and will be removed * in version 2.0.0 of doctrine/annotations. Please use the - * {@see \Doctrine\Common\Annotations\CachedReader} instead. + * {@see \Doctrine\Common\Annotations\PsrCachedReader} instead. */ class FileCacheReader implements Reader { - /** - * @var Reader - */ + /** @var Reader */ private $reader; - /** - * @var string - */ + /** @var string */ private $dir; - /** - * @var bool - */ + /** @var bool */ private $debug; - /** - * @var array - */ + /** @phpstan-var array> */ private $loadedAnnotations = []; - /** - * @var array - */ + /** @var array */ private $classNameHashes = []; - /** - * @var int - */ + /** @var int */ private $umask; /** - * Constructor. - * - * @param Reader $reader - * @param string $cacheDir - * @param boolean $debug + * @param string $cacheDir + * @param bool $debug + * @param int $umask * - * @throws \InvalidArgumentException + * @throws InvalidArgumentException */ public function __construct(Reader $reader, $cacheDir, $debug = false, $umask = 0002) { - if ( ! is_int($umask)) { - throw new \InvalidArgumentException(sprintf( + if (! is_int($umask)) { + throw new InvalidArgumentException(sprintf( 'The parameter umask must be an integer, was: %s', gettype($umask) )); } $this->reader = $reader; - $this->umask = $umask; + $this->umask = $umask; - if (!is_dir($cacheDir) && !@mkdir($cacheDir, 0777 & (~$this->umask), true)) { - throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist and could not be created.', $cacheDir)); + if (! is_dir($cacheDir) && ! @mkdir($cacheDir, 0777 & (~$this->umask), true)) { + throw new InvalidArgumentException(sprintf( + 'The directory "%s" does not exist and could not be created.', + $cacheDir + )); } $this->dir = rtrim($cacheDir, '\\/'); @@ -93,31 +88,37 @@ public function __construct(Reader $reader, $cacheDir, $debug = false, $umask = /** * {@inheritDoc} */ - public function getClassAnnotations(\ReflectionClass $class) + public function getClassAnnotations(ReflectionClass $class) { - if ( ! isset($this->classNameHashes[$class->name])) { + if (! isset($this->classNameHashes[$class->name])) { $this->classNameHashes[$class->name] = sha1($class->name); } + $key = $this->classNameHashes[$class->name]; if (isset($this->loadedAnnotations[$key])) { return $this->loadedAnnotations[$key]; } - $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php'; - if (!is_file($path)) { + $path = $this->dir . '/' . strtr($key, '\\', '-') . '.cache.php'; + if (! is_file($path)) { $annot = $this->reader->getClassAnnotations($class); $this->saveCacheFile($path, $annot); + return $this->loadedAnnotations[$key] = $annot; } - if ($this->debug - && (false !== $filename = $class->getFileName()) - && filemtime($path) < filemtime($filename)) { + $filename = $class->getFilename(); + if ( + $this->debug + && $filename !== false + && filemtime($path) < filemtime($filename) + ) { @unlink($path); $annot = $this->reader->getClassAnnotations($class); $this->saveCacheFile($path, $annot); + return $this->loadedAnnotations[$key] = $annot; } @@ -127,32 +128,38 @@ public function getClassAnnotations(\ReflectionClass $class) /** * {@inheritDoc} */ - public function getPropertyAnnotations(\ReflectionProperty $property) + public function getPropertyAnnotations(ReflectionProperty $property) { $class = $property->getDeclaringClass(); - if ( ! isset($this->classNameHashes[$class->name])) { + if (! isset($this->classNameHashes[$class->name])) { $this->classNameHashes[$class->name] = sha1($class->name); } - $key = $this->classNameHashes[$class->name].'$'.$property->getName(); + + $key = $this->classNameHashes[$class->name] . '$' . $property->getName(); if (isset($this->loadedAnnotations[$key])) { return $this->loadedAnnotations[$key]; } - $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php'; - if (!is_file($path)) { + $path = $this->dir . '/' . strtr($key, '\\', '-') . '.cache.php'; + if (! is_file($path)) { $annot = $this->reader->getPropertyAnnotations($property); $this->saveCacheFile($path, $annot); + return $this->loadedAnnotations[$key] = $annot; } - if ($this->debug - && (false !== $filename = $class->getFilename()) - && filemtime($path) < filemtime($filename)) { + $filename = $class->getFilename(); + if ( + $this->debug + && $filename !== false + && filemtime($path) < filemtime($filename) + ) { @unlink($path); $annot = $this->reader->getPropertyAnnotations($property); $this->saveCacheFile($path, $annot); + return $this->loadedAnnotations[$key] = $annot; } @@ -162,32 +169,38 @@ public function getPropertyAnnotations(\ReflectionProperty $property) /** * {@inheritDoc} */ - public function getMethodAnnotations(\ReflectionMethod $method) + public function getMethodAnnotations(ReflectionMethod $method) { $class = $method->getDeclaringClass(); - if ( ! isset($this->classNameHashes[$class->name])) { + if (! isset($this->classNameHashes[$class->name])) { $this->classNameHashes[$class->name] = sha1($class->name); } - $key = $this->classNameHashes[$class->name].'#'.$method->getName(); + + $key = $this->classNameHashes[$class->name] . '#' . $method->getName(); if (isset($this->loadedAnnotations[$key])) { return $this->loadedAnnotations[$key]; } - $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php'; - if (!is_file($path)) { + $path = $this->dir . '/' . strtr($key, '\\', '-') . '.cache.php'; + if (! is_file($path)) { $annot = $this->reader->getMethodAnnotations($method); $this->saveCacheFile($path, $annot); + return $this->loadedAnnotations[$key] = $annot; } - if ($this->debug - && (false !== $filename = $class->getFilename()) - && filemtime($path) < filemtime($filename)) { + $filename = $class->getFilename(); + if ( + $this->debug + && $filename !== false + && filemtime($path) < filemtime($filename) + ) { @unlink($path); $annot = $this->reader->getMethodAnnotations($method); $this->saveCacheFile($path, $annot); + return $this->loadedAnnotations[$key] = $annot; } @@ -204,36 +217,48 @@ public function getMethodAnnotations(\ReflectionMethod $method) */ private function saveCacheFile($path, $data) { - if (!is_writable($this->dir)) { - throw new \InvalidArgumentException(sprintf('The directory "%s" is not writable. Both, the webserver and the console user need access. You can manage access rights for multiple users with "chmod +a". If your system does not support this, check out the acl package.', $this->dir)); + if (! is_writable($this->dir)) { + throw new InvalidArgumentException(sprintf( + <<<'EXCEPTION' +The directory "%s" is not writable. Both the webserver and the console user need access. +You can manage access rights for multiple users with "chmod +a". +If your system does not support this, check out the acl package., +EXCEPTION + , + $this->dir + )); } $tempfile = tempnam($this->dir, uniqid('', true)); - if (false === $tempfile) { - throw new \RuntimeException(sprintf('Unable to create tempfile in directory: %s', $this->dir)); + if ($tempfile === false) { + throw new RuntimeException(sprintf('Unable to create tempfile in directory: %s', $this->dir)); } @chmod($tempfile, 0666 & (~$this->umask)); - $written = file_put_contents($tempfile, 'umask)); - if (false === rename($tempfile, $path)) { + if (rename($tempfile, $path) === false) { @unlink($tempfile); - throw new \RuntimeException(sprintf('Unable to rename %s to %s', $tempfile, $path)); + + throw new RuntimeException(sprintf('Unable to rename %s to %s', $tempfile, $path)); } } /** * {@inheritDoc} */ - public function getClassAnnotation(\ReflectionClass $class, $annotationName) + public function getClassAnnotation(ReflectionClass $class, $annotationName) { $annotations = $this->getClassAnnotations($class); @@ -249,7 +274,7 @@ public function getClassAnnotation(\ReflectionClass $class, $annotationName) /** * {@inheritDoc} */ - public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) + public function getMethodAnnotation(ReflectionMethod $method, $annotationName) { $annotations = $this->getMethodAnnotations($method); @@ -265,7 +290,7 @@ public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) /** * {@inheritDoc} */ - public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName) + public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) { $annotations = $this->getPropertyAnnotations($property); diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php new file mode 100644 index 00000000..2efeb1d2 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php @@ -0,0 +1,177 @@ + true, + 'Attribute' => true, + 'Attributes' => true, + /* Can we enable this? 'Enum' => true, */ + 'Required' => true, + 'Target' => true, + 'NamedArgumentConstructor' => true, + ]; + + private const WidelyUsedNonStandard = [ + 'fix' => true, + 'fixme' => true, + 'override' => true, + ]; + + private const PhpDocumentor1 = [ + 'abstract' => true, + 'access' => true, + 'code' => true, + 'deprec' => true, + 'endcode' => true, + 'exception' => true, + 'final' => true, + 'ingroup' => true, + 'inheritdoc' => true, + 'inheritDoc' => true, + 'magic' => true, + 'name' => true, + 'private' => true, + 'static' => true, + 'staticvar' => true, + 'staticVar' => true, + 'toc' => true, + 'tutorial' => true, + 'throw' => true, + ]; + + private const PhpDocumentor2 = [ + 'api' => true, + 'author' => true, + 'category' => true, + 'copyright' => true, + 'deprecated' => true, + 'example' => true, + 'filesource' => true, + 'global' => true, + 'ignore' => true, + /* Can we enable this? 'index' => true, */ + 'internal' => true, + 'license' => true, + 'link' => true, + 'method' => true, + 'package' => true, + 'param' => true, + 'property' => true, + 'property-read' => true, + 'property-write' => true, + 'return' => true, + 'see' => true, + 'since' => true, + 'source' => true, + 'subpackage' => true, + 'throws' => true, + 'todo' => true, + 'TODO' => true, + 'usedby' => true, + 'uses' => true, + 'var' => true, + 'version' => true, + ]; + + private const PHPUnit = [ + 'author' => true, + 'after' => true, + 'afterClass' => true, + 'backupGlobals' => true, + 'backupStaticAttributes' => true, + 'before' => true, + 'beforeClass' => true, + 'codeCoverageIgnore' => true, + 'codeCoverageIgnoreStart' => true, + 'codeCoverageIgnoreEnd' => true, + 'covers' => true, + 'coversDefaultClass' => true, + 'coversNothing' => true, + 'dataProvider' => true, + 'depends' => true, + 'doesNotPerformAssertions' => true, + 'expectedException' => true, + 'expectedExceptionCode' => true, + 'expectedExceptionMessage' => true, + 'expectedExceptionMessageRegExp' => true, + 'group' => true, + 'large' => true, + 'medium' => true, + 'preserveGlobalState' => true, + 'requires' => true, + 'runTestsInSeparateProcesses' => true, + 'runInSeparateProcess' => true, + 'small' => true, + 'test' => true, + 'testdox' => true, + 'testWith' => true, + 'ticket' => true, + 'uses' => true, + ]; + + private const PhpCheckStyle = ['SuppressWarnings' => true]; + + private const PhpStorm = ['noinspection' => true]; + + private const PEAR = ['package_version' => true]; + + private const PlainUML = [ + 'startuml' => true, + 'enduml' => true, + ]; + + private const Symfony = ['experimental' => true]; + + private const PhpCodeSniffer = [ + 'codingStandardsIgnoreStart' => true, + 'codingStandardsIgnoreEnd' => true, + ]; + + private const SlevomatCodingStandard = ['phpcsSuppress' => true]; + + private const Phan = ['suppress' => true]; + + private const Rector = ['noRector' => true]; + + private const StaticAnalysis = [ + // PHPStan, Psalm + 'extends' => true, + 'implements' => true, + 'template' => true, + 'use' => true, + + // Psalm + 'pure' => true, + 'immutable' => true, + ]; + + public const LIST = self::Reserved + + self::WidelyUsedNonStandard + + self::PhpDocumentor1 + + self::PhpDocumentor2 + + self::PHPUnit + + self::PhpCheckStyle + + self::PhpStorm + + self::PEAR + + self::PlainUML + + self::Symfony + + self::SlevomatCodingStandard + + self::PhpCodeSniffer + + self::Phan + + self::Rector + + self::StaticAnalysis; + + private function __construct() + { + } +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php index 4e8c3c8c..42e70765 100644 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php @@ -1,41 +1,22 @@ . - */ namespace Doctrine\Common\Annotations; +use ReflectionClass; +use ReflectionMethod; +use ReflectionProperty; + +use function call_user_func_array; +use function get_class; + /** * Allows the reader to be used in-place of Doctrine's reader. - * - * @author Johannes M. Schmitt */ class IndexedReader implements Reader { - /** - * @var Reader - */ + /** @var Reader */ private $delegate; - /** - * Constructor. - * - * @param Reader $reader - */ public function __construct(Reader $reader) { $this->delegate = $reader; @@ -44,7 +25,7 @@ public function __construct(Reader $reader) /** * {@inheritDoc} */ - public function getClassAnnotations(\ReflectionClass $class) + public function getClassAnnotations(ReflectionClass $class) { $annotations = []; foreach ($this->delegate->getClassAnnotations($class) as $annot) { @@ -57,7 +38,7 @@ public function getClassAnnotations(\ReflectionClass $class) /** * {@inheritDoc} */ - public function getClassAnnotation(\ReflectionClass $class, $annotation) + public function getClassAnnotation(ReflectionClass $class, $annotation) { return $this->delegate->getClassAnnotation($class, $annotation); } @@ -65,7 +46,7 @@ public function getClassAnnotation(\ReflectionClass $class, $annotation) /** * {@inheritDoc} */ - public function getMethodAnnotations(\ReflectionMethod $method) + public function getMethodAnnotations(ReflectionMethod $method) { $annotations = []; foreach ($this->delegate->getMethodAnnotations($method) as $annot) { @@ -78,7 +59,7 @@ public function getMethodAnnotations(\ReflectionMethod $method) /** * {@inheritDoc} */ - public function getMethodAnnotation(\ReflectionMethod $method, $annotation) + public function getMethodAnnotation(ReflectionMethod $method, $annotation) { return $this->delegate->getMethodAnnotation($method, $annotation); } @@ -86,7 +67,7 @@ public function getMethodAnnotation(\ReflectionMethod $method, $annotation) /** * {@inheritDoc} */ - public function getPropertyAnnotations(\ReflectionProperty $property) + public function getPropertyAnnotations(ReflectionProperty $property) { $annotations = []; foreach ($this->delegate->getPropertyAnnotations($property) as $annot) { @@ -99,7 +80,7 @@ public function getPropertyAnnotations(\ReflectionProperty $property) /** * {@inheritDoc} */ - public function getPropertyAnnotation(\ReflectionProperty $property, $annotation) + public function getPropertyAnnotation(ReflectionProperty $property, $annotation) { return $this->delegate->getPropertyAnnotation($property, $annotation); } @@ -107,8 +88,8 @@ public function getPropertyAnnotation(\ReflectionProperty $property, $annotation /** * Proxies all methods to the delegate. * - * @param string $method - * @param array $args + * @param string $method + * @param mixed[] $args * * @return mixed */ diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php new file mode 100644 index 00000000..8af224c0 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php @@ -0,0 +1,14 @@ +. - */ namespace Doctrine\Common\Annotations; +use ReflectionClass; +use ReflectionFunction; use SplFileObject; +use function is_file; +use function method_exists; +use function preg_quote; +use function preg_replace; + /** * Parses a file for namespaces/use/class declarations. - * - * @author Fabien Potencier - * @author Christian Kaps */ final class PhpParser { /** * Parses a class. * - * @param \ReflectionClass $class A ReflectionClass object. + * @deprecated use parseUseStatements instead + * + * @param ReflectionClass $class A ReflectionClass object. + * + * @return array A list with use statements in the form (Alias => FQN). + */ + public function parseClass(ReflectionClass $class) + { + return $this->parseUseStatements($class); + } + + /** + * Parse a class or function for use statements. + * + * @param ReflectionClass|ReflectionFunction $reflection * - * @return array A list with use statements in the form (Alias => FQN). + * @psalm-return array a list with use statements in the form (Alias => FQN). */ - public function parseClass(\ReflectionClass $class) + public function parseUseStatements($reflection): array { - if (method_exists($class, 'getUseStatements')) { - return $class->getUseStatements(); + if (method_exists($reflection, 'getUseStatements')) { + return $reflection->getUseStatements(); } - if (false === $filename = $class->getFileName()) { + $filename = $reflection->getFileName(); + + if ($filename === false) { return []; } - $content = $this->getFileContent($filename, $class->getStartLine()); + $content = $this->getFileContent($filename, $reflection->getStartLine()); - if (null === $content) { + if ($content === null) { return []; } - $namespace = preg_quote($class->getNamespaceName()); - $content = preg_replace('/^.*?(\bnamespace\s+' . $namespace . '\s*[;{].*)$/s', '\\1', $content); + $namespace = preg_quote($reflection->getNamespaceName()); + $content = preg_replace('/^.*?(\bnamespace\s+' . $namespace . '\s*[;{].*)$/s', '\\1', $content); $tokenizer = new TokenParser('parseUseStatements($class->getNamespaceName()); - - return $statements; + return $tokenizer->parseUseStatements($reflection->getNamespaceName()); } /** * Gets the content of the file right up to the given line number. * - * @param string $filename The name of the file to load. - * @param integer $lineNumber The number of lines to read from file. + * @param string $filename The name of the file to load. + * @param int $lineNumber The number of lines to read from file. * * @return string|null The content of the file or null if the file does not exist. */ private function getFileContent($filename, $lineNumber) { - if ( ! is_file($filename)) { + if (! is_file($filename)) { return null; } $content = ''; $lineCnt = 0; - $file = new SplFileObject($filename); - while (!$file->eof()) { - if ($lineCnt++ == $lineNumber) { + $file = new SplFileObject($filename); + while (! $file->eof()) { + if ($lineCnt++ === $lineNumber) { break; } diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php new file mode 100644 index 00000000..a7099d57 --- /dev/null +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php @@ -0,0 +1,232 @@ +> */ + private $loadedAnnotations = []; + + /** @var int[] */ + private $loadedFilemtimes = []; + + public function __construct(Reader $reader, CacheItemPoolInterface $cache, bool $debug = false) + { + $this->delegate = $reader; + $this->cache = $cache; + $this->debug = (bool) $debug; + } + + /** + * {@inheritDoc} + */ + public function getClassAnnotations(ReflectionClass $class) + { + $cacheKey = $class->getName(); + + if (isset($this->loadedAnnotations[$cacheKey])) { + return $this->loadedAnnotations[$cacheKey]; + } + + $annots = $this->fetchFromCache($cacheKey, $class, 'getClassAnnotations', $class); + + return $this->loadedAnnotations[$cacheKey] = $annots; + } + + /** + * {@inheritDoc} + */ + public function getClassAnnotation(ReflectionClass $class, $annotationName) + { + foreach ($this->getClassAnnotations($class) as $annot) { + if ($annot instanceof $annotationName) { + return $annot; + } + } + + return null; + } + + /** + * {@inheritDoc} + */ + public function getPropertyAnnotations(ReflectionProperty $property) + { + $class = $property->getDeclaringClass(); + $cacheKey = $class->getName() . '$' . $property->getName(); + + if (isset($this->loadedAnnotations[$cacheKey])) { + return $this->loadedAnnotations[$cacheKey]; + } + + $annots = $this->fetchFromCache($cacheKey, $class, 'getPropertyAnnotations', $property); + + return $this->loadedAnnotations[$cacheKey] = $annots; + } + + /** + * {@inheritDoc} + */ + public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) + { + foreach ($this->getPropertyAnnotations($property) as $annot) { + if ($annot instanceof $annotationName) { + return $annot; + } + } + + return null; + } + + /** + * {@inheritDoc} + */ + public function getMethodAnnotations(ReflectionMethod $method) + { + $class = $method->getDeclaringClass(); + $cacheKey = $class->getName() . '#' . $method->getName(); + + if (isset($this->loadedAnnotations[$cacheKey])) { + return $this->loadedAnnotations[$cacheKey]; + } + + $annots = $this->fetchFromCache($cacheKey, $class, 'getMethodAnnotations', $method); + + return $this->loadedAnnotations[$cacheKey] = $annots; + } + + /** + * {@inheritDoc} + */ + public function getMethodAnnotation(ReflectionMethod $method, $annotationName) + { + foreach ($this->getMethodAnnotations($method) as $annot) { + if ($annot instanceof $annotationName) { + return $annot; + } + } + + return null; + } + + public function clearLoadedAnnotations(): void + { + $this->loadedAnnotations = []; + $this->loadedFilemtimes = []; + } + + /** @return mixed[] */ + private function fetchFromCache( + string $cacheKey, + ReflectionClass $class, + string $method, + Reflector $reflector + ): array { + $cacheKey = rawurlencode($cacheKey); + + $item = $this->cache->getItem($cacheKey); + if (($this->debug && ! $this->refresh($cacheKey, $class)) || ! $item->isHit()) { + $this->cache->save($item->set($this->delegate->{$method}($reflector))); + } + + return $item->get(); + } + + /** + * Used in debug mode to check if the cache is fresh. + * + * @return bool Returns true if the cache was fresh, or false if the class + * being read was modified since writing to the cache. + */ + private function refresh(string $cacheKey, ReflectionClass $class): bool + { + $lastModification = $this->getLastModification($class); + if ($lastModification === 0) { + return true; + } + + $item = $this->cache->getItem('[C]' . $cacheKey); + if ($item->isHit() && $item->get() >= $lastModification) { + return true; + } + + $this->cache->save($item->set(time())); + + return false; + } + + /** + * Returns the time the class was last modified, testing traits and parents + */ + private function getLastModification(ReflectionClass $class): int + { + $filename = $class->getFileName(); + + if (isset($this->loadedFilemtimes[$filename])) { + return $this->loadedFilemtimes[$filename]; + } + + $parent = $class->getParentClass(); + + $lastModification = max(array_merge( + [$filename ? filemtime($filename) : 0], + array_map(function (ReflectionClass $reflectionTrait): int { + return $this->getTraitLastModificationTime($reflectionTrait); + }, $class->getTraits()), + array_map(function (ReflectionClass $class): int { + return $this->getLastModification($class); + }, $class->getInterfaces()), + $parent ? [$this->getLastModification($parent)] : [] + )); + + assert($lastModification !== false); + + return $this->loadedFilemtimes[$filename] = $lastModification; + } + + private function getTraitLastModificationTime(ReflectionClass $reflectionTrait): int + { + $fileName = $reflectionTrait->getFileName(); + + if (isset($this->loadedFilemtimes[$fileName])) { + return $this->loadedFilemtimes[$fileName]; + } + + $lastModificationTime = max(array_merge( + [$fileName ? filemtime($fileName) : 0], + array_map(function (ReflectionClass $reflectionTrait): int { + return $this->getTraitLastModificationTime($reflectionTrait); + }, $reflectionTrait->getTraits()) + )); + + assert($lastModificationTime !== false); + + return $this->loadedFilemtimes[$fileName] = $lastModificationTime; + } +} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php index 4774f873..0663ffda 100644 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php @@ -1,89 +1,80 @@ . - */ namespace Doctrine\Common\Annotations; +use ReflectionClass; +use ReflectionMethod; +use ReflectionProperty; + /** * Interface for annotation readers. - * - * @author Johannes M. Schmitt */ interface Reader { /** * Gets the annotations applied to a class. * - * @param \ReflectionClass $class The ReflectionClass of the class from which - * the class annotations should be read. + * @param ReflectionClass $class The ReflectionClass of the class from which + * the class annotations should be read. * - * @return array An array of Annotations. + * @return array An array of Annotations. */ - function getClassAnnotations(\ReflectionClass $class); + public function getClassAnnotations(ReflectionClass $class); /** * Gets a class annotation. * - * @param \ReflectionClass $class The ReflectionClass of the class from which - * the class annotations should be read. - * @param string $annotationName The name of the annotation. + * @param ReflectionClass $class The ReflectionClass of the class from which + * the class annotations should be read. + * @param class-string $annotationName The name of the annotation. + * + * @return T|null The Annotation or NULL, if the requested annotation does not exist. * - * @return object|null The Annotation or NULL, if the requested annotation does not exist. + * @template T */ - function getClassAnnotation(\ReflectionClass $class, $annotationName); + public function getClassAnnotation(ReflectionClass $class, $annotationName); /** * Gets the annotations applied to a method. * - * @param \ReflectionMethod $method The ReflectionMethod of the method from which - * the annotations should be read. + * @param ReflectionMethod $method The ReflectionMethod of the method from which + * the annotations should be read. * - * @return array An array of Annotations. + * @return array An array of Annotations. */ - function getMethodAnnotations(\ReflectionMethod $method); + public function getMethodAnnotations(ReflectionMethod $method); /** * Gets a method annotation. * - * @param \ReflectionMethod $method The ReflectionMethod to read the annotations from. - * @param string $annotationName The name of the annotation. + * @param ReflectionMethod $method The ReflectionMethod to read the annotations from. + * @param class-string $annotationName The name of the annotation. * - * @return object|null The Annotation or NULL, if the requested annotation does not exist. + * @return T|null The Annotation or NULL, if the requested annotation does not exist. + * + * @template T */ - function getMethodAnnotation(\ReflectionMethod $method, $annotationName); + public function getMethodAnnotation(ReflectionMethod $method, $annotationName); /** * Gets the annotations applied to a property. * - * @param \ReflectionProperty $property The ReflectionProperty of the property - * from which the annotations should be read. + * @param ReflectionProperty $property The ReflectionProperty of the property + * from which the annotations should be read. * - * @return array An array of Annotations. + * @return array An array of Annotations. */ - function getPropertyAnnotations(\ReflectionProperty $property); + public function getPropertyAnnotations(ReflectionProperty $property); /** * Gets a property annotation. * - * @param \ReflectionProperty $property The ReflectionProperty to read the annotations from. - * @param string $annotationName The name of the annotation. + * @param ReflectionProperty $property The ReflectionProperty to read the annotations from. + * @param class-string $annotationName The name of the annotation. + * + * @return T|null The Annotation or NULL, if the requested annotation does not exist. * - * @return object|null The Annotation or NULL, if the requested annotation does not exist. + * @template T */ - function getPropertyAnnotation(\ReflectionProperty $property, $annotationName); + public function getPropertyAnnotation(ReflectionProperty $property, $annotationName); } diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php index d4757eea..8a78c119 100644 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php @@ -1,44 +1,25 @@ . - */ namespace Doctrine\Common\Annotations; +use ReflectionClass; +use ReflectionMethod; +use ReflectionProperty; + /** * Simple Annotation Reader. * * This annotation reader is intended to be used in projects where you have * full-control over all annotations that are available. * - * @since 2.2 - * @author Johannes M. Schmitt - * @author Fabio B. Silva + * @deprecated Deprecated in favour of using AnnotationReader */ class SimpleAnnotationReader implements Reader { - /** - * @var DocParser - */ + /** @var DocParser */ private $parser; /** - * Constructor. - * * Initializes a new SimpleAnnotationReader. */ public function __construct() @@ -62,31 +43,37 @@ public function addNamespace($namespace) /** * {@inheritDoc} */ - public function getClassAnnotations(\ReflectionClass $class) + public function getClassAnnotations(ReflectionClass $class) { - return $this->parser->parse($class->getDocComment(), 'class '.$class->getName()); + return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName()); } /** * {@inheritDoc} */ - public function getMethodAnnotations(\ReflectionMethod $method) + public function getMethodAnnotations(ReflectionMethod $method) { - return $this->parser->parse($method->getDocComment(), 'method '.$method->getDeclaringClass()->name.'::'.$method->getName().'()'); + return $this->parser->parse( + $method->getDocComment(), + 'method ' . $method->getDeclaringClass()->name . '::' . $method->getName() . '()' + ); } /** * {@inheritDoc} */ - public function getPropertyAnnotations(\ReflectionProperty $property) + public function getPropertyAnnotations(ReflectionProperty $property) { - return $this->parser->parse($property->getDocComment(), 'property '.$property->getDeclaringClass()->name.'::$'.$property->getName()); + return $this->parser->parse( + $property->getDocComment(), + 'property ' . $property->getDeclaringClass()->name . '::$' . $property->getName() + ); } /** * {@inheritDoc} */ - public function getClassAnnotation(\ReflectionClass $class, $annotationName) + public function getClassAnnotation(ReflectionClass $class, $annotationName) { foreach ($this->getClassAnnotations($class) as $annot) { if ($annot instanceof $annotationName) { @@ -100,7 +87,7 @@ public function getClassAnnotation(\ReflectionClass $class, $annotationName) /** * {@inheritDoc} */ - public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) + public function getMethodAnnotation(ReflectionMethod $method, $annotationName) { foreach ($this->getMethodAnnotations($method) as $annot) { if ($annot instanceof $annotationName) { @@ -114,7 +101,7 @@ public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) /** * {@inheritDoc} */ - public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName) + public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) { foreach ($this->getPropertyAnnotations($property) as $annot) { if ($annot instanceof $annotationName) { diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php index 03d9320a..9605fb8d 100644 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php +++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php @@ -1,36 +1,34 @@ . - */ namespace Doctrine\Common\Annotations; +use function array_merge; +use function count; +use function explode; +use function strtolower; +use function token_get_all; + +use const PHP_VERSION_ID; +use const T_AS; +use const T_COMMENT; +use const T_DOC_COMMENT; +use const T_NAME_FULLY_QUALIFIED; +use const T_NAME_QUALIFIED; +use const T_NAMESPACE; +use const T_NS_SEPARATOR; +use const T_STRING; +use const T_USE; +use const T_WHITESPACE; + /** * Parses a file for namespaces/use/class declarations. - * - * @author Fabien Potencier - * @author Christian Kaps */ class TokenParser { /** * The token list. * - * @var array + * @phpstan-var list */ private $tokens; @@ -70,19 +68,20 @@ public function __construct($contents) /** * Gets the next non whitespace and non comment token. * - * @param boolean $docCommentIsComment If TRUE then a doc comment is considered a comment and skipped. - * If FALSE then only whitespace and normal comments are skipped. + * @param bool $docCommentIsComment If TRUE then a doc comment is considered a comment and skipped. + * If FALSE then only whitespace and normal comments are skipped. * - * @return array|null The token if exists, null otherwise. + * @return mixed[]|string|null The token if exists, null otherwise. */ - public function next($docCommentIsComment = TRUE) + public function next($docCommentIsComment = true) { for ($i = $this->pointer; $i < $this->numTokens; $i++) { $this->pointer++; - if ($this->tokens[$i][0] === T_WHITESPACE || + if ( + $this->tokens[$i][0] === T_WHITESPACE || $this->tokens[$i][0] === T_COMMENT || - ($docCommentIsComment && $this->tokens[$i][0] === T_DOC_COMMENT)) { - + ($docCommentIsComment && $this->tokens[$i][0] === T_DOC_COMMENT) + ) { continue; } @@ -95,38 +94,47 @@ public function next($docCommentIsComment = TRUE) /** * Parses a single use statement. * - * @return array A list with all found class names for a use statement. + * @return array A list with all found class names for a use statement. */ public function parseUseStatement() { - - $groupRoot = ''; - $class = ''; - $alias = ''; - $statements = []; + $groupRoot = ''; + $class = ''; + $alias = ''; + $statements = []; $explicitAlias = false; while (($token = $this->next())) { - $isNameToken = $token[0] === T_STRING || $token[0] === T_NS_SEPARATOR; - if (!$explicitAlias && $isNameToken) { + if (! $explicitAlias && $token[0] === T_STRING) { $class .= $token[1]; + $alias = $token[1]; + } elseif ($explicitAlias && $token[0] === T_STRING) { $alias = $token[1]; - } else if ($explicitAlias && $isNameToken) { - $alias .= $token[1]; - } else if ($token[0] === T_AS) { + } elseif ( + PHP_VERSION_ID >= 80000 && + ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED) + ) { + $class .= $token[1]; + + $classSplit = explode('\\', $token[1]); + $alias = $classSplit[count($classSplit) - 1]; + } elseif ($token[0] === T_NS_SEPARATOR) { + $class .= '\\'; + $alias = ''; + } elseif ($token[0] === T_AS) { $explicitAlias = true; - $alias = ''; - } else if ($token === ',') { + $alias = ''; + } elseif ($token === ',') { $statements[strtolower($alias)] = $groupRoot . $class; - $class = ''; - $alias = ''; - $explicitAlias = false; - } else if ($token === ';') { + $class = ''; + $alias = ''; + $explicitAlias = false; + } elseif ($token === ';') { $statements[strtolower($alias)] = $groupRoot . $class; break; - } else if ($token === '{' ) { + } elseif ($token === '{') { $groupRoot = $class; - $class = ''; - } else if ($token === '}' ) { + $class = ''; + } elseif ($token === '}') { continue; } else { break; @@ -141,7 +149,7 @@ public function parseUseStatement() * * @param string $namespaceName The namespace name of the reflected class. * - * @return array A list with all found use statements. + * @return array A list with all found use statements. */ public function parseUseStatements($namespaceName) { @@ -151,7 +159,8 @@ public function parseUseStatements($namespaceName) $statements = array_merge($statements, $this->parseUseStatement()); continue; } - if ($token[0] !== T_NAMESPACE || $this->parseNamespace() != $namespaceName) { + + if ($token[0] !== T_NAMESPACE || $this->parseNamespace() !== $namespaceName) { continue; } @@ -172,7 +181,12 @@ public function parseUseStatements($namespaceName) public function parseNamespace() { $name = ''; - while (($token = $this->next()) && ($token[0] === T_STRING || $token[0] === T_NS_SEPARATOR)) { + while ( + ($token = $this->next()) && ($token[0] === T_STRING || $token[0] === T_NS_SEPARATOR || ( + PHP_VERSION_ID >= 80000 && + ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED) + )) + ) { $name .= $token[1]; } diff --git a/vendor/doctrine/annotations/phpbench.json.dist b/vendor/doctrine/annotations/phpbench.json.dist deleted file mode 100644 index 35edde95..00000000 --- a/vendor/doctrine/annotations/phpbench.json.dist +++ /dev/null @@ -1,4 +0,0 @@ -{ - "bootstrap": "tests/Doctrine/Performance/Common/bootstrap.php", - "path": "tests/Doctrine/Performance/Common/Annotations" -} diff --git a/vendor/doctrine/annotations/phpstan.neon b/vendor/doctrine/annotations/phpstan.neon deleted file mode 100644 index bac7f83c..00000000 --- a/vendor/doctrine/annotations/phpstan.neon +++ /dev/null @@ -1,14 +0,0 @@ -parameters: - autoload_files: - - %currentWorkingDirectory%/tests/Doctrine/Tests/Common/Annotations/DocParserTest.php - excludes_analyse: - - %currentWorkingDirectory%/tests/*/Fixtures/* - - %currentWorkingDirectory%/tests/Doctrine/Tests/Common/Annotations/ReservedKeywordsClasses.php - - %currentWorkingDirectory%/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM58Entity.php - - %currentWorkingDirectory%/tests/Doctrine/Tests/DoctrineTestCase.php - polluteScopeWithLoopInitialAssignments: true - ignoreErrors: - - '#Class Doctrine_Tests_Common_Annotations_Fixtures_ClassNoNamespaceNoComment not found#' - - '#Instantiated class Doctrine_Tests_Common_Annotations_Fixtures_ClassNoNamespaceNoComment not found#' - - '#Property Doctrine\\Tests\\Common\\Annotations\\DummyClassNonAnnotationProblem::\$foo has unknown class#' - - '#Call to an undefined method ReflectionClass::getUseStatements\(\)#' diff --git a/vendor/doctrine/lexer/README.md b/vendor/doctrine/lexer/README.md index 3a74c1c3..e1b419a6 100644 --- a/vendor/doctrine/lexer/README.md +++ b/vendor/doctrine/lexer/README.md @@ -1,5 +1,7 @@ # Doctrine Lexer +Build Status: [![Build Status](https://travis-ci.org/doctrine/lexer.svg?branch=master)](https://travis-ci.org/doctrine/lexer) + Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. This lexer is used in Doctrine Annotations and in Doctrine ORM (DQL). diff --git a/vendor/doctrine/lexer/composer.json b/vendor/doctrine/lexer/composer.json index 4e82741c..3432bae4 100644 --- a/vendor/doctrine/lexer/composer.json +++ b/vendor/doctrine/lexer/composer.json @@ -17,7 +17,7 @@ {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} ], "require": { - "php": "^7.2" + "php": "^7.2 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -32,7 +32,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.2.x-dev" } }, "config": { diff --git a/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php b/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php index 00cb1e19..385643a4 100644 --- a/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php +++ b/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php @@ -300,7 +300,7 @@ public function getLiteral($token) */ protected function getModifiers() { - return 'i'; + return 'iu'; } /** diff --git a/vendor/services.php b/vendor/services.php index f9844164..2937edf5 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,7 +1,5 @@ 'think\\captcha\\CaptchaService', - 1 => 'think\\app\\Service', ); \ No newline at end of file diff --git a/vendor/zhongshaofa/easy-admin/.gitignore b/vendor/zhongshaofa/easy-admin/.gitignore new file mode 100644 index 00000000..fae68b08 --- /dev/null +++ b/vendor/zhongshaofa/easy-admin/.gitignore @@ -0,0 +1,3 @@ +.history/ +vendor/ +.idea \ No newline at end of file diff --git a/vendor/zhongshaofa/easy-admin/composer.json b/vendor/zhongshaofa/easy-admin/composer.json new file mode 100644 index 00000000..c51d9b0c --- /dev/null +++ b/vendor/zhongshaofa/easy-admin/composer.json @@ -0,0 +1,32 @@ +{ + "name": "zhongshaofa/easy-admin", + "description": "EasyAdmin工具,https://github.com/zhongshaofa/easyadmin-sdk", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "zhongshaofa", + "email": "2286732552@qq.com" + } + ], + "minimum-stability": "stable", + "require": { + "php": ">=7.1.0", + "doctrine/annotations": "^1.13.1", + "ext-json": "*" + }, + "require-dev": { + "mockery/mockery": "^1.3.0", + "phpunit/phpunit": "^8.5.0" + }, + "autoload": { + "psr-4": { + "EasyAdmin\\": "src", + "MockApp\\": "mock_app", + "Test\\": "tests" + } + }, + "scripts": { + "test": "phpunit --testdox" + } +} diff --git a/vendor/zhongshaofa/easy-admin/composer.lock b/vendor/zhongshaofa/easy-admin/composer.lock new file mode 100644 index 00000000..3a3234af --- /dev/null +++ b/vendor/zhongshaofa/easy-admin/composer.lock @@ -0,0 +1,2033 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "4c0736ad49fd778136c21d4faa8c1406", + "packages": [ + { + "name": "doctrine/annotations", + "version": "1.13.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "5b668aef16090008790395c02c893b1ba13f7e08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08", + "reference": "5b668aef16090008790395c02c893b1ba13f7e08", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "doctrine/lexer": "1.*", + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^6.0 || ^8.1", + "phpstan/phpstan": "^0.12.20", + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", + "symfony/cache": "^4.4 || ^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2021-08-05T19:00:23+00:00" + }, + { + "name": "doctrine/lexer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11.8", + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "time": "2020-05-25T17:44:05+00:00" + }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "time": "2016-08-06T20:24:11+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2020-11-10T18:47:58+00:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.3|^7.0|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "time": "2020-07-09T08:09:16+00:00" + }, + { + "name": "mockery/mockery", + "version": "1.3.4", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "31467aeb3ca3188158613322d66df81cedd86626" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/31467aeb3ca3188158613322d66df81cedd86626", + "reference": "31467aeb3ca3188158613322d66df81cedd86626", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "hamcrest/hamcrest-php": "^2.0.1", + "lib-pcre": ">=7.0", + "php": ">=5.6.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.10|^6.5|^7.5|^8.5|^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "time": "2021-02-24T09:51:00+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.10.2", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2020-11-13T09:40:50+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "bae7c545bef187884426f042434e561ab1ddb182" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2021-02-23T14:00:09+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.2.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2020-09-03T19:13:55+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "time": "2020-09-17T18:55:26+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.13.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2021-03-17T13:42:18+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "7.0.15", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "819f92bba8b001d4363065928088de22f25a3a48" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48", + "reference": "819f92bba8b001d4363065928088de22f25a3a48", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": ">=7.2", + "phpunit/php-file-iterator": "^2.0.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^3.1.3 || ^4.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^4.2.2", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1.3" + }, + "require-dev": { + "phpunit/phpunit": "^8.2.2" + }, + "suggest": { + "ext-xdebug": "^2.7.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2021-07-26T12:20:09+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/28af674ff175d0768a5a978e6de83f697d4a7f05", + "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2021-07-19T06:46:01+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "2.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2020-11-30T08:20:02+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "3.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "9c1da83261628cb24b6a6df371b6e312b3954768" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9c1da83261628cb24b6a6df371b6e312b3954768", + "reference": "9c1da83261628cb24b6a6df371b6e312b3954768", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "abandoned": true, + "time": "2021-07-26T12:15:06+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "8.5.20", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "9deefba183198398a09b927a6ac6bc1feb0b7b70" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9deefba183198398a09b927a6ac6bc1feb0b7b70", + "reference": "9deefba183198398a09b927a6ac6bc1feb0b7b70", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.0", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.2", + "phpspec/prophecy": "^1.10.3", + "phpunit/php-code-coverage": "^7.0.12", + "phpunit/php-file-iterator": "^2.0.4", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.2", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.3", + "sebastian/exporter": "^3.1.2", + "sebastian/global-state": "^3.0.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", + "sebastian/version": "^2.0.1" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0.0" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2021-08-31T06:44:38+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2020-11-30T08:15:22+00:00" + }, + { + "name": "sebastian/comparator", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2020-11-30T08:04:30+00:00" + }, + { + "name": "sebastian/diff", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "time": "2020-11-30T07:59:04+00:00" + }, + { + "name": "sebastian/environment", + "version": "4.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2020-11-30T07:53:42+00:00" + }, + { + "name": "sebastian/exporter", + "version": "3.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e", + "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.0", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2020-11-30T07:47:53+00:00" + }, + { + "name": "sebastian/global-state", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/474fb9edb7ab891665d3bfc6317f42a0a150454b", + "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^8.0" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2020-11-30T07:43:24+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "3.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2020-11-30T07:40:27+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2020-11-30T07:37:18+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2020-11-30T07:34:24+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "abandoned": true, + "time": "2020-11-30T07:30:19+00:00" + }, + { + "name": "sebastian/type", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "time": "2020-11-30T07:25:11+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2016-10-03T07:35:21+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2021-02-19T12:13:01+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2021-07-28T10:34:58+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.2 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2021-03-09T10:59:23+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=7.1.0", + "ext-json": "*" + }, + "platform-dev": [] +} diff --git a/vendor/zhongshaofa/easy-admin/mock_app/BaseController.php b/vendor/zhongshaofa/easy-admin/mock_app/BaseController.php new file mode 100644 index 00000000..fd9a2bae --- /dev/null +++ b/vendor/zhongshaofa/easy-admin/mock_app/BaseController.php @@ -0,0 +1,10 @@ +dir = base_path() . 'admin' . DIRECTORY_SEPARATOR . 'controller'; - $this->annotationCacheDir = runtime_path() . 'annotation' . DIRECTORY_SEPARATOR . 'node'; - $this->namespacePrefix = "app\admin\controller"; - return $this; - } - - /** - * 设置当前文件夹 - * @param $dir - * @return $this - */ - public function setDir($dir) - { - $this->dir = $dir; - return $this; - } - - - /** - * 设置命名空间前缀 - * @param $namespacePrefix - * @return $this - */ - public function setNamespacePrefix($namespacePrefix) - { - $this->namespacePrefix = $namespacePrefix; - return $this; - } - - /** - * 设置注解缓存地址 - * @param $annotationCacheDir - * @return $this - */ - public function setAnnotationCacheDir($annotationCacheDir) - { - $this->annotationCacheDir = $annotationCacheDir; - return $this; - } - - /** - * 设置注解debug - * @param $annotationDebug - * @return $this - */ - public function setAnnotationDebug($annotationDebug = true) + public function __construct($basePath, $baseNamespace) { - $this->annotationDebug = $annotationDebug; + $this->basePath = $basePath; + $this->baseNamespace = $baseNamespace; return $this; } @@ -118,7 +63,10 @@ public function getNodelist() if (!empty($controllerList)) { AnnotationRegistry::registerLoader('class_exists'); - $reader = new FileCacheReader(new AnnotationReader(), $this->annotationCacheDir, $this->annotationDebug); + $parser = new DocParser(); + $parser->setIgnoreNotImportedAnnotations(true); + $reader = new AnnotationReader($parser); + foreach ($controllerList as $controllerFormat => $controller) { // 获取类和方法的注释信息 @@ -168,7 +116,7 @@ public function getNodelist() */ public function getControllerList() { - return $this->readControllerFiles($this->dir); + return $this->readControllerFiles($this->basePath); } /** @@ -178,7 +126,7 @@ public function getControllerList() */ protected function readControllerFiles($path) { - list($list, $temp_list, $dirExplode) = [[], scandir($path), explode($this->dir, $path)]; + list($list, $temp_list, $dirExplode) = [[], scandir($path), explode($this->basePath, $path)]; $middleDir = isset($dirExplode[1]) && !empty($dirExplode[1]) ? str_replace('/', '\\', substr($dirExplode[1], 1)) . "\\" : null; foreach ($temp_list as $file) { @@ -199,7 +147,7 @@ protected function readControllerFiles($path) // 根目录下的文件 $className = str_replace('.php', '', $file); $controllerFormat = str_replace('\\', '.', $middleDir) . CommonTool::humpToLine(lcfirst($className)); - $list[$controllerFormat] = "{$this->namespacePrefix}\\{$middleDir}" . $className; + $list[$controllerFormat] = "{$this->baseNamespace}\\{$middleDir}" . $className; } } return $list; diff --git a/vendor/zhongshaofa/easy-admin/tests/.gitignore b/vendor/zhongshaofa/easy-admin/tests/.gitignore new file mode 100644 index 00000000..a09c56df --- /dev/null +++ b/vendor/zhongshaofa/easy-admin/tests/.gitignore @@ -0,0 +1 @@ +/.idea diff --git a/vendor/zhongshaofa/easy-admin/tests/AnnotationTest.php b/vendor/zhongshaofa/easy-admin/tests/AnnotationTest.php new file mode 100644 index 00000000..d0fc46f0 --- /dev/null +++ b/vendor/zhongshaofa/easy-admin/tests/AnnotationTest.php @@ -0,0 +1,38 @@ +getNodelist(); + + $this->assertNotEmpty($list); + $this->assertIsArray($list); + $this->assertEquals(count($list), 13); + } + +} \ No newline at end of file From ec0308c7886665139b51384cbd6b64a802f851c8 Mon Sep 17 00:00:00 2001 From: zhongshaofa <2286732552@qq.com> Date: Sat, 4 Sep 2021 01:30:49 +0800 Subject: [PATCH 2/7] =?UTF-8?q?[fix]=E4=BF=AE=E5=A4=8D=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E5=A4=B1=E8=B4=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/service/NodeService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/service/NodeService.php b/app/admin/service/NodeService.php index a5dfd363..d731528b 100644 --- a/app/admin/service/NodeService.php +++ b/app/admin/service/NodeService.php @@ -13,7 +13,7 @@ namespace app\admin\service; -use app\admin\service\NodeService as Node; +use EasyAdmin\auth\Node; class NodeService { From e30db9e519885932be04e578c0a03a293312d96c Mon Sep 17 00:00:00 2001 From: zhongshaofa <2286732552@qq.com> Date: Sat, 4 Sep 2021 16:07:23 +0800 Subject: [PATCH 3/7] [feat]update thinkphp framework version --- app/admin/config/route.php | 6 +- app/admin/event.php | 10 +- app/admin/middleware.php | 6 + app/admin/middleware/ViewInit.php | 2 +- app/common/controller/AdminController.php | 74 ++ composer.lock | 82 +- .../2d/7301e6e82f343948e5c46f0a3c314b.php | 4 + .../3b/1cd8c0f3fd25b5dba35624b103e407.php | 4 + .../4c/2d186a68942db66f8ba15fcfce2a63.php | 4 + .../53/e0ad44eb4853cd88c068b6cf317c8a.php | 4 + .../5b/db71b05f018e7d1050e74b9c95cf85.php | 4 + .../8c/6565319d3230091141e6ef012b4567.php | 4 + .../90/e939771e274fbf5126a2eef67c167e.php | 4 + .../f1/af4877cda9be6f917ff281fc61fc68.php | 4 + .../f7/7f98c583b8fc1054a771cc6b6ce474.php | 4 + vendor/composer/ClassLoader.php | 40 +- vendor/composer/InstalledVersions.php | 886 +++++++++++------ vendor/composer/autoload_files.php | 1 - vendor/composer/autoload_psr4.php | 1 - vendor/composer/autoload_real.php | 2 +- vendor/composer/autoload_static.php | 6 - vendor/composer/installed.json | 94 +- vendor/composer/installed.php | 767 +++++++------- vendor/composer/platform_check.php | 41 +- vendor/opis/closure/CHANGELOG.md | 207 ---- vendor/opis/closure/LICENSE | 20 - vendor/opis/closure/NOTICE | 9 - vendor/opis/closure/README.md | 98 -- vendor/opis/closure/autoload.php | 39 - vendor/opis/closure/composer.json | 40 - vendor/opis/closure/functions.php | 38 - vendor/opis/closure/src/Analyzer.php | 59 -- vendor/opis/closure/src/ClosureContext.php | 34 - vendor/opis/closure/src/ClosureScope.php | 25 - vendor/opis/closure/src/ClosureStream.php | 94 -- vendor/opis/closure/src/ISecurityProvider.php | 25 - vendor/opis/closure/src/ReflectionClosure.php | 939 ------------------ vendor/opis/closure/src/SecurityException.php | 18 - vendor/opis/closure/src/SecurityProvider.php | 42 - vendor/opis/closure/src/SelfReference.php | 31 - .../opis/closure/src/SerializableClosure.php | 668 ------------- vendor/topthink/framework/.travis.yml | 3 +- vendor/topthink/framework/README.md | 12 +- vendor/topthink/framework/composer.json | 3 +- vendor/topthink/framework/src/helper.php | 10 +- vendor/topthink/framework/src/lang/zh-cn.php | 2 +- vendor/topthink/framework/src/think/App.php | 49 +- vendor/topthink/framework/src/think/Cache.php | 2 +- .../topthink/framework/src/think/Config.php | 6 +- .../topthink/framework/src/think/Console.php | 83 +- .../framework/src/think/Container.php | 33 +- .../topthink/framework/src/think/Cookie.php | 35 +- vendor/topthink/framework/src/think/Db.php | 7 +- vendor/topthink/framework/src/think/Env.php | 2 +- vendor/topthink/framework/src/think/Event.php | 41 +- .../framework/src/think/Exception.php | 2 +- .../topthink/framework/src/think/Facade.php | 2 +- vendor/topthink/framework/src/think/File.php | 10 +- .../framework/src/think/Filesystem.php | 2 +- vendor/topthink/framework/src/think/Http.php | 17 +- vendor/topthink/framework/src/think/Lang.php | 29 +- vendor/topthink/framework/src/think/Log.php | 2 +- .../topthink/framework/src/think/Manager.php | 5 +- .../framework/src/think/Middleware.php | 22 +- .../topthink/framework/src/think/Pipeline.php | 5 +- .../topthink/framework/src/think/Request.php | 94 +- .../topthink/framework/src/think/Response.php | 9 +- vendor/topthink/framework/src/think/Route.php | 62 +- .../topthink/framework/src/think/Service.php | 2 +- .../topthink/framework/src/think/Session.php | 2 +- .../topthink/framework/src/think/Validate.php | 78 +- vendor/topthink/framework/src/think/View.php | 8 +- .../framework/src/think/cache/Driver.php | 27 +- .../framework/src/think/cache/TagSet.php | 10 +- .../framework/src/think/cache/driver/File.php | 4 +- .../src/think/cache/driver/Memcache.php | 4 +- .../src/think/cache/driver/Memcached.php | 9 +- .../src/think/cache/driver/Redis.php | 31 +- .../src/think/cache/driver/Wincache.php | 2 +- .../framework/src/think/console/Output.php | 15 +- .../src/think/console/command/Clear.php | 31 +- .../src/think/console/command/Help.php | 3 +- .../src/think/console/command/Lists.php | 3 +- .../src/think/console/command/Make.php | 2 +- .../src/think/console/command/RunServer.php | 27 +- .../think/console/command/ServiceDiscover.php | 6 +- .../think/console/command/VendorPublish.php | 7 +- .../think/console/command/make/Command.php | 2 +- .../think/console/command/make/Controller.php | 2 +- .../src/think/console/command/make/Event.php | 2 +- .../think/console/command/make/Listener.php | 2 +- .../think/console/command/make/Middleware.php | 4 +- .../src/think/console/command/make/Model.php | 2 +- .../think/console/command/make/Service.php | 2 +- .../think/console/command/make/Subscribe.php | 2 +- .../think/console/command/make/Validate.php | 2 +- .../console/command/make/stubs/command.stub | 6 +- .../console/command/make/stubs/listener.stub | 2 +- .../console/command/make/stubs/model.stub | 2 +- .../console/command/make/stubs/service.stub | 4 +- .../console/command/make/stubs/validate.stub | 12 +- .../think/console/command/optimize/Route.php | 7 +- .../think/console/command/optimize/Schema.php | 70 +- .../src/think/console/input/Argument.php | 25 +- .../src/think/console/input/Option.php | 33 +- .../src/think/console/output/Descriptor.php | 16 +- .../think/contract/CacheHandlerInterface.php | 2 +- .../think/contract/ModelRelationInterface.php | 2 +- .../contract/SessionHandlerInterface.php | 2 +- .../contract/TemplateHandlerInterface.php | 2 +- .../framework/src/think/event/AppInit.php | 2 +- .../framework/src/think/event/HttpEnd.php | 2 +- .../framework/src/think/event/HttpRun.php | 2 +- .../Response.php => event/LogRecord.php} | 26 +- .../framework/src/think/event/LogWrite.php | 2 +- .../framework/src/think/event/RouteLoaded.php | 2 +- .../exception/ClassNotFoundException.php | 2 +- .../src/think/exception/ErrorException.php | 2 +- .../src/think/exception/FileException.php | 2 +- .../framework/src/think/exception/Handle.php | 41 +- .../src/think/exception/HttpException.php | 2 +- .../think/exception/HttpResponseException.php | 2 +- .../exception/InvalidArgumentException.php | 2 +- .../exception/RouteNotFoundException.php | 2 +- .../src/think/exception/ValidateException.php | 2 +- .../framework/src/think/facade/App.php | 28 +- .../framework/src/think/facade/Cache.php | 17 +- .../framework/src/think/facade/Config.php | 6 +- .../framework/src/think/facade/Console.php | 25 +- .../framework/src/think/facade/Cookie.php | 9 +- .../framework/src/think/facade/Env.php | 13 +- .../framework/src/think/facade/Event.php | 11 +- .../framework/src/think/facade/Filesystem.php | 7 +- .../framework/src/think/facade/Lang.php | 10 +- .../framework/src/think/facade/Log.php | 27 +- .../framework/src/think/facade/Middleware.php | 11 +- .../framework/src/think/facade/Request.php | 103 +- .../framework/src/think/facade/Route.php | 52 +- .../framework/src/think/facade/Session.php | 4 +- .../framework/src/think/facade/Validate.php | 58 +- .../framework/src/think/facade/View.php | 11 +- .../framework/src/think/file/UploadedFile.php | 6 +- .../src/think/filesystem/CacheStore.php | 2 +- .../framework/src/think/filesystem/Driver.php | 4 +- .../src/think/filesystem/driver/Local.php | 7 +- .../src/think/initializer/BootService.php | 2 +- .../framework/src/think/initializer/Error.php | 2 +- .../src/think/initializer/RegisterService.php | 2 +- .../framework/src/think/log/Channel.php | 6 +- .../framework/src/think/log/ChannelSet.php | 2 +- .../framework/src/think/log/driver/File.php | 8 +- .../framework/src/think/log/driver/Socket.php | 146 ++- .../src/think/middleware/AllowCrossDomain.php | 9 +- .../think/middleware/CheckRequestCache.php | 50 +- .../src/think/middleware/FormTokenCheck.php | 2 +- .../src/think/middleware/LoadLangPack.php | 2 +- .../src/think/middleware/SessionInit.php | 2 +- .../framework/src/think/response/File.php | 21 +- .../framework/src/think/response/Html.php | 2 +- .../framework/src/think/response/Json.php | 2 +- .../framework/src/think/response/Jsonp.php | 6 +- .../framework/src/think/response/Redirect.php | 2 +- .../framework/src/think/response/View.php | 8 +- .../framework/src/think/response/Xml.php | 2 +- .../framework/src/think/route/Dispatch.php | 28 +- .../framework/src/think/route/Domain.php | 4 +- .../framework/src/think/route/Resource.php | 4 +- .../framework/src/think/route/Rule.php | 154 ++- .../framework/src/think/route/RuleGroup.php | 94 +- .../framework/src/think/route/RuleItem.php | 20 +- .../framework/src/think/route/RuleName.php | 26 +- .../framework/src/think/route/Url.php | 38 +- .../src/think/route/dispatch/Callback.php | 2 +- .../src/think/route/dispatch/Controller.php | 22 +- .../src/think/route/dispatch/Redirect.php | 27 - .../src/think/route/dispatch/Url.php | 10 +- .../src/think/route/dispatch/View.php | 28 - .../src/think/service/ModelService.php | 2 +- .../src/think/service/PaginatorService.php | 2 +- .../src/think/service/ValidateService.php | 2 +- .../framework/src/think/session/Store.php | 4 +- .../src/think/session/driver/Cache.php | 2 +- .../src/think/session/driver/File.php | 6 +- .../src/think/validate/ValidateRule.php | 2 +- .../framework/src/think/view/driver/Php.php | 10 +- .../framework/src/tpl/think_exception.tpl | 317 +++--- vendor/topthink/framework/tests/CacheTest.php | 10 +- .../framework/tests/ContainerTest.php | 1 + vendor/topthink/framework/tests/DbTest.php | 5 + vendor/topthink/framework/tests/EventTest.php | 9 - vendor/topthink/framework/tests/HttpTest.php | 1 + .../framework/tests/InteractsWithApp.php | 30 + vendor/topthink/framework/tests/LogTest.php | 17 +- .../framework/tests/MiddlewareTest.php | 17 +- vendor/topthink/framework/tests/RouteTest.php | 286 ++++++ vendor/topthink/framework/tests/bootstrap.php | 2 +- 196 files changed, 3098 insertions(+), 4329 deletions(-) create mode 100644 runtime/cache/2d/7301e6e82f343948e5c46f0a3c314b.php create mode 100644 runtime/cache/3b/1cd8c0f3fd25b5dba35624b103e407.php create mode 100644 runtime/cache/4c/2d186a68942db66f8ba15fcfce2a63.php create mode 100644 runtime/cache/53/e0ad44eb4853cd88c068b6cf317c8a.php create mode 100644 runtime/cache/5b/db71b05f018e7d1050e74b9c95cf85.php create mode 100644 runtime/cache/8c/6565319d3230091141e6ef012b4567.php create mode 100644 runtime/cache/90/e939771e274fbf5126a2eef67c167e.php create mode 100644 runtime/cache/f1/af4877cda9be6f917ff281fc61fc68.php create mode 100644 runtime/cache/f7/7f98c583b8fc1054a771cc6b6ce474.php delete mode 100644 vendor/opis/closure/CHANGELOG.md delete mode 100644 vendor/opis/closure/LICENSE delete mode 100644 vendor/opis/closure/NOTICE delete mode 100644 vendor/opis/closure/README.md delete mode 100644 vendor/opis/closure/autoload.php delete mode 100644 vendor/opis/closure/composer.json delete mode 100644 vendor/opis/closure/functions.php delete mode 100644 vendor/opis/closure/src/Analyzer.php delete mode 100644 vendor/opis/closure/src/ClosureContext.php delete mode 100644 vendor/opis/closure/src/ClosureScope.php delete mode 100644 vendor/opis/closure/src/ClosureStream.php delete mode 100644 vendor/opis/closure/src/ISecurityProvider.php delete mode 100644 vendor/opis/closure/src/ReflectionClosure.php delete mode 100644 vendor/opis/closure/src/SecurityException.php delete mode 100644 vendor/opis/closure/src/SecurityProvider.php delete mode 100644 vendor/opis/closure/src/SelfReference.php delete mode 100644 vendor/opis/closure/src/SerializableClosure.php rename vendor/topthink/framework/src/think/{route/dispatch/Response.php => event/LogRecord.php} (58%) delete mode 100644 vendor/topthink/framework/src/think/route/dispatch/Redirect.php delete mode 100644 vendor/topthink/framework/src/think/route/dispatch/View.php create mode 100644 vendor/topthink/framework/tests/InteractsWithApp.php create mode 100644 vendor/topthink/framework/tests/RouteTest.php diff --git a/app/admin/config/route.php b/app/admin/config/route.php index 0d3646b9..f75c439d 100644 --- a/app/admin/config/route.php +++ b/app/admin/config/route.php @@ -8,11 +8,11 @@ // 路由中间件 'middleware' => [ - // 后台视图初始化 - \app\admin\middleware\ViewInit::class, +// // 后台视图初始化 +// \app\admin\middleware\ViewInit::class, // 检测用户是否登录 - \app\admin\middleware\CheckAdmin::class, +// \app\admin\middleware\CheckAdmin::class, ], diff --git a/app/admin/event.php b/app/admin/event.php index a3bfc238..5059703e 100644 --- a/app/admin/event.php +++ b/app/admin/event.php @@ -2,10 +2,18 @@ // 事件定义文件 return [ 'bind' => [ - 'MenuUpdate' => 'app\admin\event\MenuUpdate', ], 'listen' => [ + 'AppInit' => [ + \app\admin\listener\ViewInitListener::class, + ], + 'HttpRun' => [ + \app\admin\listener\ViewInitListener::class, + ], + 'HttpEnd' => [], + 'LogLevel' => [], + 'LogWrite' => [], ], 'subscribe' => [ diff --git a/app/admin/middleware.php b/app/admin/middleware.php index 5ebb274d..95e33e89 100644 --- a/app/admin/middleware.php +++ b/app/admin/middleware.php @@ -8,5 +8,11 @@ // 系统操作日志 \app\admin\middleware\SystemLog::class, + // 后台视图初始化 +// \app\admin\middleware\ViewInit::class, + + // 检测用户是否登录 +// \app\admin\middleware\CheckAdmin::class, + ]; diff --git a/app/admin/middleware/ViewInit.php b/app/admin/middleware/ViewInit.php index ae426ba6..604bae33 100644 --- a/app/admin/middleware/ViewInit.php +++ b/app/admin/middleware/ViewInit.php @@ -22,7 +22,7 @@ class ViewInit { - public function handle($request, \Closure $next) + public function handle(\app\Request $request, \Closure $next) { list($thisModule, $thisController, $thisAction) = [app('http')->getName(), Request::controller(), $request->action()]; list($thisControllerArr, $jsPath) = [explode('.', $thisController), null]; diff --git a/app/common/controller/AdminController.php b/app/common/controller/AdminController.php index 4379d1c0..10a45550 100644 --- a/app/common/controller/AdminController.php +++ b/app/common/controller/AdminController.php @@ -14,9 +14,13 @@ namespace app\common\controller; +use app\admin\service\ConfigService; use app\BaseController; +use app\common\constants\AdminConstant; +use app\common\service\AuthService; use EasyAdmin\tool\CommonTool; use think\facade\Env; +use think\facade\View; use think\Model; /** @@ -95,6 +99,8 @@ protected function initialize() parent::initialize(); $this->layout && $this->app->view->engine()->layout($this->layout); $this->isDemo = Env::get('easyadmin.is_demo', false); + $this->viewInit(); + $this->checkAuth(); } /** @@ -206,4 +212,72 @@ public function selectList() $this->success(null, $data); } + /** + * 初始化视图参数 + */ + private function viewInit(){ + $request = app()->request; + list($thisModule, $thisController, $thisAction) = [app('http')->getName(), app()->request->controller(), $request->action()]; + list($thisControllerArr, $jsPath) = [explode('.', $thisController), null]; + foreach ($thisControllerArr as $vo) { + empty($jsPath) ? $jsPath = parse_name($vo) : $jsPath .= '/' . parse_name($vo); + } + $autoloadJs = file_exists(root_path('public') . "static/{$thisModule}/js/{$jsPath}.js") ? true : false; + $thisControllerJsPath = "{$thisModule}/js/{$jsPath}.js"; + $adminModuleName = config('app.admin_alias_name'); + $isSuperAdmin = session('admin.id') == AdminConstant::SUPER_ADMIN_ID ? true : false; + $data = [ + 'adminModuleName' => $adminModuleName, + 'thisController' => parse_name($thisController), + 'thisAction' => $thisAction, + 'thisRequest' => parse_name("{$thisModule}/{$thisController}/{$thisAction}"), + 'thisControllerJsPath' => "{$thisControllerJsPath}", + 'autoloadJs' => $autoloadJs, + 'isSuperAdmin' => $isSuperAdmin, + 'version' => env('app_debug') ? time() : ConfigService::getVersion(), + ]; + + View::assign($data); + } + + /** + * 检测权限 + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + */ + private function checkAuth(){ + $adminConfig = config('admin'); + $adminId = session('admin.id'); + $expireTime = session('admin.expire_time'); + /** @var AuthService $authService */ + $authService = app(AuthService::class, ['adminId' => $adminId]); + $currentNode = $authService->getCurrentNode(); + $currentController = parse_name(app()->request->controller()); + + // 验证登录 + if (!in_array($currentController, $adminConfig['no_login_controller']) && + !in_array($currentNode, $adminConfig['no_login_node'])) { + empty($adminId) && $this->error('请先登录后台', [], __url('admin/login/index')); + + // 判断是否登录过期 + if ($expireTime !== true && time() > $expireTime) { + session('admin', null); + $this->error('登录已过期,请重新登录', [], __url('admin/login/index')); + } + } + + // 验证权限 + if (!in_array($currentController, $adminConfig['no_auth_controller']) && + !in_array($currentNode, $adminConfig['no_auth_node'])) { + $check = $authService->checkNode($currentNode); + !$check && $this->error('无权限访问'); + + // 判断是否为演示环境 + if(env('easyadmin.is_demo', false) && app()->request->isPost()){ + $this->error('演示环境下不允许修改'); + } + + } + } } \ No newline at end of file diff --git a/composer.lock b/composer.lock index 3e6ee590..71208a31 100644 --- a/composer.lock +++ b/composer.lock @@ -1236,73 +1236,6 @@ ], "time": "2016-12-03T22:08:25+00:00" }, - { - "name": "opis/closure", - "version": "3.4.1", - "source": { - "type": "git", - "url": "https://github.com/opis/closure.git", - "reference": "e79f851749c3caa836d7ccc01ede5828feb762c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/e79f851749c3caa836d7ccc01ede5828feb762c7", - "reference": "e79f851749c3caa836d7ccc01ede5828feb762c7", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": "^5.4 || ^7.0" - }, - "require-dev": { - "jeremeamia/superclosure": "^2.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Opis\\Closure\\": "src/" - }, - "files": [ - "functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marius Sarca", - "email": "marius.sarca@gmail.com" - }, - { - "name": "Sorin Sarca", - "email": "sarca_sorin@hotmail.com" - } - ], - "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", - "homepage": "https://opis.io/closure", - "keywords": [ - "anonymous functions", - "closure", - "function", - "serializable", - "serialization", - "serialize" - ], - "time": "2019-10-19T18:38:51+00:00" - }, { "name": "phpoffice/phpspreadsheet", "version": "1.12.0", @@ -1895,16 +1828,16 @@ }, { "name": "topthink/framework", - "version": "v6.0.0", + "version": "v6.0.8", "source": { "type": "git", "url": "https://github.com/top-think/framework.git", - "reference": "79c555aab0313d1a33ddcdb3c395f2c47f37f597" + "reference": "4789343672aef06d571d556da369c0e156609bce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/framework/zipball/79c555aab0313d1a33ddcdb3c395f2c47f37f597", - "reference": "79c555aab0313d1a33ddcdb3c395f2c47f37f597", + "url": "https://api.github.com/repos/top-think/framework/zipball/4789343672aef06d571d556da369c0e156609bce", + "reference": "4789343672aef06d571d556da369c0e156609bce", "shasum": "", "mirrors": [ { @@ -1918,7 +1851,6 @@ "ext-mbstring": "*", "league/flysystem": "^1.0", "league/flysystem-cached-adapter": "^1.0", - "opis/closure": "^3.1", "php": ">=7.1.0", "psr/container": "~1.0", "psr/log": "~1.0", @@ -1959,7 +1891,11 @@ "orm", "thinkphp" ], - "time": "2019-10-23T23:28:43+00:00" + "support": { + "issues": "https://github.com/top-think/framework/issues", + "source": "https://github.com/top-think/framework/tree/v6.0.8" + }, + "time": "2021-04-27T00:41:08+00:00" }, { "name": "topthink/think-captcha", diff --git a/runtime/cache/2d/7301e6e82f343948e5c46f0a3c314b.php b/runtime/cache/2d/7301e6e82f343948e5c46f0a3c314b.php new file mode 100644 index 00000000..eb29081f --- /dev/null +++ b/runtime/cache/2d/7301e6e82f343948e5c46f0a3c314b.php @@ -0,0 +1,4 @@ + +s:21:"EasyAdmin后台系统"; \ No newline at end of file diff --git a/runtime/cache/3b/1cd8c0f3fd25b5dba35624b103e407.php b/runtime/cache/3b/1cd8c0f3fd25b5dba35624b103e407.php new file mode 100644 index 00000000..dfc3cc57 --- /dev/null +++ b/runtime/cache/3b/1cd8c0f3fd25b5dba35624b103e407.php @@ -0,0 +1,4 @@ + +a:9:{i:0;s:75:"/var/www/html/EasyAdmin/runtime/cache/2d/7301e6e82f343948e5c46f0a3c314b.php";i:1;s:75:"/var/www/html/EasyAdmin/runtime/cache/90/e939771e274fbf5126a2eef67c167e.php";i:2;s:75:"/var/www/html/EasyAdmin/runtime/cache/8c/6565319d3230091141e6ef012b4567.php";i:3;s:66:"/www/EasyAdmin/runtime/cache/2d/7301e6e82f343948e5c46f0a3c314b.php";i:4;s:66:"/www/EasyAdmin/runtime/cache/90/e939771e274fbf5126a2eef67c167e.php";i:5;s:66:"/www/EasyAdmin/runtime/cache/8c/6565319d3230091141e6ef012b4567.php";i:6;s:66:"/www/EasyAdmin/runtime/cache/5b/db71b05f018e7d1050e74b9c95cf85.php";i:7;s:66:"/www/EasyAdmin/runtime/cache/f1/af4877cda9be6f917ff281fc61fc68.php";i:8;s:66:"/www/EasyAdmin/runtime/cache/4c/2d186a68942db66f8ba15fcfce2a63.php";} \ No newline at end of file diff --git a/runtime/cache/4c/2d186a68942db66f8ba15fcfce2a63.php b/runtime/cache/4c/2d186a68942db66f8ba15fcfce2a63.php new file mode 100644 index 00000000..57a674ad --- /dev/null +++ b/runtime/cache/4c/2d186a68942db66f8ba15fcfce2a63.php @@ -0,0 +1,4 @@ + +a:18:{s:11:"upload_type";s:5:"local";s:16:"upload_allow_ext";s:49:"doc,gif,ico,icon,jpg,mp3,mp4,p12,pem,png,rar,jpeg";s:17:"upload_allow_size";s:7:"1024000";s:17:"upload_allow_mime";s:57:"image/gif,image/jpeg,video/x-msvideo,text/plain,image/png";s:17:"upload_allow_type";s:24:"local,alioss,qnoss,txcos";s:20:"alioss_access_key_id";s:9:"填你的";s:24:"alioss_access_key_secret";s:9:"填你的";s:15:"alioss_endpoint";s:9:"填你的";s:13:"alioss_bucket";s:9:"填你的";s:13:"alioss_domain";s:9:"填你的";s:15:"txcos_secret_id";s:9:"填你的";s:16:"txcos_secret_key";s:9:"填你的";s:12:"txcos_region";s:9:"填你的";s:12:"tecos_bucket";s:9:"填你的";s:16:"qnoss_access_key";s:9:"填你的";s:16:"qnoss_secret_key";s:9:"填你的";s:12:"qnoss_bucket";s:9:"填你的";s:12:"qnoss_domain";s:9:"填你的";} \ No newline at end of file diff --git a/runtime/cache/53/e0ad44eb4853cd88c068b6cf317c8a.php b/runtime/cache/53/e0ad44eb4853cd88c068b6cf317c8a.php new file mode 100644 index 00000000..15c9a954 --- /dev/null +++ b/runtime/cache/53/e0ad44eb4853cd88c068b6cf317c8a.php @@ -0,0 +1,4 @@ + +a:3:{s:8:"logoInfo";a:3:{s:5:"title";s:9:"EasyAdmin";s:5:"image";s:12:"/favicon.ico";s:4:"href";s:23:"/admin/index/index.html";}s:8:"homeInfo";a:3:{s:5:"title";s:12:"后台首页";s:4:"icon";s:10:"fa fa-home";s:4:"href";s:25:"/admin/index/welcome.html";}s:8:"menuInfo";a:2:{i:0;a:7:{s:2:"id";i:228;s:3:"pid";i:0;s:5:"title";s:12:"系统管理";s:4:"icon";s:9:"fa fa-cog";s:4:"href";s:0:"";s:6:"target";s:5:"_self";s:5:"child";a:8:{i:0;a:6:{s:2:"id";i:244;s:3:"pid";i:228;s:5:"title";s:15:"管理员管理";s:4:"icon";s:10:"fa fa-user";s:4:"href";s:30:"/admin/system.admin/index.html";s:6:"target";s:5:"_self";}i:1;a:6:{s:2:"id";i:245;s:3:"pid";i:228;s:5:"title";s:12:"角色管理";s:4:"icon";s:22:"fa fa-bitbucket-square";s:4:"href";s:29:"/admin/system.auth/index.html";s:6:"target";s:5:"_self";}i:2;a:6:{s:2:"id";i:234;s:3:"pid";i:228;s:5:"title";s:12:"菜单管理";s:4:"icon";s:10:"fa fa-tree";s:4:"href";s:29:"/admin/system.menu/index.html";s:6:"target";s:5:"_self";}i:3;a:6:{s:2:"id";i:246;s:3:"pid";i:228;s:5:"title";s:12:"节点管理";s:4:"icon";s:10:"fa fa-list";s:4:"href";s:29:"/admin/system.node/index.html";s:6:"target";s:5:"_self";}i:4;a:6:{s:2:"id";i:247;s:3:"pid";i:228;s:5:"title";s:12:"配置管理";s:4:"icon";s:14:"fa fa-asterisk";s:4:"href";s:31:"/admin/system.config/index.html";s:6:"target";s:5:"_self";}i:5;a:6:{s:2:"id";i:248;s:3:"pid";i:228;s:5:"title";s:12:"上传管理";s:4:"icon";s:14:"fa fa-arrow-up";s:4:"href";s:35:"/admin/system.uploadfile/index.html";s:6:"target";s:5:"_self";}i:6;a:6:{s:2:"id";i:252;s:3:"pid";i:228;s:5:"title";s:12:"快捷入口";s:4:"icon";s:10:"fa fa-list";s:4:"href";s:30:"/admin/system.quick/index.html";s:6:"target";s:5:"_self";}i:7;a:6:{s:2:"id";i:253;s:3:"pid";i:228;s:5:"title";s:12:"日志管理";s:4:"icon";s:20:"fa fa-connectdevelop";s:4:"href";s:28:"/admin/system.log/index.html";s:6:"target";s:5:"_self";}}}i:1;a:7:{s:2:"id";i:249;s:3:"pid";i:0;s:5:"title";s:12:"商城管理";s:4:"icon";s:10:"fa fa-list";s:4:"href";s:0:"";s:6:"target";s:5:"_self";s:5:"child";a:2:{i:0;a:6:{s:2:"id";i:250;s:3:"pid";i:249;s:5:"title";s:12:"商品分类";s:4:"icon";s:22:"fa fa-calendar-check-o";s:4:"href";s:27:"/admin/mall.cate/index.html";s:6:"target";s:5:"_self";}i:1;a:6:{s:2:"id";i:251;s:3:"pid";i:249;s:5:"title";s:12:"商品管理";s:4:"icon";s:10:"fa fa-list";s:4:"href";s:28:"/admin/mall.goods/index.html";s:6:"target";s:5:"_self";}}}}} \ No newline at end of file diff --git a/runtime/cache/5b/db71b05f018e7d1050e74b9c95cf85.php b/runtime/cache/5b/db71b05f018e7d1050e74b9c95cf85.php new file mode 100644 index 00000000..b788a6ac --- /dev/null +++ b/runtime/cache/5b/db71b05f018e7d1050e74b9c95cf85.php @@ -0,0 +1,4 @@ + +s:9:"EasyAdmin"; \ No newline at end of file diff --git a/runtime/cache/8c/6565319d3230091141e6ef012b4567.php b/runtime/cache/8c/6565319d3230091141e6ef012b4567.php new file mode 100644 index 00000000..dbdf4127 --- /dev/null +++ b/runtime/cache/8c/6565319d3230091141e6ef012b4567.php @@ -0,0 +1,4 @@ + +s:9:"填你的"; \ No newline at end of file diff --git a/runtime/cache/90/e939771e274fbf5126a2eef67c167e.php b/runtime/cache/90/e939771e274fbf5126a2eef67c167e.php new file mode 100644 index 00000000..dbdf4127 --- /dev/null +++ b/runtime/cache/90/e939771e274fbf5126a2eef67c167e.php @@ -0,0 +1,4 @@ + +s:9:"填你的"; \ No newline at end of file diff --git a/runtime/cache/f1/af4877cda9be6f917ff281fc61fc68.php b/runtime/cache/f1/af4877cda9be6f917ff281fc61fc68.php new file mode 100644 index 00000000..1369965f --- /dev/null +++ b/runtime/cache/f1/af4877cda9be6f917ff281fc61fc68.php @@ -0,0 +1,4 @@ + +s:12:"/favicon.ico"; \ No newline at end of file diff --git a/runtime/cache/f7/7f98c583b8fc1054a771cc6b6ce474.php b/runtime/cache/f7/7f98c583b8fc1054a771cc6b6ce474.php new file mode 100644 index 00000000..53f53c77 --- /dev/null +++ b/runtime/cache/f7/7f98c583b8fc1054a771cc6b6ce474.php @@ -0,0 +1,4 @@ + +a:1:{i:0;s:66:"/www/EasyAdmin/runtime/cache/53/e0ad44eb4853cd88c068b6cf317c8a.php";} \ No newline at end of file diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index 6d0c3f2d..95106127 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -42,8 +42,6 @@ */ class ClassLoader { - private $vendorDir; - // PSR-4 private $prefixLengthsPsr4 = array(); private $prefixDirsPsr4 = array(); @@ -59,17 +57,10 @@ class ClassLoader private $missingClasses = array(); private $apcuPrefix; - private static $registeredLoaders = array(); - - public function __construct($vendorDir = null) - { - $this->vendorDir = $vendorDir; - } - public function getPrefixes() { if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); + return call_user_func_array('array_merge', $this->prefixesPsr0); } return array(); @@ -309,17 +300,6 @@ public function getApcuPrefix() public function register($prepend = false) { spl_autoload_register(array($this, 'loadClass'), true, $prepend); - - if (null === $this->vendorDir) { - return; - } - - if ($prepend) { - self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; - } else { - unset(self::$registeredLoaders[$this->vendorDir]); - self::$registeredLoaders[$this->vendorDir] = $this; - } } /** @@ -328,17 +308,13 @@ public function register($prepend = false) public function unregister() { spl_autoload_unregister(array($this, 'loadClass')); - - if (null !== $this->vendorDir) { - unset(self::$registeredLoaders[$this->vendorDir]); - } } /** * Loads the given class or interface. * * @param string $class The name of the class - * @return true|null True if loaded, null otherwise + * @return bool|null True if loaded, null otherwise */ public function loadClass($class) { @@ -347,8 +323,6 @@ public function loadClass($class) return true; } - - return null; } /** @@ -393,16 +367,6 @@ public function findFile($class) return $file; } - /** - * Returns the currently registered loaders indexed by their corresponding vendor directories. - * - * @return self[] - */ - public static function getRegisteredLoaders() - { - return self::$registeredLoaders; - } - private function findFileWithExtension($class, $ext) { // PSR-4 lookup diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php index b3a4e161..b8f4ee0d 100644 --- a/vendor/composer/InstalledVersions.php +++ b/vendor/composer/InstalledVersions.php @@ -1,337 +1,567 @@ - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Composer; -use Composer\Autoload\ClassLoader; use Composer\Semver\VersionParser; -/** - * This class is copied in every Composer installed project and available to all - * - * See also https://getcomposer.org/doc/07-runtime.md#installed-versions - * - * To require it's presence, you can require `composer-runtime-api ^2.0` - */ + + + + + class InstalledVersions { - private static $installed; - private static $canGetVendors; - private static $installedByVendor = array(); - - /** - * Returns a list of all package names which are present, either by being installed, replaced or provided - * - * @return string[] - * @psalm-return list - */ - public static function getInstalledPackages() - { - $packages = array(); - foreach (self::getInstalled() as $installed) { - $packages[] = array_keys($installed['versions']); - } - - if (1 === \count($packages)) { - return $packages[0]; - } - - return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); - } - - /** - * Returns a list of all package names with a specific type e.g. 'library' - * - * @param string $type - * @return string[] - * @psalm-return list - */ - public static function getInstalledPackagesByType($type) - { - $packagesByType = array(); - - foreach (self::getInstalled() as $installed) { - foreach ($installed['versions'] as $name => $package) { - if (isset($package['type']) && $package['type'] === $type) { - $packagesByType[] = $name; - } - } - } - - return $packagesByType; - } - - /** - * Checks whether the given package is installed - * - * This also returns true if the package name is provided or replaced by another package - * - * @param string $packageName - * @param bool $includeDevRequirements - * @return bool - */ - public static function isInstalled($packageName, $includeDevRequirements = true) - { - foreach (self::getInstalled() as $installed) { - if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); - } - } - - return false; - } - - /** - * Checks whether the given package satisfies a version constraint - * - * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: - * - * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') - * - * @param VersionParser $parser Install composer/semver to have access to this class and functionality - * @param string $packageName - * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package - * @return bool - */ - public static function satisfies(VersionParser $parser, $packageName, $constraint) - { - $constraint = $parser->parseConstraints($constraint); - $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); - - return $provided->matches($constraint); - } - - /** - * Returns a version constraint representing all the range(s) which are installed for a given package - * - * It is easier to use this via isInstalled() with the $constraint argument if you need to check - * whether a given version of a package is installed, and not just whether it exists - * - * @param string $packageName - * @return string Version constraint usable with composer/semver - */ - public static function getVersionRanges($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - $ranges = array(); - if (isset($installed['versions'][$packageName]['pretty_version'])) { - $ranges[] = $installed['versions'][$packageName]['pretty_version']; - } - if (array_key_exists('aliases', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); - } - if (array_key_exists('replaced', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); - } - if (array_key_exists('provided', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); - } - - return implode(' || ', $ranges); - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['version'])) { - return null; - } - - return $installed['versions'][$packageName]['version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getPrettyVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['pretty_version'])) { - return null; - } - - return $installed['versions'][$packageName]['pretty_version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference - */ - public static function getReference($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['reference'])) { - return null; - } - - return $installed['versions'][$packageName]['reference']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. - */ - public static function getInstallPath($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @return array - * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string} - */ - public static function getRootPackage() - { - $installed = self::getInstalled(); - - return $installed[0]['root']; - } - - /** - * Returns the raw installed.php data for custom implementations - * - * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. - * @return array[] - * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array} - */ - public static function getRawData() - { - @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = include __DIR__ . '/installed.php'; - } else { - self::$installed = array(); - } - } - - return self::$installed; - } - - /** - * Returns the raw data of all installed.php which are currently loaded for custom implementations - * - * @return array[] - * @psalm-return list}> - */ - public static function getAllRawData() - { - return self::getInstalled(); - } - - /** - * Lets you reload the static array from another file - * - * This is only useful for complex integrations in which a project needs to use - * this class but then also needs to execute another project's autoloader in process, - * and wants to ensure both projects have access to their version of installed.php. - * - * A typical case would be PHPUnit, where it would need to make sure it reads all - * the data it needs from this class, then call reload() with - * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure - * the project in which it runs can then also use this class safely, without - * interference between PHPUnit's dependencies and the project's dependencies. - * - * @param array[] $data A vendor/composer/installed.php data set - * @return void - * - * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array} $data - */ - public static function reload($data) - { - self::$installed = $data; - self::$installedByVendor = array(); - } - - /** - * @return array[] - * @psalm-return list}> - */ - private static function getInstalled() - { - if (null === self::$canGetVendors) { - self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); - } - - $installed = array(); - - if (self::$canGetVendors) { - foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { - if (isset(self::$installedByVendor[$vendorDir])) { - $installed[] = self::$installedByVendor[$vendorDir]; - } elseif (is_file($vendorDir.'/composer/installed.php')) { - $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; - if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { - self::$installed = $installed[count($installed) - 1]; - } - } - } - } - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = require __DIR__ . '/installed.php'; - } else { - self::$installed = array(); - } - } - $installed[] = self::$installed; - - return $installed; - } +private static $installed = array ( + 'root' => + array ( + 'pretty_version' => 'dev-feature/composer-tool', + 'version' => 'dev-feature/composer-tool', + 'aliases' => + array ( + ), + 'reference' => 'ec0308c7886665139b51384cbd6b64a802f851c8', + 'name' => 'topthink/think', + ), + 'versions' => + array ( + 'adbario/php-dot-notation' => + array ( + 'pretty_version' => '2.2.0', + 'version' => '2.2.0.0', + 'aliases' => + array ( + ), + 'reference' => 'eee4fc81296531e6aafba4c2bbccfc5adab1676e', + ), + 'alibabacloud/client' => + array ( + 'pretty_version' => '1.5.18', + 'version' => '1.5.18.0', + 'aliases' => + array ( + ), + 'reference' => '5dcf7b8fdfa64abdae7a5ca867289baf95e8e12a', + ), + 'aliyuncs/oss-sdk-php' => + array ( + 'pretty_version' => 'v2.3.0', + 'version' => '2.3.0.0', + 'aliases' => + array ( + ), + 'reference' => 'e69f57916678458642ac9d2fd341ae78a56996c8', + ), + 'clagiordano/weblibs-configmanager' => + array ( + 'pretty_version' => 'v1.0.7', + 'version' => '1.0.7.0', + 'aliases' => + array ( + ), + 'reference' => '6ef4c27354368deb2f54b39bbe06601da8c873a0', + ), + 'danielstjules/stringy' => + array ( + 'pretty_version' => '3.1.0', + 'version' => '3.1.0.0', + 'aliases' => + array ( + ), + 'reference' => 'df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e', + ), + 'doctrine/annotations' => + array ( + 'pretty_version' => '1.13.2', + 'version' => '1.13.2.0', + 'aliases' => + array ( + ), + 'reference' => '5b668aef16090008790395c02c893b1ba13f7e08', + ), + 'doctrine/lexer' => + array ( + 'pretty_version' => '1.2.1', + 'version' => '1.2.1.0', + 'aliases' => + array ( + ), + 'reference' => 'e864bbf5904cb8f5bb334f99209b48018522f042', + ), + 'eaglewu/swoole-ide-helper' => + array ( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'aliases' => + array ( + ), + 'reference' => 'a255daa05feffbf4b88d59897a9470696d2fe259', + ), + 'guzzlehttp/command' => + array ( + 'pretty_version' => '1.0.0', + 'version' => '1.0.0.0', + 'aliases' => + array ( + ), + 'reference' => '2aaa2521a8f8269d6f5dfc13fe2af12c76921034', + ), + 'guzzlehttp/guzzle' => + array ( + 'pretty_version' => '6.4.1', + 'version' => '6.4.1.0', + 'aliases' => + array ( + ), + 'reference' => '0895c932405407fd3a7368b6910c09a24d26db11', + ), + 'guzzlehttp/guzzle-services' => + array ( + 'pretty_version' => '1.1.3', + 'version' => '1.1.3.0', + 'aliases' => + array ( + ), + 'reference' => '9e3abf20161cbf662d616cbb995f2811771759f7', + ), + 'guzzlehttp/promises' => + array ( + 'pretty_version' => 'v1.3.1', + 'version' => '1.3.1.0', + 'aliases' => + array ( + ), + 'reference' => 'a59da6cf61d80060647ff4d3eb2c03a2bc694646', + ), + 'guzzlehttp/psr7' => + array ( + 'pretty_version' => '1.6.1', + 'version' => '1.6.1.0', + 'aliases' => + array ( + ), + 'reference' => '239400de7a173fe9901b9ac7c06497751f00727a', + ), + 'jianyan74/php-excel' => + array ( + 'pretty_version' => '1.0.1', + 'version' => '1.0.1.0', + 'aliases' => + array ( + ), + 'reference' => '5b569e16ba35fa48ff7449a7f593172f8284f66b', + ), + 'league/flysystem' => + array ( + 'pretty_version' => '1.0.57', + 'version' => '1.0.57.0', + 'aliases' => + array ( + ), + 'reference' => '0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a', + ), + 'league/flysystem-cached-adapter' => + array ( + 'pretty_version' => '1.0.9', + 'version' => '1.0.9.0', + 'aliases' => + array ( + ), + 'reference' => '08ef74e9be88100807a3b92cc9048a312bf01d6f', + ), + 'markbaker/complex' => + array ( + 'pretty_version' => '1.4.8', + 'version' => '1.4.8.0', + 'aliases' => + array ( + ), + 'reference' => '8eaa40cceec7bf0518187530b2e63871be661b72', + ), + 'markbaker/matrix' => + array ( + 'pretty_version' => '1.2.0', + 'version' => '1.2.0.0', + 'aliases' => + array ( + ), + 'reference' => '5348c5a67e3b75cd209d70103f916a93b1f1ed21', + ), + 'mtdowling/jmespath.php' => + array ( + 'pretty_version' => '2.4.0', + 'version' => '2.4.0.0', + 'aliases' => + array ( + ), + 'reference' => 'adcc9531682cf87dfda21e1fd5d0e7a41d292fac', + ), + 'phpoffice/phpspreadsheet' => + array ( + 'pretty_version' => '1.12.0', + 'version' => '1.12.0.0', + 'aliases' => + array ( + ), + 'reference' => 'f79611d6dc1f6b7e8e30b738fc371b392001dbfd', + ), + '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/http-message' => + array ( + 'pretty_version' => '1.0.1', + 'version' => '1.0.1.0', + 'aliases' => + array ( + ), + 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', + ), + 'psr/http-message-implementation' => + array ( + 'provided' => + array ( + 0 => '1.0', + ), + ), + 'psr/log' => + array ( + 'pretty_version' => '1.1.2', + 'version' => '1.1.2.0', + 'aliases' => + array ( + ), + 'reference' => '446d54b4cb6bf489fc9d75f55843658e6f25d801', + ), + 'psr/simple-cache' => + array ( + 'pretty_version' => '1.0.1', + 'version' => '1.0.1.0', + 'aliases' => + array ( + ), + 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b', + ), + 'qcloud/cos-sdk-v5' => + array ( + 'pretty_version' => 'v2.0.3', + 'version' => '2.0.3.0', + 'aliases' => + array ( + ), + 'reference' => '5dea6bc8be6f8e48fb95a5c4670800d1d796ac42', + ), + 'qiniu/php-sdk' => + array ( + 'pretty_version' => 'v7.2.10', + 'version' => '7.2.10.0', + 'aliases' => + array ( + ), + 'reference' => 'd89987163f560ebf9dfa5bb25de9bd9b1a3b2bd8', + ), + 'ralouphie/getallheaders' => + array ( + 'pretty_version' => '3.0.3', + 'version' => '3.0.3.0', + 'aliases' => + array ( + ), + 'reference' => '120b605dfeb996808c31b6477290a714d356e822', + ), + 'symfony/polyfill-mbstring' => + array ( + 'pretty_version' => 'v1.16.0', + 'version' => '1.16.0.0', + 'aliases' => + array ( + ), + 'reference' => 'a54881ec0ab3b2005c406aed0023c062879031e7', + ), + 'symfony/polyfill-php72' => + array ( + 'pretty_version' => 'v1.12.0', + 'version' => '1.12.0.0', + 'aliases' => + array ( + ), + 'reference' => '04ce3335667451138df4307d6a9b61565560199e', + ), + 'symfony/var-dumper' => + array ( + 'pretty_version' => 'v4.3.6', + 'version' => '4.3.6.0', + 'aliases' => + array ( + ), + 'reference' => 'ea4940845535c85ff5c505e13b3205b0076d07bf', + ), + 'topthink/framework' => + array ( + 'pretty_version' => 'v6.0.8', + 'version' => '6.0.8.0', + 'aliases' => + array ( + ), + 'reference' => '4789343672aef06d571d556da369c0e156609bce', + ), + 'topthink/think' => + array ( + 'pretty_version' => 'dev-feature/composer-tool', + 'version' => 'dev-feature/composer-tool', + 'aliases' => + array ( + ), + 'reference' => 'ec0308c7886665139b51384cbd6b64a802f851c8', + ), + 'topthink/think-captcha' => + array ( + 'pretty_version' => 'v3.0.2', + 'version' => '3.0.2.0', + 'aliases' => + array ( + ), + 'reference' => '0b4305da19e118cefd934007875a8112f9352f01', + ), + '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.11', + 'version' => '1.0.11.0', + 'aliases' => + array ( + ), + 'reference' => '215f4a6bb88e53ad41b448c61957336eb55ce6f9', + ), + 'topthink/think-orm' => + array ( + 'pretty_version' => 'v2.0.27', + 'version' => '2.0.27.0', + 'aliases' => + array ( + ), + 'reference' => '02affaaccade2cdd8bbb2d2f5d15e46113e6eb50', + ), + 'topthink/think-template' => + array ( + 'pretty_version' => 'v2.0.7', + 'version' => '2.0.7.0', + 'aliases' => + array ( + ), + 'reference' => 'e98bdbb4a4c94b442f17dfceba81e0134d4fbd19', + ), + 'topthink/think-view' => + array ( + 'pretty_version' => 'v1.0.13', + 'version' => '1.0.13.0', + 'aliases' => + array ( + ), + 'reference' => '90803b73f781db5d42619082c4597afc58b2d4c5', + ), + 'zhongshaofa/easy-admin' => + array ( + 'pretty_version' => 'v1.0.1', + 'version' => '1.0.1.0', + 'aliases' => + array ( + ), + 'reference' => 'e09be94938283d7c0210a3c04c38287757942a56', + ), + ), +); + + + + + + + +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; +} } diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index dbc3227d..d26298c0 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -12,7 +12,6 @@ '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', '9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', - '538ca81a9a966a6716601ecf48f4eaef' => $vendorDir . '/opis/closure/functions.php', 'abede361264e2ae69ec1eee813a101af' => $vendorDir . '/markbaker/complex/classes/src/functions/abs.php', '21a5860fbef5be28db5ddfbc3cca67c4' => $vendorDir . '/markbaker/complex/classes/src/functions/acos.php', '1546e3f9d127f2a9bb2d1b6c31c26ef1' => $vendorDir . '/markbaker/complex/classes/src/functions/acosh.php', diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 23795a44..fc64d6e8 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -25,7 +25,6 @@ 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'), 'PhpOffice\\PhpSpreadsheet\\' => array($vendorDir . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet'), - 'Opis\\Closure\\' => array($vendorDir . '/opis/closure/src'), 'OSS\\' => array($vendorDir . '/aliyuncs/oss-sdk-php/src/OSS'), 'MockApp\\' => array($vendorDir . '/zhongshaofa/easy-admin/mock_app'), 'Matrix\\' => array($vendorDir . '/markbaker/matrix/classes/src'), diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 9059e90f..8e38231b 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -25,7 +25,7 @@ public static function getLoader() require __DIR__ . '/platform_check.php'; spl_autoload_register(array('ComposerAutoloaderInit6bad1cb7ba829cb65a670b5323a9e093', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(); spl_autoload_unregister(array('ComposerAutoloaderInit6bad1cb7ba829cb65a670b5323a9e093', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index e12692e4..35f71ce5 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -13,7 +13,6 @@ class ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093 '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', '9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', - '538ca81a9a966a6716601ecf48f4eaef' => __DIR__ . '/..' . '/opis/closure/functions.php', 'abede361264e2ae69ec1eee813a101af' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/abs.php', '21a5860fbef5be28db5ddfbc3cca67c4' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acos.php', '1546e3f9d127f2a9bb2d1b6c31c26ef1' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acosh.php', @@ -128,7 +127,6 @@ class ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093 ), 'O' => array ( - 'Opis\\Closure\\' => 13, 'OSS\\' => 4, ), 'M' => @@ -253,10 +251,6 @@ class ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093 array ( 0 => __DIR__ . '/..' . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet', ), - 'Opis\\Closure\\' => - array ( - 0 => __DIR__ . '/..' . '/opis/closure/src', - ), 'OSS\\' => array ( 0 => __DIR__ . '/..' . '/aliyuncs/oss-sdk-php/src/OSS', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 0c65c82c..bcba67f2 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1333,76 +1333,6 @@ ], "install-path": "../mtdowling/jmespath.php" }, - { - "name": "opis/closure", - "version": "3.4.1", - "version_normalized": "3.4.1.0", - "source": { - "type": "git", - "url": "https://github.com/opis/closure.git", - "reference": "e79f851749c3caa836d7ccc01ede5828feb762c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/e79f851749c3caa836d7ccc01ede5828feb762c7", - "reference": "e79f851749c3caa836d7ccc01ede5828feb762c7", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": "^5.4 || ^7.0" - }, - "require-dev": { - "jeremeamia/superclosure": "^2.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "time": "2019-10-19T18:38:51+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Opis\\Closure\\": "src/" - }, - "files": [ - "functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marius Sarca", - "email": "marius.sarca@gmail.com" - }, - { - "name": "Sorin Sarca", - "email": "sarca_sorin@hotmail.com" - } - ], - "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", - "homepage": "https://opis.io/closure", - "keywords": [ - "anonymous functions", - "closure", - "function", - "serializable", - "serialization", - "serialize" - ], - "install-path": "../opis/closure" - }, { "name": "phpoffice/phpspreadsheet", "version": "1.12.0", @@ -2174,17 +2104,17 @@ }, { "name": "topthink/framework", - "version": "v6.0.0", - "version_normalized": "6.0.0.0", + "version": "v6.0.8", + "version_normalized": "6.0.8.0", "source": { "type": "git", "url": "https://github.com/top-think/framework.git", - "reference": "79c555aab0313d1a33ddcdb3c395f2c47f37f597" + "reference": "4789343672aef06d571d556da369c0e156609bce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/framework/zipball/79c555aab0313d1a33ddcdb3c395f2c47f37f597", - "reference": "79c555aab0313d1a33ddcdb3c395f2c47f37f597", + "url": "https://api.github.com/repos/top-think/framework/zipball/4789343672aef06d571d556da369c0e156609bce", + "reference": "4789343672aef06d571d556da369c0e156609bce", "shasum": "", "mirrors": [ { @@ -2198,7 +2128,6 @@ "ext-mbstring": "*", "league/flysystem": "^1.0", "league/flysystem-cached-adapter": "^1.0", - "opis/closure": "^3.1", "php": ">=7.1.0", "psr/container": "~1.0", "psr/log": "~1.0", @@ -2211,7 +2140,7 @@ "mockery/mockery": "^1.2", "phpunit/phpunit": "^7.0" }, - "time": "2019-10-23T23:28:43+00:00", + "time": "2021-04-27T00:41:08+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -2241,6 +2170,10 @@ "orm", "thinkphp" ], + "support": { + "issues": "https://github.com/top-think/framework/issues", + "source": "https://github.com/top-think/framework/tree/v6.0.8" + }, "install-path": "../topthink/framework" }, { @@ -2606,10 +2539,5 @@ "install-path": "../zhongshaofa/easy-admin" } ], - "dev": true, - "dev-package-names": [ - "eaglewu/swoole-ide-helper", - "symfony/polyfill-php72", - "symfony/var-dumper" - ] + "dev": true } diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 334cc63d..08fdc9b4 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -1,389 +1,382 @@ - array( - 'pretty_version' => '1.0.0+no-version-set', - 'version' => '1.0.0.0', - 'type' => 'project', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'reference' => NULL, - 'name' => 'topthink/think', - 'dev' => true, - ), - 'versions' => array( - 'adbario/php-dot-notation' => array( - 'pretty_version' => '2.2.0', - 'version' => '2.2.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../adbario/php-dot-notation', - 'aliases' => array(), - 'reference' => 'eee4fc81296531e6aafba4c2bbccfc5adab1676e', - 'dev_requirement' => false, - ), - 'alibabacloud/client' => array( - 'pretty_version' => '1.5.18', - 'version' => '1.5.18.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../alibabacloud/client', - 'aliases' => array(), - 'reference' => '5dcf7b8fdfa64abdae7a5ca867289baf95e8e12a', - 'dev_requirement' => false, - ), - 'aliyuncs/oss-sdk-php' => array( - 'pretty_version' => 'v2.3.0', - 'version' => '2.3.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../aliyuncs/oss-sdk-php', - 'aliases' => array(), - 'reference' => 'e69f57916678458642ac9d2fd341ae78a56996c8', - 'dev_requirement' => false, - ), - 'clagiordano/weblibs-configmanager' => array( - 'pretty_version' => 'v1.0.7', - 'version' => '1.0.7.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../clagiordano/weblibs-configmanager', - 'aliases' => array(), - 'reference' => '6ef4c27354368deb2f54b39bbe06601da8c873a0', - 'dev_requirement' => false, - ), - 'danielstjules/stringy' => array( - 'pretty_version' => '3.1.0', - 'version' => '3.1.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../danielstjules/stringy', - 'aliases' => array(), - 'reference' => 'df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e', - 'dev_requirement' => false, - ), - 'doctrine/annotations' => array( - 'pretty_version' => '1.13.2', - 'version' => '1.13.2.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../doctrine/annotations', - 'aliases' => array(), - 'reference' => '5b668aef16090008790395c02c893b1ba13f7e08', - 'dev_requirement' => false, - ), - 'doctrine/lexer' => array( - 'pretty_version' => '1.2.1', - 'version' => '1.2.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../doctrine/lexer', - 'aliases' => array(), - 'reference' => 'e864bbf5904cb8f5bb334f99209b48018522f042', - 'dev_requirement' => false, - ), - 'eaglewu/swoole-ide-helper' => array( - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'type' => 'library', - 'install_path' => __DIR__ . '/../eaglewu/swoole-ide-helper', - 'aliases' => array(), - 'reference' => 'a255daa05feffbf4b88d59897a9470696d2fe259', - 'dev_requirement' => true, - ), - 'guzzlehttp/command' => array( - 'pretty_version' => '1.0.0', - 'version' => '1.0.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../guzzlehttp/command', - 'aliases' => array(), - 'reference' => '2aaa2521a8f8269d6f5dfc13fe2af12c76921034', - 'dev_requirement' => false, - ), - 'guzzlehttp/guzzle' => array( - 'pretty_version' => '6.4.1', - 'version' => '6.4.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', - 'aliases' => array(), - 'reference' => '0895c932405407fd3a7368b6910c09a24d26db11', - 'dev_requirement' => false, - ), - 'guzzlehttp/guzzle-services' => array( - 'pretty_version' => '1.1.3', - 'version' => '1.1.3.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../guzzlehttp/guzzle-services', - 'aliases' => array(), - 'reference' => '9e3abf20161cbf662d616cbb995f2811771759f7', - 'dev_requirement' => false, - ), - 'guzzlehttp/promises' => array( - 'pretty_version' => 'v1.3.1', - 'version' => '1.3.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../guzzlehttp/promises', - 'aliases' => array(), - 'reference' => 'a59da6cf61d80060647ff4d3eb2c03a2bc694646', - 'dev_requirement' => false, - ), - 'guzzlehttp/psr7' => array( - 'pretty_version' => '1.6.1', - 'version' => '1.6.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../guzzlehttp/psr7', - 'aliases' => array(), - 'reference' => '239400de7a173fe9901b9ac7c06497751f00727a', - 'dev_requirement' => false, - ), - 'jianyan74/php-excel' => array( - 'pretty_version' => '1.0.1', - 'version' => '1.0.1.0', - 'type' => 'extension', - 'install_path' => __DIR__ . '/../jianyan74/php-excel', - 'aliases' => array(), - 'reference' => '5b569e16ba35fa48ff7449a7f593172f8284f66b', - 'dev_requirement' => false, - ), - 'league/flysystem' => array( - 'pretty_version' => '1.0.57', - 'version' => '1.0.57.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../league/flysystem', - 'aliases' => array(), - 'reference' => '0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a', - 'dev_requirement' => false, - ), - 'league/flysystem-cached-adapter' => array( - 'pretty_version' => '1.0.9', - 'version' => '1.0.9.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../league/flysystem-cached-adapter', - 'aliases' => array(), - 'reference' => '08ef74e9be88100807a3b92cc9048a312bf01d6f', - 'dev_requirement' => false, - ), - 'markbaker/complex' => array( - 'pretty_version' => '1.4.8', - 'version' => '1.4.8.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../markbaker/complex', - 'aliases' => array(), - 'reference' => '8eaa40cceec7bf0518187530b2e63871be661b72', - 'dev_requirement' => false, - ), - 'markbaker/matrix' => array( - 'pretty_version' => '1.2.0', - 'version' => '1.2.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../markbaker/matrix', - 'aliases' => array(), - 'reference' => '5348c5a67e3b75cd209d70103f916a93b1f1ed21', - 'dev_requirement' => false, - ), - 'mtdowling/jmespath.php' => array( - 'pretty_version' => '2.4.0', - 'version' => '2.4.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../mtdowling/jmespath.php', - 'aliases' => array(), - 'reference' => 'adcc9531682cf87dfda21e1fd5d0e7a41d292fac', - 'dev_requirement' => false, - ), - 'opis/closure' => array( - 'pretty_version' => '3.4.1', - 'version' => '3.4.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../opis/closure', - 'aliases' => array(), - 'reference' => 'e79f851749c3caa836d7ccc01ede5828feb762c7', - 'dev_requirement' => false, - ), - 'phpoffice/phpspreadsheet' => array( - 'pretty_version' => '1.12.0', - 'version' => '1.12.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../phpoffice/phpspreadsheet', - 'aliases' => array(), - 'reference' => 'f79611d6dc1f6b7e8e30b738fc371b392001dbfd', - 'dev_requirement' => false, - ), - 'psr/cache' => array( - 'pretty_version' => '1.0.1', - 'version' => '1.0.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/cache', - 'aliases' => array(), - 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8', - 'dev_requirement' => false, - ), - 'psr/container' => array( - 'pretty_version' => '1.0.0', - 'version' => '1.0.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/container', - 'aliases' => array(), - 'reference' => 'b7ce3b176482dbbc1245ebf52b181af44c2cf55f', - 'dev_requirement' => false, - ), - 'psr/http-message' => array( - 'pretty_version' => '1.0.1', - 'version' => '1.0.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/http-message', - 'aliases' => array(), - 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', - 'dev_requirement' => false, - ), - 'psr/http-message-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0', - ), - ), - 'psr/log' => array( - 'pretty_version' => '1.1.2', - 'version' => '1.1.2.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/log', - 'aliases' => array(), - 'reference' => '446d54b4cb6bf489fc9d75f55843658e6f25d801', - 'dev_requirement' => false, - ), - 'psr/simple-cache' => array( - 'pretty_version' => '1.0.1', - 'version' => '1.0.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/simple-cache', - 'aliases' => array(), - 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b', - 'dev_requirement' => false, - ), - 'qcloud/cos-sdk-v5' => array( - 'pretty_version' => 'v2.0.3', - 'version' => '2.0.3.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../qcloud/cos-sdk-v5', - 'aliases' => array(), - 'reference' => '5dea6bc8be6f8e48fb95a5c4670800d1d796ac42', - 'dev_requirement' => false, - ), - 'qiniu/php-sdk' => array( - 'pretty_version' => 'v7.2.10', - 'version' => '7.2.10.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../qiniu/php-sdk', - 'aliases' => array(), - 'reference' => 'd89987163f560ebf9dfa5bb25de9bd9b1a3b2bd8', - 'dev_requirement' => false, - ), - 'ralouphie/getallheaders' => array( - 'pretty_version' => '3.0.3', - 'version' => '3.0.3.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../ralouphie/getallheaders', - 'aliases' => array(), - 'reference' => '120b605dfeb996808c31b6477290a714d356e822', - 'dev_requirement' => false, - ), - 'symfony/polyfill-mbstring' => array( - 'pretty_version' => 'v1.16.0', - 'version' => '1.16.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', - 'aliases' => array(), - 'reference' => 'a54881ec0ab3b2005c406aed0023c062879031e7', - 'dev_requirement' => false, - ), - 'symfony/polyfill-php72' => array( - 'pretty_version' => 'v1.12.0', - 'version' => '1.12.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/polyfill-php72', - 'aliases' => array(), - 'reference' => '04ce3335667451138df4307d6a9b61565560199e', - 'dev_requirement' => true, - ), - 'symfony/var-dumper' => array( - 'pretty_version' => 'v4.3.6', - 'version' => '4.3.6.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/var-dumper', - 'aliases' => array(), - 'reference' => 'ea4940845535c85ff5c505e13b3205b0076d07bf', - 'dev_requirement' => true, - ), - 'topthink/framework' => array( - 'pretty_version' => 'v6.0.0', - 'version' => '6.0.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../topthink/framework', - 'aliases' => array(), - 'reference' => '79c555aab0313d1a33ddcdb3c395f2c47f37f597', - 'dev_requirement' => false, - ), - 'topthink/think' => array( - 'pretty_version' => '1.0.0+no-version-set', - 'version' => '1.0.0.0', - 'type' => 'project', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'reference' => NULL, - 'dev_requirement' => false, - ), - 'topthink/think-captcha' => array( - 'pretty_version' => 'v3.0.2', - 'version' => '3.0.2.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../topthink/think-captcha', - 'aliases' => array(), - 'reference' => '0b4305da19e118cefd934007875a8112f9352f01', - 'dev_requirement' => false, - ), - 'topthink/think-helper' => array( - 'pretty_version' => 'v3.1.4', - 'version' => '3.1.4.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../topthink/think-helper', - 'aliases' => array(), - 'reference' => 'c28d37743bda4a0455286ca85b17b5791d626e10', - 'dev_requirement' => false, - ), - 'topthink/think-multi-app' => array( - 'pretty_version' => 'v1.0.11', - 'version' => '1.0.11.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../topthink/think-multi-app', - 'aliases' => array(), - 'reference' => '215f4a6bb88e53ad41b448c61957336eb55ce6f9', - 'dev_requirement' => false, - ), - 'topthink/think-orm' => array( - 'pretty_version' => 'v2.0.27', - 'version' => '2.0.27.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../topthink/think-orm', - 'aliases' => array(), - 'reference' => '02affaaccade2cdd8bbb2d2f5d15e46113e6eb50', - 'dev_requirement' => false, - ), - 'topthink/think-template' => array( - 'pretty_version' => 'v2.0.7', - 'version' => '2.0.7.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../topthink/think-template', - 'aliases' => array(), - 'reference' => 'e98bdbb4a4c94b442f17dfceba81e0134d4fbd19', - 'dev_requirement' => false, - ), - 'topthink/think-view' => array( - 'pretty_version' => 'v1.0.13', - 'version' => '1.0.13.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../topthink/think-view', - 'aliases' => array(), - 'reference' => '90803b73f781db5d42619082c4597afc58b2d4c5', - 'dev_requirement' => false, - ), - 'zhongshaofa/easy-admin' => array( - 'pretty_version' => 'v1.0.1', - 'version' => '1.0.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../zhongshaofa/easy-admin', - 'aliases' => array(), - 'reference' => 'e09be94938283d7c0210a3c04c38287757942a56', - 'dev_requirement' => false, - ), + + array ( + 'pretty_version' => 'dev-feature/composer-tool', + 'version' => 'dev-feature/composer-tool', + 'aliases' => + array ( ), + 'reference' => 'ec0308c7886665139b51384cbd6b64a802f851c8', + 'name' => 'topthink/think', + ), + 'versions' => + array ( + 'adbario/php-dot-notation' => + array ( + 'pretty_version' => '2.2.0', + 'version' => '2.2.0.0', + 'aliases' => + array ( + ), + 'reference' => 'eee4fc81296531e6aafba4c2bbccfc5adab1676e', + ), + 'alibabacloud/client' => + array ( + 'pretty_version' => '1.5.18', + 'version' => '1.5.18.0', + 'aliases' => + array ( + ), + 'reference' => '5dcf7b8fdfa64abdae7a5ca867289baf95e8e12a', + ), + 'aliyuncs/oss-sdk-php' => + array ( + 'pretty_version' => 'v2.3.0', + 'version' => '2.3.0.0', + 'aliases' => + array ( + ), + 'reference' => 'e69f57916678458642ac9d2fd341ae78a56996c8', + ), + 'clagiordano/weblibs-configmanager' => + array ( + 'pretty_version' => 'v1.0.7', + 'version' => '1.0.7.0', + 'aliases' => + array ( + ), + 'reference' => '6ef4c27354368deb2f54b39bbe06601da8c873a0', + ), + 'danielstjules/stringy' => + array ( + 'pretty_version' => '3.1.0', + 'version' => '3.1.0.0', + 'aliases' => + array ( + ), + 'reference' => 'df24ab62d2d8213bbbe88cc36fc35a4503b4bd7e', + ), + 'doctrine/annotations' => + array ( + 'pretty_version' => '1.13.2', + 'version' => '1.13.2.0', + 'aliases' => + array ( + ), + 'reference' => '5b668aef16090008790395c02c893b1ba13f7e08', + ), + 'doctrine/lexer' => + array ( + 'pretty_version' => '1.2.1', + 'version' => '1.2.1.0', + 'aliases' => + array ( + ), + 'reference' => 'e864bbf5904cb8f5bb334f99209b48018522f042', + ), + 'eaglewu/swoole-ide-helper' => + array ( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'aliases' => + array ( + ), + 'reference' => 'a255daa05feffbf4b88d59897a9470696d2fe259', + ), + 'guzzlehttp/command' => + array ( + 'pretty_version' => '1.0.0', + 'version' => '1.0.0.0', + 'aliases' => + array ( + ), + 'reference' => '2aaa2521a8f8269d6f5dfc13fe2af12c76921034', + ), + 'guzzlehttp/guzzle' => + array ( + 'pretty_version' => '6.4.1', + 'version' => '6.4.1.0', + 'aliases' => + array ( + ), + 'reference' => '0895c932405407fd3a7368b6910c09a24d26db11', + ), + 'guzzlehttp/guzzle-services' => + array ( + 'pretty_version' => '1.1.3', + 'version' => '1.1.3.0', + 'aliases' => + array ( + ), + 'reference' => '9e3abf20161cbf662d616cbb995f2811771759f7', + ), + 'guzzlehttp/promises' => + array ( + 'pretty_version' => 'v1.3.1', + 'version' => '1.3.1.0', + 'aliases' => + array ( + ), + 'reference' => 'a59da6cf61d80060647ff4d3eb2c03a2bc694646', + ), + 'guzzlehttp/psr7' => + array ( + 'pretty_version' => '1.6.1', + 'version' => '1.6.1.0', + 'aliases' => + array ( + ), + 'reference' => '239400de7a173fe9901b9ac7c06497751f00727a', + ), + 'jianyan74/php-excel' => + array ( + 'pretty_version' => '1.0.1', + 'version' => '1.0.1.0', + 'aliases' => + array ( + ), + 'reference' => '5b569e16ba35fa48ff7449a7f593172f8284f66b', + ), + 'league/flysystem' => + array ( + 'pretty_version' => '1.0.57', + 'version' => '1.0.57.0', + 'aliases' => + array ( + ), + 'reference' => '0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a', + ), + 'league/flysystem-cached-adapter' => + array ( + 'pretty_version' => '1.0.9', + 'version' => '1.0.9.0', + 'aliases' => + array ( + ), + 'reference' => '08ef74e9be88100807a3b92cc9048a312bf01d6f', + ), + 'markbaker/complex' => + array ( + 'pretty_version' => '1.4.8', + 'version' => '1.4.8.0', + 'aliases' => + array ( + ), + 'reference' => '8eaa40cceec7bf0518187530b2e63871be661b72', + ), + 'markbaker/matrix' => + array ( + 'pretty_version' => '1.2.0', + 'version' => '1.2.0.0', + 'aliases' => + array ( + ), + 'reference' => '5348c5a67e3b75cd209d70103f916a93b1f1ed21', + ), + 'mtdowling/jmespath.php' => + array ( + 'pretty_version' => '2.4.0', + 'version' => '2.4.0.0', + 'aliases' => + array ( + ), + 'reference' => 'adcc9531682cf87dfda21e1fd5d0e7a41d292fac', + ), + 'phpoffice/phpspreadsheet' => + array ( + 'pretty_version' => '1.12.0', + 'version' => '1.12.0.0', + 'aliases' => + array ( + ), + 'reference' => 'f79611d6dc1f6b7e8e30b738fc371b392001dbfd', + ), + '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/http-message' => + array ( + 'pretty_version' => '1.0.1', + 'version' => '1.0.1.0', + 'aliases' => + array ( + ), + 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', + ), + 'psr/http-message-implementation' => + array ( + 'provided' => + array ( + 0 => '1.0', + ), + ), + 'psr/log' => + array ( + 'pretty_version' => '1.1.2', + 'version' => '1.1.2.0', + 'aliases' => + array ( + ), + 'reference' => '446d54b4cb6bf489fc9d75f55843658e6f25d801', + ), + 'psr/simple-cache' => + array ( + 'pretty_version' => '1.0.1', + 'version' => '1.0.1.0', + 'aliases' => + array ( + ), + 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b', + ), + 'qcloud/cos-sdk-v5' => + array ( + 'pretty_version' => 'v2.0.3', + 'version' => '2.0.3.0', + 'aliases' => + array ( + ), + 'reference' => '5dea6bc8be6f8e48fb95a5c4670800d1d796ac42', + ), + 'qiniu/php-sdk' => + array ( + 'pretty_version' => 'v7.2.10', + 'version' => '7.2.10.0', + 'aliases' => + array ( + ), + 'reference' => 'd89987163f560ebf9dfa5bb25de9bd9b1a3b2bd8', + ), + 'ralouphie/getallheaders' => + array ( + 'pretty_version' => '3.0.3', + 'version' => '3.0.3.0', + 'aliases' => + array ( + ), + 'reference' => '120b605dfeb996808c31b6477290a714d356e822', + ), + 'symfony/polyfill-mbstring' => + array ( + 'pretty_version' => 'v1.16.0', + 'version' => '1.16.0.0', + 'aliases' => + array ( + ), + 'reference' => 'a54881ec0ab3b2005c406aed0023c062879031e7', + ), + 'symfony/polyfill-php72' => + array ( + 'pretty_version' => 'v1.12.0', + 'version' => '1.12.0.0', + 'aliases' => + array ( + ), + 'reference' => '04ce3335667451138df4307d6a9b61565560199e', + ), + 'symfony/var-dumper' => + array ( + 'pretty_version' => 'v4.3.6', + 'version' => '4.3.6.0', + 'aliases' => + array ( + ), + 'reference' => 'ea4940845535c85ff5c505e13b3205b0076d07bf', + ), + 'topthink/framework' => + array ( + 'pretty_version' => 'v6.0.8', + 'version' => '6.0.8.0', + 'aliases' => + array ( + ), + 'reference' => '4789343672aef06d571d556da369c0e156609bce', + ), + 'topthink/think' => + array ( + 'pretty_version' => 'dev-feature/composer-tool', + 'version' => 'dev-feature/composer-tool', + 'aliases' => + array ( + ), + 'reference' => 'ec0308c7886665139b51384cbd6b64a802f851c8', + ), + 'topthink/think-captcha' => + array ( + 'pretty_version' => 'v3.0.2', + 'version' => '3.0.2.0', + 'aliases' => + array ( + ), + 'reference' => '0b4305da19e118cefd934007875a8112f9352f01', + ), + '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.11', + 'version' => '1.0.11.0', + 'aliases' => + array ( + ), + 'reference' => '215f4a6bb88e53ad41b448c61957336eb55ce6f9', + ), + 'topthink/think-orm' => + array ( + 'pretty_version' => 'v2.0.27', + 'version' => '2.0.27.0', + 'aliases' => + array ( + ), + 'reference' => '02affaaccade2cdd8bbb2d2f5d15e46113e6eb50', + ), + 'topthink/think-template' => + array ( + 'pretty_version' => 'v2.0.7', + 'version' => '2.0.7.0', + 'aliases' => + array ( + ), + 'reference' => 'e98bdbb4a4c94b442f17dfceba81e0134d4fbd19', + ), + 'topthink/think-view' => + array ( + 'pretty_version' => 'v1.0.13', + 'version' => '1.0.13.0', + 'aliases' => + array ( + ), + 'reference' => '90803b73f781db5d42619082c4597afc58b2d4c5', + ), + 'zhongshaofa/easy-admin' => + array ( + 'pretty_version' => 'v1.0.1', + 'version' => '1.0.1.0', + 'aliases' => + array ( + ), + 'reference' => 'e09be94938283d7c0210a3c04c38287757942a56', + ), + ), ); diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php index 589e9e77..4642a2b4 100644 --- a/vendor/composer/platform_check.php +++ b/vendor/composer/platform_check.php @@ -5,22 +5,33 @@ $issues = array(); if (!(PHP_VERSION_ID >= 70200)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.0". You are running ' . PHP_VERSION . '.'; + $issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.0". You are running ' . PHP_VERSION . '.'; +} + +$missingExtensions = array(); +extension_loaded('ctype') || $missingExtensions[] = 'ctype'; +extension_loaded('curl') || $missingExtensions[] = 'curl'; +extension_loaded('dom') || $missingExtensions[] = 'dom'; +extension_loaded('fileinfo') || $missingExtensions[] = 'fileinfo'; +extension_loaded('gd') || $missingExtensions[] = 'gd'; +extension_loaded('iconv') || $missingExtensions[] = 'iconv'; +extension_loaded('json') || $missingExtensions[] = 'json'; +extension_loaded('libxml') || $missingExtensions[] = 'libxml'; +extension_loaded('mbstring') || $missingExtensions[] = 'mbstring'; +extension_loaded('openssl') || $missingExtensions[] = 'openssl'; +extension_loaded('simplexml') || $missingExtensions[] = 'simplexml'; +extension_loaded('tokenizer') || $missingExtensions[] = 'tokenizer'; +extension_loaded('xml') || $missingExtensions[] = 'xml'; +extension_loaded('xmlreader') || $missingExtensions[] = 'xmlreader'; +extension_loaded('xmlwriter') || $missingExtensions[] = 'xmlwriter'; +extension_loaded('zip') || $missingExtensions[] = 'zip'; +extension_loaded('zlib') || $missingExtensions[] = 'zlib'; + +if ($missingExtensions) { + $issues[] = 'Your Composer dependencies require the following PHP extensions to be installed: ' . implode(', ', $missingExtensions); } if ($issues) { - if (!headers_sent()) { - header('HTTP/1.1 500 Internal Server Error'); - } - if (!ini_get('display_errors')) { - if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { - fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); - } elseif (!headers_sent()) { - echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; - } - } - trigger_error( - 'Composer detected issues in your platform: ' . implode(' ', $issues), - E_USER_ERROR - ); + echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues); + exit(104); } diff --git a/vendor/opis/closure/CHANGELOG.md b/vendor/opis/closure/CHANGELOG.md deleted file mode 100644 index f3d663fe..00000000 --- a/vendor/opis/closure/CHANGELOG.md +++ /dev/null @@ -1,207 +0,0 @@ -CHANGELOG ---------- - -### v3.4.1, 2019.10.19 - -- Fixed a [bug](https://github.com/opis/closure/issues/40) that prevented serialization to work correctly. - -### v3.4.0, 2019.09.03 - -- Added `createClosure` static method in `Opis\Closure\SerializableClosure`. -This method creates a new closure from arbitrary code, emulating `create_function`, -but without using eval - -### v3.3.1, 2019.07.10 - -- Use `sha1` instead of `md5` for hashing file names in `Opis\Closure\ReflectionClosure` class - -### v3.3.0, 2019.05.31 - -- Fixed a bug that prevented signed closures to properly work when the serialized string -contains invalid UTF-8 chars. Starting with this version `json_encode` is no longer used -when signing a closure. Backward compatibility is maintained and all closures that were -previously signed using the old method will continue to work. - -### v3.2.0, 2019.05.05 - -- Since an unsigned closure can be unserialized when no security provider is set, -there is no reason to treat differently a signed closure in the same situation. -Therefore, the `Opis\Closure\SecurityException` exception is no longer thrown when -unserializing a signed closure, if no security provider is set. - -### v3.1.6, 2019.02.22 - -- Fixed a bug that occurred when trying to set properties of classes that were not defined in user-land. -Those properties are now ignored. - -### v3.1.5, 2019.01.14 - -- Improved parser - -### v3.1.4, 2019.01.14 - -- Added support for static methods that are named using PHP keywords or magic constants. -Ex: `A::new()`, `A::use()`, `A::if()`, `A::function()`, `A::__DIR__()`, etc. -- Used `@internal` to mark classes & methods that are for internal use only and -backward compatibility is not guaranteed. - -### v3.1.3, 2019.01.07 - -- Fixed a bug that prevented traits to be correctly resolved when used by an -anonymous class -- Fixed a bug that occurred when `$this` keyword was used inside an anonymous class - -### v3.1.2, 2018.12.16 - -* Fixed a bug regarding comma trail in group-use statements. See [issue 23](https://github.com/opis/closure/issues/23) - -### v3.1.1, 2018.10.02 - -* Fixed a bug where `parent` keyword was treated like a class-name and scope was not added to the -serialized closure -* Fixed a bug where return type was not properly handled for nested closures -* Support for anonymous classes was improved - -### v3.1.0, 2018.09.20 - -* Added `transformUseVariables` and `resolveUseVariables` to -`Opis\Closure\SerializableClosure` class. -* Added `removeSecurityProvider` static method to -`Opis\Closure\SerializableClosure` class. -* Fixed some security related issues where a user was able to unserialize an unsigned -closure, even when a security provider was in use. - -### v3.0.12, 2018.02.23 - -* Bugfix. See [issue 20](https://github.com/opis/closure/issues/20) - -### v3.0.11, 2018.01.22 - -* Bugfix. See [issue 18](https://github.com/opis/closure/issues/18) - -### v3.0.10, 2018.01.04 - -* Improved support for PHP 7.1 & 7.2 - -### v3.0.9, 2018.01.04 - -* Fixed a bug where the return type was not properly resolved. -See [issue 17](https://github.com/opis/closure/issues/17) -* Added more tests - -### v3.0.8, 2017.12.18 - -* Fixed a bug. See [issue 16](https://github.com/opis/closure/issues/16) - -### v3.0.7, 2017.10.31 - -* Bugfix: static properties are ignored now, since they are not serializable - -### v3.0.6, 2017.10.06 - -* Fixed a bug introduced by accident in 3.0.5 - -### v3.0.5, 2017.09.18 - -* Fixed a bug related to nested references - -### v3.0.4, 2017.09.18 - -* \[*internal*\] Refactored `SerializableClosure::mapPointers` method -* \[*internal*\] Added a new optional argument to `SerializableClosure::unwrapClosures` -* \[*internal*\] Removed `SerializableClosure::getClosurePointer` method -* Fixed various bugs - -### v3.0.3, 2017.09.06 - -* Fixed a bug related to nested object references -* \[*internal*\] `Opis\Closure\ClosureScope` now extends `SplObjectStorage` -* \[*internal*\] The `storage` property was removed from `Opis\Closure\ClosureScope` -* \[*internal*\] The `instances` and `objects` properties were removed from `Opis\Closure\ClosureContext` - -### v3.0.2, 2017.08.28 - -* Fixed a bug where `$this` object was not handled properly inside the -`SerializableClosre::serialize` method. - -### v3.0.1, 2017.04.13 - -* Fixed a bug in 'ignore_next' state - -### v3.0.0, 2017.04.07 - -* Dropped PHP 5.3 support -* Moved source files from `lib` to `src` folder -* Removed second parameter from `Opis\Closure\SerializableClosure::from` method and from constructor -* Removed `Opis\Closure\{SecurityProviderInterface, DefaultSecurityProvider, SecureClosure}` classes -* Refactored how signed closures were handled -* Added `wrapClosures` and `unwrapClosures` static methods to `Opis\Closure\SerializableClosure` class -* Added `Opis\Colosure\serialize` and `Opis\Closure\unserialize` functions -* Improved serialization. You can now serialize arbitrary objects and the library will automatically wrap all closures - -### v2.4.0, 2016.12.16 - -* The parser was refactored and improved -* Refactored `Opis\Closure\SerializableClosure::__invoke` method -* `Opis\Closure\{ISecurityProvider, SecurityProvider}` were added -* `Opis\Closure\{SecurityProviderInterface, DefaultSecurityProvider, SecureClosure}` were deprecated -and they will be removed in the next major version -* `setSecretKey` and `addSecurityProvider` static methods were added to `Opis\Closure\SerializableClosure` - -### v2.3.2, 2016.12.15 - -* Fixed a bug that prevented namespace resolution to be done properly - -### v2.3.1, 2016.12.13 - -* Hotfix. See [PR](https://github.com/opis/closure/pull/7) - -### v2.3.0, 2016.11.17 - -* Added `isBindingRequired` and `isScopeRequired` to the `Opis\Closure\ReflectionClosure` class -* Automatically detects when the scope and/or the bound object of a closure needs to be serialized. - -### v2.2.1, 2016.08.20 - -* Fixed a bug in `Opis\Closure\ReflectionClosure::fetchItems` - -### v2.2.0, 2016.07.26 - -* Fixed CS -* `Opis\Closure\ClosureContext`, `Opis\Closure\ClosureScope`, `Opis\Closure\SelfReference` - and `Opis\Closure\SecurityException` classes were moved into separate files -* Added support for PHP7 syntax -* Fixed some bugs in `Opis\Closure\ReflectionClosure` class -* Improved closure parser -* Added an analyzer for SuperClosure library - -### v2.1.0, 2015.09.30 - -* Added support for the missing `__METHOD__`, `__FUNCTION__` and `__TRAIT__` magic constants -* Added some security related classes and interfaces: `Opis\Closure\SecurityProviderInterface`, -`Opis\Closure\DefaultSecurityProvider`, `Opis\Closure\SecureClosure`, `Opis\Closure\SecurityException`. -* Fiexed a bug in `Opis\Closure\ReflectionClosure::getClasses` method -* Other minor bugfixes -* Added support for static closures -* Added public `isStatic` method to `Opis\Closure\ReflectionClosure` class - - -### v2.0.1, 2015.09.23 - -* Removed `branch-alias` property from `composer.json` -* Bugfix. See [issue #6](https://github.com/opis/closure/issues/6) - -### v2.0.0, 2015.07.31 - -* The closure parser was improved -* Class names are now automatically resolved -* Added support for the `#trackme` directive which allows tracking closure's residing source - -### v1.3.0, 2014.10.18 - -* Added autoload file -* Changed README file - -### Opis Closure 1.2.2 - -* Started changelog diff --git a/vendor/opis/closure/LICENSE b/vendor/opis/closure/LICENSE deleted file mode 100644 index 9c0a19ba..00000000 --- a/vendor/opis/closure/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018-2019 Zindex Software - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/opis/closure/NOTICE b/vendor/opis/closure/NOTICE deleted file mode 100644 index ae5caa62..00000000 --- a/vendor/opis/closure/NOTICE +++ /dev/null @@ -1,9 +0,0 @@ -Opis Closure -Copyright 2018-2019 Zindex Software - -This product includes software developed at -Zindex Software (http://zindex.software). - -This software was originally developed by Marius Sarca and Sorin Sarca -(Copyright 2014-2018). The copyright info was changed with the permission -of the original authors. \ No newline at end of file diff --git a/vendor/opis/closure/README.md b/vendor/opis/closure/README.md deleted file mode 100644 index 75b319a4..00000000 --- a/vendor/opis/closure/README.md +++ /dev/null @@ -1,98 +0,0 @@ -Opis Closure -==================== -[![Build Status](https://travis-ci.org/opis/closure.png)](https://travis-ci.org/opis/closure) -[![Latest Stable Version](https://poser.pugx.org/opis/closure/v/stable.png)](https://packagist.org/packages/opis/closure) -[![Latest Unstable Version](https://poser.pugx.org/opis/closure/v/unstable.png)](https://packagist.org/packages/opis/closure) -[![License](https://poser.pugx.org/opis/closure/license.png)](https://packagist.org/packages/opis/closure) - -Serializable closures ---------------------- -**Opis Closure** is a library that aims to overcome PHP's limitations regarding closure -serialization by providing a wrapper that will make all closures serializable. - -**The library's key features:** - -- Serialize any closure -- Serialize arbitrary objects -- Doesn't use `eval` for closure serialization or unserialization -- Works with any PHP version that has support for closures -- Supports PHP 7 syntax -- Handles all variables referenced/imported in `use()` and automatically wraps all referenced/imported closures for -proper serialization -- Handles recursive closures -- Handles magic constants like `__FILE__`, `__DIR__`, `__LINE__`, `__NAMESPACE__`, `__CLASS__`, -`__TRAIT__`, `__METHOD__` and `__FUNCTION__`. -- Automatically resolves all class names, function names and constant names used inside the closure -- Track closure's residing source by using the `#trackme` directive -- Simple and very fast parser -- Any error or exception, that might occur when executing an unserialized closure, can be caught and treated properly -- You can serialize/unserialize any closure unlimited times, even those previously unserialized -(this is possible because `eval()` is not used for unserialization) -- Handles static closures -- Supports cryptographically signed closures -- Provides a reflector that can give you information about the serialized closure -- Provides an analyzer for *SuperClosure* library -- Automatically detects when the scope and/or the bound object of a closure needs to be serialized -in order for the closure to work after deserialization - -### Documentation - -The full documentation for this library can be found [here][documentation]. - -### License - -**Opis Closure** is licensed under the [MIT License (MIT)][license]. - -### Requirements - -* PHP ^5.4 || ^7.0 - -## Installation - -**Opis Closure** is available on [Packagist] and it can be installed from a -command line interface by using [Composer]. - -```bash -composer require opis/closure -``` - -Or you could directly reference it into your `composer.json` file as a dependency - -```json -{ - "require": { - "opis/closure": "^3.4" - } -} -``` - -### Migrating from 2.x - -If your project needs to support PHP 5.3 you can continue using the `2.x` version -of **Opis Closure**. Otherwise, assuming you are not using one of the removed/refactored classes or features(see -[CHANGELOG]), migrating to version `3.x` is simply a matter of updating your `composer.json` file. - -### Semantic versioning - -**Opis Closure** follows [semantic versioning][SemVer] specifications. - -### Arbitrary object serialization - -This feature was primarily introduced in order to support serializing an object bound -to a closure and available via `$this`. The implementation is far from being perfect -and it's really hard to make it work flawless. I will try to improve this, but I can -not guarantee anything. So my advice regarding the `Opis\Closure\serialize|unserialize` -functions is to use them with caution. - -### SuperClosure support - -**Opis Closure** is shipped with an analyzer(`Opis\Closure\Analyzer`) which -aims to provide *Opis Closure*'s parsing precision and speed to [SuperClosure]. - -[documentation]: https://www.opis.io/closure "Opis Closure" -[license]: http://opensource.org/licenses/MIT "MIT License" -[Packagist]: https://packagist.org/packages/opis/closure "Packagist" -[Composer]: https://getcomposer.org "Composer" -[SuperClosure]: https://github.com/jeremeamia/super_closure "SuperClosure" -[SemVer]: http://semver.org/ "Semantic versioning" -[CHANGELOG]: https://github.com/opis/closure/blob/master/CHANGELOG.md "Changelog" \ No newline at end of file diff --git a/vendor/opis/closure/autoload.php b/vendor/opis/closure/autoload.php deleted file mode 100644 index a928014f..00000000 --- a/vendor/opis/closure/autoload.php +++ /dev/null @@ -1,39 +0,0 @@ -getClosureScopeClass(); - - $data = [ - 'reflection' => $reflection, - 'code' => $reflection->getCode(), - 'hasThis' => $reflection->isBindingRequired(), - 'context' => $reflection->getUseVariables(), - 'hasRefs' => false, - 'binding' => $reflection->getClosureThis(), - 'scope' => $scope ? $scope->getName() : null, - 'isStatic' => $reflection->isStatic(), - ]; - - return $data; - } - - /** - * @param array $data - * @return mixed - */ - protected function determineCode(array &$data) - { - return null; - } - - /** - * @param array $data - * @return mixed - */ - protected function determineContext(array &$data) - { - return null; - } - -} diff --git a/vendor/opis/closure/src/ClosureContext.php b/vendor/opis/closure/src/ClosureContext.php deleted file mode 100644 index d68cf988..00000000 --- a/vendor/opis/closure/src/ClosureContext.php +++ /dev/null @@ -1,34 +0,0 @@ -scope = new ClosureScope(); - $this->locks = 0; - } -} \ No newline at end of file diff --git a/vendor/opis/closure/src/ClosureScope.php b/vendor/opis/closure/src/ClosureScope.php deleted file mode 100644 index 71ad4148..00000000 --- a/vendor/opis/closure/src/ClosureScope.php +++ /dev/null @@ -1,25 +0,0 @@ -content = "length = strlen($this->content); - return true; - } - - public function stream_read($count) - { - $value = substr($this->content, $this->pointer, $count); - $this->pointer += $count; - return $value; - } - - public function stream_eof() - { - return $this->pointer >= $this->length; - } - - public function stream_stat() - { - $stat = stat(__FILE__); - $stat[7] = $stat['size'] = $this->length; - return $stat; - } - - public function url_stat($path, $flags) - { - $stat = stat(__FILE__); - $stat[7] = $stat['size'] = $this->length; - return $stat; - } - - public function stream_seek($offset, $whence = SEEK_SET) - { - $crt = $this->pointer; - - switch ($whence) { - case SEEK_SET: - $this->pointer = $offset; - break; - case SEEK_CUR: - $this->pointer += $offset; - break; - case SEEK_END: - $this->pointer = $this->length + $offset; - break; - } - - if ($this->pointer < 0 || $this->pointer >= $this->length) { - $this->pointer = $crt; - return false; - } - - return true; - } - - public function stream_tell() - { - return $this->pointer; - } - - public static function register() - { - if (!static::$isRegistered) { - static::$isRegistered = stream_wrapper_register(static::STREAM_PROTO, __CLASS__); - } - } - -} diff --git a/vendor/opis/closure/src/ISecurityProvider.php b/vendor/opis/closure/src/ISecurityProvider.php deleted file mode 100644 index d3b0a293..00000000 --- a/vendor/opis/closure/src/ISecurityProvider.php +++ /dev/null @@ -1,25 +0,0 @@ -code = $code; - parent::__construct($closure); - } - - /** - * @return bool - */ - public function isStatic() - { - if ($this->isStaticClosure === null) { - $this->isStaticClosure = strtolower(substr($this->getCode(), 0, 6)) === 'static'; - } - - return $this->isStaticClosure; - } - - /** - * @return string - */ - public function getCode() - { - if($this->code !== null){ - return $this->code; - } - - $fileName = $this->getFileName(); - $line = $this->getStartLine() - 1; - - $match = ClosureStream::STREAM_PROTO . '://'; - - if ($line === 1 && substr($fileName, 0, strlen($match)) === $match) { - return $this->code = substr($fileName, strlen($match)); - } - - $className = null; - - - if (null !== $className = $this->getClosureScopeClass()) { - $className = '\\' . trim($className->getName(), '\\'); - } - - - if($php7 = PHP_MAJOR_VERSION === 7){ - switch (PHP_MINOR_VERSION){ - case 0: - $php7_types = array('string', 'int', 'bool', 'float'); - break; - case 1: - $php7_types = array('string', 'int', 'bool', 'float', 'void'); - break; - case 2: - default: - $php7_types = array('string', 'int', 'bool', 'float', 'void', 'object'); - } - } - - $ns = $this->getNamespaceName(); - $nsf = $ns == '' ? '' : ($ns[0] == '\\' ? $ns : '\\' . $ns); - - $_file = var_export($fileName, true); - $_dir = var_export(dirname($fileName), true); - $_namespace = var_export($ns, true); - $_class = var_export(trim($className, '\\'), true); - $_function = $ns . ($ns == '' ? '' : '\\') . '{closure}'; - $_method = ($className == '' ? '' : trim($className, '\\') . '::') . $_function; - $_function = var_export($_function, true); - $_method = var_export($_method, true); - $_trait = null; - - $tokens = $this->getTokens(); - $state = $lastState = 'start'; - $inside_anonymous = false; - $anonymous_mark = 0; - $open = 0; - $code = ''; - $id_start = $id_start_ci = $id_name = $context = ''; - $classes = $functions = $constants = null; - $use = array(); - $lineAdd = 0; - $isUsingScope = false; - $isUsingThisObject = false; - - for($i = 0, $l = count($tokens); $i < $l; $i++) { - $token = $tokens[$i]; - switch ($state) { - case 'start': - if ($token[0] === T_FUNCTION || $token[0] === T_STATIC) { - $code .= $token[1]; - $state = $token[0] === T_FUNCTION ? 'function' : 'static'; - } - break; - case 'static': - if ($token[0] === T_WHITESPACE || $token[0] === T_COMMENT || $token[0] === T_FUNCTION) { - $code .= $token[1]; - if ($token[0] === T_FUNCTION) { - $state = 'function'; - } - } else { - $code = ''; - $state = 'start'; - } - break; - case 'function': - switch ($token[0]){ - case T_STRING: - $code = ''; - $state = 'named_function'; - break; - case '(': - $code .= '('; - $state = 'closure_args'; - break; - default: - $code .= is_array($token) ? $token[1] : $token; - } - break; - case 'named_function': - if($token[0] === T_FUNCTION || $token[0] === T_STATIC){ - $code = $token[1]; - $state = $token[0] === T_FUNCTION ? 'function' : 'static'; - } - break; - case 'closure_args': - switch ($token[0]){ - case T_NS_SEPARATOR: - case T_STRING: - $id_start = $token[1]; - $id_start_ci = strtolower($id_start); - $id_name = ''; - $context = 'args'; - $state = 'id_name'; - $lastState = 'closure_args'; - break; - case T_USE: - $code .= $token[1]; - $state = 'use'; - break; - case '=': - $code .= $token; - $lastState = 'closure_args'; - $state = 'ignore_next'; - break; - case ':': - $code .= ':'; - $state = 'return'; - break; - case '{': - $code .= '{'; - $state = 'closure'; - $open++; - break; - default: - $code .= is_array($token) ? $token[1] : $token; - } - break; - case 'use': - switch ($token[0]){ - case T_VARIABLE: - $use[] = substr($token[1], 1); - $code .= $token[1]; - break; - case '{': - $code .= '{'; - $state = 'closure'; - $open++; - break; - case ':': - $code .= ':'; - $state = 'return'; - break; - default: - $code .= is_array($token) ? $token[1] : $token; - break; - } - break; - case 'return': - switch ($token[0]){ - case T_WHITESPACE: - case T_COMMENT: - case T_DOC_COMMENT: - $code .= $token[1]; - break; - case T_NS_SEPARATOR: - case T_STRING: - $id_start = $token[1]; - $id_start_ci = strtolower($id_start); - $id_name = ''; - $context = 'return_type'; - $state = 'id_name'; - $lastState = 'return'; - break 2; - case '{': - $code .= '{'; - $state = 'closure'; - $open++; - break; - default: - $code .= is_array($token) ? $token[1] : $token; - break; - } - break; - case 'closure': - switch ($token[0]){ - case T_CURLY_OPEN: - case T_DOLLAR_OPEN_CURLY_BRACES: - case T_STRING_VARNAME: - case '{': - $code .= '{'; - $open++; - break; - case '}': - $code .= '}'; - if(--$open === 0){ - break 3; - } elseif ($inside_anonymous) { - $inside_anonymous = !($open === $anonymous_mark); - } - break; - case T_LINE: - $code .= $token[2] - $line + $lineAdd; - break; - case T_FILE: - $code .= $_file; - break; - case T_DIR: - $code .= $_dir; - break; - case T_NS_C: - $code .= $_namespace; - break; - case T_CLASS_C: - $code .= $_class; - break; - case T_FUNC_C: - $code .= $_function; - break; - case T_METHOD_C: - $code .= $_method; - break; - case T_COMMENT: - if (substr($token[1], 0, 8) === '#trackme') { - $timestamp = time(); - $code .= '/**' . PHP_EOL; - $code .= '* Date : ' . date(DATE_W3C, $timestamp) . PHP_EOL; - $code .= '* Timestamp : ' . $timestamp . PHP_EOL; - $code .= '* Line : ' . ($line + 1) . PHP_EOL; - $code .= '* File : ' . $_file . PHP_EOL . '*/' . PHP_EOL; - $lineAdd += 5; - } else { - $code .= $token[1]; - } - break; - case T_VARIABLE: - if($token[1] == '$this' && !$inside_anonymous){ - $isUsingThisObject = true; - } - $code .= $token[1]; - break; - case T_STATIC: - $isUsingScope = true; - $code .= $token[1]; - break; - case T_NS_SEPARATOR: - case T_STRING: - $id_start = $token[1]; - $id_start_ci = strtolower($id_start); - $id_name = ''; - $context = 'root'; - $state = 'id_name'; - $lastState = 'closure'; - break 2; - case T_NEW: - $code .= $token[1]; - $context = 'new'; - $state = 'id_start'; - $lastState = 'closure'; - break 2; - case T_USE: - $code .= $token[1]; - $context = 'use'; - $state = 'id_start'; - $lastState = 'closure'; - break; - case T_INSTANCEOF: - $code .= $token[1]; - $context = 'instanceof'; - $state = 'id_start'; - $lastState = 'closure'; - break; - case T_OBJECT_OPERATOR: - case T_DOUBLE_COLON: - $code .= $token[1]; - $lastState = 'closure'; - $state = 'ignore_next'; - break; - case T_FUNCTION: - $code .= $token[1]; - $state = 'closure_args'; - break; - case T_TRAIT_C: - if ($_trait === null) { - $startLine = $this->getStartLine(); - $endLine = $this->getEndLine(); - $structures = $this->getStructures(); - - $_trait = ''; - - foreach ($structures as &$struct) { - if ($struct['type'] === 'trait' && - $struct['start'] <= $startLine && - $struct['end'] >= $endLine - ) { - $_trait = ($ns == '' ? '' : $ns . '\\') . $struct['name']; - break; - } - } - - $_trait = var_export($_trait, true); - } - - $code .= $_trait; - break; - default: - $code .= is_array($token) ? $token[1] : $token; - } - break; - case 'ignore_next': - switch ($token[0]){ - case T_WHITESPACE: - case T_COMMENT: - case T_DOC_COMMENT: - $code .= $token[1]; - break; - case T_CLASS: - case T_NEW: - case T_STATIC: - case T_VARIABLE: - case T_STRING: - case T_CLASS_C: - case T_FILE: - case T_DIR: - case T_METHOD_C: - case T_FUNC_C: - case T_FUNCTION: - case T_INSTANCEOF: - case T_LINE: - case T_NS_C: - case T_TRAIT_C: - case T_USE: - $code .= $token[1]; - $state = $lastState; - break; - default: - $state = $lastState; - $i--; - } - break; - case 'id_start': - switch ($token[0]){ - case T_WHITESPACE: - case T_COMMENT: - case T_DOC_COMMENT: - $code .= $token[1]; - break; - case T_NS_SEPARATOR: - case T_STRING: - case T_STATIC: - $id_start = $token[1]; - $id_start_ci = strtolower($id_start); - $id_name = ''; - $state = 'id_name'; - break 2; - case T_VARIABLE: - $code .= $token[1]; - $state = $lastState; - break; - case T_CLASS: - $code .= $token[1]; - $state = 'anonymous'; - break; - default: - $i--;//reprocess last - $state = 'id_name'; - } - break; - case 'id_name': - switch ($token[0]){ - case T_NS_SEPARATOR: - case T_STRING: - $id_name .= $token[1]; - break; - case T_WHITESPACE: - case T_COMMENT: - case T_DOC_COMMENT: - $id_name .= $token[1]; - break; - case '(': - if($context === 'new' || false !== strpos($id_name, '\\')){ - if($id_start !== '\\'){ - if ($classes === null) { - $classes = $this->getClasses(); - } - if (isset($classes[$id_start_ci])) { - $id_start = $classes[$id_start_ci]; - } - if($id_start[0] !== '\\'){ - $id_start = $nsf . '\\' . $id_start; - } - } - } else { - if($id_start !== '\\'){ - if($functions === null){ - $functions = $this->getFunctions(); - } - if(isset($functions[$id_start_ci])){ - $id_start = $functions[$id_start_ci]; - } - } - } - $code .= $id_start . $id_name . '('; - $state = $lastState; - break; - case T_VARIABLE: - case T_DOUBLE_COLON: - if($id_start !== '\\') { - if($id_start_ci === 'self' || $id_start_ci === 'static' || $id_start_ci === 'parent'){ - $isUsingScope = true; - } elseif (!($php7 && in_array($id_start_ci, $php7_types))){ - if ($classes === null) { - $classes = $this->getClasses(); - } - if (isset($classes[$id_start_ci])) { - $id_start = $classes[$id_start_ci]; - } - if($id_start[0] !== '\\'){ - $id_start = $nsf . '\\' . $id_start; - } - } - } - $code .= $id_start . $id_name . $token[1]; - $state = $token[0] === T_DOUBLE_COLON ? 'ignore_next' : $lastState; - break; - default: - if($id_start !== '\\'){ - if($context === 'use' || - $context === 'instanceof' || - $context === 'args' || - $context === 'return_type' || - $context === 'extends' - ){ - if($id_start_ci === 'self' || $id_start_ci === 'static' || $id_start_ci === 'parent'){ - $isUsingScope = true; - } elseif (!($php7 && in_array($id_start_ci, $php7_types))){ - if($classes === null){ - $classes = $this->getClasses(); - } - if(isset($classes[$id_start_ci])){ - $id_start = $classes[$id_start_ci]; - } - if($id_start[0] !== '\\'){ - $id_start = $nsf . '\\' . $id_start; - } - } - } else { - if($constants === null){ - $constants = $this->getConstants(); - } - if(isset($constants[$id_start])){ - $id_start = $constants[$id_start]; - } - } - } - $code .= $id_start . $id_name; - $state = $lastState; - $i--;//reprocess last token - } - break; - case 'anonymous': - switch ($token[0]) { - case T_NS_SEPARATOR: - case T_STRING: - $id_start = $token[1]; - $id_start_ci = strtolower($id_start); - $id_name = ''; - $state = 'id_name'; - $context = 'extends'; - $lastState = 'anonymous'; - break; - case '{': - $state = 'closure'; - if (!$inside_anonymous) { - $inside_anonymous = true; - $anonymous_mark = $open; - } - $i--; - break; - default: - $code .= is_array($token) ? $token[1] : $token; - } - break; - } - } - - $this->isBindingRequired = $isUsingThisObject; - $this->isScopeRequired = $isUsingScope; - $this->code = $code; - $this->useVariables = empty($use) ? $use : array_intersect_key($this->getStaticVariables(), array_flip($use)); - - return $this->code; - } - - /** - * @return array - */ - public function getUseVariables() - { - if($this->useVariables !== null){ - return $this->useVariables; - } - - $tokens = $this->getTokens(); - $use = array(); - $state = 'start'; - - foreach ($tokens as &$token) { - $is_array = is_array($token); - - switch ($state) { - case 'start': - if ($is_array && $token[0] === T_USE) { - $state = 'use'; - } - break; - case 'use': - if ($is_array) { - if ($token[0] === T_VARIABLE) { - $use[] = substr($token[1], 1); - } - } elseif ($token == ')') { - break 2; - } - break; - } - } - - $this->useVariables = empty($use) ? $use : array_intersect_key($this->getStaticVariables(), array_flip($use)); - - return $this->useVariables; - } - - /** - * return bool - */ - public function isBindingRequired() - { - if($this->isBindingRequired === null){ - $this->getCode(); - } - - return $this->isBindingRequired; - } - - /** - * return bool - */ - public function isScopeRequired() - { - if($this->isScopeRequired === null){ - $this->getCode(); - } - - return $this->isScopeRequired; - } - - /** - * @return string - */ - protected function getHashedFileName() - { - if ($this->hashedName === null) { - $this->hashedName = sha1($this->getFileName()); - } - - return $this->hashedName; - } - - /** - * @return array - */ - protected function getFileTokens() - { - $key = $this->getHashedFileName(); - - if (!isset(static::$files[$key])) { - static::$files[$key] = token_get_all(file_get_contents($this->getFileName())); - } - - return static::$files[$key]; - } - - /** - * @return array - */ - protected function getTokens() - { - if ($this->tokens === null) { - $tokens = $this->getFileTokens(); - $startLine = $this->getStartLine(); - $endLine = $this->getEndLine(); - $results = array(); - $start = false; - - foreach ($tokens as &$token) { - if (!is_array($token)) { - if ($start) { - $results[] = $token; - } - - continue; - } - - $line = $token[2]; - - if ($line <= $endLine) { - if ($line >= $startLine) { - $start = true; - $results[] = $token; - } - - continue; - } - - break; - } - - $this->tokens = $results; - } - - return $this->tokens; - } - - /** - * @return array - */ - protected function getClasses() - { - $key = $this->getHashedFileName(); - - if (!isset(static::$classes[$key])) { - $this->fetchItems(); - } - - return static::$classes[$key]; - } - - /** - * @return array - */ - protected function getFunctions() - { - $key = $this->getHashedFileName(); - - if (!isset(static::$functions[$key])) { - $this->fetchItems(); - } - - return static::$functions[$key]; - } - - /** - * @return array - */ - protected function getConstants() - { - $key = $this->getHashedFileName(); - - if (!isset(static::$constants[$key])) { - $this->fetchItems(); - } - - return static::$constants[$key]; - } - - /** - * @return array - */ - protected function getStructures() - { - $key = $this->getHashedFileName(); - - if (!isset(static::$structures[$key])) { - $this->fetchItems(); - } - - return static::$structures[$key]; - } - - protected function fetchItems() - { - $key = $this->getHashedFileName(); - - $classes = array(); - $functions = array(); - $constants = array(); - $structures = array(); - $tokens = $this->getFileTokens(); - - $open = 0; - $state = 'start'; - $lastState = ''; - $prefix = ''; - $name = ''; - $alias = ''; - $isFunc = $isConst = false; - - $startLine = $endLine = 0; - $structType = $structName = ''; - $structIgnore = false; - - foreach ($tokens as $token) { - - switch ($state) { - case 'start': - switch ($token[0]) { - case T_CLASS: - case T_INTERFACE: - case T_TRAIT: - $state = 'before_structure'; - $startLine = $token[2]; - $structType = $token[0] == T_CLASS - ? 'class' - : ($token[0] == T_INTERFACE ? 'interface' : 'trait'); - break; - case T_USE: - $state = 'use'; - $prefix = $name = $alias = ''; - $isFunc = $isConst = false; - break; - case T_FUNCTION: - $state = 'structure'; - $structIgnore = true; - break; - case T_NEW: - $state = 'new'; - break; - case T_OBJECT_OPERATOR: - case T_DOUBLE_COLON: - $state = 'invoke'; - break; - } - break; - case 'use': - switch ($token[0]) { - case T_FUNCTION: - $isFunc = true; - break; - case T_CONST: - $isConst = true; - break; - case T_NS_SEPARATOR: - $name .= $token[1]; - break; - case T_STRING: - $name .= $token[1]; - $alias = $token[1]; - break; - case T_AS: - $lastState = 'use'; - $state = 'alias'; - break; - case '{': - $prefix = $name; - $name = $alias = ''; - $state = 'use-group'; - break; - case ',': - case ';': - if ($name === '' || $name[0] !== '\\') { - $name = '\\' . $name; - } - - if ($alias !== '') { - if ($isFunc) { - $functions[strtolower($alias)] = $name; - } elseif ($isConst) { - $constants[$alias] = $name; - } else { - $classes[strtolower($alias)] = $name; - } - } - $name = $alias = ''; - $state = $token === ';' ? 'start' : 'use'; - break; - } - break; - case 'use-group': - switch ($token[0]) { - case T_NS_SEPARATOR: - $name .= $token[1]; - break; - case T_STRING: - $name .= $token[1]; - $alias = $token[1]; - break; - case T_AS: - $lastState = 'use-group'; - $state = 'alias'; - break; - case ',': - case '}': - - if ($prefix === '' || $prefix[0] !== '\\') { - $prefix = '\\' . $prefix; - } - - if ($alias !== '') { - if ($isFunc) { - $functions[strtolower($alias)] = $prefix . $name; - } elseif ($isConst) { - $constants[$alias] = $prefix . $name; - } else { - $classes[strtolower($alias)] = $prefix . $name; - } - } - $name = $alias = ''; - $state = $token === '}' ? 'use' : 'use-group'; - break; - } - break; - case 'alias': - if ($token[0] === T_STRING) { - $alias = $token[1]; - $state = $lastState; - } - break; - case 'new': - switch ($token[0]) { - case T_WHITESPACE: - case T_COMMENT: - case T_DOC_COMMENT: - break 2; - case T_CLASS: - $state = 'structure'; - $structIgnore = true; - break; - default: - $state = 'start'; - } - break; - case 'invoke': - switch ($token[0]) { - case T_WHITESPACE: - case T_COMMENT: - case T_DOC_COMMENT: - break 2; - default: - $state = 'start'; - } - break; - case 'before_structure': - if ($token[0] == T_STRING) { - $structName = $token[1]; - $state = 'structure'; - } - break; - case 'structure': - switch ($token[0]) { - case '{': - case T_CURLY_OPEN: - case T_DOLLAR_OPEN_CURLY_BRACES: - case T_STRING_VARNAME: - $open++; - break; - case '}': - if (--$open == 0) { - if(!$structIgnore){ - $structures[] = array( - 'type' => $structType, - 'name' => $structName, - 'start' => $startLine, - 'end' => $endLine, - ); - } - $structIgnore = false; - $state = 'start'; - } - break; - default: - if (is_array($token)) { - $endLine = $token[2]; - } - } - break; - } - } - - static::$classes[$key] = $classes; - static::$functions[$key] = $functions; - static::$constants[$key] = $constants; - static::$structures[$key] = $structures; - } -} diff --git a/vendor/opis/closure/src/SecurityException.php b/vendor/opis/closure/src/SecurityException.php deleted file mode 100644 index 6a107eec..00000000 --- a/vendor/opis/closure/src/SecurityException.php +++ /dev/null @@ -1,18 +0,0 @@ -secret = $secret; - } - - /** - * @inheritdoc - */ - public function sign($closure) - { - return array( - 'closure' => $closure, - 'hash' => base64_encode(hash_hmac('sha256', $closure, $this->secret, true)), - ); - } - - /** - * @inheritdoc - */ - public function verify(array $data) - { - return base64_encode(hash_hmac('sha256', $data['closure'], $this->secret, true)) === $data['hash']; - } -} \ No newline at end of file diff --git a/vendor/opis/closure/src/SelfReference.php b/vendor/opis/closure/src/SelfReference.php deleted file mode 100644 index 3c6ec80d..00000000 --- a/vendor/opis/closure/src/SelfReference.php +++ /dev/null @@ -1,31 +0,0 @@ -hash = $hash; - } -} \ No newline at end of file diff --git a/vendor/opis/closure/src/SerializableClosure.php b/vendor/opis/closure/src/SerializableClosure.php deleted file mode 100644 index c4991cf8..00000000 --- a/vendor/opis/closure/src/SerializableClosure.php +++ /dev/null @@ -1,668 +0,0 @@ -closure = $closure; - if (static::$context !== null) { - $this->scope = static::$context->scope; - $this->scope->toserialize++; - } - } - - /** - * Get the Closure object - * - * @return Closure The wrapped closure - */ - public function getClosure() - { - return $this->closure; - } - - /** - * Get the reflector for closure - * - * @return ReflectionClosure - */ - public function getReflector() - { - if ($this->reflector === null) { - $this->reflector = new ReflectionClosure($this->closure, $this->code); - $this->code = null; - } - - return $this->reflector; - } - - /** - * Implementation of magic method __invoke() - */ - public function __invoke() - { - return call_user_func_array($this->closure, func_get_args()); - } - - /** - * Implementation of Serializable::serialize() - * - * @return string The serialized closure - */ - public function serialize() - { - if ($this->scope === null) { - $this->scope = new ClosureScope(); - $this->scope->toserialize++; - } - - $this->scope->serializations++; - - $scope = $object = null; - $reflector = $this->getReflector(); - - if($reflector->isBindingRequired()){ - $object = $reflector->getClosureThis(); - static::wrapClosures($object, $this->scope); - if($scope = $reflector->getClosureScopeClass()){ - $scope = $scope->name; - } - } elseif($reflector->isScopeRequired()) { - if($scope = $reflector->getClosureScopeClass()){ - $scope = $scope->name; - } - } - - $this->reference = spl_object_hash($this->closure); - - $this->scope[$this->closure] = $this; - - $use = $this->transformUseVariables($reflector->getUseVariables()); - $code = $reflector->getCode(); - - $this->mapByReference($use); - - $ret = \serialize(array( - 'use' => $use, - 'function' => $code, - 'scope' => $scope, - 'this' => $object, - 'self' => $this->reference, - )); - - if (static::$securityProvider !== null) { - $data = static::$securityProvider->sign($ret); - $ret = '@' . $data['hash'] . '.' . $data['closure']; - } - - if (!--$this->scope->serializations && !--$this->scope->toserialize) { - $this->scope = null; - } - - return $ret; - } - - /** - * Transform the use variables before serialization. - * - * @param array $data The Closure's use variables - * @return array - */ - protected function transformUseVariables($data) - { - return $data; - } - - /** - * Implementation of Serializable::unserialize() - * - * @param string $data Serialized data - * @throws SecurityException - */ - public function unserialize($data) - { - ClosureStream::register(); - - if (static::$securityProvider !== null) { - if ($data[0] !== '@') { - throw new SecurityException("The serialized closure is not signed. ". - "Make sure you use a security provider for both serialization and unserialization."); - } - - if ($data[1] !== '{') { - $separator = strpos($data, '.'); - if ($separator === false) { - throw new SecurityException('Invalid signed closure'); - } - $hash = substr($data, 1, $separator - 1); - $closure = substr($data, $separator + 1); - - $data = ['hash' => $hash, 'closure' => $closure]; - - unset($hash, $closure); - } else { - $data = json_decode(substr($data, 1), true); - } - - if (!is_array($data) || !static::$securityProvider->verify($data)) { - throw new SecurityException("Your serialized closure might have been modified and it's unsafe to be unserialized. " . - "Make sure you use the same security provider, with the same settings, " . - "both for serialization and unserialization."); - } - - $data = $data['closure']; - } elseif ($data[0] === '@') { - if ($data[1] !== '{') { - $separator = strpos($data, '.'); - if ($separator === false) { - throw new SecurityException('Invalid signed closure'); - } - $hash = substr($data, 1, $separator - 1); - $closure = substr($data, $separator + 1); - - $data = ['hash' => $hash, 'closure' => $closure]; - - unset($hash, $closure); - } else { - $data = json_decode(substr($data, 1), true); - } - - if (!is_array($data) || !isset($data['closure']) || !isset($data['hash'])) { - throw new SecurityException('Invalid signed closure'); - } - - $data = $data['closure']; - } - - $this->code = \unserialize($data); - - // unset data - unset($data); - - $this->code['objects'] = array(); - - if ($this->code['use']) { - $this->scope = new ClosureScope(); - $this->code['use'] = $this->resolveUseVariables($this->code['use']); - $this->mapPointers($this->code['use']); - extract($this->code['use'], EXTR_OVERWRITE | EXTR_REFS); - $this->scope = null; - } - - $this->closure = include(ClosureStream::STREAM_PROTO . '://' . $this->code['function']); - - if($this->code['this'] === $this){ - $this->code['this'] = null; - } - - if ($this->code['scope'] !== null || $this->code['this'] !== null) { - $this->closure = $this->closure->bindTo($this->code['this'], $this->code['scope']); - } - - if(!empty($this->code['objects'])){ - foreach ($this->code['objects'] as $item){ - $item['property']->setValue($item['instance'], $item['object']->getClosure()); - } - } - - $this->code = $this->code['function']; - } - - /** - * Resolve the use variables after unserialization. - * - * @param array $data The Closure's transformed use variables - * @return array - */ - protected function resolveUseVariables($data) - { - return $data; - } - - /** - * Wraps a closure and sets the serialization context (if any) - * - * @param Closure $closure Closure to be wrapped - * - * @return self The wrapped closure - */ - public static function from(Closure $closure) - { - if (static::$context === null) { - $instance = new static($closure); - } elseif (isset(static::$context->scope[$closure])) { - $instance = static::$context->scope[$closure]; - } else { - $instance = new static($closure); - static::$context->scope[$closure] = $instance; - } - - return $instance; - } - - /** - * Increments the context lock counter or creates a new context if none exist - */ - public static function enterContext() - { - if (static::$context === null) { - static::$context = new ClosureContext(); - } - - static::$context->locks++; - } - - /** - * Decrements the context lock counter and destroy the context when it reaches to 0 - */ - public static function exitContext() - { - if (static::$context !== null && !--static::$context->locks) { - static::$context = null; - } - } - - /** - * @param string $secret - */ - public static function setSecretKey($secret) - { - if(static::$securityProvider === null){ - static::$securityProvider = new SecurityProvider($secret); - } - } - - /** - * @param ISecurityProvider $securityProvider - */ - public static function addSecurityProvider(ISecurityProvider $securityProvider) - { - static::$securityProvider = $securityProvider; - } - - /** - * Remove security provider - */ - public static function removeSecurityProvider() - { - static::$securityProvider = null; - } - - /** - * @return null|ISecurityProvider - */ - public static function getSecurityProvider() - { - return static::$securityProvider; - } - - /** - * Wrap closures - * - * @internal - * @param $data - * @param ClosureScope|SplObjectStorage|null $storage - */ - public static function wrapClosures(&$data, SplObjectStorage $storage = null) - { - if($storage === null){ - $storage = static::$context->scope; - } - - if($data instanceof Closure){ - $data = static::from($data); - } elseif (is_array($data)){ - if(isset($data[self::ARRAY_RECURSIVE_KEY])){ - return; - } - $data[self::ARRAY_RECURSIVE_KEY] = true; - foreach ($data as $key => &$value){ - if($key === self::ARRAY_RECURSIVE_KEY){ - continue; - } - static::wrapClosures($value, $storage); - } - unset($value); - unset($data[self::ARRAY_RECURSIVE_KEY]); - } elseif($data instanceof \stdClass){ - if(isset($storage[$data])){ - $data = $storage[$data]; - return; - } - $data = $storage[$data] = clone($data); - foreach ($data as &$value){ - static::wrapClosures($value, $storage); - } - unset($value); - } elseif (is_object($data) && ! $data instanceof static){ - if(isset($storage[$data])){ - $data = $storage[$data]; - return; - } - $instance = $data; - $reflection = new ReflectionObject($instance); - if(!$reflection->isUserDefined()){ - $storage[$instance] = $data; - return; - } - $storage[$instance] = $data = $reflection->newInstanceWithoutConstructor(); - - do{ - if(!$reflection->isUserDefined()){ - break; - } - foreach ($reflection->getProperties() as $property){ - if($property->isStatic() || !$property->getDeclaringClass()->isUserDefined()){ - continue; - } - $property->setAccessible(true); - $value = $property->getValue($instance); - if(is_array($value) || is_object($value)){ - static::wrapClosures($value, $storage); - } - $property->setValue($data, $value); - }; - } while($reflection = $reflection->getParentClass()); - } - } - - /** - * Unwrap closures - * - * @internal - * @param $data - * @param SplObjectStorage|null $storage - */ - public static function unwrapClosures(&$data, SplObjectStorage $storage = null) - { - if($storage === null){ - $storage = static::$context->scope; - } - - if($data instanceof static){ - $data = $data->getClosure(); - } elseif (is_array($data)){ - if(isset($data[self::ARRAY_RECURSIVE_KEY])){ - return; - } - $data[self::ARRAY_RECURSIVE_KEY] = true; - foreach ($data as $key => &$value){ - if($key === self::ARRAY_RECURSIVE_KEY){ - continue; - } - static::unwrapClosures($value, $storage); - } - unset($data[self::ARRAY_RECURSIVE_KEY]); - }elseif ($data instanceof \stdClass){ - if(isset($storage[$data])){ - return; - } - $storage[$data] = true; - foreach ($data as &$property){ - static::unwrapClosures($property, $storage); - } - } elseif (is_object($data) && !($data instanceof Closure)){ - if(isset($storage[$data])){ - return; - } - $storage[$data] = true; - $reflection = new ReflectionObject($data); - - do{ - if(!$reflection->isUserDefined()){ - break; - } - foreach ($reflection->getProperties() as $property){ - if($property->isStatic() || !$property->getDeclaringClass()->isUserDefined()){ - continue; - } - $property->setAccessible(true); - $value = $property->getValue($data); - if(is_array($value) || is_object($value)){ - static::unwrapClosures($value, $storage); - $property->setValue($data, $value); - } - }; - } while($reflection = $reflection->getParentClass()); - } - } - - /** - * Creates a new closure from arbitrary code, - * emulating create_function, but without using eval - * - * @param string$args - * @param string $code - * @return Closure - */ - public static function createClosure($args, $code) - { - ClosureStream::register(); - return include(ClosureStream::STREAM_PROTO . '://function(' . $args. '){' . $code . '};'); - } - - /** - * Internal method used to map closure pointers - * @internal - * @param $data - */ - protected function mapPointers(&$data) - { - $scope = $this->scope; - - if ($data instanceof static) { - $data = &$data->closure; - } elseif (is_array($data)) { - if(isset($data[self::ARRAY_RECURSIVE_KEY])){ - return; - } - $data[self::ARRAY_RECURSIVE_KEY] = true; - foreach ($data as $key => &$value){ - if($key === self::ARRAY_RECURSIVE_KEY){ - continue; - } elseif ($value instanceof static) { - $data[$key] = &$value->closure; - } elseif ($value instanceof SelfReference && $value->hash === $this->code['self']){ - $data[$key] = &$this->closure; - } else { - $this->mapPointers($value); - } - } - unset($value); - unset($data[self::ARRAY_RECURSIVE_KEY]); - } elseif ($data instanceof \stdClass) { - if(isset($scope[$data])){ - return; - } - $scope[$data] = true; - foreach ($data as $key => &$value){ - if ($value instanceof SelfReference && $value->hash === $this->code['self']){ - $data->{$key} = &$this->closure; - } elseif(is_array($value) || is_object($value)) { - $this->mapPointers($value); - } - } - unset($value); - } elseif (is_object($data) && !($data instanceof Closure)){ - if(isset($scope[$data])){ - return; - } - $scope[$data] = true; - $reflection = new ReflectionObject($data); - do{ - if(!$reflection->isUserDefined()){ - break; - } - foreach ($reflection->getProperties() as $property){ - if($property->isStatic() || !$property->getDeclaringClass()->isUserDefined()){ - continue; - } - $property->setAccessible(true); - $item = $property->getValue($data); - if ($item instanceof SerializableClosure || ($item instanceof SelfReference && $item->hash === $this->code['self'])) { - $this->code['objects'][] = array( - 'instance' => $data, - 'property' => $property, - 'object' => $item instanceof SelfReference ? $this : $item, - ); - } elseif (is_array($item) || is_object($item)) { - $this->mapPointers($item); - $property->setValue($data, $item); - } - } - } while($reflection = $reflection->getParentClass()); - } - } - - /** - * Internal method used to map closures by reference - * - * @internal - * @param mixed &$data - */ - protected function mapByReference(&$data) - { - if ($data instanceof Closure) { - if($data === $this->closure){ - $data = new SelfReference($this->reference); - return; - } - - if (isset($this->scope[$data])) { - $data = $this->scope[$data]; - return; - } - - $instance = new static($data); - - if (static::$context !== null) { - static::$context->scope->toserialize--; - } else { - $instance->scope = $this->scope; - } - - $data = $this->scope[$data] = $instance; - } elseif (is_array($data)) { - if(isset($data[self::ARRAY_RECURSIVE_KEY])){ - return; - } - $data[self::ARRAY_RECURSIVE_KEY] = true; - foreach ($data as $key => &$value){ - if($key === self::ARRAY_RECURSIVE_KEY){ - continue; - } - $this->mapByReference($value); - } - unset($value); - unset($data[self::ARRAY_RECURSIVE_KEY]); - } elseif ($data instanceof \stdClass) { - if(isset($this->scope[$data])){ - $data = $this->scope[$data]; - return; - } - $instance = $data; - $this->scope[$instance] = $data = clone($data); - - foreach ($data as &$value){ - $this->mapByReference($value); - } - unset($value); - } elseif (is_object($data) && !$data instanceof SerializableClosure){ - if(isset($this->scope[$data])){ - $data = $this->scope[$data]; - return; - } - - $instance = $data; - $reflection = new ReflectionObject($data); - if(!$reflection->isUserDefined()){ - $this->scope[$instance] = $data; - return; - } - $this->scope[$instance] = $data = $reflection->newInstanceWithoutConstructor(); - - do{ - if(!$reflection->isUserDefined()){ - break; - } - foreach ($reflection->getProperties() as $property){ - if($property->isStatic() || !$property->getDeclaringClass()->isUserDefined()){ - continue; - } - $property->setAccessible(true); - $value = $property->getValue($instance); - if(is_array($value) || is_object($value)){ - $this->mapByReference($value); - } - $property->setValue($data, $value); - } - } while($reflection = $reflection->getParentClass()); - } - } - -} diff --git a/vendor/topthink/framework/.travis.yml b/vendor/topthink/framework/.travis.yml index 73e6681f..28987af8 100644 --- a/vendor/topthink/framework/.travis.yml +++ b/vendor/topthink/framework/.travis.yml @@ -19,6 +19,7 @@ services: before_install: - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + - echo 'xdebug.mode = coverage' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - printf "\n" | pecl install -f redis - travis_retry composer self-update - mysql -e 'CREATE DATABASE test;' @@ -31,4 +32,4 @@ script: after_script: - travis_retry wget https://scrutinizer-ci.com/ocular.phar - - php ocular.phar code-coverage:upload --format=php-clover build/logs/coverage.xml \ No newline at end of file + - php ocular.phar code-coverage:upload --format=php-clover build/logs/coverage.xml diff --git a/vendor/topthink/framework/README.md b/vendor/topthink/framework/README.md index 44cc4515..0ea03c98 100644 --- a/vendor/topthink/framework/README.md +++ b/vendor/topthink/framework/README.md @@ -13,6 +13,8 @@ ThinkPHP 6.0 ThinkPHP6.0底层架构采用PHP7.1改写和进一步优化。 +[官方应用服务市场](https://market.topthink.com) | [`ThinkAPI`——官方统一API服务](https://docs.topthink.com/think-api/) + ## 主要新特性 * 采用`PHP7`强类型(严格模式) @@ -33,12 +35,12 @@ ThinkPHP6.0底层架构采用PHP7.1改写和进一步优化。 * 统一和精简大量用法 -> ThinkPHP6.0的运行环境要求PHP7.1+。 +> ThinkPHP6.0的运行环境要求PHP7.1+,兼容PHP8.0。 ## 安装 ~~~ -composer create-project topthink/think tp 6.0.*-dev +composer create-project topthink/think tp ~~~ 启动服务 @@ -69,7 +71,7 @@ composer update topthink/framework ## 参与开发 -请参阅 [ThinkPHP核心框架包](https://github.com/top-think/framework)。 +直接提交PR或者Issue即可 ## 版权信息 @@ -77,9 +79,7 @@ ThinkPHP遵循Apache2开源协议发布,并提供免费使用。 本项目包含的第三方源码和二进制文件之版权信息另行标注。 -版权所有Copyright © 2006-2019 by ThinkPHP (http://thinkphp.cn) - -All rights reserved。 +版权所有Copyright © 2006-2021 by ThinkPHP (http://thinkphp.cn) All rights reserved。 ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。 diff --git a/vendor/topthink/framework/composer.json b/vendor/topthink/framework/composer.json index 017b3d96..9afc513a 100644 --- a/vendor/topthink/framework/composer.json +++ b/vendor/topthink/framework/composer.json @@ -24,7 +24,6 @@ "ext-mbstring": "*", "league/flysystem": "^1.0", "league/flysystem-cached-adapter": "^1.0", - "opis/closure": "^3.1", "psr/log": "~1.0", "psr/container": "~1.0", "psr/simple-cache": "^1.0", @@ -44,7 +43,7 @@ }, "autoload-dev": { "psr-4": { - "think\\tests\\": "src/tests/" + "think\\tests\\": "tests/" } }, "minimum-stability": "dev", diff --git a/vendor/topthink/framework/src/helper.php b/vendor/topthink/framework/src/helper.php index 42353eb8..650edcb9 100644 --- a/vendor/topthink/framework/src/helper.php +++ b/vendor/topthink/framework/src/helper.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -359,7 +359,7 @@ function parse_name(string $name, int $type = 0, bool $ucfirst = true): string return $ucfirst ? ucfirst($name) : lcfirst($name); } - return strtolower(trim(preg_replace("/[A-Z]/", "_\\0", $name), "_")); + return strtolower(trim(preg_replace('/[A-Z]/', '_\\0', $name), '_')); } } @@ -370,7 +370,7 @@ function parse_name(string $name, int $type = 0, bool $ucfirst = true): string * @param int $code 状态码 * @return \think\response\Redirect */ - function redirect(string $url, int $code = 302): Redirect + function redirect(string $url = '', int $code = 302): Redirect { return Response::create($url, 'redirect', $code); } @@ -523,7 +523,7 @@ function validate($validate = '', array $message = [], bool $batch = false, bool } else { if (strpos($validate, '.')) { // 支持场景 - list($validate, $scene) = explode('.', $validate); + [$validate, $scene] = explode('.', $validate); } $class = false !== strpos($validate, '\\') ? $validate : app()->parseClass('validate', $validate); @@ -632,7 +632,7 @@ function config_path($path = '') */ function public_path($path = '') { - return app()->getRootPath() . ($path ? ltrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR : $path); + return app()->getRootPath() . 'public' . DIRECTORY_SEPARATOR . ($path ? ltrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR : $path); } } diff --git a/vendor/topthink/framework/src/lang/zh-cn.php b/vendor/topthink/framework/src/lang/zh-cn.php index 83d8a1e8..a546330a 100644 --- a/vendor/topthink/framework/src/lang/zh-cn.php +++ b/vendor/topthink/framework/src/lang/zh-cn.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/App.php b/vendor/topthink/framework/src/think/App.php index f64d7953..cdcfeb8d 100644 --- a/vendor/topthink/framework/src/think/App.php +++ b/vendor/topthink/framework/src/think/App.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -39,7 +39,7 @@ */ class App extends Container { - const VERSION = '6.0.0'; + const VERSION = '6.0.8'; /** * 应用调试模式 @@ -47,6 +47,12 @@ class App extends Container */ protected $appDebug = false; + /** + * 环境变量标识 + * @var string + */ + protected $envName = ''; + /** * 应用开始时间 * @var float @@ -277,6 +283,18 @@ public function getNamespace(): string return $this->namespace; } + /** + * 设置环境变量标识 + * @access public + * @param string $name 环境标识 + * @return $this + */ + public function setEnvName(string $name) + { + $this->envName = $name; + return $this; + } + /** * 获取框架版本 * @access public @@ -395,6 +413,22 @@ public function getBeginMem(): int return $this->beginMem; } + /** + * 加载环境变量定义 + * @access public + * @param string $envName 环境标识 + * @return void + */ + public function loadEnv(string $envName = ''): void + { + // 加载环境变量 + $envFile = $envName ? $this->rootPath . '.env.' . $envName : $this->rootPath . '.env'; + + if (is_file($envFile)) { + $this->env->load($envFile); + } + } + /** * 初始化应用 * @access public @@ -407,10 +441,7 @@ public function initialize() $this->beginTime = microtime(true); $this->beginMem = memory_get_usage(); - // 加载环境变量 - if (is_file($this->rootPath . '.env')) { - $this->env->load($this->rootPath . '.env'); - } + $this->loadEnv($this->envName); $this->configExt = $this->env->get('config_ext', '.php'); @@ -590,7 +621,7 @@ public function parseClass(string $layer, string $name): string * 是否运行在命令行下 * @return bool */ - public function runningInConsole() + public function runningInConsole(): bool { return php_sapi_name() === 'cli' || php_sapi_name() === 'phpdbg'; } @@ -602,9 +633,7 @@ public function runningInConsole() */ protected function getDefaultRootPath(): string { - $path = dirname(dirname(dirname(dirname($this->thinkPath)))); - - return $path . DIRECTORY_SEPARATOR; + return dirname($this->thinkPath, 4) . DIRECTORY_SEPARATOR; } } diff --git a/vendor/topthink/framework/src/think/Cache.php b/vendor/topthink/framework/src/think/Cache.php index 4bc99c27..f802b556 100644 --- a/vendor/topthink/framework/src/think/Cache.php +++ b/vendor/topthink/framework/src/think/Cache.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/Config.php b/vendor/topthink/framework/src/think/Config.php index 78933adc..9162e82f 100644 --- a/vendor/topthink/framework/src/think/Config.php +++ b/vendor/topthink/framework/src/think/Config.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -116,6 +116,10 @@ protected function parse(string $file, string $name): array */ public function has(string $name): bool { + if (false === strpos($name, '.') && !isset($this->config[strtolower($name)])) { + return false; + } + return !is_null($this->get($name)); } diff --git a/vendor/topthink/framework/src/think/Console.php b/vendor/topthink/framework/src/think/Console.php index a1398d5d..389d104d 100644 --- a/vendor/topthink/framework/src/think/Console.php +++ b/vendor/topthink/framework/src/think/Console.php @@ -57,7 +57,7 @@ class Console protected $catchExceptions = true; protected $autoExit = true; protected $definition; - protected $defaultCommand = 'list'; + protected $defaultCommand = 'list'; protected $defaultCommands = [ 'help' => Help::class, @@ -91,9 +91,7 @@ public function __construct(App $app) { $this->app = $app; - if (!$this->app->initialized()) { - $this->app->initialize(); - } + $this->initialize(); $this->definition = $this->getDefaultInputDefinition(); @@ -103,6 +101,63 @@ public function __construct(App $app) $this->start(); } + /** + * 初始化 + */ + protected function initialize() + { + if (!$this->app->initialized()) { + $this->app->initialize(); + } + $this->makeRequest(); + } + + /** + * 构造request + */ + protected function makeRequest() + { + $uri = $this->app->config->get('app.url', 'http://localhost'); + + $components = parse_url($uri); + + $server = $_SERVER; + + if (isset($components['path'])) { + $server = array_merge($server, [ + 'SCRIPT_FILENAME' => $components['path'], + 'SCRIPT_NAME' => $components['path'], + ]); + } + + if (isset($components['host'])) { + $server['SERVER_NAME'] = $components['host']; + $server['HTTP_HOST'] = $components['host']; + } + + if (isset($components['scheme'])) { + if ('https' === $components['scheme']) { + $server['HTTPS'] = 'on'; + $server['SERVER_PORT'] = 443; + } else { + unset($server['HTTPS']); + $server['SERVER_PORT'] = 80; + } + } + + if (isset($components['port'])) { + $server['SERVER_PORT'] = $components['port']; + $server['HTTP_HOST'] .= ':' . $components['port']; + } + + $server['REQUEST_URI'] = $uri; + + /** @var Request $request */ + $request = $this->app->make('request'); + + $request->withServer($server); + } + /** * 添加初始化器 * @param Closure $callback @@ -161,7 +216,7 @@ protected function loadCommands(): void /** * @access public * @param string $command - * @param array $parameters + * @param array $parameters * @param string $driver * @return Output|Buffer */ @@ -226,7 +281,7 @@ public function run() /** * 执行指令 * @access public - * @param Input $input + * @param Input $input * @param Output $output * @return int */ @@ -344,7 +399,7 @@ public function addCommands(array $commands): void * 添加一个指令 * @access public * @param string|Command $command 指令对象或者指令类名 - * @param string $name 指令名 留空则自动获取 + * @param string $name 指令名 留空则自动获取 * @return Command|void */ public function addCommand($command, string $name = '') @@ -462,7 +517,7 @@ public function findNamespace(string $namespace): string $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]) . '[^:]*'; }, $namespace); - $namespaces = preg_grep('{^' . $expr . '}', $allNamespaces); + $namespaces = preg_grep('{^' . $expr . '}', $allNamespaces); if (empty($namespaces)) { $message = sprintf('There are no commands defined in the "%s" namespace.', $namespace); @@ -560,7 +615,7 @@ public function all(string $namespace = null): array /** * 配置基于用户的参数和选项的输入和输出实例。 * @access protected - * @param Input $input 输入实例 + * @param Input $input 输入实例 * @param Output $output 输出实例 */ protected function configureIO(Input $input, Output $output): void @@ -590,8 +645,8 @@ protected function configureIO(Input $input, Output $output): void * 执行指令 * @access protected * @param Command $command 指令实例 - * @param Input $input 输入实例 - * @param Output $output 输出实例 + * @param Input $input 输入实例 + * @param Output $output 输出实例 * @return int * @throws \Exception */ @@ -644,8 +699,8 @@ private function getAbbreviationSuggestions(array $abbrevs): string /** * 返回命名空间部分 * @access public - * @param string $name 指令 - * @param int $limit 部分的命名空间的最大数量 + * @param string $name 指令 + * @param int $limit 部分的命名空间的最大数量 * @return string */ public function extractNamespace(string $name, int $limit = 0): string @@ -659,7 +714,7 @@ public function extractNamespace(string $name, int $limit = 0): string /** * 查找可替代的建议 * @access private - * @param string $name + * @param string $name * @param array|\Traversable $collection * @return array */ diff --git a/vendor/topthink/framework/src/think/Container.php b/vendor/topthink/framework/src/think/Container.php index ce8225e6..74026bb0 100644 --- a/vendor/topthink/framework/src/think/Container.php +++ b/vendor/topthink/framework/src/think/Container.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -152,8 +152,9 @@ public function bind($abstract, $concrete = null) $this->instance($abstract, $concrete); } else { $abstract = $this->getAlias($abstract); - - $this->bind[$abstract] = $concrete; + if ($abstract != $concrete) { + $this->bind[$abstract] = $concrete; + } } return $this; @@ -304,7 +305,8 @@ public function invokeMethod($method, array $vars = [], bool $accessible = false { if (is_array($method)) { [$class, $method] = $method; - $class = is_object($class) ? $class : $this->invokeClass($class); + + $class = is_object($class) ? $class : $this->invokeClass($class); } else { // 静态方法 [$class, $method] = explode('::', $method); @@ -314,8 +316,7 @@ public function invokeMethod($method, array $vars = [], bool $accessible = false $reflect = new ReflectionMethod($class, $method); } catch (ReflectionException $e) { $class = is_object($class) ? get_class($class) : $class; - $message = sprintf('method not exists: %d::%d()', $class, $method); - throw new FuncNotFoundException($message, "{$class}::{$method}", $e); + throw new FuncNotFoundException('method not exists: ' . $class . '::' . $method . '()', "{$class}::{$method}", $e); } $args = $this->bindParams($reflect, $vars); @@ -379,8 +380,10 @@ public function invokeClass(string $class, array $vars = []) if ($reflect->hasMethod('__make')) { $method = $reflect->getMethod('__make'); if ($method->isPublic() && $method->isStatic()) { - $args = $this->bindParams($method, $vars); - return $method->invokeArgs(null, $args); + $args = $this->bindParams($method, $vars); + $object = $method->invokeArgs(null, $args); + $this->invokeAfter($class, $object); + return $object; } } @@ -437,17 +440,17 @@ protected function bindParams(ReflectionFunctionAbstract $reflect, array $vars = $args = []; foreach ($params as $param) { - $name = $param->getName(); - $lowerName = Str::snake($name); - $class = $param->getClass(); + $name = $param->getName(); + $lowerName = Str::snake($name); + $reflectionType = $param->getType(); - if ($class) { - $args[] = $this->getObjectParam($class->getName(), $vars); + if ($reflectionType && $reflectionType->isBuiltin() === false) { + $args[] = $this->getObjectParam($reflectionType->getName(), $vars); } elseif (1 == $type && !empty($vars)) { $args[] = array_shift($vars); - } elseif (0 == $type && isset($vars[$name])) { + } elseif (0 == $type && array_key_exists($name, $vars)) { $args[] = $vars[$name]; - } elseif (0 == $type && isset($vars[$lowerName])) { + } elseif (0 == $type && array_key_exists($lowerName, $vars)) { $args[] = $vars[$lowerName]; } elseif ($param->isDefaultValueAvailable()) { $args[] = $param->getDefaultValue(); diff --git a/vendor/topthink/framework/src/think/Cookie.php b/vendor/topthink/framework/src/think/Cookie.php index c26594a4..ebbfd64e 100644 --- a/vendor/topthink/framework/src/think/Cookie.php +++ b/vendor/topthink/framework/src/think/Cookie.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -35,6 +35,8 @@ class Cookie 'secure' => false, // httponly设置 'httponly' => false, + // samesite 设置,支持 'strict' 'lax' + 'samesite' => '', ]; /** @@ -181,9 +183,18 @@ public function getCookie(): array public function save(): void { foreach ($this->cookie as $name => $val) { - list($value, $expire, $option) = $val; - - $this->saveCookie($name, $value, $expire, $option['path'], $option['domain'], $option['secure'] ? true : false, $option['httponly'] ? true : false); + [$value, $expire, $option] = $val; + + $this->saveCookie( + $name, + $value, + $expire, + $option['path'], + $option['domain'], + $option['secure'] ? true : false, + $option['httponly'] ? true : false, + $option['samesite'] + ); } } @@ -197,11 +208,23 @@ public function save(): void * @param string $domain 有效域名/子域名 * @param bool $secure 是否仅仅通过HTTPS * @param bool $httponly 仅可通过HTTP访问 + * @param string $samesite 防止CSRF攻击和用户追踪 * @return void */ - protected function saveCookie(string $name, string $value, int $expire, string $path, string $domain, bool $secure, bool $httponly): void + protected function saveCookie(string $name, string $value, int $expire, string $path, string $domain, bool $secure, bool $httponly, string $samesite): void { - setcookie($name, $value, $expire, $path, $domain, $secure, $httponly); + if (version_compare(PHP_VERSION, '7.3.0', '>=')) { + setcookie($name, $value, [ + 'expires' => $expire, + 'path' => $path, + 'domain' => $domain, + 'secure' => $secure, + 'httponly' => $httponly, + 'samesite' => $samesite, + ]); + } else { + setcookie($name, $value, $expire, $path, $domain, $secure, $httponly); + } } } diff --git a/vendor/topthink/framework/src/think/Db.php b/vendor/topthink/framework/src/think/Db.php index 06b7ff29..0048874f 100644 --- a/vendor/topthink/framework/src/think/Db.php +++ b/vendor/topthink/framework/src/think/Db.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -15,6 +15,7 @@ /** * 数据库管理类 * @package think + * @property Config $config */ class Db extends DbManager { @@ -32,7 +33,9 @@ public static function __make(Event $event, Config $config, Log $log, Cache $cac $db->setConfig($config); $db->setEvent($event); $db->setLog($log); - $db->setCache($cache); + + $store = $db->getConfig('cache_store'); + $db->setCache($cache->store($store)); $db->triggerSql(); return $db; diff --git a/vendor/topthink/framework/src/think/Env.php b/vendor/topthink/framework/src/think/Env.php index 05228aaf..4c26b33a 100644 --- a/vendor/topthink/framework/src/think/Env.php +++ b/vendor/topthink/framework/src/think/Env.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/Event.php b/vendor/topthink/framework/src/think/Event.php index fa9b11ad..6a0eb1f0 100644 --- a/vendor/topthink/framework/src/think/Event.php +++ b/vendor/topthink/framework/src/think/Event.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -39,12 +39,6 @@ class Event 'LogWrite' => event\LogWrite::class, ]; - /** - * 是否需要事件响应 - * @var bool - */ - protected $withEvent = true; - /** * 应用对象 * @var App @@ -56,18 +50,6 @@ public function __construct(App $app) $this->app = $app; } - /** - * 设置是否开启事件响应 - * @access protected - * @param bool $event 是否需要事件响应 - * @return $this - */ - public function withEvent(bool $event) - { - $this->withEvent = $event; - return $this; - } - /** * 批量注册事件监听 * @access public @@ -76,10 +58,6 @@ public function withEvent(bool $event) */ public function listenEvents(array $events) { - if (!$this->withEvent) { - return $this; - } - foreach ($events as $event => $listeners) { if (isset($this->bind[$event])) { $event = $this->bind[$event]; @@ -101,10 +79,6 @@ public function listenEvents(array $events) */ public function listen(string $event, $listener, bool $first = false) { - if (!$this->withEvent) { - return $this; - } - if (isset($this->bind[$event])) { $event = $this->bind[$event]; } @@ -169,10 +143,6 @@ public function bind(array $events) */ public function subscribe($subscriber) { - if (!$this->withEvent) { - return $this; - } - $subscribers = (array) $subscriber; foreach ($subscribers as $subscriber) { @@ -201,10 +171,6 @@ public function subscribe($subscriber) */ public function observe($observer, string $prefix = '') { - if (!$this->withEvent) { - return $this; - } - if (is_string($observer)) { $observer = $this->app->make($observer); } @@ -238,10 +204,6 @@ public function observe($observer, string $prefix = '') */ public function trigger($event, $params = null, bool $once = false) { - if (!$this->withEvent) { - return; - } - if (is_object($event)) { $params = $event; $event = get_class($event); @@ -253,6 +215,7 @@ public function trigger($event, $params = null, bool $once = false) $result = []; $listeners = $this->listener[$event] ?? []; + $listeners = array_unique($listeners, SORT_REGULAR); foreach ($listeners as $key => $listener) { $result[$key] = $this->dispatch($listener, $params); diff --git a/vendor/topthink/framework/src/think/Exception.php b/vendor/topthink/framework/src/think/Exception.php index 468e29df..5cf79548 100644 --- a/vendor/topthink/framework/src/think/Exception.php +++ b/vendor/topthink/framework/src/think/Exception.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/Facade.php b/vendor/topthink/framework/src/think/Facade.php index 79212980..9a0e3339 100644 --- a/vendor/topthink/framework/src/think/Facade.php +++ b/vendor/topthink/framework/src/think/Facade.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/File.php b/vendor/topthink/framework/src/think/File.php index feed90c8..f7c37bdb 100644 --- a/vendor/topthink/framework/src/think/File.php +++ b/vendor/topthink/framework/src/think/File.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -100,13 +100,13 @@ public function move(string $directory, string $name = null): File set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; }); - $renamed = rename($this->getPathname(), $target); + $renamed = rename($this->getPathname(), (string) $target); restore_error_handler(); if (!$renamed) { throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s)', $this->getPathname(), $target, strip_tags($error))); } - @chmod($target, 0666 & ~umask()); + @chmod((string) $target, 0666 & ~umask()); return $target; } @@ -157,11 +157,11 @@ public function extension(): string /** * 自动生成文件名 - * @access protected + * @access public * @param string|\Closure $rule * @return string */ - public function hashName($rule = 'date'): string + public function hashName($rule = ''): string { if (!$this->hashName) { if ($rule instanceof \Closure) { diff --git a/vendor/topthink/framework/src/think/Filesystem.php b/vendor/topthink/framework/src/think/Filesystem.php index a443f74a..0aee929f 100644 --- a/vendor/topthink/framework/src/think/Filesystem.php +++ b/vendor/topthink/framework/src/think/Filesystem.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/Http.php b/vendor/topthink/framework/src/think/Http.php index a78b8b4d..4e49c88c 100644 --- a/vendor/topthink/framework/src/think/Http.php +++ b/vendor/topthink/framework/src/think/Http.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -42,6 +42,12 @@ class Http */ protected $path; + /** + * 路由路径 + * @var string + */ + protected $routePath; + /** * 是否绑定应用 * @var bool @@ -117,7 +123,6 @@ public function getRoutePath(): string * 设置路由目录 * @access public * @param string $path 路由定义目录 - * @return string */ public function setRoutePath(string $path): void { @@ -154,6 +159,9 @@ public function isBind(): bool */ public function run(Request $request = null): Response { + //初始化 + $this->initialize(); + //自动创建request对象 $request = $request ?? $this->app->make('request', [], true); $this->app->instance('request', $request); @@ -186,14 +194,9 @@ protected function initialize() */ protected function runWithRequest(Request $request) { - $this->initialize(); - // 加载全局中间件 $this->loadMiddleware(); - // 设置开启事件机制 - $this->app->event->withEvent($this->app->config->get('app.with_event', true)); - // 监听HttpRun $this->app->event->trigger(HttpRun::class); diff --git a/vendor/topthink/framework/src/think/Lang.php b/vendor/topthink/framework/src/think/Lang.php index fefd367b..0b79b760 100644 --- a/vendor/topthink/framework/src/think/Lang.php +++ b/vendor/topthink/framework/src/think/Lang.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -33,6 +33,8 @@ class Lang 'extend_list' => [], // 多语言cookie变量 'cookie_var' => 'think_lang', + // 多语言header变量 + 'header_var' => 'think-lang', // 多语言自动侦测变量名 'detect_var' => 'lang', // Accept-Language转义为对应语言包名称 @@ -118,9 +120,9 @@ public function load($file, $range = ''): array $lang = []; - foreach ((array) $file as $_file) { - if (is_file($_file)) { - $result = $this->parse($_file); + foreach ((array) $file as $name) { + if (is_file($name)) { + $result = $this->parse($name); $lang = array_change_key_case($result) + $lang; } } @@ -151,6 +153,18 @@ protected function parse(string $file): array if (function_exists('yaml_parse_file')) { $result = yaml_parse_file($file); } + break; + case 'json': + $data = file_get_contents($file); + + if (false !== $data) { + $data = json_decode($data, true); + + if (json_last_error() === JSON_ERROR_NONE) { + $result = $data; + } + } + break; } @@ -169,7 +183,7 @@ public function has(string $name, string $range = ''): bool $range = $range ?: $this->range; if ($this->config['allow_group'] && strpos($name, '.')) { - list($name1, $name2) = explode('.', $name, 2); + [$name1, $name2] = explode('.', $name, 2); return isset($this->lang[$range][strtolower($name1)][$name2]); } @@ -194,7 +208,7 @@ public function get(string $name = null, array $vars = [], string $range = '') } if ($this->config['allow_group'] && strpos($name, '.')) { - list($name1, $name2) = explode('.', $name, 2); + [$name1, $name2] = explode('.', $name, 2); $value = $this->lang[$range][strtolower($name1)][$name2] ?? $name; } else { @@ -239,6 +253,9 @@ public function detect(Request $request): string if ($request->get($this->config['detect_var'])) { // url中设置了语言变量 $langSet = strtolower($request->get($this->config['detect_var'])); + } elseif ($request->header($this->config['header_var'])) { + // Header中设置了语言变量 + $langSet = strtolower($request->header($this->config['header_var'])); } elseif ($request->cookie($this->config['cookie_var'])) { // Cookie中设置了语言变量 $langSet = strtolower($request->cookie($this->config['cookie_var'])); diff --git a/vendor/topthink/framework/src/think/Log.php b/vendor/topthink/framework/src/think/Log.php index e9031c76..c31210ce 100644 --- a/vendor/topthink/framework/src/think/Log.php +++ b/vendor/topthink/framework/src/think/Log.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/Manager.php b/vendor/topthink/framework/src/think/Manager.php index 7845e463..ca3f6a5a 100644 --- a/vendor/topthink/framework/src/think/Manager.php +++ b/vendor/topthink/framework/src/think/Manager.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -48,7 +48,8 @@ protected function driver(string $name = null) 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 )); } diff --git a/vendor/topthink/framework/src/think/Middleware.php b/vendor/topthink/framework/src/think/Middleware.php index f713cb17..a3db0f2f 100644 --- a/vendor/topthink/framework/src/think/Middleware.php +++ b/vendor/topthink/framework/src/think/Middleware.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -66,7 +66,7 @@ public function add($middleware, string $type = 'global'): void { $middleware = $this->buildMiddleware($middleware, $type); - if ($middleware) { + if (!empty($middleware)) { $this->queue[$type][] = $middleware; $this->queue[$type] = array_unique($this->queue[$type], SORT_REGULAR); } @@ -135,11 +135,11 @@ public function pipeline(string $type = 'global') return (new Pipeline()) ->through(array_map(function ($middleware) { return function ($request, $next) use ($middleware) { - list($call, $param) = $middleware; + [$call, $params] = $middleware; if (is_array($call) && is_string($call[0])) { $call = [$this->app->make($call[0]), $call[1]]; } - $response = call_user_func($call, $request, $next, $param); + $response = call_user_func($call, $request, $next, ...$params); if (!$response instanceof Response) { throw new LogicException('The middleware must return Response instance'); @@ -158,7 +158,7 @@ public function end(Response $response) { foreach ($this->queue as $queue) { foreach ($queue as $middleware) { - list($call) = $middleware; + [$call] = $middleware; if (is_array($call) && is_string($call[0])) { $instance = $this->app->make($call[0]); if (method_exists($instance, 'end')) { @@ -182,9 +182,7 @@ public function handleException($passable, Throwable $e) $handler->report($e); - $response = $handler->render($passable, $e); - - return $response; + return $handler->render($passable, $e); } /** @@ -197,11 +195,11 @@ public function handleException($passable, Throwable $e) protected function buildMiddleware($middleware, string $type): array { if (is_array($middleware)) { - list($middleware, $param) = $middleware; + [$middleware, $params] = $middleware; } if ($middleware instanceof Closure) { - return [$middleware, $param ?? null]; + return [$middleware, $params ?? []]; } if (!is_string($middleware)) { @@ -220,7 +218,7 @@ protected function buildMiddleware($middleware, string $type): array return []; } - return [[$middleware, 'handle'], $param ?? null]; + return [[$middleware, 'handle'], $params ?? []]; } /** @@ -248,7 +246,7 @@ protected function sortMiddleware(array $middlewares) */ protected function getMiddlewarePriority($priority, $middleware) { - list($call) = $middleware; + [$call] = $middleware; if (is_array($call) && is_string($call[0])) { $index = array_search($call[0], array_reverse($priority)); return false === $index ? -1 : $index; diff --git a/vendor/topthink/framework/src/think/Pipeline.php b/vendor/topthink/framework/src/think/Pipeline.php index 24c5122a..77151f3a 100644 --- a/vendor/topthink/framework/src/think/Pipeline.php +++ b/vendor/topthink/framework/src/think/Pipeline.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -60,7 +60,8 @@ function ($passable) use ($destination) { } catch (Throwable | Exception $e) { return $this->handleException($passable, $e); } - }); + } + ); return $pipeline($this->passable); } diff --git a/vendor/topthink/framework/src/think/Request.php b/vendor/topthink/framework/src/think/Request.php index d25c0091..a21976df 100644 --- a/vendor/topthink/framework/src/think/Request.php +++ b/vendor/topthink/framework/src/think/Request.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -12,6 +12,7 @@ namespace think; +use ArrayAccess; use think\file\UploadedFile; use think\route\Rule; @@ -19,7 +20,7 @@ * 请求管理类 * @package think */ -class Request +class Request implements ArrayAccess { /** * 兼容PATH_INFO获取 @@ -307,15 +308,6 @@ public static function __make(App $app) { $request = new static(); - $request->server = $_SERVER; - $request->env = $app->env; - $request->get = $_GET; - $request->post = $_POST ?: $request->getInputData($request->input); - $request->put = $request->getInputData($request->input); - $request->request = $_REQUEST; - $request->cookie = $_COOKIE; - $request->file = $_FILES ?? []; - if (function_exists('apache_request_headers') && $result = apache_request_headers()) { $header = $result; } else { @@ -336,6 +328,17 @@ public static function __make(App $app) } $request->header = array_change_key_case($header); + $request->server = $_SERVER; + $request->env = $app->env; + + $inputData = $request->getInputData($request->input); + + $request->get = $_GET; + $request->post = $_POST ?: $inputData; + $request->put = $inputData; + $request->request = $_REQUEST; + $request->cookie = $_COOKIE; + $request->file = $_FILES ?? []; return $request; } @@ -866,6 +869,24 @@ public function param($name = '', $default = null, $filter = '') return $this->input($this->param, $name, $default, $filter); } + /** + * 获取包含文件在内的请求参数 + * @access public + * @param string|array $name 变量名 + * @param string|array $filter 过滤方法 + * @return mixed + */ + public function all($name = '', $filter = '') + { + $data = array_merge($this->param(), $this->file()); + + if (is_array($name)) { + $data = $this->only($name, $data, $filter); + } + + return $data; + } + /** * 设置路由变量 * @access public @@ -896,7 +917,8 @@ public function rule() */ public function setRoute(array $route) { - $this->route = array_merge($this->route, $route); + $this->route = array_merge($this->route, $route); + $this->mergeParam = false; return $this; } @@ -982,11 +1004,12 @@ public function put($name = '', $default = null, $filter = '') protected function getInputData($content): array { - if (false !== strpos($this->contentType(), 'json')) { - return (array) json_decode($content, true); - } elseif (strpos($content, '=')) { + $contentType = $this->contentType(); + if ('application/x-www-form-urlencoded' == $contentType) { parse_str($content, $data); return $data; + } elseif (false !== strpos($contentType, 'json')) { + return (array) json_decode($content, true); } return []; @@ -1126,7 +1149,7 @@ public function file(string $name = '') if (!empty($files)) { if (strpos($name, '.')) { - list($name, $sub) = explode('.', $name); + [$name, $sub] = explode('.', $name); } // 处理上传文件 @@ -1244,7 +1267,7 @@ public function input(array $data = [], $name = '', $default = null, $filter = ' if ('' != $name) { // 解析name if (strpos($name, '/')) { - list($name, $type) = explode('/', $name); + [$name, $type] = explode('/', $name); } $data = $this->getData($data, $name); @@ -1654,7 +1677,7 @@ public function isValidIP(string $ip, string $type = ''): bool $flag = FILTER_FLAG_IPV6; break; default: - $flag = null; + $flag = 0; break; } @@ -1751,7 +1774,7 @@ public function host(bool $strict = false): string if ($this->host) { $host = $this->host; } else { - $host = strval($this->server('HTTP_X_REAL_HOST') ?: $this->server('HTTP_HOST')); + $host = strval($this->server('HTTP_X_FORWARDED_HOST') ?: $this->server('HTTP_HOST')); } return true === $strict && strpos($host, ':') ? strstr($host, ':', true) : $host; @@ -1764,7 +1787,7 @@ public function host(bool $strict = false): string */ public function port(): int { - return (int) $this->server('SERVER_PORT', ''); + return (int) ($this->server('HTTP_X_FORWARDED_PORT') ?: $this->server('SERVER_PORT', '')); } /** @@ -1794,11 +1817,11 @@ public function remotePort(): int */ public function contentType(): string { - $contentType = $this->server('CONTENT_TYPE'); + $contentType = $this->header('Content-Type'); if ($contentType) { if (strpos($contentType, ';')) { - list($type) = explode(';', $contentType); + [$type] = explode(';', $contentType); } else { $type = $contentType; } @@ -2051,12 +2074,19 @@ public function withEnv(Env $env) /** * 设置php://input数据 * @access public - * @param string $input RAW数据 + * @param string $input RAW数据 * @return $this */ public function withInput(string $input) { $this->input = $input; + if (!empty($input)) { + $inputData = $this->getInputData($input); + if (!empty($inputData)) { + $this->post = $inputData; + $this->put = $inputData; + } + } return $this; } @@ -2116,4 +2146,22 @@ public function __isset(string $name): bool { return isset($this->middleware[$name]); } + + // ArrayAccess + public function offsetExists($name): bool + { + return $this->has($name); + } + + public function offsetGet($name) + { + return $this->param($name); + } + + public function offsetSet($name, $value) + {} + + public function offsetUnset($name) + {} + } diff --git a/vendor/topthink/framework/src/think/Response.php b/vendor/topthink/framework/src/think/Response.php index 9b8d96dc..a8a61ffb 100644 --- a/vendor/topthink/framework/src/think/Response.php +++ b/vendor/topthink/framework/src/think/Response.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -138,8 +138,9 @@ public function send(): void header($name . (!is_null($val) ? ':' . $val : '')); } } - - $this->cookie->save(); + if ($this->cookie) { + $this->cookie->save(); + } $this->sendData($data); @@ -213,7 +214,7 @@ public function allowCache(bool $cache) /** * 是否允许请求缓存 * @access public - * @return $this + * @return bool */ public function isAllowCache() { diff --git a/vendor/topthink/framework/src/think/Route.php b/vendor/topthink/framework/src/think/Route.php index 6bf7c808..a3acf85b 100644 --- a/vendor/topthink/framework/src/think/Route.php +++ b/vendor/topthink/framework/src/think/Route.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -15,6 +15,7 @@ use Closure; use think\exception\RouteNotFoundException; use think\route\Dispatch; +use think\route\dispatch\Callback; use think\route\dispatch\Url as UrlDispatch; use think\route\Domain; use think\route\Resource; @@ -120,7 +121,7 @@ class Route /** * 域名对象 - * @var array + * @var Domain[] */ protected $domains = []; @@ -134,7 +135,7 @@ class Route * 路由是否延迟解析 * @var bool */ - protected $lazy = true; + protected $lazy = false; /** * 路由是否测试模式 @@ -164,12 +165,12 @@ public function __construct(App $app) // 读取路由映射文件 $this->import(include $this->app->getRuntimePath() . 'route.php'); } + + $this->config = array_merge($this->config, $this->app->config->get('route')); } protected function init() { - $this->config = array_merge($this->config, $this->app->config->get('route')); - if (!empty($this->config['middleware'])) { $this->app->middleware->import($this->config['middleware'], 'route'); } @@ -422,7 +423,7 @@ public function getDomainBind(string $domain = null) * @param string $name 路由标识 * @param string $domain 域名 * @param string $method 请求类型 - * @return RuleItem[] + * @return array */ public function getName(string $name = null, string $domain = null, string $method = '*'): array { @@ -433,7 +434,7 @@ public function getName(string $name = null, string $domain = null, string $meth * 批量导入路由标识 * @access public * @param array $name 路由标识 - * @return $this + * @return void */ public function import(array $name): void { @@ -510,6 +511,12 @@ public function clear(): void */ public function rule(string $rule, $route = null, string $method = '*'): RuleItem { + if ($route instanceof Response) { + // 兼容之前的路由到响应对象,感觉不需要,使用场景很少,闭包就能实现 + $route = function () use ($route) { + return $route; + }; + } return $this->group->addRule($rule, $route, $method); } @@ -658,7 +665,9 @@ public function resource(string $rule, string $route): Resource */ public function view(string $rule, string $template = '', array $vars = []): RuleItem { - return $this->rule($rule, $template, 'GET')->view($vars); + return $this->rule($rule, function () use ($vars, $template) { + return Response::create($template, 'view')->assign($vars); + }, 'GET'); } /** @@ -671,7 +680,21 @@ public function view(string $rule, string $template = '', array $vars = []): Rul */ public function redirect(string $rule, string $route = '', int $status = 301): RuleItem { - return $this->rule($rule, $route, '*')->redirect()->status($status); + return $this->rule($rule, function (Request $request) use ($status, $route) { + $search = $replace = []; + $matches = $request->rule()->getVars(); + + foreach ($matches as $key => $value) { + $search[] = '<' . $key . '>'; + $replace[] = $value; + + $search[] = ':' . $key; + $replace[] = $value; + } + + $route = str_replace($search, $replace, $route); + return Response::create($route, 'redirect')->code($status); + }, '*'); } /** @@ -722,10 +745,10 @@ public function miss($route, string $method = '*'): RuleItem /** * 路由调度 * @param Request $request - * @param Closure $withRoute + * @param Closure|bool $withRoute * @return Response */ - public function dispatch(Request $request, $withRoute = null) + public function dispatch(Request $request, $withRoute = true) { $this->request = $request; $this->host = $this->request->host(true); @@ -733,7 +756,9 @@ public function dispatch(Request $request, $withRoute = null) if ($withRoute) { //加载路由 - $withRoute(); + if ($withRoute instanceof Closure) { + $withRoute(); + } $dispatch = $this->check(); } else { $dispatch = $this->url($this->path()); @@ -751,10 +776,10 @@ public function dispatch(Request $request, $withRoute = null) /** * 检测URL路由 * @access public - * @return Dispatch + * @return Dispatch|false * @throws RouteNotFoundException */ - public function check(): Dispatch + public function check() { // 自动检测域名路由 $url = str_replace($this->config['pathinfo_depr'], '|', $this->path()); @@ -807,8 +832,15 @@ protected function path(): string * @param string $url URL地址 * @return Dispatch */ - public function url(string $url): UrlDispatch + public function url(string $url): Dispatch { + if ($this->request->method() == 'OPTIONS') { + // 自动响应options请求 + return new Callback($this->request, $this->group, function () { + return Response::create('', 'html', 204)->header(['Allow' => 'GET, POST, PUT, DELETE']); + }); + } + return new UrlDispatch($this->request, $this->group, $url); } diff --git a/vendor/topthink/framework/src/think/Service.php b/vendor/topthink/framework/src/think/Service.php index 68c67890..d9e89601 100644 --- a/vendor/topthink/framework/src/think/Service.php +++ b/vendor/topthink/framework/src/think/Service.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/Session.php b/vendor/topthink/framework/src/think/Session.php index c344f0bd..6c84faf8 100644 --- a/vendor/topthink/framework/src/think/Session.php +++ b/vendor/topthink/framework/src/think/Session.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/Validate.php b/vendor/topthink/framework/src/think/Validate.php index a8db2da2..07884064 100644 --- a/vendor/topthink/framework/src/think/Validate.php +++ b/vendor/topthink/framework/src/think/Validate.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -126,12 +126,12 @@ class Validate 'alpha' => '/^[A-Za-z]+$/', 'alphaNum' => '/^[A-Za-z0-9]+$/', 'alphaDash' => '/^[A-Za-z0-9\-\_]+$/', - 'chs' => '/^[\x{4e00}-\x{9fa5}]+$/u', - 'chsAlpha' => '/^[\x{4e00}-\x{9fa5}a-zA-Z]+$/u', - 'chsAlphaNum' => '/^[\x{4e00}-\x{9fa5}a-zA-Z0-9]+$/u', - 'chsDash' => '/^[\x{4e00}-\x{9fa5}a-zA-Z0-9\_\-]+$/u', + 'chs' => '/^[\x{4e00}-\x{9fa5}\x{9fa6}-\x{9fef}\x{3400}-\x{4db5}\x{20000}-\x{2ebe0}]+$/u', + 'chsAlpha' => '/^[\x{4e00}-\x{9fa5}\x{9fa6}-\x{9fef}\x{3400}-\x{4db5}\x{20000}-\x{2ebe0}a-zA-Z]+$/u', + 'chsAlphaNum' => '/^[\x{4e00}-\x{9fa5}\x{9fa6}-\x{9fef}\x{3400}-\x{4db5}\x{20000}-\x{2ebe0}a-zA-Z0-9]+$/u', + 'chsDash' => '/^[\x{4e00}-\x{9fa5}\x{9fa6}-\x{9fef}\x{3400}-\x{4db5}\x{20000}-\x{2ebe0}a-zA-Z0-9\_\-]+$/u', 'mobile' => '/^1[3-9]\d{9}$/', - 'idCard' => '/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/', + 'idCard' => '/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$)/', 'zip' => '/\d{6}/', ]; @@ -156,7 +156,7 @@ class Validate /** * 验证失败错误信息 - * @var array + * @var string|array */ protected $error = []; @@ -472,18 +472,19 @@ public function check(array $data, array $rules = []): bool { $this->error = []; + if ($this->currentScene) { + $this->getScene($this->currentScene); + } + if (empty($rules)) { // 读取验证规则 $rules = $this->rule; } - if ($this->currentScene) { - $this->getScene($this->currentScene); - } - foreach ($this->append as $key => $rule) { if (!isset($rules[$key])) { $rules[$key] = $rule; + unset($this->append[$key]); } } @@ -491,7 +492,7 @@ public function check(array $data, array $rules = []): bool // field => 'rule1|rule2...' field => ['rule1','rule2',...] if (strpos($key, '|')) { // 字段|描述 用于指定属性名称 - list($key, $title) = explode('|', $key); + [$key, $title] = explode('|', $key); } else { $title = $this->field[$key] ?? $key; } @@ -560,7 +561,7 @@ public function checkRule($value, $rules): bool $result = call_user_func_array($rule, [$value]); } else { // 判断验证类型 - list($type, $rule) = $this->getValidateType($key, $rule); + [$type, $rule] = $this->getValidateType($key, $rule); $callback = $this->type[$type] ?? [$this, $type]; @@ -605,6 +606,11 @@ protected function checkItem(string $field, $value, $rules, $data, string $title if (isset($this->append[$field])) { // 追加额外的验证规则 $rules = array_unique(array_merge($rules, $this->append[$field]), SORT_REGULAR); + unset($this->append[$field]); + } + + if (empty($rules)) { + return true; } $i = 0; @@ -614,10 +620,9 @@ protected function checkItem(string $field, $value, $rules, $data, string $title $info = is_numeric($key) ? '' : $key; } else { // 判断验证类型 - list($type, $rule, $info) = $this->getValidateType($key, $rule); + [$type, $rule, $info] = $this->getValidateType($key, $rule); if (isset($this->append[$field]) && in_array($info, $this->append[$field])) { - } elseif (isset($this->remove[$field]) && in_array($info, $this->remove[$field])) { // 规则已经移除 $i++; @@ -660,7 +665,7 @@ protected function checkItem(string $field, $value, $rules, $data, string $title $i++; } - return $result; + return $result ?? true; } /** @@ -682,7 +687,7 @@ protected function getValidateType($key, $rule): array } if (strpos($rule, ':')) { - list($type, $rule) = explode(':', $rule, 2); + [$type, $rule] = explode(':', $rule, 2); if (isset($this->alias[$type])) { // 判断别名 $type = $this->alias[$type]; @@ -1072,13 +1077,13 @@ public function image($file, $rule): bool if ($rule) { $rule = explode(',', $rule); - list($width, $height, $type) = getimagesize($file->getRealPath()); + [$width, $height, $type] = getimagesize($file->getRealPath()); if (isset($rule[2])) { $imageType = strtolower($rule[2]); - if ('jpeg' == $imageType) { - $imageType = 'jpg'; + if ('jpg' == $imageType) { + $imageType = 'jpeg'; } if (image_type_to_extension($type, false) != $imageType) { @@ -1086,7 +1091,7 @@ public function image($file, $rule): bool } } - list($w, $h) = $rule; + [$w, $h] = $rule; return $w == $width && $h == $height; } @@ -1173,12 +1178,12 @@ public function unique($value, $rule, array $data = [], string $field = ''): boo public function filter($value, $rule): bool { if (is_string($rule) && strpos($rule, ',')) { - list($rule, $param) = explode(',', $rule); + [$rule, $param] = explode(',', $rule); } elseif (is_array($rule)) { - $param = $rule[1] ?? null; + $param = $rule[1] ?? 0; $rule = $rule[0]; } else { - $param = null; + $param = 0; } return false !== filter_var($value, is_int($rule) ? $rule : filter_id($rule), $param); @@ -1194,7 +1199,7 @@ public function filter($value, $rule): bool */ public function requireIf($value, $rule, array $data = []): bool { - list($field, $val) = explode(',', $rule); + [$field, $val] = explode(',', $rule); if ($this->getDataValue($data, $field) == $val) { return !empty($value) || '0' == $value; @@ -1296,7 +1301,7 @@ public function between($value, $rule): bool if (is_string($rule)) { $rule = explode(',', $rule); } - list($min, $max) = $rule; + [$min, $max] = $rule; return $value >= $min && $value <= $max; } @@ -1313,7 +1318,7 @@ public function notBetween($value, $rule): bool if (is_string($rule)) { $rule = explode(',', $rule); } - list($min, $max) = $rule; + [$min, $max] = $rule; return $value < $min || $value > $max; } @@ -1337,7 +1342,7 @@ public function length($value, $rule): bool if (is_string($rule) && strpos($rule, ',')) { // 长度区间 - list($min, $max) = explode(',', $rule); + [$min, $max] = explode(',', $rule); return $length >= $min && $length <= $max; } @@ -1452,7 +1457,7 @@ public function expire($value, $rule): bool $rule = explode(',', $rule); } - list($start, $end) = $rule; + [$start, $end] = $rule; if (!is_numeric($start)) { $start = strtotime($start); @@ -1512,7 +1517,10 @@ public function regex($value, $rule): bool return is_scalar($value) && 1 === preg_match($rule, (string) $value); } - // 获取错误信息 + /** + * 获取错误信息 + * @return array|string + */ public function getError() { return $this->error; @@ -1583,7 +1591,7 @@ protected function getRuleMsg(string $attribute, string $title, string $type, $r * @param string $msg 错误信息 * @param mixed $rule 验证规则数据 * @param string $title 字段描述名 - * @return string + * @return string|array */ protected function parseErrorMsg(string $msg, $rule, string $title) { @@ -1597,6 +1605,11 @@ protected function parseErrorMsg(string $msg, $rule, string $title) return $this->errorMsgIsArray($msg, $rule, $title); } + // rule若是数组则转为字符串 + if (is_array($rule)) { + $rule = implode(',', $rule); + } + if (is_scalar($rule) && false !== strpos($msg, ':')) { // 变量替换 if (is_string($rule) && strpos($rule, ',')) { @@ -1608,7 +1621,8 @@ protected function parseErrorMsg(string $msg, $rule, string $title) $msg = str_replace( [':attribute', ':1', ':2', ':3'], [$title, $array[0], $array[1], $array[2]], - $msg); + $msg + ); if (strpos($msg, ':rule')) { $msg = str_replace(':rule', (string) $rule, $msg); diff --git a/vendor/topthink/framework/src/think/View.php b/vendor/topthink/framework/src/think/View.php index c2e7368e..2e710884 100644 --- a/vendor/topthink/framework/src/think/View.php +++ b/vendor/topthink/framework/src/think/View.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -115,7 +115,11 @@ protected function getContent($callback): string { // 页面缓存 ob_start(); - ob_implicit_flush(0); + if (PHP_VERSION > 8.0) { + ob_implicit_flush(false); + } else { + ob_implicit_flush(0); + } // 渲染输出 try { diff --git a/vendor/topthink/framework/src/think/cache/Driver.php b/vendor/topthink/framework/src/think/cache/Driver.php index 30b90f40..5813c7b3 100644 --- a/vendor/topthink/framework/src/think/cache/Driver.php +++ b/vendor/topthink/framework/src/think/cache/Driver.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -18,6 +18,7 @@ use DateTimeInterface; use Exception; use Psr\SimpleCache\CacheInterface; +use think\Container; use think\contract\CacheHandlerInterface; use think\exception\InvalidArgumentException; use throwable; @@ -129,6 +130,18 @@ public function push(string $name, $value): void $this->set($name, $item); } + /** + * 追加TagSet数据 + * @access public + * @param string $name 缓存变量名 + * @param mixed $value 存储数据 + * @return void + */ + public function append(string $name, $value): void + { + $this->push($name, $value); + } + /** * 如果不存在则写入缓存 * @access public @@ -156,7 +169,7 @@ public function remember(string $name, $value, $expire = null) if ($value instanceof Closure) { // 获取缓存数据 - $value = $value(); + $value = Container::getInstance()->invokeFunction($value); } // 缓存数据 @@ -184,9 +197,6 @@ public function tag($name): TagSet $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); } @@ -201,7 +211,8 @@ public function tag($name): TagSet */ public function getTagItems(string $tag): array { - return $this->get($tag, []); + $name = $this->getTagKey($tag); + return $this->get($name, []); } /** @@ -227,7 +238,7 @@ protected function serialize($data): string return (string) $data; } - $serialize = $this->options['serialize'][0] ?? "\Opis\Closure\serialize"; + $serialize = $this->options['serialize'][0] ?? "serialize"; return $serialize($data); } @@ -244,7 +255,7 @@ protected function unserialize(string $data) return $data; } - $unserialize = $this->options['serialize'][1] ?? "\Opis\Closure\unserialize"; + $unserialize = $this->options['serialize'][1] ?? "unserialize"; return $unserialize($data); } diff --git a/vendor/topthink/framework/src/think/cache/TagSet.php b/vendor/topthink/framework/src/think/cache/TagSet.php index d890c496..5ba20769 100644 --- a/vendor/topthink/framework/src/think/cache/TagSet.php +++ b/vendor/topthink/framework/src/think/cache/TagSet.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -69,7 +69,8 @@ public function append(string $name): void $name = $this->handler->getCacheKey($name); foreach ($this->tag as $tag) { - $this->handler->push($tag, $name); + $key = $this->handler->getTagKey($tag); + $this->handler->append($key, $name); } } @@ -120,9 +121,10 @@ public function clear(): bool // 指定标签清除 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; diff --git a/vendor/topthink/framework/src/think/cache/driver/File.php b/vendor/topthink/framework/src/think/cache/driver/File.php index f0122f53..b36b0696 100644 --- a/vendor/topthink/framework/src/think/cache/driver/File.php +++ b/vendor/topthink/framework/src/think/cache/driver/File.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -108,7 +108,7 @@ protected function getRaw(string $name) $content = gzuncompress($content); } - return ['content' => $content, 'expire' => $expire]; + return is_string($content) ? ['content' => $content, 'expire' => $expire] : null; } } diff --git a/vendor/topthink/framework/src/think/cache/driver/Memcache.php b/vendor/topthink/framework/src/think/cache/driver/Memcache.php index 12774479..2fbbb9c7 100644 --- a/vendor/topthink/framework/src/think/cache/driver/Memcache.php +++ b/vendor/topthink/framework/src/think/cache/driver/Memcache.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -64,7 +64,7 @@ public function __construct(array $options = []) foreach ($hosts as $i => $host) { $port = $ports[$i] ?? $ports[0]; $this->options['timeout'] > 0 ? - $this->handler->addServer($host, (int) $port, $this->options['persistent'], 1, $this->options['timeout']) : + $this->handler->addServer($host, (int) $port, $this->options['persistent'], 1, (int) $this->options['timeout']) : $this->handler->addServer($host, (int) $port, $this->options['persistent'], 1); } } diff --git a/vendor/topthink/framework/src/think/cache/driver/Memcached.php b/vendor/topthink/framework/src/think/cache/driver/Memcached.php index a5755b8c..71edb058 100644 --- a/vendor/topthink/framework/src/think/cache/driver/Memcached.php +++ b/vendor/topthink/framework/src/think/cache/driver/Memcached.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -181,15 +181,18 @@ public function dec(string $name, int $step = 1) * 删除缓存 * @access public * @param string $name 缓存变量名 + * @param bool|false $ttl * @return bool */ - public function delete($name): bool + public function delete($name, $ttl = false): bool { $this->writeTimes++; $key = $this->getCacheKey($name); - return $this->handler->delete($key); + return false === $ttl ? + $this->handler->delete($key) : + $this->handler->delete($key, $ttl); } /** diff --git a/vendor/topthink/framework/src/think/cache/driver/Redis.php b/vendor/topthink/framework/src/think/cache/driver/Redis.php index 23c52dc6..791b27b8 100644 --- a/vendor/topthink/framework/src/think/cache/driver/Redis.php +++ b/vendor/topthink/framework/src/think/cache/driver/Redis.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -58,9 +58,9 @@ public function __construct(array $options = []) $this->handler = new \Redis; if ($this->options['persistent']) { - $this->handler->pconnect($this->options['host'], (int) $this->options['port'], $this->options['timeout'], 'persistent_id_' . $this->options['select']); + $this->handler->pconnect($this->options['host'], (int) $this->options['port'], (int) $this->options['timeout'], 'persistent_id_' . $this->options['select']); } else { - $this->handler->connect($this->options['host'], (int) $this->options['port'], $this->options['timeout']); + $this->handler->connect($this->options['host'], (int) $this->options['port'], (int) $this->options['timeout']); } if ('' != $this->options['password']) { @@ -87,7 +87,7 @@ public function __construct(array $options = []) } if (0 != $this->options['select']) { - $this->handler->select($this->options['select']); + $this->handler->select((int) $this->options['select']); } } @@ -112,10 +112,10 @@ public function has($name): bool public function get($name, $default = null) { $this->readTimes++; + $key = $this->getCacheKey($name); + $value = $this->handler->get($key); - $value = $this->handler->get($this->getCacheKey($name)); - - if (false === $value) { + if (false === $value || is_null($value)) { return $default; } @@ -161,7 +161,6 @@ public function set($name, $value, $expire = null): bool public function inc(string $name, int $step = 1) { $this->writeTimes++; - $key = $this->getCacheKey($name); return $this->handler->incrby($key, $step); @@ -177,7 +176,6 @@ public function inc(string $name, int $step = 1) public function dec(string $name, int $step = 1) { $this->writeTimes++; - $key = $this->getCacheKey($name); return $this->handler->decrby($key, $step); @@ -193,7 +191,8 @@ public function delete($name): bool { $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 @@ public function delete($name): bool public function clear(): bool { $this->writeTimes++; - $this->handler->flushDB(); return true; } @@ -223,15 +221,16 @@ public function clearTag(array $keys): void } /** - * 追加(数组)缓存数据 + * 追加TagSet数据 * @access public * @param string $name 缓存标识 * @param mixed $value 数据 * @return void */ - public function push(string $name, $value): void + public function append(string $name, $value): void { - $this->handler->sAdd($name, $value); + $key = $this->getCacheKey($name); + $this->handler->sAdd($key, $value); } /** @@ -242,7 +241,9 @@ public function push(string $name, $value): void */ public function getTagItems(string $tag): array { - return $this->handler->sMembers($tag); + $name = $this->getTagKey($tag); + $key = $this->getCacheKey($name); + return $this->handler->sMembers($key); } } diff --git a/vendor/topthink/framework/src/think/cache/driver/Wincache.php b/vendor/topthink/framework/src/think/cache/driver/Wincache.php index 8b8e26df..8b3e8b86 100644 --- a/vendor/topthink/framework/src/think/cache/driver/Wincache.php +++ b/vendor/topthink/framework/src/think/cache/driver/Wincache.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/console/Output.php b/vendor/topthink/framework/src/think/console/Output.php index 13837a7d..294c4b80 100644 --- a/vendor/topthink/framework/src/think/console/Output.php +++ b/vendor/topthink/framework/src/think/console/Output.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2020 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -42,16 +42,22 @@ */ class Output { + // 不显示信息(静默) const VERBOSITY_QUIET = 0; + // 正常信息 const VERBOSITY_NORMAL = 1; + // 详细信息 const VERBOSITY_VERBOSE = 2; + // 非常详细的信息 const VERBOSITY_VERY_VERBOSE = 3; + // 调试信息 const VERBOSITY_DEBUG = 4; const OUTPUT_NORMAL = 0; const OUTPUT_RAW = 1; const OUTPUT_PLAIN = 2; + // 输出信息级别 private $verbosity = self::VERBOSITY_NORMAL; /** @var Buffer|Console|Nothing */ @@ -162,7 +168,8 @@ public function renderException(Throwable $e): void } /** - * {@inheritdoc} + * 设置输出信息级别 + * @param int $level 输出信息级别 */ public function setVerbosity(int $level) { @@ -170,7 +177,8 @@ public function setVerbosity(int $level) } /** - * {@inheritdoc} + * 获取输出信息级别 + * @return int */ public function getVerbosity(): int { @@ -220,5 +228,4 @@ public function __call($method, $args) throw new Exception('method not exists:' . __CLASS__ . '->' . $method); } } - } diff --git a/vendor/topthink/framework/src/think/console/command/Clear.php b/vendor/topthink/framework/src/think/console/command/Clear.php index 81878c59..da70b35d 100644 --- a/vendor/topthink/framework/src/think/console/command/Clear.php +++ b/vendor/topthink/framework/src/think/console/command/Clear.php @@ -25,6 +25,7 @@ protected function configure() ->addOption('cache', 'c', Option::VALUE_NONE, 'clear cache file') ->addOption('log', 'l', Option::VALUE_NONE, 'clear log file') ->addOption('dir', 'r', Option::VALUE_NONE, 'clear empty dir') + ->addOption('expire', 'e', Option::VALUE_NONE, 'clear cache file if cache has expired') ->setDescription('Clear runtime file'); } @@ -41,24 +42,44 @@ protected function execute(Input $input, Output $output) } $rmdir = $input->getOption('dir') ? true : false; - $this->clear(rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR, $rmdir); + // --expire 仅当 --cache 时生效 + $cache_expire = $input->getOption('expire') && $input->getOption('cache') ? true : false; + $this->clear(rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR, $rmdir, $cache_expire); $output->writeln("Clear Successed"); } - protected function clear(string $path, bool $rmdir): void + protected function clear(string $path, bool $rmdir, bool $cache_expire): void { $files = is_dir($path) ? scandir($path) : []; foreach ($files as $file) { if ('.' != $file && '..' != $file && is_dir($path . $file)) { - array_map('unlink', glob($path . $file . DIRECTORY_SEPARATOR . '*.*')); + $this->clear($path . $file . DIRECTORY_SEPARATOR, $rmdir, $cache_expire); if ($rmdir) { - rmdir($path . $file); + @rmdir($path . $file); } } elseif ('.gitignore' != $file && is_file($path . $file)) { - unlink($path . $file); + if ($cache_expire) { + if ($this->cacheHasExpired($path . $file)) { + unlink($path . $file); + } + } else { + unlink($path . $file); + } } } } + + /** + * 缓存文件是否已过期 + * @param $filename string 文件路径 + * @return bool + */ + protected function cacheHasExpired($filename) { + $content = file_get_contents($filename); + $expire = (int) substr($content, 8, 12); + return 0 != $expire && time() - $expire > filemtime($filename); + } + } diff --git a/vendor/topthink/framework/src/think/console/command/Help.php b/vendor/topthink/framework/src/think/console/command/Help.php index d3833b8e..2e4f2ca7 100644 --- a/vendor/topthink/framework/src/think/console/command/Help.php +++ b/vendor/topthink/framework/src/think/console/command/Help.php @@ -32,7 +32,8 @@ protected function configure() $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(<<setDescription('Displays help for a command')->setHelp( + <<%command.name% command displays help for a given command: php %command.full_name% list diff --git a/vendor/topthink/framework/src/think/console/command/Lists.php b/vendor/topthink/framework/src/think/console/command/Lists.php index 278c2bd4..d20fc751 100644 --- a/vendor/topthink/framework/src/think/console/command/Lists.php +++ b/vendor/topthink/framework/src/think/console/command/Lists.php @@ -25,7 +25,8 @@ class Lists extends Command */ protected function configure() { - $this->setName('list')->setDefinition($this->createDefinition())->setDescription('Lists commands')->setHelp(<<setName('list')->setDefinition($this->createDefinition())->setDescription('Lists commands')->setHelp( + <<%command.name% command lists all commands: php %command.full_name% diff --git a/vendor/topthink/framework/src/think/console/command/Make.php b/vendor/topthink/framework/src/think/console/command/Make.php index c355a92f..662b3372 100644 --- a/vendor/topthink/framework/src/think/console/command/Make.php +++ b/vendor/topthink/framework/src/think/console/command/Make.php @@ -79,7 +79,7 @@ protected function getClassName(string $name): string } if (strpos($name, '@')) { - list($app, $name) = explode('@', $name); + [$app, $name] = explode('@', $name); } else { $app = ''; } diff --git a/vendor/topthink/framework/src/think/console/command/RunServer.php b/vendor/topthink/framework/src/think/console/command/RunServer.php index 82d2744b..20a24662 100644 --- a/vendor/topthink/framework/src/think/console/command/RunServer.php +++ b/vendor/topthink/framework/src/think/console/command/RunServer.php @@ -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'); } diff --git a/vendor/topthink/framework/src/think/console/command/ServiceDiscover.php b/vendor/topthink/framework/src/think/console/command/ServiceDiscover.php index 3aae1db5..e90f4339 100644 --- a/vendor/topthink/framework/src/think/console/command/ServiceDiscover.php +++ b/vendor/topthink/framework/src/think/console/command/ServiceDiscover.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -28,6 +28,10 @@ public function execute(Input $input, Output $output) { 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) { diff --git a/vendor/topthink/framework/src/think/console/command/VendorPublish.php b/vendor/topthink/framework/src/think/console/command/VendorPublish.php index 7b437621..39987657 100644 --- a/vendor/topthink/framework/src/think/console/command/VendorPublish.php +++ b/vendor/topthink/framework/src/think/console/command/VendorPublish.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -31,7 +31,10 @@ public function handle() 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']; + } foreach ($packages as $package) { //配置 $configDir = $this->app->getConfigPath(); diff --git a/vendor/topthink/framework/src/think/console/command/make/Command.php b/vendor/topthink/framework/src/think/console/command/make/Command.php index 88e665a5..9549a021 100644 --- a/vendor/topthink/framework/src/think/console/command/make/Command.php +++ b/vendor/topthink/framework/src/think/console/command/make/Command.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2016 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/console/command/make/Controller.php b/vendor/topthink/framework/src/think/console/command/make/Controller.php index 582cffbb..4a8d226c 100644 --- a/vendor/topthink/framework/src/think/console/command/make/Controller.php +++ b/vendor/topthink/framework/src/think/console/command/make/Controller.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2016 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/console/command/make/Event.php b/vendor/topthink/framework/src/think/console/command/make/Event.php index a4676d8f..6b166898 100644 --- a/vendor/topthink/framework/src/think/console/command/make/Event.php +++ b/vendor/topthink/framework/src/think/console/command/make/Event.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/console/command/make/Listener.php b/vendor/topthink/framework/src/think/console/command/make/Listener.php index bb296683..5c926736 100644 --- a/vendor/topthink/framework/src/think/console/command/make/Listener.php +++ b/vendor/topthink/framework/src/think/console/command/make/Listener.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/console/command/make/Middleware.php b/vendor/topthink/framework/src/think/console/command/make/Middleware.php index 80f45633..3b68b4a7 100644 --- a/vendor/topthink/framework/src/think/console/command/make/Middleware.php +++ b/vendor/topthink/framework/src/think/console/command/make/Middleware.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -31,6 +31,6 @@ protected function getStub(): string protected function getNamespace(string $app): string { - return 'app\\middleware'; + return parent::getNamespace($app) . '\\middleware'; } } diff --git a/vendor/topthink/framework/src/think/console/command/make/Model.php b/vendor/topthink/framework/src/think/console/command/make/Model.php index acb37e7c..cb7a23c4 100644 --- a/vendor/topthink/framework/src/think/console/command/make/Model.php +++ b/vendor/topthink/framework/src/think/console/command/make/Model.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/console/command/make/Service.php b/vendor/topthink/framework/src/think/console/command/make/Service.php index 18bd54eb..c4bbaa0e 100644 --- a/vendor/topthink/framework/src/think/console/command/make/Service.php +++ b/vendor/topthink/framework/src/think/console/command/make/Service.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/console/command/make/Subscribe.php b/vendor/topthink/framework/src/think/console/command/make/Subscribe.php index 4203986e..a1dc2a82 100644 --- a/vendor/topthink/framework/src/think/console/command/make/Subscribe.php +++ b/vendor/topthink/framework/src/think/console/command/make/Subscribe.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/console/command/make/Validate.php b/vendor/topthink/framework/src/think/console/command/make/Validate.php index 4926e20d..8d364316 100644 --- a/vendor/topthink/framework/src/think/console/command/make/Validate.php +++ b/vendor/topthink/framework/src/think/console/command/make/Validate.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2016 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/command.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/command.stub index e9121cdd..3ee2b1cf 100644 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/command.stub +++ b/vendor/topthink/framework/src/think/console/command/make/stubs/command.stub @@ -15,12 +15,12 @@ class {%className%} extends Command { // 指令配置 $this->setName('{%commandName%}') - ->setDescription('the {%commandName%} command'); + ->setDescription('the {%commandName%} command'); } protected function execute(Input $input, Output $output) { - // 指令输出 - $output->writeln('{%commandName%}'); + // 指令输出 + $output->writeln('{%commandName%}'); } } diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/listener.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/listener.stub index d55e7c4e..03724380 100644 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/listener.stub +++ b/vendor/topthink/framework/src/think/console/command/make/stubs/listener.stub @@ -13,5 +13,5 @@ class {%className%} public function handle($event) { // - } + } } diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/model.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/model.stub index b2f4571d..bb94a388 100644 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/model.stub +++ b/vendor/topthink/framework/src/think/console/command/make/stubs/model.stub @@ -6,7 +6,7 @@ namespace {%namespace%}; use think\Model; /** - * @mixin think\Model + * @mixin \think\Model */ class {%className%} extends Model { diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/service.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/service.stub index 6ec93fe8..5d74d15c 100644 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/service.stub +++ b/vendor/topthink/framework/src/think/console/command/make/stubs/service.stub @@ -3,9 +3,8 @@ declare (strict_types = 1); namespace {%namespace%}; -class {%className%} extends \think\Service +class {%className%} extends \think\Service { - /** * 注册服务 * @@ -16,7 +15,6 @@ class {%className%} extends \think\Service // } - /** * 执行服务 * diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/validate.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/validate.stub index b5969797..d1fedd8d 100644 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/validate.stub +++ b/vendor/topthink/framework/src/think/console/command/make/stubs/validate.stub @@ -9,17 +9,17 @@ class {%className%} extends Validate { /** * 定义验证规则 - * 格式:'字段名' => ['规则1','规则2'...] + * 格式:'字段名' => ['规则1','规则2'...] * * @var array - */ - protected $rule = []; - + */ + protected $rule = []; + /** * 定义错误信息 - * 格式:'字段名.规则名' => '错误信息' + * 格式:'字段名.规则名' => '错误信息' * * @var array - */ + */ protected $message = []; } diff --git a/vendor/topthink/framework/src/think/console/command/optimize/Route.php b/vendor/topthink/framework/src/think/console/command/optimize/Route.php index f72532f6..56f7f5a9 100644 --- a/vendor/topthink/framework/src/think/console/command/optimize/Route.php +++ b/vendor/topthink/framework/src/think/console/command/optimize/Route.php @@ -46,7 +46,7 @@ protected function buildRouteCache(string $dir = null): string $this->app->route->lazy(false); // 路由检测 - $path = $this->app->getRootPath() . 'route' . DIRECTORY_SEPARATOR . ($dir ? $dir . DIRECTORY_SEPARATOR : ''); + $path = $this->app->getRootPath() . ($dir ? 'app' . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR : '') . 'route' . DIRECTORY_SEPARATOR; $files = is_dir($path) ? scandir($path) : []; @@ -58,10 +58,9 @@ protected function buildRouteCache(string $dir = null): string //触发路由载入完成事件 $this->app->event->trigger(RouteLoaded::class); + $rules = $this->app->route->getName(); - $content = 'app->route->getName()) . '\');'; - return $content; + return 'setName('optimize:schema') ->addArgument('dir', Argument::OPTIONAL, 'dir name .') - ->addOption('db', null, Option::VALUE_REQUIRED, 'db name .') + ->addOption('connection', null, Option::VALUE_REQUIRED, 'connection name .') ->addOption('table', null, Option::VALUE_REQUIRED, 'table name .') ->setDescription('Build database schema cache.'); } @@ -31,22 +33,24 @@ protected function execute(Input $input, Output $output) { $dir = $input->getArgument('dir') ?: ''; - $schemaPath = $this->app->db->getConnection()->getConfig('schema_cache_path'); - - if (!is_dir($schemaPath)) { - mkdir($schemaPath, 0755, true); - } - if ($input->hasOption('table')) { + $connection = $this->app->db->connect($input->getOption('connection')); + if (!$connection instanceof PDOConnection) { + $output->error("only PDO connection support schema cache!"); + return; + } $table = $input->getOption('table'); if (false === strpos($table, '.')) { - $dbName = $this->app->db->getConnection()->getConfig('database'); + $dbName = $connection->getConfig('database'); + } else { + [$dbName, $table] = explode('.', $table); + } + + if ($table == '*') { + $table = $connection->getTables($dbName); } - $tables[] = $table; - } elseif ($input->hasOption('db')) { - $dbName = $input->getOption('db'); - $tables = $this->app->db->getConnection()->getTables($dbName); + $this->buildDataBaseSchema($connection, (array) $table, $dbName); } else { if ($dir) { $appPath = $this->app->getBasePath() . $dir . DIRECTORY_SEPARATOR; @@ -66,14 +70,8 @@ protected function execute(Input $input, Output $output) $class = '\\' . $namespace . '\\model\\' . pathinfo($file, PATHINFO_FILENAME); $this->buildModelSchema($class); } - - $output->writeln('Succeed!'); - return; } - $db = isset($dbName) ? $dbName . '.' : ''; - $this->buildDataBaseSchema($schemaPath, $tables, $db); - $output->writeln('Succeed!'); } @@ -81,36 +79,26 @@ protected function buildModelSchema(string $class): void { $reflect = new \ReflectionClass($class); if (!$reflect->isAbstract() && $reflect->isSubclassOf('\think\Model')) { - /** @var \think\Model $model */ - $model = new $class; + try { + /** @var \think\Model $model */ + $model = new $class; + $connection = $model->db()->getConnection(); + if ($connection instanceof PDOConnection) { + $table = $model->getTable(); + //预读字段信息 + $connection->getSchemaInfo($table, true); + } + } catch (Exception $e) { - $table = $model->getTable(); - $dbName = $model->getConnection()->getConfig('database'); - $path = $model->getConnection()->getConfig('schema_cache_path'); - if (!is_dir($path)) { - mkdir($path, 0755, true); } - $content = 'db()->getConnection()->getTableFieldsInfo($table); - $content .= var_export($info, true) . ';'; - - file_put_contents($path . $dbName . '.' . $table . '.php', $content); } } - protected function buildDataBaseSchema(string $path, array $tables, string $db): void + protected function buildDataBaseSchema(PDOConnection $connection, array $tables, string $dbName): void { - if ('' == $db) { - $dbName = $this->app->db->getConnection()->getConfig('database') . '.'; - } else { - $dbName = $db; - } - foreach ($tables as $table) { - $content = 'app->db->getConnection()->getTableFieldsInfo($db . $table); - $content .= var_export($info, true) . ';'; - file_put_contents($path . $dbName . $table . '.php', $content); + //预读字段信息 + $connection->getSchemaInfo("{$dbName}.{$table}", true); } } } diff --git a/vendor/topthink/framework/src/think/console/input/Argument.php b/vendor/topthink/framework/src/think/console/input/Argument.php index 4fa3e3cd..86cca36c 100644 --- a/vendor/topthink/framework/src/think/console/input/Argument.php +++ b/vendor/topthink/framework/src/think/console/input/Argument.php @@ -13,14 +13,37 @@ class Argument { - + // 必传参数 const REQUIRED = 1; + + // 可选参数 const OPTIONAL = 2; + + // 数组参数 const IS_ARRAY = 4; + /** + * 参数名 + * @var string + */ private $name; + + /** + * 参数类型 + * @var int + */ private $mode; + + /** + * 参数默认值 + * @var mixed + */ private $default; + + /** + * 参数描述 + * @var string + */ private $description; /** diff --git a/vendor/topthink/framework/src/think/console/input/Option.php b/vendor/topthink/framework/src/think/console/input/Option.php index e5707c9a..19c7e1e8 100644 --- a/vendor/topthink/framework/src/think/console/input/Option.php +++ b/vendor/topthink/framework/src/think/console/input/Option.php @@ -11,18 +11,49 @@ namespace think\console\input; +/** + * 命令行选项 + * @package think\console\input + */ class Option { - + // 无需传值 const VALUE_NONE = 1; + // 必须传值 const VALUE_REQUIRED = 2; + // 可选传值 const VALUE_OPTIONAL = 4; + // 传数组值 const VALUE_IS_ARRAY = 8; + /** + * 选项名 + * @var string + */ private $name; + + /** + * 选项短名称 + * @var string + */ private $shortcut; + + /** + * 选项类型 + * @var int + */ private $mode; + + /** + * 选项默认值 + * @var mixed + */ private $default; + + /** + * 选项描述 + * @var string + */ private $description; /** diff --git a/vendor/topthink/framework/src/think/console/output/Descriptor.php b/vendor/topthink/framework/src/think/console/output/Descriptor.php index 8582b595..e4a9e61b 100644 --- a/vendor/topthink/framework/src/think/console/output/Descriptor.php +++ b/vendor/topthink/framework/src/think/console/output/Descriptor.php @@ -216,7 +216,7 @@ protected function describeConsole(Console $console, array $options = []) $description = new ConsoleDescription($console, $describedNamespace); if (isset($options['raw_text']) && $options['raw_text']) { - $width = $this->getColumnWidth($description->getCommands()); + $width = $this->getColumnWidth($description->getNamespaces()); foreach ($description->getCommands() as $command) { $this->writeText(sprintf("%-${width}s %s", $command->getName(), $command->getDescription()), $options); @@ -235,7 +235,7 @@ protected function describeConsole(Console $console, array $options = []) $this->writeText("\n"); $this->writeText("\n"); - $width = $this->getColumnWidth($description->getCommands()); + $width = $this->getColumnWidth($description->getNamespaces()); if ($describedNamespace) { $this->writeText(sprintf('Available commands for the "%s" namespace:', $describedNamespace), $options); @@ -282,14 +282,18 @@ private function formatDefaultValue($default) } /** - * @param Command[] $commands + * @param Namespaces[] $namespaces * @return int */ - private function getColumnWidth(array $commands) + private function getColumnWidth(array $namespaces) { $width = 0; - foreach ($commands as $command) { - $width = strlen($command->getName()) > $width ? strlen($command->getName()) : $width; + foreach ($namespaces as $namespace) { + foreach ($namespace['commands'] as $name) { + if (strlen($name) > $width) { + $width = strlen($name); + } + } } return $width + 2; diff --git a/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php b/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php index e953f663..da5e6963 100644 --- a/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php +++ b/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/contract/ModelRelationInterface.php b/vendor/topthink/framework/src/think/contract/ModelRelationInterface.php index 49cfa75d..1f6f994e 100644 --- a/vendor/topthink/framework/src/think/contract/ModelRelationInterface.php +++ b/vendor/topthink/framework/src/think/contract/ModelRelationInterface.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php b/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php index caed3222..0b2e4142 100644 --- a/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php +++ b/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php b/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php index f01820dd..9be93d2e 100644 --- a/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php +++ b/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/event/AppInit.php b/vendor/topthink/framework/src/think/event/AppInit.php index 83d75e7d..dda820b5 100644 --- a/vendor/topthink/framework/src/think/event/AppInit.php +++ b/vendor/topthink/framework/src/think/event/AppInit.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/event/HttpEnd.php b/vendor/topthink/framework/src/think/event/HttpEnd.php index 5296ef17..c40da57d 100644 --- a/vendor/topthink/framework/src/think/event/HttpEnd.php +++ b/vendor/topthink/framework/src/think/event/HttpEnd.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/event/HttpRun.php b/vendor/topthink/framework/src/think/event/HttpRun.php index a9cd7c39..ce67e93e 100644 --- a/vendor/topthink/framework/src/think/event/HttpRun.php +++ b/vendor/topthink/framework/src/think/event/HttpRun.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/route/dispatch/Response.php b/vendor/topthink/framework/src/think/event/LogRecord.php similarity index 58% rename from vendor/topthink/framework/src/think/route/dispatch/Response.php rename to vendor/topthink/framework/src/think/event/LogRecord.php index 3ae4c0a2..237468dd 100644 --- a/vendor/topthink/framework/src/think/route/dispatch/Response.php +++ b/vendor/topthink/framework/src/think/event/LogRecord.php @@ -2,26 +2,28 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- -// | Author: liu21st +// | Author: yunwuxin <448901948@qq.com> // +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\route\dispatch; - -use think\route\Dispatch; +namespace think\event; /** - * Response Dispatcher + * LogRecord事件类 */ -class Response extends Dispatch +class LogRecord { - public function exec() + /** @var string */ + public $type; + + /** @var string */ + public $message; + + public function __construct($type, $message) { - return $this->dispatch; + $this->type = $type; + $this->message = $message; } - } diff --git a/vendor/topthink/framework/src/think/event/LogWrite.php b/vendor/topthink/framework/src/think/event/LogWrite.php index 470e1198..a7873018 100644 --- a/vendor/topthink/framework/src/think/event/LogWrite.php +++ b/vendor/topthink/framework/src/think/event/LogWrite.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/event/RouteLoaded.php b/vendor/topthink/framework/src/think/event/RouteLoaded.php index eee1f3ef..ace7992f 100644 --- a/vendor/topthink/framework/src/think/event/RouteLoaded.php +++ b/vendor/topthink/framework/src/think/event/RouteLoaded.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/exception/ClassNotFoundException.php b/vendor/topthink/framework/src/think/exception/ClassNotFoundException.php index 2fa1f581..c4cda77d 100644 --- a/vendor/topthink/framework/src/think/exception/ClassNotFoundException.php +++ b/vendor/topthink/framework/src/think/exception/ClassNotFoundException.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006-2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/exception/ErrorException.php b/vendor/topthink/framework/src/think/exception/ErrorException.php index 54de0fee..d1a23780 100644 --- a/vendor/topthink/framework/src/think/exception/ErrorException.php +++ b/vendor/topthink/framework/src/think/exception/ErrorException.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/exception/FileException.php b/vendor/topthink/framework/src/think/exception/FileException.php index 22544728..228a1898 100644 --- a/vendor/topthink/framework/src/think/exception/FileException.php +++ b/vendor/topthink/framework/src/think/exception/FileException.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/exception/Handle.php b/vendor/topthink/framework/src/think/exception/Handle.php index 1725a722..1f783bc5 100644 --- a/vendor/topthink/framework/src/think/exception/Handle.php +++ b/vendor/topthink/framework/src/think/exception/Handle.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006-2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -75,7 +75,9 @@ public function report(Throwable $exception): void $log .= PHP_EOL . $exception->getTraceAsString(); } - $this->app->log->record($log, 'error'); + try { + $this->app->log->record($log, 'error'); + } catch (Exception $e) {} } } @@ -150,24 +152,31 @@ protected function convertExceptionToArray(Throwable $exception): array { if ($this->app->isDebug()) { // 调试模式,获取详细的错误信息 + $traces = []; + $nextException = $exception; + do { + $traces[] = [ + 'name' => get_class($nextException), + 'file' => $nextException->getFile(), + 'line' => $nextException->getLine(), + 'code' => $this->getCode($nextException), + 'message' => $this->getMessage($nextException), + 'trace' => $nextException->getTrace(), + 'source' => $this->getSourceCode($nextException), + ]; + } while ($nextException = $nextException->getPrevious()); $data = [ - 'name' => get_class($exception), - 'file' => $exception->getFile(), - 'line' => $exception->getLine(), - 'message' => $this->getMessage($exception), - 'trace' => $exception->getTrace(), 'code' => $this->getCode($exception), - 'source' => $this->getSourceCode($exception), + 'message' => $this->getMessage($exception), + 'traces' => $traces, 'datas' => $this->getExtendData($exception), 'tables' => [ - 'GET Data' => $this->app->request->get(), - 'POST Data' => $this->app->request->post(), - 'Files' => $this->app->request->file(), - 'Cookies' => $this->app->request->cookie(), - 'Session' => $this->app->session->all(), - 'Server/Request Data' => $this->app->request->server(), - 'Environment Variables' => $this->app->request->env(), - 'ThinkPHP Constants' => $this->getConst(), + 'GET Data' => $this->app->request->get(), + 'POST Data' => $this->app->request->post(), + 'Files' => $this->app->request->file(), + 'Cookies' => $this->app->request->cookie(), + 'Session' => $this->app->exists('session') ? $this->app->session->all() : [], + 'Server/Request Data' => $this->app->request->server(), ], ]; } else { diff --git a/vendor/topthink/framework/src/think/exception/HttpException.php b/vendor/topthink/framework/src/think/exception/HttpException.php index 74fabfc6..45302e58 100644 --- a/vendor/topthink/framework/src/think/exception/HttpException.php +++ b/vendor/topthink/framework/src/think/exception/HttpException.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006-2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/exception/HttpResponseException.php b/vendor/topthink/framework/src/think/exception/HttpResponseException.php index 759254c1..607813d9 100644 --- a/vendor/topthink/framework/src/think/exception/HttpResponseException.php +++ b/vendor/topthink/framework/src/think/exception/HttpResponseException.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006-2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/exception/InvalidArgumentException.php b/vendor/topthink/framework/src/think/exception/InvalidArgumentException.php index d317278b..8ccd6f6a 100644 --- a/vendor/topthink/framework/src/think/exception/InvalidArgumentException.php +++ b/vendor/topthink/framework/src/think/exception/InvalidArgumentException.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006-2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006-2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/exception/RouteNotFoundException.php b/vendor/topthink/framework/src/think/exception/RouteNotFoundException.php index f50dff67..7a2ee879 100644 --- a/vendor/topthink/framework/src/think/exception/RouteNotFoundException.php +++ b/vendor/topthink/framework/src/think/exception/RouteNotFoundException.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006-2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/exception/ValidateException.php b/vendor/topthink/framework/src/think/exception/ValidateException.php index cc79e191..89b4e4d5 100644 --- a/vendor/topthink/framework/src/think/exception/ValidateException.php +++ b/vendor/topthink/framework/src/think/exception/ValidateException.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006-2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/facade/App.php b/vendor/topthink/framework/src/think/facade/App.php index 4f64d961..e9f81050 100644 --- a/vendor/topthink/framework/src/think/facade/App.php +++ b/vendor/topthink/framework/src/think/facade/App.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -18,6 +18,32 @@ * @see \think\App * @package think\facade * @mixin \think\App + * @method static \think\Service|null register(\think\Service|string $service, bool $force = false) 注册服务 + * @method static mixed bootService(\think\Service $service) 执行服务 + * @method static \think\Service|null getService(string|\think\Service $service) 获取服务 + * @method static \think\App debug(bool $debug = true) 开启应用调试模式 + * @method static bool isDebug() 是否为调试模式 + * @method static \think\App setNamespace(string $namespace) 设置应用命名空间 + * @method static string getNamespace() 获取应用类库命名空间 + * @method static string version() 获取框架版本 + * @method static string getRootPath() 获取应用根目录 + * @method static string getBasePath() 获取应用基础目录 + * @method static string getAppPath() 获取当前应用目录 + * @method static mixed setAppPath(string $path) 设置应用目录 + * @method static string getRuntimePath() 获取应用运行时目录 + * @method static void setRuntimePath(string $path) 设置runtime目录 + * @method static string getThinkPath() 获取核心框架目录 + * @method static string getConfigPath() 获取应用配置目录 + * @method static string getConfigExt() 获取配置后缀 + * @method static float getBeginTime() 获取应用开启时间 + * @method static integer getBeginMem() 获取应用初始内存占用 + * @method static \think\App initialize() 初始化应用 + * @method static bool initialized() 是否初始化过 + * @method static void loadLangPack(string $langset) 加载语言包 + * @method static void boot() 引导应用 + * @method static void loadEvent(array $event) 注册应用事件 + * @method static string parseClass(string $layer, string $name) 解析应用类的类名 + * @method static bool runningInConsole() 是否运行在命令行下 */ class App extends Facade { diff --git a/vendor/topthink/framework/src/think/facade/Cache.php b/vendor/topthink/framework/src/think/facade/Cache.php index 62391b73..aac105d4 100644 --- a/vendor/topthink/framework/src/think/facade/Cache.php +++ b/vendor/topthink/framework/src/think/facade/Cache.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -12,12 +12,27 @@ namespace think\facade; +use think\cache\Driver; +use think\cache\TagSet; use think\Facade; /** * @see \think\Cache * @package think\facade * @mixin \think\Cache + * @method static string|null getDefaultDriver() 默认驱动 + * @method static mixed getConfig(null|string $name = null, mixed $default = null) 获取缓存配置 + * @method static array getStoreConfig(string $store, string $name = null, null $default = null) 获取驱动配置 + * @method static Driver store(string $name = null) 连接或者切换缓存 + * @method static bool clear() 清空缓冲池 + * @method static mixed get(string $key, mixed $default = null) 读取缓存 + * @method static bool set(string $key, mixed $value, int|\DateTime $ttl = null) 写入缓存 + * @method static bool delete(string $key) 删除缓存 + * @method static iterable getMultiple(iterable $keys, mixed $default = null) 读取缓存 + * @method static bool setMultiple(iterable $values, null|int|\DateInterval $ttl = null) 写入缓存 + * @method static bool deleteMultiple(iterable $keys) 删除缓存 + * @method static bool has(string $key) 判断缓存是否存在 + * @method static TagSet tag(string|array $name) 缓存标签 */ class Cache extends Facade { diff --git a/vendor/topthink/framework/src/think/facade/Config.php b/vendor/topthink/framework/src/think/facade/Config.php index 93916e45..4ce73dd6 100644 --- a/vendor/topthink/framework/src/think/facade/Config.php +++ b/vendor/topthink/framework/src/think/facade/Config.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -18,6 +18,10 @@ * @see \think\Config * @package think\facade * @mixin \think\Config + * @method static array load(string $file, string $name = '') 加载配置文件(多种格式) + * @method static bool has(string $name) 检测配置是否存在 + * @method static mixed get(string $name = null, mixed $default = null) 获取配置参数 为空则获取所有配置 + * @method static array set(array $config, string $name = null) 设置配置参数 name为数组则为批量设置 */ class Config extends Facade { diff --git a/vendor/topthink/framework/src/think/facade/Console.php b/vendor/topthink/framework/src/think/facade/Console.php index f3f92394..30dd935e 100644 --- a/vendor/topthink/framework/src/think/facade/Console.php +++ b/vendor/topthink/framework/src/think/facade/Console.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -12,12 +12,35 @@ namespace think\facade; +use think\console\Command; +use think\console\Input; +use think\console\input\Definition as InputDefinition; +use think\console\Output; +use think\console\output\driver\Buffer; use think\Facade; /** * Class Console * @package think\facade * @mixin \think\Console + * @method static Output|Buffer call(string $command, array $parameters = [], string $driver = 'buffer') + * @method static int run() 执行当前的指令 + * @method static int doRun(Input $input, Output $output) 执行指令 + * @method static void setDefinition(InputDefinition $definition) 设置输入参数定义 + * @method static InputDefinition The InputDefinition instance getDefinition() 获取输入参数定义 + * @method static string A help message. getHelp() Gets the help message. + * @method static void setCatchExceptions(bool $boolean) 是否捕获异常 + * @method static void setAutoExit(bool $boolean) 是否自动退出 + * @method static string getLongVersion() 获取完整的版本号 + * @method static void addCommands(array $commands) 添加指令集 + * @method static Command|void addCommand(string|Command $command, string $name = '') 添加一个指令 + * @method static Command getCommand(string $name) 获取指令 + * @method static bool hasCommand(string $name) 某个指令是否存在 + * @method static array getNamespaces() 获取所有的命名空间 + * @method static string findNamespace(string $namespace) 查找注册命名空间中的名称或缩写。 + * @method static Command find(string $name) 查找指令 + * @method static Command[] all(string $namespace = null) 获取所有的指令 + * @method static string extractNamespace(string $name, int $limit = 0) 返回命名空间部分 */ class Console extends Facade { diff --git a/vendor/topthink/framework/src/think/facade/Cookie.php b/vendor/topthink/framework/src/think/facade/Cookie.php index 98aa6c2d..960f4a3d 100644 --- a/vendor/topthink/framework/src/think/facade/Cookie.php +++ b/vendor/topthink/framework/src/think/facade/Cookie.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -18,6 +18,13 @@ * @see \think\Cookie * @package think\facade * @mixin \think\Cookie + * @method static mixed get(mixed $name = '', string $default = null) 获取cookie + * @method static bool has(string $name) 是否存在Cookie参数 + * @method static void set(string $name, string $value, mixed $option = null) Cookie 设置 + * @method static void forever(string $name, string $value = '', mixed $option = null) 永久保存Cookie数据 + * @method static void delete(string $name) Cookie删除 + * @method static array getCookie() 获取cookie保存数据 + * @method static void save() 保存Cookie */ class Cookie extends Facade { diff --git a/vendor/topthink/framework/src/think/facade/Env.php b/vendor/topthink/framework/src/think/facade/Env.php index 5452e908..bed25380 100644 --- a/vendor/topthink/framework/src/think/facade/Env.php +++ b/vendor/topthink/framework/src/think/facade/Env.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -18,6 +18,17 @@ * @see \think\Env * @package think\facade * @mixin \think\Env + * @method static void load(string $file) 读取环境变量定义文件 + * @method static mixed get(string $name = null, mixed $default = null) 获取环境变量值 + * @method static void set(string|array $env, mixed $value = null) 设置环境变量值 + * @method static bool has(string $name) 检测是否存在环境变量 + * @method static void __set(string $name, mixed $value) 设置环境变量 + * @method static mixed __get(string $name) 获取环境变量 + * @method static bool __isset(string $name) 检测是否存在环境变量 + * @method static void offsetSet($name, $value) + * @method static bool offsetExists($name) + * @method static mixed offsetUnset($name) + * @method static mixed offsetGet($name) */ class Env extends Facade { diff --git a/vendor/topthink/framework/src/think/facade/Event.php b/vendor/topthink/framework/src/think/facade/Event.php index 09344526..c09d8166 100644 --- a/vendor/topthink/framework/src/think/facade/Event.php +++ b/vendor/topthink/framework/src/think/facade/Event.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -18,6 +18,15 @@ * @see \think\Event * @package think\facade * @mixin \think\Event + * @method static \think\Event listenEvents(array $events) 批量注册事件监听 + * @method static \think\Event listen(string $event, mixed $listener, bool $first = false) 注册事件监听 + * @method static bool hasListener(string $event) 是否存在事件监听 + * @method static void remove(string $event) 移除事件监听 + * @method static \think\Event bind(array $events) 指定事件别名标识 便于调用 + * @method static \think\Event subscribe(mixed $subscriber) 注册事件订阅者 + * @method static \think\Event observe(string|object $observer, null|string $prefix = '') 自动注册事件观察者 + * @method static mixed trigger(string|object $event, mixed $params = null, bool $once = false) 触发事件 + * @method static mixed until($event, $params = null) 触发事件(只获取一个有效返回值) */ class Event extends Facade { diff --git a/vendor/topthink/framework/src/think/facade/Filesystem.php b/vendor/topthink/framework/src/think/facade/Filesystem.php index 6fe4d5a7..53706a84 100644 --- a/vendor/topthink/framework/src/think/facade/Filesystem.php +++ b/vendor/topthink/framework/src/think/facade/Filesystem.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -13,11 +13,16 @@ namespace think\facade; use think\Facade; +use think\filesystem\Driver; /** * Class Filesystem * @package think\facade * @mixin \think\Filesystem + * @method static Driver disk(string $name = null) ,null|string + * @method static mixed getConfig(null|string $name = null, mixed $default = null) 获取缓存配置 + * @method static array getDiskConfig(string $disk, null $name = null, null $default = null) 获取磁盘配置 + * @method static string|null getDefaultDriver() 默认驱动 */ class Filesystem extends Facade { diff --git a/vendor/topthink/framework/src/think/facade/Lang.php b/vendor/topthink/framework/src/think/facade/Lang.php index 1085c159..b460fe2f 100644 --- a/vendor/topthink/framework/src/think/facade/Lang.php +++ b/vendor/topthink/framework/src/think/facade/Lang.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -18,6 +18,14 @@ * @see \think\Lang * @package think\facade * @mixin \think\Lang + * @method static void setLangSet(string $lang) 设置当前语言 + * @method static string getLangSet() 获取当前语言 + * @method static string defaultLangSet() 获取默认语言 + * @method static array load(string|array $file, string $range = '') 加载语言定义(不区分大小写) + * @method static bool has(string|null $name, string $range = '') 判断是否存在语言定义(不区分大小写) + * @method static mixed get(string|null $name = null, array $vars = [], string $range = '') 获取语言定义(不区分大小写) + * @method static string detect(\think\Request $request) 自动侦测设置获取语言选择 + * @method static void saveToCookie(\think\Cookie $cookie) 保存当前语言到Cookie */ class Lang extends Facade { diff --git a/vendor/topthink/framework/src/think/facade/Log.php b/vendor/topthink/framework/src/think/facade/Log.php index e92a5dc6..7c43d37e 100644 --- a/vendor/topthink/framework/src/think/facade/Log.php +++ b/vendor/topthink/framework/src/think/facade/Log.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -13,11 +13,36 @@ namespace think\facade; use think\Facade; +use think\log\Channel; +use think\log\ChannelSet; /** * @see \think\Log * @package think\facade * @mixin \think\Log + * @method static string|null getDefaultDriver() 默认驱动 + * @method static mixed getConfig(null|string $name = null, mixed $default = null) 获取日志配置 + * @method static array getChannelConfig(string $channel, null $name = null, null $default = null) 获取渠道配置 + * @method static Channel|ChannelSet channel(string|array $name = null) driver() 的别名 + * @method static mixed createDriver(string $name) + * @method static \think\Log clear(string|array $channel = '*') 清空日志信息 + * @method static \think\Log close(string|array $channel = '*') 关闭本次请求日志写入 + * @method static array getLog(string $channel = null) 获取日志信息 + * @method static bool save() 保存日志信息 + * @method static \think\Log record(mixed $msg, string $type = 'info', array $context = [], bool $lazy = true) 记录日志信息 + * @method static \think\Log write(mixed $msg, string $type = 'info', array $context = []) 实时写入日志信息 + * @method static Event listen($listener) 注册日志写入事件监听 + * @method static void log(string $level, mixed $message, array $context = []) 记录日志信息 + * @method static void emergency(mixed $message, array $context = []) 记录emergency信息 + * @method static void alert(mixed $message, array $context = []) 记录警报信息 + * @method static void critical(mixed $message, array $context = []) 记录紧急情况 + * @method static void error(mixed $message, array $context = []) 记录错误信息 + * @method static void warning(mixed $message, array $context = []) 记录warning信息 + * @method static void notice(mixed $message, array $context = []) 记录notice信息 + * @method static void info(mixed $message, array $context = []) 记录一般信息 + * @method static void debug(mixed $message, array $context = []) 记录调试信息 + * @method static void sql(mixed $message, array $context = []) 记录sql信息 + * @method static mixed __call($method, $parameters) */ class Log extends Facade { diff --git a/vendor/topthink/framework/src/think/facade/Middleware.php b/vendor/topthink/framework/src/think/facade/Middleware.php index 8a9cc36a..4203f821 100644 --- a/vendor/topthink/framework/src/think/facade/Middleware.php +++ b/vendor/topthink/framework/src/think/facade/Middleware.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -18,6 +18,15 @@ * @see \think\Middleware * @package think\facade * @mixin \think\Middleware + * @method static void import(array $middlewares = [], string $type = 'global') 导入中间件 + * @method static void add(mixed $middleware, string $type = 'global') 注册中间件 + * @method static void route(mixed $middleware) 注册路由中间件 + * @method static void controller(mixed $middleware) 注册控制器中间件 + * @method static mixed unshift(mixed $middleware, string $type = 'global') 注册中间件到开始位置 + * @method static array all(string $type = 'global') 获取注册的中间件 + * @method static Pipeline pipeline(string $type = 'global') 调度管道 + * @method static mixed end(\think\Response $response) 结束调度 + * @method static \think\Response handleException(\think\Request $passable, \Throwable $e) 异常处理 */ class Middleware extends Facade { diff --git a/vendor/topthink/framework/src/think/facade/Request.php b/vendor/topthink/framework/src/think/facade/Request.php index 8bf5fc23..6531f467 100644 --- a/vendor/topthink/framework/src/think/facade/Request.php +++ b/vendor/topthink/framework/src/think/facade/Request.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -13,11 +13,112 @@ namespace think\facade; use think\Facade; +use think\file\UploadedFile; +use think\route\Rule; /** * @see \think\Request * @package think\facade * @mixin \think\Request + * @method static \think\Request setDomain(string $domain) 设置当前包含协议的域名 + * @method static string domain(bool $port = false) 获取当前包含协议的域名 + * @method static string rootDomain() 获取当前根域名 + * @method static \think\Request setSubDomain(string $domain) 设置当前泛域名的值 + * @method static string subDomain() 获取当前子域名 + * @method static \think\Request setPanDomain(string $domain) 设置当前泛域名的值 + * @method static string panDomain() 获取当前泛域名的值 + * @method static \think\Request setUrl(string $url) 设置当前完整URL 包括QUERY_STRING + * @method static string url(bool $complete = false) 获取当前完整URL 包括QUERY_STRING + * @method static \think\Request setBaseUrl(string $url) 设置当前URL 不含QUERY_STRING + * @method static string baseUrl(bool $complete = false) 获取当前URL 不含QUERY_STRING + * @method static string baseFile(bool $complete = false) 获取当前执行的文件 SCRIPT_NAME + * @method static \think\Request setRoot(string $url) 设置URL访问根地址 + * @method static string root(bool $complete = false) 获取URL访问根地址 + * @method static string rootUrl() 获取URL访问根目录 + * @method static \think\Request setPathinfo(string $pathinfo) 设置当前请求的pathinfo + * @method static string pathinfo() 获取当前请求URL的pathinfo信息(含URL后缀) + * @method static string ext() 当前URL的访问后缀 + * @method static integer|float time(bool $float = false) 获取当前请求的时间 + * @method static string type() 当前请求的资源类型 + * @method static void mimeType(string|array $type, string $val = '') 设置资源类型 + * @method static \think\Request setMethod(string $method) 设置请求类型 + * @method static string method(bool $origin = false) 当前的请求类型 + * @method static bool isGet() 是否为GET请求 + * @method static bool isPost() 是否为POST请求 + * @method static bool isPut() 是否为PUT请求 + * @method static bool isDelete() 是否为DELTE请求 + * @method static bool isHead() 是否为HEAD请求 + * @method static bool isPatch() 是否为PATCH请求 + * @method static bool isOptions() 是否为OPTIONS请求 + * @method static bool isCli() 是否为cli + * @method static bool isCgi() 是否为cgi + * @method static mixed param(string|array $name = '', mixed $default = null, string|array $filter = '') 获取当前请求的参数 + * @method static \think\Request setRule(Rule $rule) 设置路由变量 + * @method static Rule|null rule() 获取当前路由对象 + * @method static \think\Request setRoute(array $route) 设置路由变量 + * @method static mixed route(string|array $name = '', mixed $default = null, string|array $filter = '') 获取路由参数 + * @method static mixed get(string|array $name = '', mixed $default = null, string|array $filter = '') 获取GET参数 + * @method static mixed middleware(mixed $name, mixed $default = null) 获取中间件传递的参数 + * @method static mixed post(string|array $name = '', mixed $default = null, string|array $filter = '') 获取POST参数 + * @method static mixed put(string|array $name = '', mixed $default = null, string|array $filter = '') 获取PUT参数 + * @method static mixed delete(mixed $name = '', mixed $default = null, string|array $filter = '') 设置获取DELETE参数 + * @method static mixed patch(mixed $name = '', mixed $default = null, string|array $filter = '') 设置获取PATCH参数 + * @method static mixed request(string|array $name = '', mixed $default = null, string|array $filter = '') 获取request变量 + * @method static mixed env(string $name = '', string $default = null) 获取环境变量 + * @method static mixed session(string $name = '', string $default = null) 获取session数据 + * @method static mixed cookie(mixed $name = '', string $default = null, string|array $filter = '') 获取cookie参数 + * @method static mixed server(string $name = '', string $default = '') 获取server参数 + * @method static null|array|UploadedFile file(string $name = '') 获取上传的文件信息 + * @method static string|array header(string $name = '', string $default = null) 设置或者获取当前的Header + * @method static mixed input(array $data = [], string|false $name = '', mixed $default = null, string|array $filter = '') 获取变量 支持过滤和默认值 + * @method static mixed filter(mixed $filter = null) 设置或获取当前的过滤规则 + * @method static mixed filterValue(mixed &$value, mixed $key, array $filters) 递归过滤给定的值 + * @method static bool has(string $name, string $type = 'param', bool $checkEmpty = false) 是否存在某个请求参数 + * @method static array only(array $name, mixed $data = 'param', string|array $filter = '') 获取指定的参数 + * @method static mixed except(array $name, string $type = 'param') 排除指定参数获取 + * @method static bool isSsl() 当前是否ssl + * @method static bool isJson() 当前是否JSON请求 + * @method static bool isAjax(bool $ajax = false) 当前是否Ajax请求 + * @method static bool isPjax(bool $pjax = false) 当前是否Pjax请求 + * @method static string ip() 获取客户端IP地址 + * @method static boolean isValidIP(string $ip, string $type = '') 检测是否是合法的IP地址 + * @method static string ip2bin(string $ip) 将IP地址转换为二进制字符串 + * @method static bool isMobile() 检测是否使用手机访问 + * @method static string scheme() 当前URL地址中的scheme参数 + * @method static string query() 当前请求URL地址中的query参数 + * @method static \think\Request setHost(string $host) 设置当前请求的host(包含端口) + * @method static string host(bool $strict = false) 当前请求的host + * @method static int port() 当前请求URL地址中的port参数 + * @method static string protocol() 当前请求 SERVER_PROTOCOL + * @method static int remotePort() 当前请求 REMOTE_PORT + * @method static string contentType() 当前请求 HTTP_CONTENT_TYPE + * @method static string secureKey() 获取当前请求的安全Key + * @method static \think\Request setController(string $controller) 设置当前的控制器名 + * @method static \think\Request setAction(string $action) 设置当前的操作名 + * @method static string controller(bool $convert = false) 获取当前的控制器名 + * @method static string action(bool $convert = false) 获取当前的操作名 + * @method static string getContent() 设置或者获取当前请求的content + * @method static string getInput() 获取当前请求的php://input + * @method static string buildToken(string $name = '__token__', mixed $type = 'md5') 生成请求令牌 + * @method static bool checkToken(string $token = '__token__', array $data = []) 检查请求令牌 + * @method static \think\Request withMiddleware(array $middleware) 设置在中间件传递的数据 + * @method static \think\Request withGet(array $get) 设置GET数据 + * @method static \think\Request withPost(array $post) 设置POST数据 + * @method static \think\Request withCookie(array $cookie) 设置COOKIE数据 + * @method static \think\Request withSession(Session $session) 设置SESSION数据 + * @method static \think\Request withServer(array $server) 设置SERVER数据 + * @method static \think\Request withHeader(array $header) 设置HEADER数据 + * @method static \think\Request withEnv(Env $env) 设置ENV数据 + * @method static \think\Request withInput(string $input) 设置php://input数据 + * @method static \think\Request withFiles(array $files) 设置文件上传数据 + * @method static \think\Request withRoute(array $route) 设置ROUTE变量 + * @method static mixed __set(string $name, mixed $value) 设置中间传递数据 + * @method static mixed __get(string $name) 获取中间传递数据的值 + * @method static boolean __isset(string $name) 检测中间传递数据的值 + * @method static bool offsetExists($name) + * @method static mixed offsetGet($name) + * @method static mixed offsetSet($name, $value) + * @method static mixed offsetUnset($name) */ class Request extends Facade { diff --git a/vendor/topthink/framework/src/think/facade/Route.php b/vendor/topthink/framework/src/think/facade/Route.php index 5fd5e409..46bd7469 100644 --- a/vendor/topthink/framework/src/think/facade/Route.php +++ b/vendor/topthink/framework/src/think/facade/Route.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -13,11 +13,61 @@ namespace think\facade; use think\Facade; +use think\route\Dispatch; +use think\route\Domain; +use think\route\Rule; +use think\route\RuleGroup; +use think\route\RuleItem; +use think\route\RuleName; +use think\route\Url as UrlBuild; /** * @see \think\Route * @package think\facade * @mixin \think\Route + * @method static mixed config(string $name = null) + * @method static \think\Route lazy(bool $lazy = true) 设置路由域名及分组(包括资源路由)是否延迟解析 + * @method static void setTestMode(bool $test) 设置路由为测试模式 + * @method static bool isTest() 检查路由是否为测试模式 + * @method static \think\Route mergeRuleRegex(bool $merge = true) 设置路由域名及分组(包括资源路由)是否合并解析 + * @method static void setGroup(RuleGroup $group) 设置当前分组 + * @method static RuleGroup getGroup(string $name = null) 获取指定标识的路由分组 不指定则获取当前分组 + * @method static \think\Route pattern(array $pattern) 注册变量规则 + * @method static \think\Route option(array $option) 注册路由参数 + * @method static Domain domain(string|array $name, mixed $rule = null) 注册域名路由 + * @method static array getDomains() 获取域名 + * @method static RuleName getRuleName() 获取RuleName对象 + * @method static \think\Route bind(string $bind, string $domain = null) 设置路由绑定 + * @method static array getBind() 读取路由绑定信息 + * @method static string|null getDomainBind(string $domain = null) 读取路由绑定 + * @method static RuleItem[] getName(string $name = null, string $domain = null, string $method = '*') 读取路由标识 + * @method static void import(array $name) 批量导入路由标识 + * @method static void setName(string $name, RuleItem $ruleItem, bool $first = false) 注册路由标识 + * @method static void setRule(string $rule, RuleItem $ruleItem = null) 保存路由规则 + * @method static RuleItem[] getRule(string $rule) 读取路由 + * @method static array getRuleList() 读取路由列表 + * @method static void clear() 清空路由规则 + * @method static RuleItem rule(string $rule, mixed $route = null, string $method = '*') 注册路由规则 + * @method static \think\Route setCrossDomainRule(Rule $rule, string $method = '*') 设置跨域有效路由规则 + * @method static RuleGroup group(string|\Closure $name, mixed $route = null) 注册路由分组 + * @method static RuleItem any(string $rule, mixed $route) 注册路由 + * @method static RuleItem get(string $rule, mixed $route) 注册GET路由 + * @method static RuleItem post(string $rule, mixed $route) 注册POST路由 + * @method static RuleItem put(string $rule, mixed $route) 注册PUT路由 + * @method static RuleItem delete(string $rule, mixed $route) 注册DELETE路由 + * @method static RuleItem patch(string $rule, mixed $route) 注册PATCH路由 + * @method static RuleItem options(string $rule, mixed $route) 注册OPTIONS路由 + * @method static Resource resource(string $rule, string $route) 注册资源路由 + * @method static RuleItem view(string $rule, string $template = '', array $vars = []) 注册视图路由 + * @method static RuleItem redirect(string $rule, string $route = '', int $status = 301) 注册重定向路由 + * @method static \think\Route rest(string|array $name, array|bool $resource = []) rest方法定义和修改 + * @method static array|null getRest(string $name = null) 获取rest方法定义的参数 + * @method static RuleItem miss(string|Closure $route, string $method = '*') 注册未匹配路由规则后的处理 + * @method static Response dispatch(\think\Request $request, Closure|bool $withRoute = true) 路由调度 + * @method static Dispatch|false check() 检测URL路由 + * @method static Dispatch url(string $url) 默认URL解析 + * @method static UrlBuild buildUrl(string $url = '', array $vars = []) URL生成 支持路由反射 + * @method static RuleGroup __call(string $method, array $args) 设置全局的路由分组参数 */ class Route extends Facade { diff --git a/vendor/topthink/framework/src/think/facade/Session.php b/vendor/topthink/framework/src/think/facade/Session.php index 4bcb6e80..68bf9936 100644 --- a/vendor/topthink/framework/src/think/facade/Session.php +++ b/vendor/topthink/framework/src/think/facade/Session.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -18,6 +18,8 @@ * @see \think\Session * @package think\facade * @mixin \think\Session + * @method static mixed getConfig(null|string $name = null, mixed $default = null) 获取Session配置 + * @method static string|null getDefaultDriver() 默认驱动 */ class Session extends Facade { diff --git a/vendor/topthink/framework/src/think/facade/Validate.php b/vendor/topthink/framework/src/think/facade/Validate.php index 0d6a34e2..6db6d34a 100644 --- a/vendor/topthink/framework/src/think/facade/Validate.php +++ b/vendor/topthink/framework/src/think/facade/Validate.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -18,6 +18,62 @@ * @see \think\Validate * @package think\facade * @mixin \think\Validate + * @method static void setLang(\think\Lang $lang) 设置Lang对象 + * @method static void setDb(\think\Db $db) 设置Db对象 + * @method static void setRequest(\think\Request $request) 设置Request对象 + * @method static \think\Validate rule(string|array $name, mixed $rule = '') 添加字段验证规则 + * @method static \think\Validate extend(string $type, callable $callback = null, string $message = null) 注册验证(类型)规则 + * @method static void setTypeMsg(string|array $type, string $msg = null) 设置验证规则的默认提示信息 + * @method static Validate message(array $message) 设置提示信息 + * @method static \think\Validate scene(string $name) 设置验证场景 + * @method static bool hasScene(string $name) 判断是否存在某个验证场景 + * @method static \think\Validate batch(bool $batch = true) 设置批量验证 + * @method static \think\Validate failException(bool $fail = true) 设置验证失败后是否抛出异常 + * @method static \think\Validate only(array $fields) 指定需要验证的字段列表 + * @method static \think\Validate remove(string|array $field, mixed $rule = null) 移除某个字段的验证规则 + * @method static \think\Validate append(string|array $field, mixed $rule = null) 追加某个字段的验证规则 + * @method static bool check(array $data, array $rules = []) 数据自动验证 + * @method static bool checkRule(mixed $value, mixed $rules) 根据验证规则验证数据 + * @method static bool confirm(mixed $value, mixed $rule, array $data = [], string $field = '') 验证是否和某个字段的值一致 + * @method static bool different(mixed $value, mixed $rule, array $data = []) 验证是否和某个字段的值是否不同 + * @method static bool egt(mixed $value, mixed $rule, array $data = []) 验证是否大于等于某个值 + * @method static bool gt(mixed $value, mixed $rule, array $data = []) 验证是否大于某个值 + * @method static bool elt(mixed $value, mixed $rule, array $data = []) 验证是否小于等于某个值 + * @method static bool lt(mixed $value, mixed $rule, array $data = []) 验证是否小于某个值 + * @method static bool eq(mixed $value, mixed $rule) 验证是否等于某个值 + * @method static bool must(mixed $value, mixed $rule = null) 必须验证 + * @method static bool is(mixed $value, string $rule, array $data = []) 验证字段值是否为有效格式 + * @method static bool token(mixed $value, mixed $rule, array $data) 验证表单令牌 + * @method static bool activeUrl(mixed $value, mixed $rule = 'MX') 验证是否为合格的域名或者IP 支持A,MX,NS,SOA,PTR,CNAME,AAAA,A6, SRV,NAPTR,TXT 或者 ANY类型 + * @method static bool ip(mixed $value, mixed $rule = 'ipv4') 验证是否有效IP + * @method static bool fileExt(mixed $file, mixed $rule) 验证上传文件后缀 + * @method static bool fileMime(mixed $file, mixed $rule) 验证上传文件类型 + * @method static bool fileSize(mixed $file, mixed $rule) 验证上传文件大小 + * @method static bool image(mixed $file, mixed $rule) 验证图片的宽高及类型 + * @method static bool dateFormat(mixed $value, mixed $rule) 验证时间和日期是否符合指定格式 + * @method static bool unique(mixed $value, mixed $rule, array $data = [], string $field = '') 验证是否唯一 + * @method static bool filter(mixed $value, mixed $rule) 使用filter_var方式验证 + * @method static bool requireIf(mixed $value, mixed $rule, array $data = []) 验证某个字段等于某个值的时候必须 + * @method static bool requireCallback(mixed $value, mixed $rule, array $data = []) 通过回调方法验证某个字段是否必须 + * @method static bool requireWith(mixed $value, mixed $rule, array $data = []) 验证某个字段有值的情况下必须 + * @method static bool requireWithout(mixed $value, mixed $rule, array $data = []) 验证某个字段没有值的情况下必须 + * @method static bool in(mixed $value, mixed $rule) 验证是否在范围内 + * @method static bool notIn(mixed $value, mixed $rule) 验证是否不在某个范围 + * @method static bool between(mixed $value, mixed $rule) between验证数据 + * @method static bool notBetween(mixed $value, mixed $rule) 使用notbetween验证数据 + * @method static bool length(mixed $value, mixed $rule) 验证数据长度 + * @method static bool max(mixed $value, mixed $rule) 验证数据最大长度 + * @method static bool min(mixed $value, mixed $rule) 验证数据最小长度 + * @method static bool after(mixed $value, mixed $rule, array $data = []) 验证日期 + * @method static bool before(mixed $value, mixed $rule, array $data = []) 验证日期 + * @method static bool afterWith(mixed $value, mixed $rule, array $data = []) 验证日期 + * @method static bool beforeWith(mixed $value, mixed $rule, array $data = []) 验证日期 + * @method static bool expire(mixed $value, mixed $rule) 验证有效期 + * @method static bool allowIp(mixed $value, mixed $rule) 验证IP许可 + * @method static bool denyIp(mixed $value, mixed $rule) 验证IP禁用 + * @method static bool regex(mixed $value, mixed $rule) 使用正则验证数据 + * @method static array|string getError() 获取错误信息 + * @method static bool __call(string $method, array $args) 动态方法 直接调用is方法进行验证 */ class Validate extends Facade { diff --git a/vendor/topthink/framework/src/think/facade/View.php b/vendor/topthink/framework/src/think/facade/View.php index 0fecb15f..acde3b57 100644 --- a/vendor/topthink/framework/src/think/facade/View.php +++ b/vendor/topthink/framework/src/think/facade/View.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -18,6 +18,15 @@ * @see \think\View * @package think\facade * @mixin \think\View + * @method static \think\View engine(string $type = null) 获取模板引擎 + * @method static \think\View assign(string|array $name, mixed $value = null) 模板变量赋值 + * @method static \think\View filter(\think\Callable $filter = null) 视图过滤 + * @method static string fetch(string $template = '', array $vars = []) 解析和获取模板内容 用于输出 + * @method static string display(string $content, array $vars = []) 渲染内容输出 + * @method static mixed __set(string $name, mixed $value) 模板变量赋值 + * @method static mixed __get(string $name) 取得模板显示变量的值 + * @method static bool __isset(string $name) 检测模板变量是否设置 + * @method static string|null getDefaultDriver() 默认驱动 */ class View extends Facade { diff --git a/vendor/topthink/framework/src/think/file/UploadedFile.php b/vendor/topthink/framework/src/think/file/UploadedFile.php index 7810eac1..7dff766e 100644 --- a/vendor/topthink/framework/src/think/file/UploadedFile.php +++ b/vendor/topthink/framework/src/think/file/UploadedFile.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -60,13 +60,13 @@ public function move(string $directory, string $name = null): File $error = $msg; }); - $moved = move_uploaded_file($this->getPathname(), $target); + $moved = move_uploaded_file($this->getPathname(), (string) $target); restore_error_handler(); if (!$moved) { throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s)', $this->getPathname(), $target, strip_tags($error))); } - @chmod($target, 0666 & ~umask()); + @chmod((string) $target, 0666 & ~umask()); return $target; } diff --git a/vendor/topthink/framework/src/think/filesystem/CacheStore.php b/vendor/topthink/framework/src/think/filesystem/CacheStore.php index 46659ba7..0a62399e 100644 --- a/vendor/topthink/framework/src/think/filesystem/CacheStore.php +++ b/vendor/topthink/framework/src/think/filesystem/CacheStore.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/filesystem/Driver.php b/vendor/topthink/framework/src/think/filesystem/Driver.php index 26826adf..67129592 100644 --- a/vendor/topthink/framework/src/think/filesystem/Driver.php +++ b/vendor/topthink/framework/src/think/filesystem/Driver.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -115,7 +115,7 @@ public function putFile(string $path, File $file, $rule = null, array $options = public function putFileAs(string $path, File $file, string $name, array $options = []) { $stream = fopen($file->getRealPath(), 'r'); - $path = trim($path . '/' . $name, '/'); + $path = trim($path . '/' . $name, '/'); $result = $this->putStream($path, $stream, $options); diff --git a/vendor/topthink/framework/src/think/filesystem/driver/Local.php b/vendor/topthink/framework/src/think/filesystem/driver/Local.php index 60aa71c4..c10ccc3b 100644 --- a/vendor/topthink/framework/src/think/filesystem/driver/Local.php +++ b/vendor/topthink/framework/src/think/filesystem/driver/Local.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -35,7 +35,10 @@ protected function createAdapter(): AdapterInterface : LocalAdapter::DISALLOW_LINKS; return new LocalAdapter( - $this->config['root'], LOCK_EX, $links, $permissions + $this->config['root'], + LOCK_EX, + $links, + $permissions ); } } diff --git a/vendor/topthink/framework/src/think/initializer/BootService.php b/vendor/topthink/framework/src/think/initializer/BootService.php index ef9b25e5..bab6d390 100644 --- a/vendor/topthink/framework/src/think/initializer/BootService.php +++ b/vendor/topthink/framework/src/think/initializer/BootService.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/initializer/Error.php b/vendor/topthink/framework/src/think/initializer/Error.php index 27fef645..201d9473 100644 --- a/vendor/topthink/framework/src/think/initializer/Error.php +++ b/vendor/topthink/framework/src/think/initializer/Error.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/initializer/RegisterService.php b/vendor/topthink/framework/src/think/initializer/RegisterService.php index c63ab355..b682a0b0 100644 --- a/vendor/topthink/framework/src/think/initializer/RegisterService.php +++ b/vendor/topthink/framework/src/think/initializer/RegisterService.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/log/Channel.php b/vendor/topthink/framework/src/think/log/Channel.php index 2660a603..1de96f1a 100644 --- a/vendor/topthink/framework/src/think/log/Channel.php +++ b/vendor/topthink/framework/src/think/log/Channel.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -15,6 +15,7 @@ use Psr\Log\LoggerInterface; use think\contract\LogHandlerInterface; use think\Event; +use think\event\LogRecord; use think\event\LogWrite; class Channel implements LoggerInterface @@ -94,6 +95,9 @@ public function record($msg, string $type = 'info', array $context = [], bool $l if (!empty($msg) || 0 === $msg) { $this->log[$type][] = $msg; + if ($this->event) { + $this->event->trigger(new LogRecord($type, $msg)); + } } if (!$this->lazy || !$lazy) { diff --git a/vendor/topthink/framework/src/think/log/ChannelSet.php b/vendor/topthink/framework/src/think/log/ChannelSet.php index e38811c0..6dcb0bdb 100644 --- a/vendor/topthink/framework/src/think/log/ChannelSet.php +++ b/vendor/topthink/framework/src/think/log/ChannelSet.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/log/driver/File.php b/vendor/topthink/framework/src/think/log/driver/File.php index 1b6314da..e5682fc0 100644 --- a/vendor/topthink/framework/src/think/log/driver/File.php +++ b/vendor/topthink/framework/src/think/log/driver/File.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006-2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -72,7 +72,7 @@ public function save(array $log): bool $info = []; // 日志信息封装 - $time = date($this->config['time_format']); + $time = \DateTime::createFromFormat('0.u00 U', microtime())->setTimezone(new \DateTimeZone(date_default_timezone_get()))->format($this->config['time_format']); foreach ($log as $type => $val) { $message = []; @@ -82,8 +82,8 @@ public function save(array $log): bool } $message[] = $this->config['json'] ? - json_encode(['time' => $time, 'type' => $type, 'msg' => $msg], $this->config['json_options']) : - sprintf($this->config['format'], $time, $type, $msg); + json_encode(['time' => $time, 'type' => $type, 'msg' => $msg], $this->config['json_options']) : + sprintf($this->config['format'], $time, $type, $msg); } if (true === $this->config['apart_level'] || in_array($type, $this->config['apart_level'])) { diff --git a/vendor/topthink/framework/src/think/log/driver/Socket.php b/vendor/topthink/framework/src/think/log/driver/Socket.php index 8fde70a2..2cfb9433 100644 --- a/vendor/topthink/framework/src/think/log/driver/Socket.php +++ b/vendor/topthink/framework/src/think/log/driver/Socket.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006-2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -12,6 +12,8 @@ namespace think\log\driver; +use Psr\Container\NotFoundExceptionInterface; +use think\App; use think\contract\LogHandlerInterface; /** @@ -20,11 +22,13 @@ */ class Socket implements LogHandlerInterface { - public $port = 1116; //SocketLog 服务的http的端口号 + protected $app; protected $config = [ // socket服务器地址 'host' => 'localhost', + // socket服务器端口 + 'port' => 1116, // 是否显示加载的文件列表 'show_included_files' => false, // 日志强制记录到配置的client_id @@ -33,6 +37,15 @@ class Socket implements LogHandlerInterface 'allow_client_ids' => [], // 调试开关 'debug' => false, + // 输出到浏览器时默认展开的日志级别 + 'expand_level' => ['debug'], + // 日志头渲染回调 + 'format_head' => null, + // curl opt + 'curl_opt' => [ + CURLOPT_CONNECTTIMEOUT => 1, + CURLOPT_TIMEOUT => 10, + ], ]; protected $css = [ @@ -45,16 +58,25 @@ class Socket implements LogHandlerInterface protected $allowForceClientIds = []; //配置强制推送且被授权的client_id + protected $clientArg = []; + /** * 架构函数 * @access public + * @param App $app * @param array $config 缓存参数 */ - public function __construct(array $config = []) + public function __construct(App $app, array $config = []) { + $this->app = $app; + if (!empty($config)) { $this->config = array_merge($this->config, $config); } + + if (!isset($config['debug'])) { + $this->config['debug'] = $app->isDebug(); + } } /** @@ -72,26 +94,35 @@ public function save(array $log = []): bool $trace = []; if ($this->config['debug']) { - - if (isset($_SERVER['HTTP_HOST'])) { - $current_uri = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + if ($this->app->exists('request')) { + $currentUri = $this->app->request->url(true); } else { - $current_uri = 'cmd:' . implode(' ', $_SERVER['argv']); + $currentUri = 'cmd:' . implode(' ', $_SERVER['argv'] ?? []); + } + + if (!empty($this->config['format_head'])) { + try { + $currentUri = $this->app->invoke($this->config['format_head'], [$currentUri]); + } catch (NotFoundExceptionInterface $notFoundException) { + // Ignore exception + } } // 基本信息 $trace[] = [ 'type' => 'group', - 'msg' => $current_uri, + 'msg' => $currentUri, 'css' => $this->css['page'], ]; } + $expandLevel = array_flip($this->config['expand_level']); + foreach ($log as $type => $val) { $trace[] = [ - 'type' => 'groupCollapsed', + 'type' => isset($expandLevel[$type]) ? 'group' : 'groupCollapsed', 'msg' => '[ ' . $type . ' ]', - 'css' => isset($this->css[$type]) ? $this->css[$type] : '', + 'css' => $this->css[$type] ?? '', ]; foreach ($val as $msg) { @@ -140,18 +171,18 @@ public function save(array $log = []): bool $tabid = $this->getClientArg('tabid'); - if (!$client_id = $this->getClientArg('client_id')) { - $client_id = ''; + if (!$clientId = $this->getClientArg('client_id')) { + $clientId = ''; } if (!empty($this->allowForceClientIds)) { //强制推送到多个client_id - foreach ($this->allowForceClientIds as $force_client_id) { - $client_id = $force_client_id; - $this->sendToClient($tabid, $client_id, $trace, $force_client_id); + foreach ($this->allowForceClientIds as $forceClientId) { + $clientId = $forceClientId; + $this->sendToClient($tabid, $clientId, $trace, $forceClientId); } } else { - $this->sendToClient($tabid, $client_id, $trace, ''); + $this->sendToClient($tabid, $clientId, $trace, ''); } return true; @@ -160,27 +191,32 @@ public function save(array $log = []): bool /** * 发送给指定客户端 * @access protected + * @author Zjmainstay * @param $tabid - * @param $client_id + * @param $clientId * @param $logs - * @param $force_client_id - * @author Zjmainstay + * @param $forceClientId */ - protected function sendToClient($tabid, $client_id, $logs, $force_client_id) + protected function sendToClient($tabid, $clientId, $logs, $forceClientId) { $logs = [ 'tabid' => $tabid, - 'client_id' => $client_id, + 'client_id' => $clientId, 'logs' => $logs, - 'force_client_id' => $force_client_id, + 'force_client_id' => $forceClientId, ]; - $msg = @json_encode($logs); - $address = '/' . $client_id; //将client_id作为地址, server端通过地址判断将日志发布给谁 + $msg = json_encode($logs, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PARTIAL_OUTPUT_ON_ERROR); + $address = '/' . $clientId; //将client_id作为地址, server端通过地址判断将日志发布给谁 - $this->send($this->config['host'], $msg, $address); + $this->send($this->config['host'], $this->config['port'], $msg, $address); } + /** + * 检测客户授权 + * @access protected + * @return bool + */ protected function check() { $tabid = $this->getClientArg('tabid'); @@ -191,17 +227,17 @@ protected function check() } //用户认证 - $allow_client_ids = $this->config['allow_client_ids']; + $allowClientIds = $this->config['allow_client_ids']; - if (!empty($allow_client_ids)) { + if (!empty($allowClientIds)) { //通过数组交集得出授权强制推送的client_id - $this->allowForceClientIds = array_intersect($allow_client_ids, $this->config['force_client_ids']); + $this->allowForceClientIds = array_intersect($allowClientIds, $this->config['force_client_ids']); if (!$tabid && count($this->allowForceClientIds)) { return true; } - $client_id = $this->getClientArg('client_id'); - if (!in_array($client_id, $allow_client_ids)) { + $clientId = $this->getClientArg('client_id'); + if (!in_array($clientId, $allowClientIds)) { return false; } } else { @@ -211,53 +247,58 @@ protected function check() return true; } - protected function getClientArg($name) + /** + * 获取客户参数 + * @access protected + * @param string $name + * @return string + */ + protected function getClientArg(string $name) { - static $args = []; - - $key = 'HTTP_USER_AGENT'; - - if (isset($_SERVER['HTTP_SOCKETLOG'])) { - $key = 'HTTP_SOCKETLOG'; + if (!$this->app->exists('request')) { + return ''; } - if (!isset($_SERVER[$key])) { - return; - } + if (empty($this->clientArg)) { + if (empty($socketLog = $this->app->request->header('socketlog'))) { + if (empty($socketLog = $this->app->request->header('User-Agent'))) { + return ''; + } + } - if (empty($args)) { - if (!preg_match('/SocketLog\((.*?)\)/', $_SERVER[$key], $match)) { - $args = ['tabid' => null]; - return; + if (!preg_match('/SocketLog\((.*?)\)/', $socketLog, $match)) { + $this->clientArg = ['tabid' => null, 'client_id' => null]; + return ''; } - parse_str($match[1], $args); + parse_str($match[1] ?? '', $this->clientArg); } - if (isset($args[$name])) { - return $args[$name]; + if (isset($this->clientArg[$name])) { + return $this->clientArg[$name]; } - return; + return ''; } /** * @access protected * @param string $host - $host of socket server + * @param int $port - $port of socket server * @param string $message - 发送的消息 * @param string $address - 地址 * @return bool */ - protected function send($host, $message = '', $address = '/') + protected function send($host, $port, $message = '', $address = '/') { - $url = 'http://' . $host . ':' . $this->port . $address; + $url = 'http://' . $host . ':' . $port . $address; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $message); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1); - curl_setopt($ch, CURLOPT_TIMEOUT, 10); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->config['curl_opt'][CURLOPT_CONNECTTIMEOUT] ?? 1); + curl_setopt($ch, CURLOPT_TIMEOUT, $this->config['curl_opt'][CURLOPT_TIMEOUT] ?? 10); $headers = [ "Content-Type: application/json;charset=UTF-8", @@ -267,5 +308,4 @@ protected function send($host, $message = '', $address = '/') return curl_exec($ch); } - } diff --git a/vendor/topthink/framework/src/think/middleware/AllowCrossDomain.php b/vendor/topthink/framework/src/think/middleware/AllowCrossDomain.php index 1c1d4c70..b7ab842c 100644 --- a/vendor/topthink/framework/src/think/middleware/AllowCrossDomain.php +++ b/vendor/topthink/framework/src/think/middleware/AllowCrossDomain.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -26,6 +26,7 @@ class AllowCrossDomain protected $header = [ 'Access-Control-Allow-Credentials' => 'true', + 'Access-Control-Max-Age' => 1800, 'Access-Control-Allow-Methods' => 'GET, POST, PATCH, PUT, DELETE, OPTIONS', 'Access-Control-Allow-Headers' => 'Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-CSRF-TOKEN, X-Requested-With', ]; @@ -43,7 +44,7 @@ public function __construct(Config $config) * @param array $header * @return Response */ - public function handle($request, Closure $next, ?array $header = []) + public function handle($request, Closure $next, ? array $header = []) { $header = !empty($header) ? array_merge($this->header, $header) : $this->header; @@ -57,10 +58,6 @@ public function handle($request, Closure $next, ?array $header = []) } } - if ($request->method(true) == 'OPTIONS') { - return Response::create()->code(204)->header($header); - } - return $next($request)->header($header); } } diff --git a/vendor/topthink/framework/src/think/middleware/CheckRequestCache.php b/vendor/topthink/framework/src/think/middleware/CheckRequestCache.php index eab1da67..b1143519 100644 --- a/vendor/topthink/framework/src/think/middleware/CheckRequestCache.php +++ b/vendor/topthink/framework/src/think/middleware/CheckRequestCache.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -61,23 +61,30 @@ public function __construct(Cache $cache, Config $config) public function handle($request, Closure $next, $cache = null) { if ($request->isGet() && false !== $cache) { - $cache = $cache ?: $this->getRequestCache($request); + if (false === $this->config['request_cache_key']) { + // 关闭当前缓存 + $cache = false; + } + + $cache = $cache ?? $this->getRequestCache($request); if ($cache) { if (is_array($cache)) { - list($key, $expire, $tag) = $cache; + [$key, $expire, $tag] = array_pad($cache, 3, null); } else { - $key = str_replace('|', '/', $request->url()); + $key = md5($request->url(true)); $expire = $cache; $tag = null; } + $key = $this->parseCacheKey($request, $key); + if (strtotime($request->server('HTTP_IF_MODIFIED_SINCE', '')) + $expire > $request->server('REQUEST_TIME')) { // 读取缓存 return Response::create()->code(304); } elseif (($hit = $this->cache->get($key)) !== null) { - list($content, $header, $when) = $hit; - if ($expire === null || $when + $expire > $request->server('REQUEST_TIME')) { + [$content, $header, $when] = $hit; + if (null === $expire || $when + $expire > $request->server('REQUEST_TIME')) { return Response::create($content)->header($header); } } @@ -111,6 +118,24 @@ protected function getRequestCache($request) $except = $this->config['request_cache_except']; $tag = $this->config['request_cache_tag']; + foreach ($except as $rule) { + if (0 === stripos($request->url(), $rule)) { + return; + } + } + + return [$key, $expire, $tag]; + } + + /** + * 读取当前地址的请求缓存信息 + * @access protected + * @param Request $request + * @param mixed $key + * @return null|string + */ + protected function parseCacheKey($request, $key) + { if ($key instanceof \Closure) { $key = call_user_func($key, $request); } @@ -120,17 +145,11 @@ protected function getRequestCache($request) return; } - foreach ($except as $rule) { - if (0 === stripos($request->url(), $rule)) { - return; - } - } - if (true === $key) { // 自动缓存功能 $key = '__URL__'; } elseif (strpos($key, '|')) { - list($key, $fun) = explode('|', $key); + [$key, $fun] = explode('|', $key); } // 特殊规则替换 @@ -140,9 +159,10 @@ protected function getRequestCache($request) if (false !== strpos($key, ':')) { $param = $request->param(); + foreach ($param as $item => $val) { if (is_string($val) && false !== strpos($key, ':' . $item)) { - $key = str_replace(':' . $item, $val, $key); + $key = str_replace(':' . $item, (string) $val, $key); } } } elseif (strpos($key, ']')) { @@ -158,6 +178,6 @@ protected function getRequestCache($request) $key = $fun($key); } - return [$key, $expire, $tag]; + return $key; } } diff --git a/vendor/topthink/framework/src/think/middleware/FormTokenCheck.php b/vendor/topthink/framework/src/think/middleware/FormTokenCheck.php index f507903c..efbb77b1 100644 --- a/vendor/topthink/framework/src/think/middleware/FormTokenCheck.php +++ b/vendor/topthink/framework/src/think/middleware/FormTokenCheck.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/middleware/LoadLangPack.php b/vendor/topthink/framework/src/think/middleware/LoadLangPack.php index c9e7a9d3..478e29c9 100644 --- a/vendor/topthink/framework/src/think/middleware/LoadLangPack.php +++ b/vendor/topthink/framework/src/think/middleware/LoadLangPack.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/middleware/SessionInit.php b/vendor/topthink/framework/src/think/middleware/SessionInit.php index 8c2a7b44..3cb2fad9 100644 --- a/vendor/topthink/framework/src/think/middleware/SessionInit.php +++ b/vendor/topthink/framework/src/think/middleware/SessionInit.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/response/File.php b/vendor/topthink/framework/src/think/response/File.php index ce000ab7..1e45f2f4 100644 --- a/vendor/topthink/framework/src/think/response/File.php +++ b/vendor/topthink/framework/src/think/response/File.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -24,6 +24,7 @@ class File extends Response protected $name; protected $mimeType; protected $isContent = false; + protected $force = true; public function __construct($data = '', int $code = 200) { @@ -43,7 +44,9 @@ protected function output($data) throw new Exception('file not exists:' . $data); } - ob_end_clean(); + while (ob_get_level() > 0) { + ob_end_clean(); + } if (!empty($this->name)) { $name = $this->name; @@ -62,7 +65,7 @@ protected function output($data) $this->header['Pragma'] = 'public'; $this->header['Content-Type'] = $mimeType ?: 'application/octet-stream'; $this->header['Cache-control'] = 'max-age=' . $this->expire; - $this->header['Content-Disposition'] = 'attachment; filename="' . $name . '"'; + $this->header['Content-Disposition'] = ($this->force ? 'attachment; ' : '') . 'filename="' . $name . '"'; $this->header['Content-Length'] = $size; $this->header['Content-Transfer-Encoding'] = 'binary'; $this->header['Expires'] = gmdate("D, d M Y H:i:s", time() + $this->expire) . ' GMT'; @@ -108,6 +111,18 @@ public function mimeType(string $mimeType) return $this; } + /** + * 设置文件强制下载 + * @access public + * @param bool $force 强制浏览器下载 + * @return $this + */ + public function force(bool $force) + { + $this->force = $force; + return $this; + } + /** * 获取文件类型信息 * @access public diff --git a/vendor/topthink/framework/src/think/response/Html.php b/vendor/topthink/framework/src/think/response/Html.php index dbf23c78..c158f781 100644 --- a/vendor/topthink/framework/src/think/response/Html.php +++ b/vendor/topthink/framework/src/think/response/Html.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/response/Json.php b/vendor/topthink/framework/src/think/response/Json.php index 85d2d228..a84501f5 100644 --- a/vendor/topthink/framework/src/think/response/Json.php +++ b/vendor/topthink/framework/src/think/response/Json.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/response/Jsonp.php b/vendor/topthink/framework/src/think/response/Jsonp.php index a098d4c7..81d3a06e 100644 --- a/vendor/topthink/framework/src/think/response/Jsonp.php +++ b/vendor/topthink/framework/src/think/response/Jsonp.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -51,8 +51,8 @@ protected function output($data): string { try { // 返回JSON数据格式到客户端 包含状态信息 [当url_common_param为false时是无法获取到$_GET的数据的,故使用Request来获取] - $var_jsonp_handler = $this->request->param($this->options['var_jsonp_handler'], ""); - $handler = !empty($var_jsonp_handler) ? $var_jsonp_handler : $this->options['default_jsonp_handler']; + $varJsonpHandler = $this->request->param($this->options['var_jsonp_handler'], ""); + $handler = !empty($varJsonpHandler) ? $varJsonpHandler : $this->options['default_jsonp_handler']; $data = json_encode($data, $this->options['json_encode_param']); diff --git a/vendor/topthink/framework/src/think/response/Redirect.php b/vendor/topthink/framework/src/think/response/Redirect.php index 3d201aad..1f38764c 100644 --- a/vendor/topthink/framework/src/think/response/Redirect.php +++ b/vendor/topthink/framework/src/think/response/Redirect.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/response/View.php b/vendor/topthink/framework/src/think/response/View.php index 0b1ae88c..2c116c77 100644 --- a/vendor/topthink/framework/src/think/response/View.php +++ b/vendor/topthink/framework/src/think/response/View.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -86,8 +86,10 @@ public function isContent(bool $content = true) protected function output($data): string { // 渲染模板输出 - return $this->view->filter($this->filter) - ->fetch($data, $this->vars, $this->isContent); + $this->view->filter($this->filter); + return $this->isContent ? + $this->view->display($data, $this->vars) : + $this->view->fetch($data, $this->vars); } /** diff --git a/vendor/topthink/framework/src/think/response/Xml.php b/vendor/topthink/framework/src/think/response/Xml.php index 35975487..bddbb48b 100644 --- a/vendor/topthink/framework/src/think/response/Xml.php +++ b/vendor/topthink/framework/src/think/response/Xml.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/route/Dispatch.php b/vendor/topthink/framework/src/think/route/Dispatch.php index c9775867..e77e299a 100644 --- a/vendor/topthink/framework/src/think/route/Dispatch.php +++ b/vendor/topthink/framework/src/think/route/Dispatch.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -53,19 +53,12 @@ abstract class Dispatch */ protected $param; - /** - * 状态码 - * @var int - */ - protected $code; - - public function __construct(Request $request, Rule $rule, $dispatch, array $param = [], int $code = null) + public function __construct(Request $request, Rule $rule, $dispatch, array $param = []) { $this->request = $request; $this->rule = $rule; $this->dispatch = $dispatch; $this->param = $param; - $this->code = $code; } public function init(App $app) @@ -139,16 +132,16 @@ protected function doRouteAfter(): void $this->createBindModel($option['model'], $this->param); } - // 数据自动验证 - if (isset($option['validate'])) { - $this->autoValidate($option['validate']); - } - // 记录当前请求的路由规则 $this->request->setRule($this->rule); // 记录路由变量 $this->request->setRoute($this->param); + + // 数据自动验证 + if (isset($option['validate'])) { + $this->autoValidate($option['validate']); + } } /** @@ -167,7 +160,7 @@ protected function createBindModel(array $bindModel, array $matches): void $fields = explode('&', $key); if (is_array($val)) { - list($model, $exception) = $val; + [$model, $exception] = $val; } else { $model = $val; $exception = true; @@ -206,7 +199,7 @@ protected function createBindModel(array $bindModel, array $matches): void */ protected function autoValidate(array $option): void { - list($validate, $scene, $message, $batch) = $option; + [$validate, $scene, $message, $batch] = $option; if (is_array($validate)) { // 指定验证规则 @@ -244,7 +237,7 @@ abstract public function exec(); public function __sleep() { - return ['rule', 'dispatch', 'param', 'code', 'controller', 'actionName']; + return ['rule', 'dispatch', 'param', 'controller', 'actionName']; } public function __wakeup() @@ -258,7 +251,6 @@ public function __debugInfo() return [ 'dispatch' => $this->dispatch, 'param' => $this->param, - 'code' => $this->code, 'rule' => $this->rule, ]; } diff --git a/vendor/topthink/framework/src/think/route/Domain.php b/vendor/topthink/framework/src/think/route/Domain.php index 49ccd2ce..84f1d463 100644 --- a/vendor/topthink/framework/src/think/route/Domain.php +++ b/vendor/topthink/framework/src/think/route/Domain.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -110,7 +110,7 @@ private function checkUrlBind(Request $request, string $url) protected function parseBindAppendParam(string &$bind): void { if (false !== strpos($bind, '?')) { - list($bind, $query) = explode('?', $bind); + [$bind, $query] = explode('?', $bind); parse_str($query, $vars); $this->append($vars); } diff --git a/vendor/topthink/framework/src/think/route/Resource.php b/vendor/topthink/framework/src/think/route/Resource.php index 01565fc7..bb37cb6d 100644 --- a/vendor/topthink/framework/src/think/route/Resource.php +++ b/vendor/topthink/framework/src/think/route/Resource.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -132,7 +132,7 @@ protected function buildResourceRule(): void $ruleItem = $this->addRule(trim($prefix . $val[1], '/'), $this->route . '/' . $val[2], $val[0]); - foreach (['model', 'validate', 'middleware'] as $name) { + foreach (['model', 'validate', 'middleware', 'pattern'] as $name) { if (isset($this->$name[$key])) { call_user_func_array([$ruleItem, $name], (array) $this->$name[$key]); } diff --git a/vendor/topthink/framework/src/think/route/Rule.php b/vendor/topthink/framework/src/think/route/Rule.php index fd9e2809..31b2e0e5 100644 --- a/vendor/topthink/framework/src/think/route/Rule.php +++ b/vendor/topthink/framework/src/think/route/Rule.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -18,13 +18,9 @@ use think\middleware\CheckRequestCache; use think\middleware\FormTokenCheck; use think\Request; -use think\Response; use think\Route; use think\route\dispatch\Callback as CallbackDispatch; use think\route\dispatch\Controller as ControllerDispatch; -use think\route\dispatch\Redirect as RedirectDispatch; -use think\route\dispatch\Response as ResponseDispatch; -use think\route\dispatch\View as ViewDispatch; /** * 路由规则基础类 @@ -241,11 +237,17 @@ public function config(string $name = '') */ public function getPattern(string $name = '') { + $pattern = $this->pattern; + + if ($this->parent) { + $pattern = array_merge($this->parent->getPattern(), $pattern); + } + if ('' === $name) { - return $this->pattern; + return $pattern; } - return $this->pattern[$name] ?? null; + return $pattern[$name] ?? null; } /** @@ -257,11 +259,26 @@ public function getPattern(string $name = '') */ public function getOption(string $name = '', $default = null) { + $option = $this->option; + + if ($this->parent) { + $parentOption = $this->parent->getOption(); + + // 合并分组参数 + foreach ($this->mergeOptions as $item) { + if (isset($parentOption[$item]) && isset($option[$item])) { + $option[$item] = array_merge($parentOption[$item], $option[$item]); + } + } + + $option = array_merge($parentOption, $option); + } + if ('' === $name) { - return $this->option; + return $option; } - return $this->option[$name] ?? $default; + return $option[$name] ?? $default; } /** @@ -387,17 +404,17 @@ public function validate($validate, string $scene = null, array $message = [], b /** * 指定路由中间件 * @access public - * @param string|array|Closure $middleware 中间件 - * @param mixed $param 参数 + * @param string|array|Closure $middleware 中间件 + * @param mixed $params 参数 * @return $this */ - public function middleware($middleware, $param = null) + public function middleware($middleware, ...$params) { - if (is_null($param) && is_array($middleware)) { + if (empty($params) && is_array($middleware)) { $this->option['middleware'] = $middleware; } else { foreach ((array) $middleware as $item) { - $this->option['middleware'][] = [$item, $param]; + $this->option['middleware'][] = [$item, $params]; } } @@ -505,38 +522,16 @@ public function pjax(bool $pjax = true) } /** - * 当前路由到一个模板地址 当使用数组的时候可以传入模板变量 + * 路由到一个模板地址 需要额外传入的模板变量 * @access public - * @param bool|array $view 视图 + * @param array $view 视图 * @return $this */ - public function view($view = true) + public function view(array $view = []) { return $this->setOption('view', $view); } - /** - * 当前路由为重定向 - * @access public - * @param bool $redirect 是否为重定向 - * @return $this - */ - public function redirect(bool $redirect = true) - { - return $this->setOption('redirect', $redirect); - } - - /** - * 设置status - * @access public - * @param int $status 状态码 - * @return $this - */ - public function status(int $status) - { - return $this->setOption('status', $status); - } - /** * 设置路由完整匹配 * @access public @@ -577,26 +572,6 @@ public function crossDomainRule() return $this; } - /** - * 合并分组参数 - * @access public - * @return array - */ - public function mergeGroupOptions(): array - { - $parentOption = $this->parent->getOption(); - // 合并分组参数 - foreach ($this->mergeOptions as $item) { - if (isset($parentOption[$item]) && isset($this->option[$item])) { - $this->option[$item] = array_merge($parentOption[$item], $this->option[$item]); - } - } - - $this->option = array_merge($parentOption, $this->option); - - return $this->option; - } - /** * 解析匹配到的规则路由 * @access public @@ -616,24 +591,31 @@ public function parseRule(Request $request, string $rule, $route, string $url, a } // 替换路由地址中的变量 - if (is_string($route) && !empty($matches)) { - $search = $replace = []; - - foreach ($matches as $key => $value) { - $search[] = '<' . $key . '>'; - $replace[] = $value; - - $search[] = ':' . $key; - $replace[] = $value; + $extraParams = true; + $search = $replace = []; + $depr = $this->router->config('pathinfo_depr'); + foreach ($matches as $key => $value) { + $search[] = '<' . $key . '>'; + $replace[] = $value; + + $search[] = ':' . $key; + $replace[] = $value; + + if (strpos($value, $depr)) { + $extraParams = false; } + } + if (is_string($route)) { $route = str_replace($search, $replace, $route); } // 解析额外参数 - $count = substr_count($rule, '/'); - $url = array_slice(explode('|', $url), $count + 1); - $this->parseUrlParams(implode('|', $url), $matches); + if ($extraParams) { + $count = substr_count($rule, '/'); + $url = array_slice(explode('|', $url), $count + 1); + $this->parseUrlParams(implode('|', $url), $matches); + } $this->vars = $matches; @@ -651,20 +633,14 @@ public function parseRule(Request $request, string $rule, $route, string $url, a */ protected function dispatch(Request $request, $route, array $option): Dispatch { - if ($route instanceof Dispatch) { - $result = $route; + if (is_subclass_of($route, Dispatch::class)) { + $result = new $route($request, $this, $route, $this->vars); } elseif ($route instanceof Closure) { // 执行闭包 $result = new CallbackDispatch($request, $this, $route, $this->vars); - } elseif ($route instanceof Response) { - $result = new ResponseDispatch($request, $this, $route); - } elseif (isset($option['view']) && false !== $option['view']) { - $result = new ViewDispatch($request, $this, $route, is_array($option['view']) ? $option['view'] : $this->vars); - } elseif (!empty($option['redirect'])) { - // 路由到重定向地址 - $result = new RedirectDispatch($request, $this, $route, $this->vars, $option['status'] ?? 301); - } elseif (false !== strpos($route, '\\')) { + } elseif (false !== strpos($route, '@') || false !== strpos($route, '::') || false !== strpos($route, '\\')) { // 路由到类的方法 + $route = str_replace('::', '@', $route); $result = $this->dispatchMethod($request, $route); } else { // 路由到控制器/操作 @@ -816,7 +792,11 @@ public function parseUrlPath(string $url): array protected function buildRuleRegex(string $rule, array $match, array $pattern = [], array $option = [], bool $completeMatch = false, string $suffix = ''): string { foreach ($match as $name) { - $replace[] = $this->buildNameRegex($name, $pattern, $suffix); + $value = $this->buildNameRegex($name, $pattern, $suffix); + if ($value) { + $origin[] = $name; + $replace[] = $value; + } } // 是否区分 / 地址访问 @@ -829,11 +809,11 @@ protected function buildRuleRegex(string $rule, array $match, array $pattern = [ } } - $regex = str_replace(array_unique($match), array_unique($replace), $rule); - $regex = str_replace([')?/', ')/', ')?-', ')-', '\\\\/'], [')\/', ')\/', ')\-', ')\-', '\/'], $regex); + $regex = isset($replace) ? str_replace($origin, $replace, $rule) : $rule; + $regex = str_replace([')?/', ')?-'], [')/', ')-'], $regex); if (isset($hasSlash)) { - $regex .= '\/'; + $regex .= '/'; } return $regex . ($completeMatch ? '$' : ''); @@ -853,7 +833,7 @@ protected function buildNameRegex(string $name, array $pattern, string $suffix): $slash = substr($name, 0, 1); if (in_array($slash, ['/', '-'])) { - $prefix = '\\' . $slash; + $prefix = $slash; $name = substr($name, 1); $slash = substr($name, 0, 1); } else { @@ -861,7 +841,7 @@ protected function buildNameRegex(string $name, array $pattern, string $suffix): } if ('<' != $slash) { - return $prefix . preg_quote($name, '/'); + return ''; } if (strpos($name, '?')) { diff --git a/vendor/topthink/framework/src/think/route/RuleGroup.php b/vendor/topthink/framework/src/think/route/RuleGroup.php index 77de0002..cd9ddbd1 100644 --- a/vendor/topthink/framework/src/think/route/RuleGroup.php +++ b/vendor/topthink/framework/src/think/route/RuleGroup.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -16,9 +16,7 @@ use think\Container; use think\Exception; use think\Request; -use think\Response; use think\Route; -use think\route\dispatch\Response as ResponseDispatch; /** * 路由分组类 @@ -29,16 +27,7 @@ class RuleGroup extends Rule * 分组路由(包括子分组) * @var array */ - protected $rules = [ - '*' => [], - 'get' => [], - 'post' => [], - 'put' => [], - 'patch' => [], - 'delete' => [], - 'head' => [], - 'options' => [], - ]; + protected $rules = []; /** * 分组路由规则 @@ -151,28 +140,20 @@ public function check(Request $request, string $url, bool $completeMatch = false // 解析分组路由 if ($this instanceof Resource) { $this->buildResourceRule(); - } elseif ($this->rule instanceof Response) { - return new ResponseDispatch($request, $this, $this->rule); } else { $this->parseGroupRule($this->rule); } // 获取当前路由规则 $method = strtolower($request->method()); - $rules = $this->getMethodRules($method); + $rules = $this->getRules($method); + $option = $this->getOption(); - if ($this->parent) { - // 合并分组参数 - $this->mergeGroupOptions(); - // 合并分组变量规则 - $this->pattern = array_merge($this->parent->getPattern(), $this->pattern); - } - - if (isset($this->option['complete_match'])) { - $completeMatch = $this->option['complete_match']; + if (isset($option['complete_match'])) { + $completeMatch = $option['complete_match']; } - if (!empty($this->option['merge_rule_regex'])) { + if (!empty($option['merge_rule_regex'])) { // 合并路由正则规则进行路由匹配检查 $result = $this->checkMergeRuleRegex($request, $rules, $url, $completeMatch); @@ -183,16 +164,18 @@ public function check(Request $request, string $url, bool $completeMatch = false // 检查分组路由 foreach ($rules as $key => $item) { - $result = $item->check($request, $url, $completeMatch); + $result = $item[1]->check($request, $url, $completeMatch); if (false !== $result) { return $result; } } - if ($this->miss && in_array($this->miss->getMethod(), ['*', $method])) { + if (!empty($option['dispatcher'])) { + $result = $this->parseRule($request, '', $option['dispatcher'], $url, $option); + } elseif ($this->miss && in_array($this->miss->getMethod(), ['*', $method])) { // 未匹配所有路由的路由规则处理 - $result = $this->parseRule($request, '', $this->miss->getRoute(), $url, $this->miss->mergeGroupOptions()); + $result = $this->parseRule($request, '', $this->miss->getRoute(), $url, $this->miss->getOption()); } else { $result = false; } @@ -200,17 +183,6 @@ public function check(Request $request, string $url, bool $completeMatch = false return $result; } - /** - * 获取当前请求的路由规则(包括子分组、资源路由) - * @access protected - * @param string $method 请求类型 - * @return array - */ - protected function getMethodRules(string $method): array - { - return array_merge($this->rules[$method], $this->rules['*']); - } - /** * 分组URL匹配检查 * @access protected @@ -274,6 +246,11 @@ public function lazy(bool $lazy = true) */ public function parseGroupRule($rule): void { + if (is_string($rule) && is_subclass_of($rule, Dispatch::class)) { + $this->dispatcher($rule); + return; + } + $origin = $this->router->getGroup(); $this->router->setGroup($this); @@ -302,7 +279,8 @@ protected function checkMergeRuleRegex(Request $request, array &$rules, string $ $regex = []; $items = []; - foreach ($rules as $key => $item) { + foreach ($rules as $key => $val) { + $item = $val[1]; if ($item instanceof RuleItem) { $rule = $depr . str_replace('/', $depr, $item->getRule()); if ($depr == $rule && $depr != $url) { @@ -346,7 +324,7 @@ protected function checkMergeRuleRegex(Request $request, array &$rules, string $ } try { - $result = preg_match('/^(?:' . implode('|', $regex) . ')/u', $url, $match); + $result = preg_match('~^(?:' . implode('|', $regex) . ')~u', $url, $match); } catch (\Exception $e) { throw new Exception('route pattern error'); } @@ -355,7 +333,7 @@ protected function checkMergeRuleRegex(Request $request, array &$rules, string $ $var = []; foreach ($match as $key => $val) { if (is_string($key) && '' !== $val) { - list($name, $pos) = explode('_THINK_', $key); + [$name, $pos] = explode('_THINK_', $key); $var[$name] = $val; } @@ -460,10 +438,10 @@ public function addRuleItem(Rule $rule, string $method = '*') $method = '*'; } - $this->rules[$method][] = $rule; + $this->rules[] = [$method, $rule]; if ($rule instanceof RuleItem && 'options' != $method) { - $this->rules['options'][] = $rule->setAutoOptions(); + $this->rules[] = ['options', $rule->setAutoOptions()]; } return $this; @@ -495,6 +473,17 @@ public function mergeRuleRegex(bool $merge = true) return $this->setOption('merge_rule_regex', $merge); } + /** + * 设置分组的Dispatch调度 + * @access public + * @param string $dispatch 调度类 + * @return $this + */ + public function dispatcher(string $dispatch) + { + return $this->setOption('dispatcher', $dispatch); + } + /** * 获取完整分组Name * @access public @@ -517,7 +506,9 @@ public function getRules(string $method = ''): array return $this->rules; } - return $this->rules[strtolower($method)] ?? []; + return array_filter($this->rules, function ($item) use ($method) { + return $method == $item[0] || '*' == $item[0]; + }); } /** @@ -527,15 +518,6 @@ public function getRules(string $method = ''): array */ public function clear(): void { - $this->rules = [ - '*' => [], - 'get' => [], - 'post' => [], - 'put' => [], - 'patch' => [], - 'delete' => [], - 'head' => [], - 'options' => [], - ]; + $this->rules = []; } } diff --git a/vendor/topthink/framework/src/think/route/RuleItem.php b/vendor/topthink/framework/src/think/route/RuleItem.php index f7f72ba1..1f9aa52a 100644 --- a/vendor/topthink/framework/src/think/route/RuleItem.php +++ b/vendor/topthink/framework/src/think/route/RuleItem.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -191,12 +191,12 @@ public function checkRule(Request $request, string $url, $match = null, bool $co } // 合并分组参数 - $option = $this->mergeGroupOptions(); - - $url = $this->urlSuffixCheck($request, $url, $option); + $option = $this->getOption(); + $pattern = $this->getPattern(); + $url = $this->urlSuffixCheck($request, $url, $option); if (is_null($match)) { - $match = $this->match($url, $option, $completeMatch); + $match = $this->match($url, $option, $pattern, $completeMatch); } if (false !== $match) { @@ -248,17 +248,17 @@ protected function urlSuffixCheck(Request $request, string $url, array $option = * @access private * @param string $url URL地址 * @param array $option 路由参数 - * @param bool $completeMatch 路由是否完全匹配 + * @param array $pattern 变量规则 + * @param bool $completeMatch 是否完全匹配 * @return array|false */ - private function match(string $url, array $option, bool $completeMatch) + private function match(string $url, array $option, array $pattern, bool $completeMatch) { if (isset($option['complete_match'])) { $completeMatch = $option['complete_match']; } - $depr = $this->router->config('pathinfo_depr'); - $pattern = array_merge($this->parent->getPattern(), $this->pattern); + $depr = $this->router->config('pathinfo_depr'); // 检查完整规则定义 if (isset($pattern['__url__']) && !preg_match(0 === strpos($pattern['__url__'], '/') ? $pattern['__url__'] : '/^' . $pattern['__url__'] . ($completeMatch ? '$' : '') . '/', str_replace('|', $depr, $url))) { @@ -292,7 +292,7 @@ private function match(string $url, array $option, bool $completeMatch) $regex = $this->buildRuleRegex($rule, $matches[0], $pattern, $option, $completeMatch); try { - if (!preg_match('/^' . $regex . '/u', $url, $match)) { + if (!preg_match('~^' . $regex . '~u', $url, $match)) { return false; } } catch (\Exception $e) { diff --git a/vendor/topthink/framework/src/think/route/RuleName.php b/vendor/topthink/framework/src/think/route/RuleName.php index 9b1088ae..0684367c 100644 --- a/vendor/topthink/framework/src/think/route/RuleName.php +++ b/vendor/topthink/framework/src/think/route/RuleName.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -46,10 +46,11 @@ class RuleName public function setName(string $name, RuleItem $ruleItem, bool $first = false): void { $name = strtolower($name); + $item = $this->getRuleItemInfo($ruleItem); if ($first && isset($this->item[$name])) { - array_unshift($this->item[$name], $ruleItem); + array_unshift($this->item[$name], $item); } else { - $this->item[$name][] = $ruleItem; + $this->item[$name][] = $item; } } @@ -179,8 +180,8 @@ public function getName(string $name = null, string $domain = null, string $meth $result = $this->item[$name]; } else { foreach ($this->item[$name] as $item) { - $itemDomain = $item->getDomain(); - $itemMethod = $item->getMethod(); + $itemDomain = $item['domain']; + $itemMethod = $item['method']; if (($itemDomain == $domain || '-' == $itemDomain) && ('*' == $itemMethod || '*' == $method || $method == $itemMethod)) { $result[] = $item; @@ -192,4 +193,19 @@ public function getName(string $name = null, string $domain = null, string $meth return $result; } + /** + * 获取路由信息 + * @access protected + * @param RuleItem $item 路由规则 + * @return array + */ + protected function getRuleItemInfo(RuleItem $item): array + { + return [ + 'rule' => $item->getRule(), + 'domain' => $item->getDomain(), + 'method' => $item->getMethod(), + 'suffix' => $item->getSuffix(), + ]; + } } diff --git a/vendor/topthink/framework/src/think/route/Url.php b/vendor/topthink/framework/src/think/route/Url.php index b7f1a387..8dd410cb 100644 --- a/vendor/topthink/framework/src/think/route/Url.php +++ b/vendor/topthink/framework/src/think/route/Url.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -164,9 +164,9 @@ protected function parseDomain(string &$url, $domain): string $domains = $this->route->getDomains(); if (!empty($domains)) { - $route_domain = array_keys($domains); - foreach ($route_domain as $domain_prefix) { - if (0 === strpos($domain_prefix, '*.') && strpos($domain, ltrim($domain_prefix, '*.')) !== false) { + $routeDomain = array_keys($domains); + foreach ($routeDomain as $domainPrefix) { + if (0 === strpos($domainPrefix, '*.') && strpos($domain, ltrim($domainPrefix, '*.')) !== false) { foreach ($domains as $key => $rule) { $rule = is_array($rule) ? $rule[0] : $rule; if (is_string($rule) && false === strpos($key, '*') && 0 === strpos($url, $rule)) { @@ -213,7 +213,7 @@ protected function parseSuffix($suffix): string if ($suffix) { $suffix = true === $suffix ? $this->route->config('url_html_suffix') : $suffix; - if ($pos = strpos($suffix, '|')) { + if (is_string($suffix) && $pos = strpos($suffix, '|')) { $suffix = substr($suffix, 0, $pos); } } @@ -302,10 +302,10 @@ protected function getRuleUrl(array $rule, array &$vars = [], $allowDomain = '') $port = $request->port(); foreach ($rule as $item) { - $url = $item->getRule(); + $url = $item['rule']; $pattern = $this->parseVar($url); - $domain = $item->getDomain(); - $suffix = $item->getSuffix(); + $domain = $item['domain']; + $suffix = $item['suffix']; if ('-' == $domain) { $domain = is_string($allowDomain) ? $allowDomain : $request->host(true); @@ -324,11 +324,12 @@ protected function getRuleUrl(array $rule, array &$vars = [], $allowDomain = '') } $type = $this->route->config('url_common_param'); + $keys = []; foreach ($pattern as $key => $val) { if (isset($vars[$key])) { - $url = str_replace(['[:' . $key . ']', '<' . $key . '?>', ':' . $key, '<' . $key . '>'], $type ? $vars[$key] : urlencode((string) $vars[$key]), $url); - unset($vars[$key]); + $url = str_replace(['[:' . $key . ']', '<' . $key . '?>', ':' . $key, '<' . $key . '>'], $type ? (string) $vars[$key] : urlencode((string) $vars[$key]), $url); + $keys[] = $key; $url = str_replace(['/?', '-?'], ['/', '-'], $url); $result = [rtrim($url, '?/-'), $domain, $suffix]; } elseif (2 == $val) { @@ -336,10 +337,14 @@ protected function getRuleUrl(array $rule, array &$vars = [], $allowDomain = '') $url = str_replace(['/?', '-?'], ['/', '-'], $url); $result = [rtrim($url, '?/-'), $domain, $suffix]; } else { + $result = null; + $keys = []; break; } } + $vars = array_diff_key($vars, array_flip($keys)); + if (isset($result)) { return $result; } @@ -348,6 +353,11 @@ protected function getRuleUrl(array $rule, array &$vars = [], $allowDomain = '') return []; } + /** + * 生成URL地址 + * @access public + * @return string + */ public function build() { // 解析URL @@ -373,16 +383,16 @@ public function build() if (false !== strpos($anchor, '?')) { // 解析参数 - list($anchor, $info['query']) = explode('?', $anchor, 2); + [$anchor, $info['query']] = explode('?', $anchor, 2); } if (false !== strpos($anchor, '@')) { // 解析域名 - list($anchor, $domain) = explode('@', $anchor, 2); + [$anchor, $domain] = explode('@', $anchor, 2); } } elseif (strpos($url, '@') && false === strpos($url, '\\')) { // 解析域名 - list($url, $domain) = explode('@', $url, 2); + [$url, $domain] = explode('@', $url, 2); } } @@ -468,7 +478,7 @@ public function build() // 添加参数 if ($this->route->config('url_common_param')) { $vars = http_build_query($vars); - $url .= $suffix . '?' . $vars . $anchor; + $url .= $suffix . ($vars ? '?' . $vars : '') . $anchor; } else { foreach ($vars as $var => $val) { $val = (string) $val; diff --git a/vendor/topthink/framework/src/think/route/dispatch/Callback.php b/vendor/topthink/framework/src/think/route/dispatch/Callback.php index 7658c3df..2044ef8e 100644 --- a/vendor/topthink/framework/src/think/route/dispatch/Callback.php +++ b/vendor/topthink/framework/src/think/route/dispatch/Callback.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/route/dispatch/Controller.php b/vendor/topthink/framework/src/think/route/dispatch/Controller.php index 413c1a1b..611101bd 100644 --- a/vendor/topthink/framework/src/think/route/dispatch/Controller.php +++ b/vendor/topthink/framework/src/think/route/dispatch/Controller.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -83,7 +83,8 @@ public function exec() ->send($this->request) ->then(function () use ($instance) { // 获取当前操作名 - $action = $this->actionName . $this->rule->config('action_suffix'); + $suffix = $this->rule->config('action_suffix'); + $action = $this->actionName . $suffix; if (is_callable([$instance, $action])) { $vars = $this->request->param(); @@ -91,6 +92,10 @@ public function exec() $reflect = new ReflectionMethod($instance, $action); // 严格获取当前操作方法名 $actionName = $reflect->getName(); + if ($suffix) { + $actionName = substr($actionName, 0, -strlen($suffix)); + } + $this->request->setAction($actionName); } catch (ReflectionException $e) { $reflect = new ReflectionMethod($instance, '__call'); @@ -127,12 +132,12 @@ protected function registerControllerMiddleware($controller): void foreach ($middlewares as $key => $val) { if (!is_int($key)) { if (isset($val['only']) && !in_array($this->request->action(true), array_map(function ($item) { - return strtolower($item); - }, is_string($val['only']) ? explode(",", $val['only']) : $val['only']))) { + return strtolower($item); + }, is_string($val['only']) ? explode(",", $val['only']) : $val['only']))) { continue; } elseif (isset($val['except']) && in_array($this->request->action(true), array_map(function ($item) { - return strtolower($item); - }, is_string($val['except']) ? explode(',', $val['except']) : $val['except']))) { + return strtolower($item); + }, is_string($val['except']) ? explode(',', $val['except']) : $val['except']))) { continue; } else { $val = $key; @@ -140,7 +145,10 @@ protected function registerControllerMiddleware($controller): void } if (is_string($val) && strpos($val, ':')) { - $val = explode(':', $val, 2); + $val = explode(':', $val); + if (count($val) > 1) { + $val = [$val[0], array_slice($val, 1)]; + } } $this->app->middleware->controller($val); diff --git a/vendor/topthink/framework/src/think/route/dispatch/Redirect.php b/vendor/topthink/framework/src/think/route/dispatch/Redirect.php deleted file mode 100644 index 1ec9ed97..00000000 --- a/vendor/topthink/framework/src/think/route/dispatch/Redirect.php +++ /dev/null @@ -1,27 +0,0 @@ - -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\route\dispatch; - -use think\Response; -use think\route\Dispatch; - -/** - * Redirect Dispatcher - */ -class Redirect extends Dispatch -{ - public function exec() - { - return Response::create($this->dispatch, 'redirect')->code($this->code); - } -} diff --git a/vendor/topthink/framework/src/think/route/dispatch/Url.php b/vendor/topthink/framework/src/think/route/dispatch/Url.php index acbd9d05..147f5cb7 100644 --- a/vendor/topthink/framework/src/think/route/dispatch/Url.php +++ b/vendor/topthink/framework/src/think/route/dispatch/Url.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -23,14 +23,14 @@ class Url extends Controller { - public function __construct(Request $request, Rule $rule, $dispatch, array $param = [], int $code = null) + public function __construct(Request $request, Rule $rule, $dispatch) { $this->request = $request; $this->rule = $rule; // 解析默认的URL规则 $dispatch = $this->parseUrl($dispatch); - parent::__construct($request, $rule, $dispatch, $this->param, $code); + parent::__construct($request, $rule, $dispatch, $this->param); } /** @@ -58,7 +58,7 @@ protected function parseUrl(string $url): array // 解析控制器 $controller = !empty($path) ? array_shift($path) : null; - if ($controller && !preg_match('/^[A-Za-z][\w|\.]*$/', $controller)) { + if ($controller && !preg_match('/^[A-Za-z0-9][\w|\.]*$/', $controller)) { throw new HttpException(404, 'controller not exists:' . $controller); } @@ -100,7 +100,7 @@ protected function parseUrl(string $url): array */ protected function hasDefinedRoute(array $route): bool { - list($controller, $action) = $route; + [$controller, $action] = $route; // 检查地址是否被定义过路由 $name = strtolower(Str::studly($controller) . '/' . $action); diff --git a/vendor/topthink/framework/src/think/route/dispatch/View.php b/vendor/topthink/framework/src/think/route/dispatch/View.php deleted file mode 100644 index 94f90476..00000000 --- a/vendor/topthink/framework/src/think/route/dispatch/View.php +++ /dev/null @@ -1,28 +0,0 @@ - -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\route\dispatch; - -use think\Response; -use think\route\Dispatch; - -/** - * View Dispatcher - */ -class View extends Dispatch -{ - public function exec() - { - // 渲染模板输出 - return Response::create($this->dispatch, 'view')->assign($this->param); - } -} diff --git a/vendor/topthink/framework/src/think/service/ModelService.php b/vendor/topthink/framework/src/think/service/ModelService.php index a212a58e..87cfaf98 100644 --- a/vendor/topthink/framework/src/think/service/ModelService.php +++ b/vendor/topthink/framework/src/think/service/ModelService.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/service/PaginatorService.php b/vendor/topthink/framework/src/think/service/PaginatorService.php index b13dc1df..a01977d0 100644 --- a/vendor/topthink/framework/src/think/service/PaginatorService.php +++ b/vendor/topthink/framework/src/think/service/PaginatorService.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/service/ValidateService.php b/vendor/topthink/framework/src/think/service/ValidateService.php index d96dea01..94d7638a 100644 --- a/vendor/topthink/framework/src/think/service/ValidateService.php +++ b/vendor/topthink/framework/src/think/service/ValidateService.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/session/Store.php b/vendor/topthink/framework/src/think/session/Store.php index 30f46300..49e1ba90 100644 --- a/vendor/topthink/framework/src/think/session/Store.php +++ b/vendor/topthink/framework/src/think/session/Store.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -118,7 +118,7 @@ public function getName(): string */ public function setId($id = null): void { - $this->id = is_string($id) && strlen($id) === 32 ? $id : md5(microtime(true) . session_create_id()); + $this->id = is_string($id) && strlen($id) === 32 && ctype_alnum($id) ? $id : md5(microtime(true) . session_create_id()); } /** diff --git a/vendor/topthink/framework/src/think/session/driver/Cache.php b/vendor/topthink/framework/src/think/session/driver/Cache.php index c25e2efe..4fabc799 100644 --- a/vendor/topthink/framework/src/think/session/driver/Cache.php +++ b/vendor/topthink/framework/src/think/session/driver/Cache.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/session/driver/File.php b/vendor/topthink/framework/src/think/session/driver/File.php index 1846089a..788f3230 100644 --- a/vendor/topthink/framework/src/think/session/driver/File.php +++ b/vendor/topthink/framework/src/think/session/driver/File.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -39,7 +39,7 @@ public function __construct(App $app, array $config = []) $this->config = array_merge($this->config, $config); if (empty($this->config['path'])) { - $this->config['path'] = $app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . 'session' . DIRECTORY_SEPARATOR; + $this->config['path'] = $app->getRuntimePath() . 'session' . DIRECTORY_SEPARATOR; } elseif (substr($this->config['path'], -1) != DIRECTORY_SEPARATOR) { $this->config['path'] .= DIRECTORY_SEPARATOR; } @@ -152,7 +152,7 @@ public function read(string $sessID): string if ($this->config['data_compress'] && function_exists('gzcompress')) { //启用数据压缩 - $content = gzuncompress($content); + $content = (string) gzuncompress($content); } return $content; diff --git a/vendor/topthink/framework/src/think/validate/ValidateRule.php b/vendor/topthink/framework/src/think/validate/ValidateRule.php index 05e275fe..b741f530 100644 --- a/vendor/topthink/framework/src/think/validate/ValidateRule.php +++ b/vendor/topthink/framework/src/think/validate/ValidateRule.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- diff --git a/vendor/topthink/framework/src/think/view/driver/Php.php b/vendor/topthink/framework/src/think/view/driver/Php.php index a89e5865..9e6e54aa 100644 --- a/vendor/topthink/framework/src/think/view/driver/Php.php +++ b/vendor/topthink/framework/src/think/view/driver/Php.php @@ -2,7 +2,7 @@ // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. +// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- @@ -83,10 +83,6 @@ public function fetch(string $template, array $data = []): void $this->template = $template; - // 记录视图信息 - $this->app->log - ->record('[ VIEW ] ' . $template . ' [ ' . var_export(array_keys($data), true) . ' ]'); - extract($data, EXTR_OVERWRITE); include $this->template; @@ -119,8 +115,8 @@ private function parseTemplate(string $template): string // 获取视图根目录 if (strpos($template, '@')) { - // 跨模块调用 - list($app, $template) = explode('@', $template); + // 跨应用调用 + [$app, $template] = explode('@', $template); } if ($this->config['view_path'] && !isset($app)) { diff --git a/vendor/topthink/framework/src/tpl/think_exception.tpl b/vendor/topthink/framework/src/tpl/think_exception.tpl index 0c07a125..7766caf5 100644 --- a/vendor/topthink/framework/src/tpl/think_exception.tpl +++ b/vendor/topthink/framework/src/tpl/think_exception.tpl @@ -1,79 +1,93 @@ '.end($names).''; - } +if (!function_exists('parse_class')) { + function parse_class($name) + { + $names = explode('\\', $name); + return ''.end($names).''; } +} - if(!function_exists('parse_file')){ - function parse_file($file, $line) - { - return ''.basename($file)." line {$line}".''; - } +if (!function_exists('parse_file')) { + function parse_file($file, $line) + { + return ''.basename($file)." line {$line}".''; } - - if(!function_exists('parse_args')){ - function parse_args($args) - { - $result = []; - - foreach ($args as $key => $item) { - switch (true) { - case is_object($item): - $value = sprintf('object(%s)', parse_class(get_class($item))); - break; - case is_array($item): - if(count($item) > 3){ - $value = sprintf('[%s, ...]', parse_args(array_slice($item, 0, 3))); - } else { - $value = sprintf('[%s]', parse_args($item)); - } - break; - case is_string($item): - if(strlen($item) > 20){ - $value = sprintf( - '\'%s...\'', - htmlentities($item), - htmlentities(substr($item, 0, 20)) - ); - } else { - $value = sprintf("'%s'", htmlentities($item)); - } - break; - case is_int($item): - case is_float($item): - $value = $item; - break; - case is_null($item): - $value = 'null'; - break; - case is_bool($item): - $value = '' . ($item ? 'true' : 'false') . ''; - break; - case is_resource($item): - $value = 'resource'; - break; - default: - $value = htmlentities(str_replace("\n", '', var_export(strval($item), true))); - break; - } - - $result[] = is_int($key) ? $value : "'{$key}' => {$value}"; +} + +if (!function_exists('parse_args')) { + function parse_args($args) + { + $result = []; + foreach ($args as $key => $item) { + switch (true) { + case is_object($item): + $value = sprintf('object(%s)', parse_class(get_class($item))); + break; + case is_array($item): + if (count($item) > 3) { + $value = sprintf('[%s, ...]', parse_args(array_slice($item, 0, 3))); + } else { + $value = sprintf('[%s]', parse_args($item)); + } + break; + case is_string($item): + if (strlen($item) > 20) { + $value = sprintf( + '\'%s...\'', + htmlentities($item), + htmlentities(substr($item, 0, 20)) + ); + } else { + $value = sprintf("'%s'", htmlentities($item)); + } + break; + case is_int($item): + case is_float($item): + $value = $item; + break; + case is_null($item): + $value = 'null'; + break; + case is_bool($item): + $value = '' . ($item ? 'true' : 'false') . ''; + break; + case is_resource($item): + $value = 'resource'; + break; + default: + $value = htmlentities(str_replace("\n", '', var_export(strval($item), true))); + break; } - return implode(', ', $result); + $result[] = is_int($key) ? $value : "'{$key}' => {$value}"; + } + + return implode(', ', $result); + } +} +if (!function_exists('echo_value')) { + function echo_value($val) + { + if (is_array($val) || is_object($val)) { + echo htmlentities(json_encode($val, JSON_PRETTY_PRINT)); + } elseif (is_bool($val)) { + echo $val ? 'true' : 'false'; + } elseif (is_scalar($val)) { + echo htmlentities($val); + } else { + echo 'Resource'; } } +} ?> @@ -123,11 +137,9 @@ .line-error{ background: #f8cbcb; } - .echo table { width: 100%; } - .echo pre { padding: 16px; overflow: auto; @@ -138,12 +150,10 @@ border-radius: 3px; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; } - .echo pre > pre { padding: 0; margin: 0; } - /* Exception Info */ .exception { margin-top: 20px; @@ -156,9 +166,8 @@ font-size:16px; border-top-left-radius: 4px; border-top-right-radius: 4px; - font-family: Consolas,"Liberation Mono",Courier,Verdana,"微软雅黑"; + font-family: Consolas,"Liberation Mono",Courier,Verdana,"微软雅黑",serif; } - .exception .code{ float: left; text-align: center; @@ -185,8 +194,8 @@ display: inline-block; min-width: 100%; box-sizing: border-box; - font-size:14px; - font-family: "Century Gothic",Consolas,"Liberation Mono",Courier,Verdana; + font-size:14px; + font-family: "Century Gothic",Consolas,"Liberation Mono",Courier,Verdana,serif; padding-left: px; } .exception .source-code pre li{ @@ -199,16 +208,20 @@ height: 100%; display: inline-block; border-left: 1px solid #fff; - font-size:14px; - font-family: Consolas,"Liberation Mono",Courier,Verdana,"微软雅黑"; + font-size:14px; + font-family: Consolas,"Liberation Mono",Courier,Verdana,"微软雅黑",serif; } .exception .trace{ padding: 6px; border: 1px solid #ddd; border-top: 0 none; line-height: 16px; - font-size:14px; - font-family: Consolas,"Liberation Mono",Courier,Verdana,"微软雅黑"; + font-size:14px; + font-family: Consolas,"Liberation Mono",Courier,Verdana,"微软雅黑",serif; + } + .exception .trace h2:hover { + text-decoration: underline; + cursor: pointer; } .exception .trace ol{ margin: 12px; @@ -227,7 +240,7 @@ margin: 12px 0; box-sizing: border-box; table-layout:fixed; - word-wrap:break-word; + word-wrap:break-word; } .exception-var table caption{ text-align: left; @@ -243,7 +256,7 @@ } .exception-var table tbody{ font-size: 13px; - font-family: Consolas,"Liberation Mono",Courier,"微软雅黑"; + font-family: Consolas, "Liberation Mono", Courier, "微软雅黑",serif; } .exception-var table td{ padding: 0 6px; @@ -283,65 +296,63 @@ - + + $trace) { ?>
-
- +
-

[

+

-

+

- -
- -
-
    $value) { ?>
- + +
+
    $value) { ?>
  1. ">
+
+
-

Call Stack

+

Call Stack

    -
  1. - -
  2. -
  3. + +
  4. + -
  5. + // Show line + if (isset($value['file']) && isset($value['line'])) { + echo sprintf(' in %s', parse_file($value['file'], $value['line'])); + } + ?> +
+
- -

- +

- +

Exception Datas

$value) { ?> - + @@ -349,19 +360,7 @@ $val) { ?> - + @@ -371,12 +370,12 @@ - +

Environment Variables

$value) { ?>
empty
- -
- + @@ -384,19 +383,7 @@ $val) { ?> - + @@ -410,12 +397,10 @@ ThinkPHPV{ 十年磨一剑-为API开发设计的高性能框架 } - - 官方手册 + - 官方手册 - + diff --git a/vendor/topthink/framework/tests/CacheTest.php b/vendor/topthink/framework/tests/CacheTest.php index 3b22404d..5b5a13cb 100644 --- a/vendor/topthink/framework/tests/CacheTest.php +++ b/vendor/topthink/framework/tests/CacheTest.php @@ -119,13 +119,13 @@ public function testRedisCache() $redis->shouldReceive("set")->once()->with('foo', 5)->andReturnTrue(); $redis->shouldReceive("incrby")->once()->with('foo', 1)->andReturnTrue(); $redis->shouldReceive("decrby")->once()->with('foo', 2)->andReturnTrue(); - $redis->shouldReceive("get")->once()->with('foo')->andReturn(6); - $redis->shouldReceive("get")->once()->with('foo')->andReturn(4); - $redis->shouldReceive("set")->once()->with('bar', \Opis\Closure\serialize(true))->andReturnTrue(); - $redis->shouldReceive("set")->once()->with('baz', \Opis\Closure\serialize(null))->andReturnTrue(); + $redis->shouldReceive("get")->once()->with('foo')->andReturn('6'); + $redis->shouldReceive("get")->once()->with('foo')->andReturn('4'); + $redis->shouldReceive("set")->once()->with('bar', serialize(true))->andReturnTrue(); + $redis->shouldReceive("set")->once()->with('baz', serialize(null))->andReturnTrue(); $redis->shouldReceive("del")->once()->with('baz')->andReturnTrue(); $redis->shouldReceive("flushDB")->once()->andReturnTrue(); - $redis->shouldReceive("set")->once()->with('bar', \Opis\Closure\serialize('foobar'))->andReturnTrue(); + $redis->shouldReceive("set")->once()->with('bar', serialize('foobar'))->andReturnTrue(); $redis->shouldReceive("sAdd")->once()->with('tag:' . md5('foo'), 'bar')->andReturnTrue(); $redis->shouldReceive("sMembers")->once()->with('tag:' . md5('foo'))->andReturn(['bar']); $redis->shouldReceive("del")->once()->with(['bar'])->andReturnTrue(); diff --git a/vendor/topthink/framework/tests/ContainerTest.php b/vendor/topthink/framework/tests/ContainerTest.php index 72ff1d07..e27deb08 100644 --- a/vendor/topthink/framework/tests/ContainerTest.php +++ b/vendor/topthink/framework/tests/ContainerTest.php @@ -149,6 +149,7 @@ public function testBind() $container->bind('name2', $object); + $container->bind('name3', Taylor::class); $container->bind('name3', Taylor::class); $container->name4 = $object; diff --git a/vendor/topthink/framework/tests/DbTest.php b/vendor/topthink/framework/tests/DbTest.php index cffdc845..3bd0c1e9 100644 --- a/vendor/topthink/framework/tests/DbTest.php +++ b/vendor/topthink/framework/tests/DbTest.php @@ -5,6 +5,7 @@ use Mockery as m; use PHPUnit\Framework\TestCase; use think\Cache; +use think\cache\Driver; use think\Config; use think\Db; use think\Event; @@ -23,6 +24,10 @@ public function testMake() $config = m::mock(Config::class); $log = m::mock(Log::class); $cache = m::mock(Cache::class); + $store = m::mock(Driver::class); + + $config->shouldReceive('get')->with('database.cache_store', null)->andReturn(null); + $cache->shouldReceive('store')->with(null)->andReturn($store); $db = Db::__make($event, $config, $log, $cache); diff --git a/vendor/topthink/framework/tests/EventTest.php b/vendor/topthink/framework/tests/EventTest.php index 707a35b5..ded5a36d 100644 --- a/vendor/topthink/framework/tests/EventTest.php +++ b/vendor/topthink/framework/tests/EventTest.php @@ -108,15 +108,6 @@ public function testAutoObserve() $this->event->trigger('bar'); } - public function testWithoutEvent() - { - $this->event->withEvent(false); - - $this->event->listen('SomeListener', TestListener::class); - - $this->assertFalse($this->event->hasListener('SomeListener')); - } - } class TestListener diff --git a/vendor/topthink/framework/tests/HttpTest.php b/vendor/topthink/framework/tests/HttpTest.php index 8b6f28fd..c3e0abd3 100644 --- a/vendor/topthink/framework/tests/HttpTest.php +++ b/vendor/topthink/framework/tests/HttpTest.php @@ -123,6 +123,7 @@ public function testRunWithException() $response = m::mock(Response::class); $this->app->shouldReceive('instance')->once()->with('request', $request); + $this->app->shouldReceive('initialize')->once(); $exception = new Exception(); diff --git a/vendor/topthink/framework/tests/InteractsWithApp.php b/vendor/topthink/framework/tests/InteractsWithApp.php new file mode 100644 index 00000000..f4fcf73f --- /dev/null +++ b/vendor/topthink/framework/tests/InteractsWithApp.php @@ -0,0 +1,30 @@ +app = m::mock(App::class)->makePartial(); + Container::setInstance($this->app); + $this->app->shouldReceive('make')->with(App::class)->andReturn($this->app); + $this->app->shouldReceive('isDebug')->andReturnTrue(); + $this->config = m::mock(Config::class)->makePartial(); + $this->config->shouldReceive('get')->with('app.show_error_msg')->andReturnTrue(); + $this->app->shouldReceive('get')->with('config')->andReturn($this->config); + $this->app->shouldReceive('runningInConsole')->andReturn(false); + } +} diff --git a/vendor/topthink/framework/tests/LogTest.php b/vendor/topthink/framework/tests/LogTest.php index 269306f4..981110f5 100644 --- a/vendor/topthink/framework/tests/LogTest.php +++ b/vendor/topthink/framework/tests/LogTest.php @@ -7,23 +7,16 @@ use Mockery\MockInterface; use org\bovigo\vfs\vfsStream; use PHPUnit\Framework\TestCase; -use think\App; -use think\Config; -use think\Container; use think\Log; use think\log\ChannelSet; class LogTest extends TestCase { - /** @var App|MockInterface */ - protected $app; + use InteractsWithApp; /** @var Log|MockInterface */ protected $log; - /** @var Config|MockInterface */ - protected $config; - protected function tearDown(): void { m::close(); @@ -31,13 +24,7 @@ protected function tearDown(): void protected function setUp() { - $this->app = m::mock(App::class)->makePartial(); - Container::setInstance($this->app); - - $this->app->shouldReceive('make')->with(App::class)->andReturn($this->app); - $this->config = m::mock(Config::class)->makePartial(); - $this->app->shouldReceive('get')->with('config')->andReturn($this->config); - $this->app->shouldReceive('runningInConsole')->andReturn(false); + $this->prepareApp(); $this->log = new Log($this->app); } diff --git a/vendor/topthink/framework/tests/MiddlewareTest.php b/vendor/topthink/framework/tests/MiddlewareTest.php index bbd092d4..aa53059c 100644 --- a/vendor/topthink/framework/tests/MiddlewareTest.php +++ b/vendor/topthink/framework/tests/MiddlewareTest.php @@ -5,9 +5,6 @@ use Mockery as m; use Mockery\MockInterface; use PHPUnit\Framework\TestCase; -use think\App; -use think\Config; -use think\Container; use think\Exception; use think\exception\Handle; use think\Middleware; @@ -17,15 +14,11 @@ class MiddlewareTest extends TestCase { - /** @var App|MockInterface */ - protected $app; + use InteractsWithApp; /** @var Middleware|MockInterface */ protected $middleware; - /** @var Config|MockInterface */ - protected $config; - protected function tearDown(): void { m::close(); @@ -33,13 +26,7 @@ protected function tearDown(): void protected function setUp() { - $this->app = m::mock(App::class)->makePartial(); - Container::setInstance($this->app); - - $this->app->shouldReceive('make')->with(App::class)->andReturn($this->app); - $this->config = m::mock(Config::class)->makePartial(); - $this->app->shouldReceive('get')->with('config')->andReturn($this->config); - $this->app->shouldReceive('runningInConsole')->andReturn(false); + $this->prepareApp(); $this->middleware = new Middleware($this->app); } diff --git a/vendor/topthink/framework/tests/RouteTest.php b/vendor/topthink/framework/tests/RouteTest.php new file mode 100644 index 00000000..e992d0fe --- /dev/null +++ b/vendor/topthink/framework/tests/RouteTest.php @@ -0,0 +1,286 @@ +prepareApp(); + $this->route = new Route($this->app); + } + + /** + * @param $path + * @param string $method + * @param string $host + * @return m\Mock|Request + */ + protected function makeRequest($path, $method = 'GET', $host = 'localhost') + { + $request = m::mock(Request::class)->makePartial(); + $request->shouldReceive('host')->andReturn($host); + $request->shouldReceive('pathinfo')->andReturn($path); + $request->shouldReceive('url')->andReturn('/' . $path); + $request->shouldReceive('method')->andReturn(strtoupper($method)); + return $request; + } + + public function testSimpleRequest() + { + $this->route->get('foo', function () { + return 'get-foo'; + }); + + $this->route->put('foo', function () { + return 'put-foo'; + }); + + $this->route->group(function () { + $this->route->post('foo', function () { + return 'post-foo'; + }); + }); + + $request = $this->makeRequest('foo', 'post'); + $response = $this->route->dispatch($request); + $this->assertEquals(200, $response->getCode()); + $this->assertEquals('post-foo', $response->getContent()); + + $request = $this->makeRequest('foo', 'get'); + $response = $this->route->dispatch($request); + $this->assertEquals(200, $response->getCode()); + $this->assertEquals('get-foo', $response->getContent()); + } + + public function testOptionsRequest() + { + $this->route->get('foo', function () { + return 'get-foo'; + }); + + $this->route->put('foo', function () { + return 'put-foo'; + }); + + $this->route->group(function () { + $this->route->post('foo', function () { + return 'post-foo'; + }); + }); + $this->route->group('abc', function () { + $this->route->post('foo/:id', function () { + return 'post-abc-foo'; + }); + }); + + $this->route->post('foo/:id', function () { + return 'post-abc-foo'; + }); + + $this->route->resource('bar', 'SomeClass'); + + $request = $this->makeRequest('foo', 'options'); + $response = $this->route->dispatch($request); + $this->assertEquals(204, $response->getCode()); + $this->assertEquals('GET, PUT, POST', $response->getHeader('Allow')); + + $request = $this->makeRequest('bar', 'options'); + $response = $this->route->dispatch($request); + $this->assertEquals(204, $response->getCode()); + $this->assertEquals('GET, POST', $response->getHeader('Allow')); + + $request = $this->makeRequest('bar/1', 'options'); + $response = $this->route->dispatch($request); + $this->assertEquals(204, $response->getCode()); + $this->assertEquals('GET, PUT, DELETE', $response->getHeader('Allow')); + + $request = $this->makeRequest('xxxx', 'options'); + $response = $this->route->dispatch($request); + $this->assertEquals(204, $response->getCode()); + $this->assertEquals('GET, POST, PUT, DELETE', $response->getHeader('Allow')); + } + + public function testAllowCrossDomain() + { + $this->route->get('foo', function () { + return 'get-foo'; + })->allowCrossDomain(['some' => 'bar']); + + $request = $this->makeRequest('foo', 'get'); + $response = $this->route->dispatch($request); + + $this->assertEquals('bar', $response->getHeader('some')); + $this->assertArrayHasKey('Access-Control-Allow-Credentials', $response->getHeader()); + + $request = $this->makeRequest('foo2', 'options'); + $response = $this->route->dispatch($request); + + $this->assertEquals(204, $response->getCode()); + $this->assertArrayHasKey('Access-Control-Allow-Credentials', $response->getHeader()); + $this->assertEquals('GET, POST, PUT, DELETE', $response->getHeader('Allow')); + } + + public function testControllerDispatch() + { + $this->route->get('foo', 'foo/bar'); + + $controller = m::Mock(\stdClass::class); + + $this->app->shouldReceive('parseClass')->with('controller', 'Foo')->andReturn($controller->mockery_getName()); + $this->app->shouldReceive('make')->with($controller->mockery_getName(), [], true)->andReturn($controller); + + $controller->shouldReceive('bar')->andReturn('bar'); + + $request = $this->makeRequest('foo'); + $response = $this->route->dispatch($request); + $this->assertEquals('bar', $response->getContent()); + } + + public function testEmptyControllerDispatch() + { + $this->route->get('foo', 'foo/bar'); + + $controller = m::Mock(\stdClass::class); + + $this->app->shouldReceive('parseClass')->with('controller', 'Error')->andReturn($controller->mockery_getName()); + $this->app->shouldReceive('make')->with($controller->mockery_getName(), [], true)->andReturn($controller); + + $controller->shouldReceive('bar')->andReturn('bar'); + + $request = $this->makeRequest('foo'); + $response = $this->route->dispatch($request); + $this->assertEquals('bar', $response->getContent()); + } + + protected function createMiddleware($times = 1) + { + $middleware = m::mock(Str::random(5)); + $middleware->shouldReceive('handle')->times($times)->andReturnUsing(function ($request, Closure $next) { + return $next($request); + }); + $this->app->shouldReceive('make')->with($middleware->mockery_getName())->andReturn($middleware); + + return $middleware; + } + + public function testControllerWithMiddleware() + { + $this->route->get('foo', 'foo/bar'); + + $controller = m::mock(FooClass::class); + + $controller->middleware = [ + $this->createMiddleware()->mockery_getName() . ":params1:params2", + $this->createMiddleware(0)->mockery_getName() => ['except' => 'bar'], + $this->createMiddleware()->mockery_getName() => ['only' => 'bar'], + ]; + + $this->app->shouldReceive('parseClass')->with('controller', 'Foo')->andReturn($controller->mockery_getName()); + $this->app->shouldReceive('make')->with($controller->mockery_getName(), [], true)->andReturn($controller); + + $controller->shouldReceive('bar')->once()->andReturn('bar'); + + $request = $this->makeRequest('foo'); + $response = $this->route->dispatch($request); + $this->assertEquals('bar', $response->getContent()); + } + + public function testUrlDispatch() + { + $controller = m::mock(FooClass::class); + $controller->shouldReceive('index')->andReturn('bar'); + + $this->app->shouldReceive('parseClass')->once()->with('controller', 'Foo')->andReturn($controller->mockery_getName()); + $this->app->shouldReceive('make')->with($controller->mockery_getName(), [], true)->andReturn($controller); + + $request = $this->makeRequest('foo'); + $response = $this->route->dispatch($request); + $this->assertEquals('bar', $response->getContent()); + } + + public function testRedirectDispatch() + { + $this->route->redirect('foo', 'http://localhost', 302); + + $request = $this->makeRequest('foo'); + $this->app->shouldReceive('make')->with(Request::class)->andReturn($request); + $response = $this->route->dispatch($request); + + $this->assertInstanceOf(Redirect::class, $response); + $this->assertEquals(302, $response->getCode()); + $this->assertEquals('http://localhost', $response->getData()); + } + + public function testViewDispatch() + { + $this->route->view('foo', 'index/hello', ['city' => 'shanghai']); + + $request = $this->makeRequest('foo'); + $response = $this->route->dispatch($request); + + $this->assertInstanceOf(View::class, $response); + $this->assertEquals(['city' => 'shanghai'], $response->getVars()); + $this->assertEquals('index/hello', $response->getData()); + } + + public function testResponseDispatch() + { + $this->route->get('hello/:name', response() + ->data('Hello,ThinkPHP') + ->code(200) + ->contentType('text/plain')); + + $request = $this->makeRequest('hello/some'); + $response = $this->route->dispatch($request); + + $this->assertEquals('Hello,ThinkPHP', $response->getContent()); + $this->assertEquals(200, $response->getCode()); + } + + public function testDomainBindResponse() + { + $this->route->domain('test', function () { + $this->route->get('/', function () { + return 'Hello,ThinkPHP'; + }); + }); + + $request = $this->makeRequest('', 'get', 'test.domain.com'); + $response = $this->route->dispatch($request); + + $this->assertEquals('Hello,ThinkPHP', $response->getContent()); + $this->assertEquals(200, $response->getCode()); + } + +} + +class FooClass +{ + public $middleware = []; + + public function bar() + { + + } +} diff --git a/vendor/topthink/framework/tests/bootstrap.php b/vendor/topthink/framework/tests/bootstrap.php index 991ea439..34590612 100644 --- a/vendor/topthink/framework/tests/bootstrap.php +++ b/vendor/topthink/framework/tests/bootstrap.php @@ -1,3 +1,3 @@ Date: Sat, 4 Sep 2021 16:08:49 +0800 Subject: [PATCH 4/7] =?UTF-8?q?[delete]=E5=88=A0=E9=99=A4=E5=A4=9A?= =?UTF-8?q?=E4=BD=99=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- runtime/cache/2d/7301e6e82f343948e5c46f0a3c314b.php | 4 ---- runtime/cache/3b/1cd8c0f3fd25b5dba35624b103e407.php | 4 ---- runtime/cache/4c/2d186a68942db66f8ba15fcfce2a63.php | 4 ---- runtime/cache/53/e0ad44eb4853cd88c068b6cf317c8a.php | 4 ---- runtime/cache/5b/db71b05f018e7d1050e74b9c95cf85.php | 4 ---- runtime/cache/8c/6565319d3230091141e6ef012b4567.php | 4 ---- runtime/cache/90/e939771e274fbf5126a2eef67c167e.php | 4 ---- runtime/cache/f1/af4877cda9be6f917ff281fc61fc68.php | 4 ---- runtime/cache/f7/7f98c583b8fc1054a771cc6b6ce474.php | 4 ---- 9 files changed, 36 deletions(-) delete mode 100644 runtime/cache/2d/7301e6e82f343948e5c46f0a3c314b.php delete mode 100644 runtime/cache/3b/1cd8c0f3fd25b5dba35624b103e407.php delete mode 100644 runtime/cache/4c/2d186a68942db66f8ba15fcfce2a63.php delete mode 100644 runtime/cache/53/e0ad44eb4853cd88c068b6cf317c8a.php delete mode 100644 runtime/cache/5b/db71b05f018e7d1050e74b9c95cf85.php delete mode 100644 runtime/cache/8c/6565319d3230091141e6ef012b4567.php delete mode 100644 runtime/cache/90/e939771e274fbf5126a2eef67c167e.php delete mode 100644 runtime/cache/f1/af4877cda9be6f917ff281fc61fc68.php delete mode 100644 runtime/cache/f7/7f98c583b8fc1054a771cc6b6ce474.php diff --git a/runtime/cache/2d/7301e6e82f343948e5c46f0a3c314b.php b/runtime/cache/2d/7301e6e82f343948e5c46f0a3c314b.php deleted file mode 100644 index eb29081f..00000000 --- a/runtime/cache/2d/7301e6e82f343948e5c46f0a3c314b.php +++ /dev/null @@ -1,4 +0,0 @@ - -s:21:"EasyAdmin后台系统"; \ No newline at end of file diff --git a/runtime/cache/3b/1cd8c0f3fd25b5dba35624b103e407.php b/runtime/cache/3b/1cd8c0f3fd25b5dba35624b103e407.php deleted file mode 100644 index dfc3cc57..00000000 --- a/runtime/cache/3b/1cd8c0f3fd25b5dba35624b103e407.php +++ /dev/null @@ -1,4 +0,0 @@ - -a:9:{i:0;s:75:"/var/www/html/EasyAdmin/runtime/cache/2d/7301e6e82f343948e5c46f0a3c314b.php";i:1;s:75:"/var/www/html/EasyAdmin/runtime/cache/90/e939771e274fbf5126a2eef67c167e.php";i:2;s:75:"/var/www/html/EasyAdmin/runtime/cache/8c/6565319d3230091141e6ef012b4567.php";i:3;s:66:"/www/EasyAdmin/runtime/cache/2d/7301e6e82f343948e5c46f0a3c314b.php";i:4;s:66:"/www/EasyAdmin/runtime/cache/90/e939771e274fbf5126a2eef67c167e.php";i:5;s:66:"/www/EasyAdmin/runtime/cache/8c/6565319d3230091141e6ef012b4567.php";i:6;s:66:"/www/EasyAdmin/runtime/cache/5b/db71b05f018e7d1050e74b9c95cf85.php";i:7;s:66:"/www/EasyAdmin/runtime/cache/f1/af4877cda9be6f917ff281fc61fc68.php";i:8;s:66:"/www/EasyAdmin/runtime/cache/4c/2d186a68942db66f8ba15fcfce2a63.php";} \ No newline at end of file diff --git a/runtime/cache/4c/2d186a68942db66f8ba15fcfce2a63.php b/runtime/cache/4c/2d186a68942db66f8ba15fcfce2a63.php deleted file mode 100644 index 57a674ad..00000000 --- a/runtime/cache/4c/2d186a68942db66f8ba15fcfce2a63.php +++ /dev/null @@ -1,4 +0,0 @@ - -a:18:{s:11:"upload_type";s:5:"local";s:16:"upload_allow_ext";s:49:"doc,gif,ico,icon,jpg,mp3,mp4,p12,pem,png,rar,jpeg";s:17:"upload_allow_size";s:7:"1024000";s:17:"upload_allow_mime";s:57:"image/gif,image/jpeg,video/x-msvideo,text/plain,image/png";s:17:"upload_allow_type";s:24:"local,alioss,qnoss,txcos";s:20:"alioss_access_key_id";s:9:"填你的";s:24:"alioss_access_key_secret";s:9:"填你的";s:15:"alioss_endpoint";s:9:"填你的";s:13:"alioss_bucket";s:9:"填你的";s:13:"alioss_domain";s:9:"填你的";s:15:"txcos_secret_id";s:9:"填你的";s:16:"txcos_secret_key";s:9:"填你的";s:12:"txcos_region";s:9:"填你的";s:12:"tecos_bucket";s:9:"填你的";s:16:"qnoss_access_key";s:9:"填你的";s:16:"qnoss_secret_key";s:9:"填你的";s:12:"qnoss_bucket";s:9:"填你的";s:12:"qnoss_domain";s:9:"填你的";} \ No newline at end of file diff --git a/runtime/cache/53/e0ad44eb4853cd88c068b6cf317c8a.php b/runtime/cache/53/e0ad44eb4853cd88c068b6cf317c8a.php deleted file mode 100644 index 15c9a954..00000000 --- a/runtime/cache/53/e0ad44eb4853cd88c068b6cf317c8a.php +++ /dev/null @@ -1,4 +0,0 @@ - -a:3:{s:8:"logoInfo";a:3:{s:5:"title";s:9:"EasyAdmin";s:5:"image";s:12:"/favicon.ico";s:4:"href";s:23:"/admin/index/index.html";}s:8:"homeInfo";a:3:{s:5:"title";s:12:"后台首页";s:4:"icon";s:10:"fa fa-home";s:4:"href";s:25:"/admin/index/welcome.html";}s:8:"menuInfo";a:2:{i:0;a:7:{s:2:"id";i:228;s:3:"pid";i:0;s:5:"title";s:12:"系统管理";s:4:"icon";s:9:"fa fa-cog";s:4:"href";s:0:"";s:6:"target";s:5:"_self";s:5:"child";a:8:{i:0;a:6:{s:2:"id";i:244;s:3:"pid";i:228;s:5:"title";s:15:"管理员管理";s:4:"icon";s:10:"fa fa-user";s:4:"href";s:30:"/admin/system.admin/index.html";s:6:"target";s:5:"_self";}i:1;a:6:{s:2:"id";i:245;s:3:"pid";i:228;s:5:"title";s:12:"角色管理";s:4:"icon";s:22:"fa fa-bitbucket-square";s:4:"href";s:29:"/admin/system.auth/index.html";s:6:"target";s:5:"_self";}i:2;a:6:{s:2:"id";i:234;s:3:"pid";i:228;s:5:"title";s:12:"菜单管理";s:4:"icon";s:10:"fa fa-tree";s:4:"href";s:29:"/admin/system.menu/index.html";s:6:"target";s:5:"_self";}i:3;a:6:{s:2:"id";i:246;s:3:"pid";i:228;s:5:"title";s:12:"节点管理";s:4:"icon";s:10:"fa fa-list";s:4:"href";s:29:"/admin/system.node/index.html";s:6:"target";s:5:"_self";}i:4;a:6:{s:2:"id";i:247;s:3:"pid";i:228;s:5:"title";s:12:"配置管理";s:4:"icon";s:14:"fa fa-asterisk";s:4:"href";s:31:"/admin/system.config/index.html";s:6:"target";s:5:"_self";}i:5;a:6:{s:2:"id";i:248;s:3:"pid";i:228;s:5:"title";s:12:"上传管理";s:4:"icon";s:14:"fa fa-arrow-up";s:4:"href";s:35:"/admin/system.uploadfile/index.html";s:6:"target";s:5:"_self";}i:6;a:6:{s:2:"id";i:252;s:3:"pid";i:228;s:5:"title";s:12:"快捷入口";s:4:"icon";s:10:"fa fa-list";s:4:"href";s:30:"/admin/system.quick/index.html";s:6:"target";s:5:"_self";}i:7;a:6:{s:2:"id";i:253;s:3:"pid";i:228;s:5:"title";s:12:"日志管理";s:4:"icon";s:20:"fa fa-connectdevelop";s:4:"href";s:28:"/admin/system.log/index.html";s:6:"target";s:5:"_self";}}}i:1;a:7:{s:2:"id";i:249;s:3:"pid";i:0;s:5:"title";s:12:"商城管理";s:4:"icon";s:10:"fa fa-list";s:4:"href";s:0:"";s:6:"target";s:5:"_self";s:5:"child";a:2:{i:0;a:6:{s:2:"id";i:250;s:3:"pid";i:249;s:5:"title";s:12:"商品分类";s:4:"icon";s:22:"fa fa-calendar-check-o";s:4:"href";s:27:"/admin/mall.cate/index.html";s:6:"target";s:5:"_self";}i:1;a:6:{s:2:"id";i:251;s:3:"pid";i:249;s:5:"title";s:12:"商品管理";s:4:"icon";s:10:"fa fa-list";s:4:"href";s:28:"/admin/mall.goods/index.html";s:6:"target";s:5:"_self";}}}}} \ No newline at end of file diff --git a/runtime/cache/5b/db71b05f018e7d1050e74b9c95cf85.php b/runtime/cache/5b/db71b05f018e7d1050e74b9c95cf85.php deleted file mode 100644 index b788a6ac..00000000 --- a/runtime/cache/5b/db71b05f018e7d1050e74b9c95cf85.php +++ /dev/null @@ -1,4 +0,0 @@ - -s:9:"EasyAdmin"; \ No newline at end of file diff --git a/runtime/cache/8c/6565319d3230091141e6ef012b4567.php b/runtime/cache/8c/6565319d3230091141e6ef012b4567.php deleted file mode 100644 index dbdf4127..00000000 --- a/runtime/cache/8c/6565319d3230091141e6ef012b4567.php +++ /dev/null @@ -1,4 +0,0 @@ - -s:9:"填你的"; \ No newline at end of file diff --git a/runtime/cache/90/e939771e274fbf5126a2eef67c167e.php b/runtime/cache/90/e939771e274fbf5126a2eef67c167e.php deleted file mode 100644 index dbdf4127..00000000 --- a/runtime/cache/90/e939771e274fbf5126a2eef67c167e.php +++ /dev/null @@ -1,4 +0,0 @@ - -s:9:"填你的"; \ No newline at end of file diff --git a/runtime/cache/f1/af4877cda9be6f917ff281fc61fc68.php b/runtime/cache/f1/af4877cda9be6f917ff281fc61fc68.php deleted file mode 100644 index 1369965f..00000000 --- a/runtime/cache/f1/af4877cda9be6f917ff281fc61fc68.php +++ /dev/null @@ -1,4 +0,0 @@ - -s:12:"/favicon.ico"; \ No newline at end of file diff --git a/runtime/cache/f7/7f98c583b8fc1054a771cc6b6ce474.php b/runtime/cache/f7/7f98c583b8fc1054a771cc6b6ce474.php deleted file mode 100644 index 53f53c77..00000000 --- a/runtime/cache/f7/7f98c583b8fc1054a771cc6b6ce474.php +++ /dev/null @@ -1,4 +0,0 @@ - -a:1:{i:0;s:66:"/www/EasyAdmin/runtime/cache/53/e0ad44eb4853cd88c068b6cf317c8a.php";} \ No newline at end of file From c3880b28256f4117f6bf1843b79905af1dac7f55 Mon Sep 17 00:00:00 2001 From: zhongshaofa <2286732552@qq.com> Date: Sat, 4 Sep 2021 16:13:46 +0800 Subject: [PATCH 5/7] =?UTF-8?q?[feat]=E5=AE=8C=E5=96=84idea=E8=AF=86?= =?UTF-8?q?=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + app/admin/middleware/SystemLog.php | 3 ++- composer.json | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 5677f4c7..3a60e9ff 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ runtime/admin runtime/log runtime/session runtime/temp +runtime/cache public/conf public/WowOss.exe app/index/controller/Test.php diff --git a/app/admin/middleware/SystemLog.php b/app/admin/middleware/SystemLog.php index ecd93c65..4f602653 100644 --- a/app/admin/middleware/SystemLog.php +++ b/app/admin/middleware/SystemLog.php @@ -13,6 +13,7 @@ namespace app\admin\middleware; use app\admin\service\SystemLogService; +use app\Request; use EasyAdmin\tool\CommonTool; /** @@ -32,7 +33,7 @@ class SystemLog 'password_again', ]; - public function handle($request, \Closure $next) + public function handle(Request $request, \Closure $next) { if ($request->isAjax()) { $method = strtolower($request->method()); diff --git a/composer.json b/composer.json index 22518618..815502ef 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,8 @@ "qiniu/php-sdk": "^7.2", "alibabacloud/client": "^1.5", "jianyan74/php-excel": "^1.0", - "zhongshaofa/easy-admin": "^1.0" + "zhongshaofa/easy-admin": "^1.0", + "ext-json": "*" }, "require-dev": { "symfony/var-dumper": "^4.2", From 41c98e2f9c0c3c32ea7a6644910033079df34751 Mon Sep 17 00:00:00 2001 From: zhongshaofa <2286732552@qq.com> Date: Sat, 4 Sep 2021 16:21:34 +0800 Subject: [PATCH 6/7] =?UTF-8?q?[feat]=E5=AE=8C=E5=96=84=E6=B3=A8=E9=87=8A,?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E5=BF=97=E6=95=B0=E6=8D=AE=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E4=B8=BAjson?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/middleware/CheckAdmin.php | 1 + app/admin/middleware/ViewInit.php | 5 +++++ app/common.php | 1 + config/log.php | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/admin/middleware/CheckAdmin.php b/app/admin/middleware/CheckAdmin.php index 2eca878d..d0344f89 100644 --- a/app/admin/middleware/CheckAdmin.php +++ b/app/admin/middleware/CheckAdmin.php @@ -16,6 +16,7 @@ use think\Request; /** + * @deprecated 废弃,新版TP不支持在中间件获取控制器相关信息 * 检测用户登录和节点权限 * Class CheckAdmin * @package app\admin\middleware diff --git a/app/admin/middleware/ViewInit.php b/app/admin/middleware/ViewInit.php index 604bae33..712d0ce4 100644 --- a/app/admin/middleware/ViewInit.php +++ b/app/admin/middleware/ViewInit.php @@ -19,6 +19,11 @@ use think\facade\Request; use think\facade\View; +/** + * @deprecated 废弃,新版TP不支持在中间件获取控制器相关信息 + * Class ViewInit + * @package app\admin\middleware + */ class ViewInit { diff --git a/app/common.php b/app/common.php index 7b9d0648..7c3c7241 100644 --- a/app/common.php +++ b/app/common.php @@ -40,6 +40,7 @@ function password($value) /** * debug调试 + * @deprecated 不建议使用,建议直接使用框架自带的log组件 * @param string|array $data 打印信息 * @param string $type 类型 * @param string $suffix 文件后缀名 diff --git a/config/log.php b/config/log.php index 5556ca4a..621146ac 100644 --- a/config/log.php +++ b/config/log.php @@ -30,7 +30,7 @@ // 最大日志文件数量 'max_files' => 30, // 使用JSON格式记录 - 'json' => false, + 'json' => true, // 日志处理 'processor' => null, // 关闭通道日志写入 From 3462bf21c1b63399c4d5a20d0704e1449423ebc1 Mon Sep 17 00:00:00 2001 From: zhongshaofa <2286732552@qq.com> Date: Sat, 4 Sep 2021 17:52:04 +0800 Subject: [PATCH 7/7] =?UTF-8?q?[feat]=E5=AE=8C=E5=96=84=E9=93=BE=E8=B7=AF?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BF=A1=E6=81=AF=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/middleware/SystemLog.php | 30 +- composer.json | 3 +- composer.lock | 60 +- config/log.php | 2 +- vendor/composer/InstalledVersions.php | 13 +- vendor/composer/autoload_files.php | 2 +- vendor/composer/autoload_psr4.php | 3 +- vendor/composer/autoload_static.php | 8 +- vendor/composer/installed.json | 56 + vendor/composer/installed.php | 13 +- vendor/services.php | 4 +- .../zhongshaofa/thinkphp-log-trace/.gitignore | 3 + .../thinkphp-log-trace/composer.json | 31 + .../thinkphp-log-trace/composer.lock | 2727 +++++++++++++++++ .../thinkphp-log-trace/src/FileLog.php | 76 + .../thinkphp-log-trace/src/IdCreate.php | 69 + .../thinkphp-log-trace/src/SnowFlake.php | 112 + .../thinkphp-log-trace/src/TraceId.php | 54 + .../thinkphp-log-trace/tests/IdCreateTest.php | 45 + .../thinkphp-log-trace/tests/TraceIdTest.php | 49 + 20 files changed, 3338 insertions(+), 22 deletions(-) create mode 100644 vendor/zhongshaofa/thinkphp-log-trace/.gitignore create mode 100644 vendor/zhongshaofa/thinkphp-log-trace/composer.json create mode 100644 vendor/zhongshaofa/thinkphp-log-trace/composer.lock create mode 100644 vendor/zhongshaofa/thinkphp-log-trace/src/FileLog.php create mode 100644 vendor/zhongshaofa/thinkphp-log-trace/src/IdCreate.php create mode 100644 vendor/zhongshaofa/thinkphp-log-trace/src/SnowFlake.php create mode 100644 vendor/zhongshaofa/thinkphp-log-trace/src/TraceId.php create mode 100644 vendor/zhongshaofa/thinkphp-log-trace/tests/IdCreateTest.php create mode 100644 vendor/zhongshaofa/thinkphp-log-trace/tests/TraceIdTest.php diff --git a/app/admin/middleware/SystemLog.php b/app/admin/middleware/SystemLog.php index 4f602653..512a80e4 100644 --- a/app/admin/middleware/SystemLog.php +++ b/app/admin/middleware/SystemLog.php @@ -15,6 +15,7 @@ use app\admin\service\SystemLogService; use app\Request; use EasyAdmin\tool\CommonTool; +use think\facade\Log; /** * 系统操作日志中间件 @@ -31,22 +32,33 @@ class SystemLog protected $sensitiveParams = [ 'password', 'password_again', + 'phone', + 'mobile' ]; public function handle(Request $request, \Closure $next) { + $params = $request->param(); + if (isset($params['s'])) { + unset($params['s']); + } + foreach ($params as $key => $val) { + in_array($key, $this->sensitiveParams) && $params[$key] = "***********"; + } + $method = strtolower($request->method()); + $url = $request->url(); + + trace([ + 'url' => $url, + 'method' => $method, + 'params' => $params, + ], + 'requestDebugInfo' + ); + if ($request->isAjax()) { - $method = strtolower($request->method()); if (in_array($method, ['post', 'put', 'delete'])) { - $url = $request->url(); $ip = CommonTool::getRealIp(); - $params = $request->param(); - if (isset($params['s'])) { - unset($params['s']); - } - foreach ($params as $key => $val) { - in_array($key, $this->sensitiveParams) && $params[$key] = password($val); - } $data = [ 'admin_id' => session('admin.id'), 'url' => $url, diff --git a/composer.json b/composer.json index 815502ef..41417b49 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,8 @@ "alibabacloud/client": "^1.5", "jianyan74/php-excel": "^1.0", "zhongshaofa/easy-admin": "^1.0", - "ext-json": "*" + "ext-json": "*", + "zhongshaofa/thinkphp-log-trace": "^1.0" }, "require-dev": { "symfony/var-dumper": "^4.2", diff --git a/composer.lock b/composer.lock index 71208a31..ce0f717a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ac7670016790669e43f1002ec4f549cc", + "content-hash": "c112aff9c64fc93ce95419b345ed9743", "packages": [ { "name": "adbario/php-dot-notation", @@ -2237,6 +2237,59 @@ "source": "https://github.com/zhongshaofa/easyadmin-sdk/tree/v1.0.1" }, "time": "2021-09-03T16:09:14+00:00" + }, + { + "name": "zhongshaofa/thinkphp-log-trace", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/zhongshaofa/thinkphp-log-trace.git", + "reference": "20388c806bd78f493cb806ad1bce2f5c81c9e969" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zhongshaofa/thinkphp-log-trace/zipball/20388c806bd78f493cb806ad1bce2f5c81c9e969", + "reference": "20388c806bd78f493cb806ad1bce2f5c81c9e969", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "php": ">=7.1.0" + }, + "require-dev": { + "mockery/mockery": "^1.3.0", + "phpunit/phpunit": "^8.5.0", + "topthink/framework": "^6.0.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "LogTrace\\": "src", + "Test\\": "tests" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "zhongshaofa", + "email": "2286732552@qq.com" + } + ], + "description": "thinkphp6链路日志组件", + "support": { + "issues": "https://github.com/zhongshaofa/thinkphp-log-trace/issues", + "source": "https://github.com/zhongshaofa/thinkphp-log-trace/tree/v1.0.1" + }, + "time": "2021-09-04T09:43:49+00:00" } ], "packages-dev": [ @@ -2438,8 +2491,9 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.1.0" + "php": ">=7.1.0", + "ext-json": "*" }, "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.0.0" } diff --git a/config/log.php b/config/log.php index 621146ac..ca45a0d7 100644 --- a/config/log.php +++ b/config/log.php @@ -20,7 +20,7 @@ 'channels' => [ 'file' => [ // 日志记录方式 - 'type' => 'File', + 'type' => \LogTrace\FileLog::class, // 日志保存目录 'path' => '', // 单文件日志写入 diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php index b8f4ee0d..adc7e858 100644 --- a/vendor/composer/InstalledVersions.php +++ b/vendor/composer/InstalledVersions.php @@ -19,7 +19,7 @@ class InstalledVersions 'aliases' => array ( ), - 'reference' => 'ec0308c7886665139b51384cbd6b64a802f851c8', + 'reference' => '41c98e2f9c0c3c32ea7a6644910033079df34751', 'name' => 'topthink/think', ), 'versions' => @@ -326,7 +326,7 @@ class InstalledVersions 'aliases' => array ( ), - 'reference' => 'ec0308c7886665139b51384cbd6b64a802f851c8', + 'reference' => '41c98e2f9c0c3c32ea7a6644910033079df34751', ), 'topthink/think-captcha' => array ( @@ -391,6 +391,15 @@ class InstalledVersions ), 'reference' => 'e09be94938283d7c0210a3c04c38287757942a56', ), + 'zhongshaofa/thinkphp-log-trace' => + array ( + 'pretty_version' => 'v1.0.1', + 'version' => '1.0.1.0', + 'aliases' => + array ( + ), + 'reference' => '20388c806bd78f493cb806ad1bce2f5c81c9e969', + ), ), ); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index d26298c0..60c58be6 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -9,8 +9,8 @@ '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', - '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', '9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php', + '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', 'abede361264e2ae69ec1eee813a101af' => $vendorDir . '/markbaker/complex/classes/src/functions/abs.php', '21a5860fbef5be28db5ddfbc3cca67c4' => $vendorDir . '/markbaker/complex/classes/src/functions/acos.php', diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index fc64d6e8..e458f009 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -13,7 +13,7 @@ 'jianyan\\excel\\' => array($vendorDir . '/jianyan74/php-excel/src'), 'clagiordano\\weblibs\\configmanager\\' => array($vendorDir . '/clagiordano/weblibs-configmanager/src'), 'app\\' => array($baseDir . '/app'), - 'Test\\' => array($vendorDir . '/zhongshaofa/easy-admin/tests'), + 'Test\\' => array($vendorDir . '/zhongshaofa/easy-admin/tests', $vendorDir . '/zhongshaofa/thinkphp-log-trace/tests'), 'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'), 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), 'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'), @@ -28,6 +28,7 @@ 'OSS\\' => array($vendorDir . '/aliyuncs/oss-sdk-php/src/OSS'), 'MockApp\\' => array($vendorDir . '/zhongshaofa/easy-admin/mock_app'), 'Matrix\\' => array($vendorDir . '/markbaker/matrix/classes/src'), + 'LogTrace\\' => array($vendorDir . '/zhongshaofa/thinkphp-log-trace/src'), 'League\\Flysystem\\Cached\\' => array($vendorDir . '/league/flysystem-cached-adapter/src'), 'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'), 'JmesPath\\' => array($vendorDir . '/mtdowling/jmespath.php/src'), diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 35f71ce5..7b96af2c 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -10,8 +10,8 @@ class ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093 '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', - '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', '9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php', + '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', 'abede361264e2ae69ec1eee813a101af' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/abs.php', '21a5860fbef5be28db5ddfbc3cca67c4' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acos.php', @@ -136,6 +136,7 @@ class ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093 ), 'L' => array ( + 'LogTrace\\' => 9, 'League\\Flysystem\\Cached\\' => 24, 'League\\Flysystem\\' => 17, ), @@ -206,6 +207,7 @@ class ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093 'Test\\' => array ( 0 => __DIR__ . '/..' . '/zhongshaofa/easy-admin/tests', + 1 => __DIR__ . '/..' . '/zhongshaofa/thinkphp-log-trace/tests', ), 'Symfony\\Polyfill\\Php72\\' => array ( @@ -263,6 +265,10 @@ class ComposerStaticInit6bad1cb7ba829cb65a670b5323a9e093 array ( 0 => __DIR__ . '/..' . '/markbaker/matrix/classes/src', ), + 'LogTrace\\' => + array ( + 0 => __DIR__ . '/..' . '/zhongshaofa/thinkphp-log-trace/src', + ), 'League\\Flysystem\\Cached\\' => array ( 0 => __DIR__ . '/..' . '/league/flysystem-cached-adapter/src', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index bcba67f2..ea094f3a 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -2537,6 +2537,62 @@ "source": "https://github.com/zhongshaofa/easyadmin-sdk/tree/v1.0.1" }, "install-path": "../zhongshaofa/easy-admin" + }, + { + "name": "zhongshaofa/thinkphp-log-trace", + "version": "v1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/zhongshaofa/thinkphp-log-trace.git", + "reference": "20388c806bd78f493cb806ad1bce2f5c81c9e969" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zhongshaofa/thinkphp-log-trace/zipball/20388c806bd78f493cb806ad1bce2f5c81c9e969", + "reference": "20388c806bd78f493cb806ad1bce2f5c81c9e969", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "php": ">=7.1.0" + }, + "require-dev": { + "mockery/mockery": "^1.3.0", + "phpunit/phpunit": "^8.5.0", + "topthink/framework": "^6.0.0" + }, + "time": "2021-09-04T09:43:49+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "LogTrace\\": "src", + "Test\\": "tests" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "zhongshaofa", + "email": "2286732552@qq.com" + } + ], + "description": "thinkphp6链路日志组件", + "support": { + "issues": "https://github.com/zhongshaofa/thinkphp-log-trace/issues", + "source": "https://github.com/zhongshaofa/thinkphp-log-trace/tree/v1.0.1" + }, + "install-path": "../zhongshaofa/thinkphp-log-trace" } ], "dev": true diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 08fdc9b4..da878e37 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -6,7 +6,7 @@ 'aliases' => array ( ), - 'reference' => 'ec0308c7886665139b51384cbd6b64a802f851c8', + 'reference' => '41c98e2f9c0c3c32ea7a6644910033079df34751', 'name' => 'topthink/think', ), 'versions' => @@ -313,7 +313,7 @@ 'aliases' => array ( ), - 'reference' => 'ec0308c7886665139b51384cbd6b64a802f851c8', + 'reference' => '41c98e2f9c0c3c32ea7a6644910033079df34751', ), 'topthink/think-captcha' => array ( @@ -378,5 +378,14 @@ ), 'reference' => 'e09be94938283d7c0210a3c04c38287757942a56', ), + 'zhongshaofa/thinkphp-log-trace' => + array ( + 'pretty_version' => 'v1.0.1', + 'version' => '1.0.1.0', + 'aliases' => + array ( + ), + 'reference' => '20388c806bd78f493cb806ad1bce2f5c81c9e969', + ), ), ); diff --git a/vendor/services.php b/vendor/services.php index 2937edf5..cf102c40 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,7 @@ 'think\\captcha\\CaptchaService', + 1 => 'think\\app\\Service', ); \ No newline at end of file diff --git a/vendor/zhongshaofa/thinkphp-log-trace/.gitignore b/vendor/zhongshaofa/thinkphp-log-trace/.gitignore new file mode 100644 index 00000000..fae68b08 --- /dev/null +++ b/vendor/zhongshaofa/thinkphp-log-trace/.gitignore @@ -0,0 +1,3 @@ +.history/ +vendor/ +.idea \ No newline at end of file diff --git a/vendor/zhongshaofa/thinkphp-log-trace/composer.json b/vendor/zhongshaofa/thinkphp-log-trace/composer.json new file mode 100644 index 00000000..f72610ef --- /dev/null +++ b/vendor/zhongshaofa/thinkphp-log-trace/composer.json @@ -0,0 +1,31 @@ +{ + "name": "zhongshaofa/thinkphp-log-trace", + "description": "thinkphp6链路日志组件", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "zhongshaofa", + "email": "2286732552@qq.com" + } + ], + "minimum-stability": "stable", + "require": { + "php": ">=7.1.0", + "ext-json": "*" + }, + "require-dev": { + "topthink/framework": "^6.0.0", + "mockery/mockery": "^1.3.0", + "phpunit/phpunit": "^8.5.0" + }, + "autoload": { + "psr-4": { + "LogTrace\\": "src", + "Test\\": "tests" + } + }, + "scripts": { + "test": "phpunit --testdox" + } +} diff --git a/vendor/zhongshaofa/thinkphp-log-trace/composer.lock b/vendor/zhongshaofa/thinkphp-log-trace/composer.lock new file mode 100644 index 00000000..da1fc85c --- /dev/null +++ b/vendor/zhongshaofa/thinkphp-log-trace/composer.lock @@ -0,0 +1,2727 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "106d9c123bd66e684f2a6e7e65fc1408", + "packages": [], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-11-10T18:47:58+00:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.3|^7.0|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + }, + "time": "2020-07-09T08:09:16+00:00" + }, + { + "name": "league/flysystem", + "version": "1.1.5", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "18634df356bfd4119fe3d6156bdb990c414c14ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/18634df356bfd4119fe3d6156bdb990c414c14ea", + "reference": "18634df356bfd4119fe3d6156bdb990c414c14ea", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-fileinfo": "*", + "league/mime-type-detection": "^1.3", + "php": "^7.2.5 || ^8.0" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "phpspec/prophecy": "^1.11.1", + "phpunit/phpunit": "^8.5.8" + }, + "suggest": { + "ext-ftp": "Allows you to use FTP server storage", + "ext-openssl": "Allows you to use FTPS server storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "support": { + "issues": "https://github.com/thephpleague/flysystem/issues", + "source": "https://github.com/thephpleague/flysystem/tree/1.1.5" + }, + "funding": [ + { + "url": "https://offset.earth/frankdejonge", + "type": "other" + } + ], + "time": "2021-08-17T13:49:42+00:00" + }, + { + "name": "league/flysystem-cached-adapter", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-cached-adapter.git", + "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/d1925efb2207ac4be3ad0c40b8277175f99ffaff", + "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "league/flysystem": "~1.0", + "psr/cache": "^1.0.0" + }, + "require-dev": { + "mockery/mockery": "~0.9", + "phpspec/phpspec": "^3.4", + "phpunit/phpunit": "^5.7", + "predis/predis": "~1.0", + "tedivm/stash": "~0.12" + }, + "suggest": { + "ext-phpredis": "Pure C implemented extension for PHP" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\Cached\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "frankdejonge", + "email": "info@frenky.net" + } + ], + "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.7.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3", + "reference": "3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.18", + "phpstan/phpstan": "^0.12.68", + "phpunit/phpunit": "^8.5.8 || ^9.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Mime-type detection for Flysystem", + "support": { + "issues": "https://github.com/thephpleague/mime-type-detection/issues", + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.7.0" + }, + "funding": [ + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2021-01-18T20:58:21+00:00" + }, + { + "name": "mockery/mockery", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "d1339f64479af1bee0e82a0413813fe5345a54ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/d1339f64479af1bee0e82a0413813fe5345a54ea", + "reference": "d1339f64479af1bee0e82a0413813fe5345a54ea", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "hamcrest/hamcrest-php": "^2.0.1", + "lib-pcre": ">=7.0", + "php": "^7.3 || ^8.0" + }, + "conflict": { + "phpunit/phpunit": "<8.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5 || ^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "support": { + "issues": "https://github.com/mockery/mockery/issues", + "source": "https://github.com/mockery/mockery/tree/1.4.3" + }, + "time": "2021-02-24T09:51:49+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.10.2", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "bae7c545bef187884426f042434e561ab1ddb182" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" + }, + "time": "2021-02-23T14:00:09+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.2.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-09-03T19:13:55+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, + "time": "2020-09-17T18:55:26+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.13.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.13.0" + }, + "time": "2021-03-17T13:42:18+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "7.0.15", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "819f92bba8b001d4363065928088de22f25a3a48" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48", + "reference": "819f92bba8b001d4363065928088de22f25a3a48", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": ">=7.2", + "phpunit/php-file-iterator": "^2.0.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^3.1.3 || ^4.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^4.2.2", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1.3" + }, + "require-dev": { + "phpunit/phpunit": "^8.2.2" + }, + "suggest": { + "ext-xdebug": "^2.7.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-07-26T12:20:09+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/28af674ff175d0768a5a978e6de83f697d4a7f05", + "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-07-19T06:46:01+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + }, + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "2.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:20:02+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3", + "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.3 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "abandoned": true, + "time": "2020-08-04T08:28:15+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "8.5.20", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "9deefba183198398a09b927a6ac6bc1feb0b7b70" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9deefba183198398a09b927a6ac6bc1feb0b7b70", + "reference": "9deefba183198398a09b927a6ac6bc1feb0b7b70", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.0", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.2", + "phpspec/prophecy": "^1.10.3", + "phpunit/php-code-coverage": "^7.0.12", + "phpunit/php-file-iterator": "^2.0.4", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.2", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.3", + "sebastian/exporter": "^3.1.2", + "sebastian/global-state": "^3.0.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", + "sebastian/version": "^2.0.1" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0.0" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.20" + }, + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-08-31T06:44:38+00:00" + }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/master" + }, + "time": "2016-08-06T20:24:11+00:00" + }, + { + "name": "psr/container", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.1" + }, + "time": "2021-03-05T17:36:06+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/master" + }, + "time": "2017-10-23T01:57:42+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:15:22+00:00" + }, + { + "name": "sebastian/comparator", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:04:30+00:00" + }, + { + "name": "sebastian/diff", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:59:04+00:00" + }, + { + "name": "sebastian/environment", + "version": "4.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:53:42+00:00" + }, + { + "name": "sebastian/exporter", + "version": "3.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e", + "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.0", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:47:53+00:00" + }, + { + "name": "sebastian/global-state", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/474fb9edb7ab891665d3bfc6317f42a0a150454b", + "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^8.0" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:43:24+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "3.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:40:27+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:37:18+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:34:24+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "abandoned": true, + "time": "2020-11-30T07:30:19+00:00" + }, + { + "name": "sebastian/type", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:25:11+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/master" + }, + "time": "2016-10-03T07:35:21+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.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": "2021-02-19T12:13:01+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + }, + { + "name": "topthink/framework", + "version": "v6.0.9", + "source": { + "type": "git", + "url": "https://github.com/top-think/framework.git", + "reference": "0b5fb453f0e533de3af3a1ab6a202510b61be617" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/framework/zipball/0b5fb453f0e533de3af3a1ab6a202510b61be617", + "reference": "0b5fb453f0e533de3af3a1ab6a202510b61be617", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "league/flysystem": "^1.1.4", + "league/flysystem-cached-adapter": "^1.0", + "php": ">=7.2.5", + "psr/container": "~1.0", + "psr/log": "~1.0", + "psr/simple-cache": "^1.0", + "topthink/think-helper": "^3.1.1", + "topthink/think-orm": "^2.0" + }, + "require-dev": { + "mikey179/vfsstream": "^1.6", + "mockery/mockery": "^1.2", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "autoload": { + "files": [], + "psr-4": { + "think\\": "src/think/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "liu21st", + "email": "liu21st@gmail.com" + }, + { + "name": "yunwuxin", + "email": "448901948@qq.com" + } + ], + "description": "The ThinkPHP Framework.", + "homepage": "http://thinkphp.cn/", + "keywords": [ + "framework", + "orm", + "thinkphp" + ], + "support": { + "issues": "https://github.com/top-think/framework/issues", + "source": "https://github.com/top-think/framework/tree/v6.0.9" + }, + "time": "2021-07-22T03:24:49+00:00" + }, + { + "name": "topthink/think-helper", + "version": "v3.1.5", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-helper.git", + "reference": "f98e3ad44acd27ae85a4d923b1bdfd16c6d8d905" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/think-helper/zipball/f98e3ad44acd27ae85a4d923b1bdfd16c6d8d905", + "reference": "f98e3ad44acd27ae85a4d923b1bdfd16c6d8d905", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "think\\": "src" + }, + "files": [ + "src/helper.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "yunwuxin", + "email": "448901948@qq.com" + } + ], + "description": "The ThinkPHP6 Helper Package", + "support": { + "issues": "https://github.com/top-think/think-helper/issues", + "source": "https://github.com/top-think/think-helper/tree/v3.1.5" + }, + "time": "2021-06-21T06:17:31+00:00" + }, + { + "name": "topthink/think-orm", + "version": "v2.0.44", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-orm.git", + "reference": "5d3d5c1ebf8bfccf34bacd90edb42989b16ea409" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/think-orm/zipball/5d3d5c1ebf8bfccf34bacd90edb42989b16ea409", + "reference": "5d3d5c1ebf8bfccf34bacd90edb42989b16ea409", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "ext-pdo": "*", + "php": ">=7.1.0", + "psr/log": "~1.0", + "psr/simple-cache": "^1.0", + "topthink/think-helper": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^7|^8|^9.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "think\\": "src" + }, + "files": [ + "stubs/load_stubs.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "liu21st", + "email": "liu21st@gmail.com" + } + ], + "description": "think orm", + "keywords": [ + "database", + "orm" + ], + "support": { + "issues": "https://github.com/top-think/think-orm/issues", + "source": "https://github.com/top-think/think-orm/tree/v2.0.44" + }, + "time": "2021-07-21T02:22:31+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.2 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" + }, + "time": "2021-03-09T10:59:23+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=7.1.0", + "ext-json": "*" + }, + "platform-dev": [], + "plugin-api-version": "2.0.0" +} diff --git a/vendor/zhongshaofa/thinkphp-log-trace/src/FileLog.php b/vendor/zhongshaofa/thinkphp-log-trace/src/FileLog.php new file mode 100644 index 00000000..c56ea927 --- /dev/null +++ b/vendor/zhongshaofa/thinkphp-log-trace/src/FileLog.php @@ -0,0 +1,76 @@ +getMasterLogFile(); + + $path = dirname($destination); + !is_dir($path) && mkdir($path, 0755, true); + + $info = []; + + // 日志信息封装 + $time = \DateTime::createFromFormat('0.u00 U', microtime())->setTimezone(new \DateTimeZone(date_default_timezone_get()))->format($this->config['time_format']); + + foreach ($log as $type => $val) { + $message = []; + foreach ($val as $msg) { + if (!is_string($msg) && !is_array($msg)) { + $msg = var_export($msg, true); + } + + $message[] = $this->config['json'] ? + json_encode(['time' => $time, 'type' => $type, 'msg' => $msg, 'traceId' => TraceId::getTraceId()], $this->config['json_options']) : + sprintf($this->config['format'], $time, $type, $msg); + } + + if (true === $this->config['apart_level'] || in_array($type, $this->config['apart_level'])) { + // 独立记录的日志级别 + $filename = $this->getApartLevelFile($path, $type); + $this->write($message, $filename); + continue; + } + + $info[$type] = $message; + } + + if ($info) { + return $this->write($info, $destination); + } + + return true; + } + + +} \ No newline at end of file diff --git a/vendor/zhongshaofa/thinkphp-log-trace/src/IdCreate.php b/vendor/zhongshaofa/thinkphp-log-trace/src/IdCreate.php new file mode 100644 index 00000000..34114df7 --- /dev/null +++ b/vendor/zhongshaofa/thinkphp-log-trace/src/IdCreate.php @@ -0,0 +1,69 @@ +nextId(); + } + +} \ No newline at end of file diff --git a/vendor/zhongshaofa/thinkphp-log-trace/src/SnowFlake.php b/vendor/zhongshaofa/thinkphp-log-trace/src/SnowFlake.php new file mode 100644 index 00000000..46da6aa4 --- /dev/null +++ b/vendor/zhongshaofa/thinkphp-log-trace/src/SnowFlake.php @@ -0,0 +1,112 @@ + $this->maxWorkerId || $workerId < 0) { + throw new Exception("worker Id can't be greater than {$this->maxWorkerId} or less than 0"); + } + + if ($datacenterId > $this->maxDatacenterId || $datacenterId < 0) { + throw new Exception("datacenter Id can't be greater than {$this->maxDatacenterId} or less than 0"); + } + + $this->workerId = $workerId; + $this->datacenterId = $datacenterId; + $this->sequence = $sequence; + } + + public function nextId() + { + $timestamp = $this->timeGen(); + + if ($timestamp < $this->lastTimestamp) { + $diffTimestamp = bcsub($this->lastTimestamp, $timestamp); + throw new Exception("Clock moved backwards. Refusing to generate id for {$diffTimestamp} milliseconds"); + } + + if ($this->lastTimestamp == $timestamp) { + $this->sequence = ($this->sequence + 1) & $this->sequenceMask; + + if (0 == $this->sequence) { + $timestamp = $this->tilNextMillis($this->lastTimestamp); + } + } else { + $this->sequence = 0; + } + + $this->lastTimestamp = $timestamp; + + /*$gmpTimestamp = gmp_init($this->leftShift(bcsub($timestamp, self::TWEPOCH), $this->timestampLeftShift)); + $gmpDatacenterId = gmp_init($this->leftShift($this->datacenterId, $this->datacenterIdShift)); + $gmpWorkerId = gmp_init($this->leftShift($this->workerId, $this->workerIdShift)); + $gmpSequence = gmp_init($this->sequence); + return gmp_strval(gmp_or(gmp_or(gmp_or($gmpTimestamp, $gmpDatacenterId), $gmpWorkerId), $gmpSequence));*/ + + return (($timestamp - self::TWEPOCH) << $this->timestampLeftShift) | + ($this->datacenterId << $this->datacenterIdShift) | + ($this->workerId << $this->workerIdShift) | + $this->sequence; + } + + protected function tilNextMillis($lastTimestamp) + { + $timestamp = $this->timeGen(); + while ($timestamp <= $lastTimestamp) { + $timestamp = $this->timeGen(); + } + + return $timestamp; + } + + protected function timeGen() + { + return floor(microtime(true) * 1000); + } + + // 左移 << + protected function leftShift($a, $b) + { + return bcmul($a, bcpow(2, $b)); + } +} \ No newline at end of file diff --git a/vendor/zhongshaofa/thinkphp-log-trace/src/TraceId.php b/vendor/zhongshaofa/thinkphp-log-trace/src/TraceId.php new file mode 100644 index 00000000..29dc801b --- /dev/null +++ b/vendor/zhongshaofa/thinkphp-log-trace/src/TraceId.php @@ -0,0 +1,54 @@ +assertIsInt($id); + } + + public function testCreateBatch() + { + $array = []; + $i = 0; + while ($i < 1000) { + $array[] = IdCreate::createOnlyId(); + $i++; + } + $this->assertNotEmpty($array); + $this->assertEquals(count($array), 1000); + $uniqueArray = array_unique($array); + $this->assertEquals(count($uniqueArray), 1000); + } + + +} \ No newline at end of file diff --git a/vendor/zhongshaofa/thinkphp-log-trace/tests/TraceIdTest.php b/vendor/zhongshaofa/thinkphp-log-trace/tests/TraceIdTest.php new file mode 100644 index 00000000..06bcdadf --- /dev/null +++ b/vendor/zhongshaofa/thinkphp-log-trace/tests/TraceIdTest.php @@ -0,0 +1,49 @@ +assertEquals($traceId1, $traceId2); + } + + public function testTraceIdReset() + { + $traceId1 = TraceId::getTraceId(); + TraceId::reset(); + $traceId2 = TraceId::getTraceId(); + $this->assertNotEquals($traceId1, $traceId2); + } + + public function testTraceIdSet() + { + $definitionID = md5(time()); + TraceId::setTraceId($definitionID); + $traceId = TraceId::getTraceId(); + $this->assertEquals($traceId, $definitionID); + } + +} \ No newline at end of file
empty
- -