From 4af129acf85fc56818e803fa55c6a4da12261d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=B3=E6=B8=85=E7=88=BD?= Date: Tue, 25 Mar 2025 18:31:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=20vendor=20=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/view/tpl/dispatch_jump.tpl | 93 + .../adbario/php-dot-notation/src/Dot.php | 28 +- .../adbario/php-dot-notation/src/helpers.php | 9 +- .../alibabacloud/credentials/CHANGELOG.md | 4 - .../alibabacloud/credentials/README-zh-CN.md | 367 +- .../vendor/alibabacloud/credentials/README.md | 361 +- .../alibabacloud/credentials/composer.json | 7 +- .../credentials/src/AccessKeyCredential.php | 16 +- .../credentials/src/BearerTokenCredential.php | 22 +- .../credentials/src/Credential.php | 292 +- .../credentials/src/Credential/Config.php | 266 +- .../src/Credential/CredentialModel.php | 143 - .../src/Credential/RefreshResult.php | 99 - .../credentials/src/Credentials.php | 4 +- .../credentials/src/CredentialsInterface.php | 9 - .../src/CredentialsProviderWrap.php | 76 - .../credentials/src/EcsRamRoleCredential.php | 64 +- .../alibabacloud/credentials/src/Filter.php | 134 + .../credentials/src/{Utils => }/Helper.php | 53 +- .../credentials/src/{Utils => }/MockTrait.php | 26 +- .../CLIProfileCredentialsProvider.php | 187 - .../src/Providers/ChainProvider.php | 5 +- .../credentials/src/Providers/Credentials.php | 87 - .../src/Providers/CredentialsProvider.php | 24 - .../Providers/DefaultCredentialsProvider.php | 175 - .../EcsRamRoleCredentialsProvider.php | 276 - .../src/Providers/EcsRamRoleProvider.php | 94 + ...EnvironmentVariableCredentialsProvider.php | 65 - .../OIDCRoleArnCredentialsProvider.php | 264 - .../Providers/ProfileCredentialsProvider.php | 188 - .../credentials/src/Providers/Provider.php | 82 + .../RamRoleArnCredentialsProvider.php | 317 - .../src/Providers/RamRoleArnProvider.php | 49 + .../RsaKeyPairCredentialsProvider.php | 200 - .../src/Providers/RsaKeyPairProvider.php | 53 + .../Providers/SessionCredentialsProvider.php | 161 - .../Providers/StaticAKCredentialsProvider.php | 78 - .../StaticSTSCredentialsProvider.php | 92 - .../src/Providers/URLCredentialsProvider.php | 126 - .../credentials/src/RamRoleArnCredential.php | 36 +- .../credentials/src/Request/AssumeRole.php | 37 + .../src/Request/GenerateSessionAccessKey.php | 33 + .../credentials/src/Request/Request.php | 118 +- .../credentials/src/RsaKeyPairCredential.php | 35 +- .../credentials/src/StsCredential.php | 23 +- .../credentials/src/Utils/Filter.php | 233 - .../darabonba-openapi/composer.json | 4 +- .../darabonba-openapi/phpunit.xml | 31 - .../darabonba-openapi/src/Models/Config.php | 133 +- .../src/Models/GlobalParameters.php | 8 +- .../src/Models/OpenApiRequest.php | 8 +- .../darabonba-openapi/src/Models/Params.php | 8 +- .../darabonba-openapi/src/OpenApiClient.php | 1051 ++- .../tests/OpenApiClientTest.php | 328 - .../darabonba-openapi/tests/bootstrap.php | 3 - .../alibabacloud/openapi-util/composer.json | 2 +- .../alibabacloud/openapi-util/phpunit.xml | 2 +- .../openapi-util/src/OpenApiUtilClient.php | 20 +- .../tests/OpenApiUtilClientTest.php | 78 +- .../vendor/alibabacloud/tea-utils/phpunit.xml | 29 +- .../alibabacloud/tea-utils/src/Utils.php | 23 +- .../tea-utils/src/Utils/ExtendsParameters.php | 38 - .../tea-utils/src/Utils/RuntimeOptions.php | 240 +- .../tea-utils/tests/UtilsTest.php | 82 +- .../vendor/alibabacloud/tea-xml/composer.json | 2 +- .../vendor/alibabacloud/tea-xml/phpunit.xml | 2 +- .../vendor/alibabacloud/tea-xml/src/XML.php | 8 +- .../alibabacloud/tea-xml/tests/XMLTest.php | 4 +- Server/vendor/alibabacloud/tea/composer.json | 2 +- .../tea/src/Exception/TeaError.php | 8 +- Server/vendor/alibabacloud/tea/src/Helper.php | 44 - .../vendor/alibabacloud/tea/src/Request.php | 8 +- Server/vendor/alibabacloud/tea/src/Tea.php | 3 - .../vendor/aliyuncs/oss-sdk-php/CHANGELOG.md | 4 - .../oss-sdk-php/src/OSS/OssClient.php | 31 +- .../oss-sdk-php/tests/OSS/Tests/Common.php | 5 - .../OSS/Tests/OssClientForcePathStyleTest.php | 94 +- .../tests/OSS/Tests/OssClientPresignTest.php | 70 - .../OSS/Tests/OssClientPresignV4Test.php | 43 - Server/vendor/autoload.php | 18 - Server/vendor/composer/ClassLoader.php | 139 +- Server/vendor/composer/InstalledVersions.php | 33 +- Server/vendor/composer/autoload_classmap.php | 4 +- Server/vendor/composer/autoload_files.php | 10 +- .../vendor/composer/autoload_namespaces.php | 2 +- Server/vendor/composer/autoload_psr4.php | 11 +- Server/vendor/composer/autoload_real.php | 58 +- Server/vendor/composer/autoload_static.php | 45 +- Server/vendor/composer/installed.json | 1024 ++- Server/vendor/composer/installed.php | 238 +- Server/vendor/composer/platform_check.php | 26 + Server/vendor/guzzlehttp/guzzle/.php_cs | 23 + Server/vendor/guzzlehttp/guzzle/CHANGELOG.md | 352 +- Server/vendor/guzzlehttp/guzzle/Dockerfile | 18 + Server/vendor/guzzlehttp/guzzle/README.md | 59 +- Server/vendor/guzzlehttp/guzzle/UPGRADING.md | 68 +- Server/vendor/guzzlehttp/guzzle/composer.json | 65 +- .../guzzlehttp/guzzle/src/BodySummarizer.php | 28 - .../guzzle/src/BodySummarizerInterface.php | 13 - .../vendor/guzzlehttp/guzzle/src/Client.php | 268 +- .../guzzlehttp/guzzle/src/ClientInterface.php | 23 +- .../guzzlehttp/guzzle/src/ClientTrait.php | 241 - .../guzzle/src/Cookie/CookieJar.php | 160 +- .../guzzle/src/Cookie/CookieJarInterface.php | 24 +- .../guzzle/src/Cookie/FileCookieJar.php | 46 +- .../guzzle/src/Cookie/SessionCookieJar.php | 37 +- .../guzzle/src/Cookie/SetCookie.php | 300 +- .../src/Exception/BadResponseException.php | 30 +- .../guzzle/src/Exception/ClientException.php | 1 - .../guzzle/src/Exception/ConnectException.php | 39 +- .../guzzle/src/Exception/GuzzleException.php | 22 +- .../guzzle/src/Exception/RequestException.php | 124 +- .../guzzle/src/Exception/SeekException.php | 27 + .../guzzle/src/Exception/ServerException.php | 1 - .../Exception/TooManyRedirectsException.php | 1 - .../src/Exception/TransferException.php | 1 - .../guzzle/src/Handler/CurlFactory.php | 577 +- .../src/Handler/CurlFactoryInterface.php | 8 +- .../guzzle/src/Handler/CurlHandler.php | 26 +- .../guzzle/src/Handler/CurlMultiHandler.php | 167 +- .../guzzle/src/Handler/EasyHandle.php | 80 +- .../guzzle/src/Handler/HeaderProcessor.php | 42 - .../guzzle/src/Handler/MockHandler.php | 143 +- .../guzzlehttp/guzzle/src/Handler/Proxy.php | 40 +- .../guzzle/src/Handler/StreamHandler.php | 466 +- .../guzzlehttp/guzzle/src/HandlerStack.php | 150 +- .../guzzle/src/MessageFormatter.php | 96 +- .../guzzle/src/MessageFormatterInterface.php | 18 - .../guzzlehttp/guzzle/src/Middleware.php | 136 +- Server/vendor/guzzlehttp/guzzle/src/Pool.php | 63 +- .../guzzle/src/PrepareBodyMiddleware.php | 38 +- .../guzzle/src/RedirectMiddleware.php | 128 +- .../guzzlehttp/guzzle/src/RequestOptions.php | 81 +- .../guzzlehttp/guzzle/src/RetryMiddleware.php | 89 +- .../guzzlehttp/guzzle/src/TransferStats.php | 55 +- .../guzzlehttp/guzzle/src/UriTemplate.php | 237 + Server/vendor/guzzlehttp/guzzle/src/Utils.php | 362 +- .../guzzlehttp/guzzle/src/functions.php | 275 +- .../guzzle/src/functions_include.php | 4 +- .../vendor/guzzlehttp/promises/CHANGELOG.md | 58 +- Server/vendor/guzzlehttp/promises/Makefile | 13 + Server/vendor/guzzlehttp/promises/README.md | 74 +- .../vendor/guzzlehttp/promises/composer.json | 20 +- .../promises/src/AggregateException.php | 4 +- .../promises/src/CancellationException.php | 2 - .../guzzlehttp/promises/src/Coroutine.php | 43 +- .../vendor/guzzlehttp/promises/src/Create.php | 21 +- .../vendor/guzzlehttp/promises/src/Each.php | 43 +- .../guzzlehttp/promises/src/EachPromise.php | 59 +- .../promises/src/FulfilledPromise.php | 33 +- Server/vendor/guzzlehttp/promises/src/Is.php | 18 +- .../guzzlehttp/promises/src/Promise.php | 59 +- .../promises/src/PromiseInterface.php | 38 +- .../promises/src/PromisorInterface.php | 6 +- .../promises/src/RejectedPromise.php | 34 +- .../promises/src/RejectionException.php | 15 +- .../guzzlehttp/promises/src/TaskQueue.php | 16 +- .../promises/src/TaskQueueInterface.php | 10 +- .../vendor/guzzlehttp/promises/src/Utils.php | 69 +- .../guzzlehttp/promises/src/functions.php | 363 ++ .../promises/src/functions_include.php | 6 + .../guzzlehttp/psr7/.github/FUNDING.yml | 2 + .../vendor/guzzlehttp/psr7/.github/stale.yml | 14 + .../guzzlehttp/psr7/.github/workflows/ci.yml | 34 + .../psr7/.github/workflows/integration.yml | 37 + .../psr7/.github/workflows/static.yml | 29 + Server/vendor/guzzlehttp/psr7/.php_cs.dist | 56 + Server/vendor/guzzlehttp/psr7/CHANGELOG.md | 165 +- Server/vendor/guzzlehttp/psr7/README.md | 97 +- Server/vendor/guzzlehttp/psr7/composer.json | 49 +- .../guzzlehttp/psr7/src/AppendStream.php | 74 +- .../guzzlehttp/psr7/src/BufferStream.php | 47 +- .../guzzlehttp/psr7/src/CachingStream.php | 38 +- .../guzzlehttp/psr7/src/DroppingStream.php | 14 +- .../src/Exception/MalformedUriException.php | 14 - .../vendor/guzzlehttp/psr7/src/FnStream.php | 111 +- Server/vendor/guzzlehttp/psr7/src/Header.php | 113 +- .../guzzlehttp/psr7/src/HttpFactory.php | 94 - .../guzzlehttp/psr7/src/InflateStream.php | 51 +- .../guzzlehttp/psr7/src/LazyOpenStream.php | 23 +- .../guzzlehttp/psr7/src/LimitStream.php | 36 +- Server/vendor/guzzlehttp/psr7/src/Message.php | 74 +- .../guzzlehttp/psr7/src/MessageTrait.php | 83 +- .../vendor/guzzlehttp/psr7/src/MimeType.php | 1357 +--- .../guzzlehttp/psr7/src/MultipartStream.php | 67 +- .../guzzlehttp/psr7/src/NoSeekStream.php | 13 +- .../vendor/guzzlehttp/psr7/src/PumpStream.php | 79 +- Server/vendor/guzzlehttp/psr7/src/Query.php | 37 +- Server/vendor/guzzlehttp/psr7/src/Request.php | 39 +- .../vendor/guzzlehttp/psr7/src/Response.php | 44 +- Server/vendor/guzzlehttp/psr7/src/Rfc7230.php | 14 +- .../guzzlehttp/psr7/src/ServerRequest.php | 107 +- Server/vendor/guzzlehttp/psr7/src/Stream.php | 97 +- .../psr7/src/StreamDecoratorTrait.php | 64 +- .../guzzlehttp/psr7/src/StreamWrapper.php | 134 +- .../guzzlehttp/psr7/src/UploadedFile.php | 185 +- Server/vendor/guzzlehttp/psr7/src/Uri.php | 341 +- .../guzzlehttp/psr7/src/UriComparator.php | 11 +- .../guzzlehttp/psr7/src/UriNormalizer.php | 55 +- .../guzzlehttp/psr7/src/UriResolver.php | 43 +- Server/vendor/guzzlehttp/psr7/src/Utils.php | 155 +- .../vendor/guzzlehttp/psr7/src/functions.php | 422 ++ .../guzzlehttp/psr7/src/functions_include.php | 6 + Server/vendor/myclabs/php-enum/README.md | 74 +- Server/vendor/myclabs/php-enum/composer.json | 11 +- Server/vendor/myclabs/php-enum/psalm.xml | 20 + Server/vendor/myclabs/php-enum/src/Enum.php | 88 +- .../myclabs/php-enum/stubs/Stringable.php | 11 - Server/vendor/psr/http-client/CHANGELOG.md | 31 - Server/vendor/psr/http-client/README.md | 12 - Server/vendor/psr/http-client/composer.json | 30 - .../src/ClientExceptionInterface.php | 10 - .../psr/http-client/src/ClientInterface.php | 20 - .../src/NetworkExceptionInterface.php | 24 - .../src/RequestExceptionInterface.php | 24 - Server/vendor/psr/http-factory/README.md | 12 - Server/vendor/psr/http-factory/composer.json | 35 - .../src/RequestFactoryInterface.php | 18 - .../src/ResponseFactoryInterface.php | 18 - .../src/ServerRequestFactoryInterface.php | 24 - .../src/StreamFactoryInterface.php | 45 - .../src/UploadedFileFactoryInterface.php | 34 - .../http-factory/src/UriFactoryInterface.php | 17 - Server/vendor/psr/http-message/README.md | 5 +- Server/vendor/psr/http-message/composer.json | 6 +- .../psr/http-message/docs/PSR7-Interfaces.md | 130 - .../psr/http-message/docs/PSR7-Usage.md | 159 - .../psr/http-message/src/MessageInterface.php | 22 +- .../psr/http-message/src/RequestInterface.php | 15 +- .../http-message/src/ResponseInterface.php | 6 +- .../src/ServerRequestInterface.php | 24 +- .../psr/http-message/src/StreamInterface.php | 30 +- .../src/UploadedFileInterface.php | 12 +- .../psr/http-message/src/UriInterface.php | 33 +- Server/vendor/psr/log/LICENSE | 19 - Server/vendor/psr/log/README.md | 58 - Server/vendor/psr/log/composer.json | 26 - Server/vendor/psr/log/src/AbstractLogger.php | 15 - .../psr/log/src/InvalidArgumentException.php | 7 - Server/vendor/psr/log/src/LogLevel.php | 18 - .../psr/log/src/LoggerAwareInterface.php | 14 - .../vendor/psr/log/src/LoggerAwareTrait.php | 22 - Server/vendor/psr/log/src/LoggerInterface.php | 97 - Server/vendor/psr/log/src/LoggerTrait.php | 98 - Server/vendor/psr/log/src/NullLogger.php | 26 - .../deprecation-contracts/CHANGELOG.md | 5 - .../symfony/deprecation-contracts/README.md | 26 - .../deprecation-contracts/function.php | 27 - Server/vendor/symfony/polyfill-ctype/LICENSE | 2 +- .../symfony/polyfill-ctype/composer.json | 5 +- .../vendor/symfony/polyfill-intl-idn/Idn.php | 925 +++ .../vendor/symfony/polyfill-intl-idn/Info.php | 23 + .../polyfill-intl-idn}/LICENSE | 16 +- .../symfony/polyfill-intl-idn/README.md | 12 + .../Resources/unidata/DisallowedRanges.php | 375 ++ .../Resources/unidata/Regex.php | 24 + .../Resources/unidata/deviation.php | 8 + .../Resources/unidata/disallowed.php | 2638 ++++++++ .../unidata/disallowed_STD3_mapped.php | 308 + .../unidata/disallowed_STD3_valid.php | 71 + .../Resources/unidata/ignored.php | 273 + .../Resources/unidata/mapped.php | 5778 +++++++++++++++++ .../Resources/unidata/virama.php | 65 + .../symfony/polyfill-intl-idn/bootstrap.php | 145 + .../symfony/polyfill-intl-idn/bootstrap80.php | 125 + .../symfony/polyfill-intl-idn/composer.json | 44 + .../LICENSE | 2 +- .../polyfill-intl-normalizer/Normalizer.php | 310 + .../polyfill-intl-normalizer/README.md | 14 + .../Resources/stubs/Normalizer.php | 17 + .../unidata/canonicalComposition.php | 945 +++ .../unidata/canonicalDecomposition.php | 2065 ++++++ .../Resources/unidata/combiningClass.php | 876 +++ .../unidata/compatibilityDecomposition.php | 3695 +++++++++++ .../polyfill-intl-normalizer/bootstrap.php | 23 + .../polyfill-intl-normalizer/bootstrap80.php | 19 + .../polyfill-intl-normalizer/composer.json | 39 + .../polyfill-php72}/LICENSE | 12 +- .../vendor/symfony/polyfill-php72/Php72.php | 217 + .../vendor/symfony/polyfill-php72/README.md | 35 + .../symfony/polyfill-php72/bootstrap.php | 57 + .../composer.json | 18 +- .../.github/ISSUE_TEMPLATE/bug_report.md | 21 - .../.github/ISSUE_TEMPLATE/feature_request.md | 14 - .../.github/ISSUE_TEMPLATE/other-issue.md | 10 - .../.github/workflows/acceptance.yml | 113 - Server/vendor/textalk/websocket/.gitignore | 6 - Server/vendor/textalk/websocket/COPYING.md | 16 - Server/vendor/textalk/websocket/Makefile | 32 - Server/vendor/textalk/websocket/README.md | 67 - .../vendor/textalk/websocket/codestandard.xml | 10 - Server/vendor/textalk/websocket/composer.json | 34 - .../textalk/websocket/docs/Changelog.md | 143 - .../vendor/textalk/websocket/docs/Client.md | 137 - .../textalk/websocket/docs/Contributing.md | 44 - .../vendor/textalk/websocket/docs/Examples.md | 98 - .../vendor/textalk/websocket/docs/Message.md | 60 - .../vendor/textalk/websocket/docs/Server.md | 136 - .../textalk/websocket/examples/echoserver.php | 87 - .../websocket/examples/random_client.php | 94 - .../websocket/examples/random_server.php | 93 - .../textalk/websocket/examples/send.php | 51 - .../websocket/lib/BadOpcodeException.php | 7 - .../textalk/websocket/lib/BadUriException.php | 7 - Server/vendor/textalk/websocket/lib/Base.php | 486 -- .../vendor/textalk/websocket/lib/Client.php | 226 - .../websocket/lib/ConnectionException.php | 26 - .../textalk/websocket/lib/Exception.php | 7 - .../textalk/websocket/lib/Message/Binary.php | 8 - .../textalk/websocket/lib/Message/Close.php | 8 - .../textalk/websocket/lib/Message/Factory.php | 25 - .../textalk/websocket/lib/Message/Message.php | 53 - .../textalk/websocket/lib/Message/Ping.php | 8 - .../textalk/websocket/lib/Message/Pong.php | 8 - .../textalk/websocket/lib/Message/Text.php | 8 - .../vendor/textalk/websocket/lib/Server.php | 176 - .../websocket/lib/TimeoutException.php | 7 - .../vendor/textalk/websocket/phpunit.xml.dist | 14 - .../textalk/websocket/tests/ClientTest.php | 458 -- .../textalk/websocket/tests/ExceptionTest.php | 51 - .../textalk/websocket/tests/MessageTest.php | 60 - .../vendor/textalk/websocket/tests/README.md | 29 - .../textalk/websocket/tests/ServerTest.php | 447 -- .../textalk/websocket/tests/bootstrap.php | 6 - .../textalk/websocket/tests/mock/EchoLog.php | 34 - .../websocket/tests/mock/MockSocket.php | 78 - .../websocket/tests/mock/mock-socket.php | 83 - .../websocket/tests/mock/payload.128.txt | 5 - .../websocket/tests/mock/payload.65536.txt | 1682 ----- .../websocket/tests/scripts/client.close.json | 76 - .../tests/scripts/client.connect-authed.json | 58 - .../scripts/client.connect-bad-context.json | 7 - .../tests/scripts/client.connect-context.json | 58 - .../tests/scripts/client.connect-error.json | 23 - .../scripts/client.connect-extended.json | 58 - .../tests/scripts/client.connect-failed.json | 19 - .../client.connect-handshake-error.json | 65 - .../tests/scripts/client.connect-headers.json | 67 - .../scripts/client.connect-invalid-key.json | 49 - .../client.connect-invalid-upgrade.json | 49 - .../scripts/client.connect-persistent.json | 94 - .../tests/scripts/client.connect-timeout.json | 58 - .../tests/scripts/client.connect.json | 58 - .../tests/scripts/client.destruct.json | 23 - .../tests/scripts/client.reconnect.json | 99 - .../websocket/tests/scripts/close-remote.json | 55 - .../tests/scripts/config-timeout.json | 24 - .../websocket/tests/scripts/ping-pong.json | 150 - .../tests/scripts/receive-bad-opcode.json | 18 - .../tests/scripts/receive-broken-read.json | 58 - .../tests/scripts/receive-client-timeout.json | 50 - .../tests/scripts/receive-empty-read.json | 58 - .../tests/scripts/receive-fragmentation.json | 126 - .../tests/scripts/send-bad-opcode.json | 9 - .../tests/scripts/send-broken-write.json | 43 - .../tests/scripts/send-convenicance.json | 86 - .../tests/scripts/send-failed-write.json | 43 - .../tests/scripts/send-receive-128.json | 50 - .../tests/scripts/send-receive-65536.json | 113 - .../scripts/send-receive-multi-fragment.json | 112 - .../websocket/tests/scripts/send-receive.json | 50 - .../tests/scripts/server.accept-destruct.json | 315 - .../scripts/server.accept-error-connect.json | 18 - .../scripts/server.accept-failed-connect.json | 14 - .../scripts/server.accept-failed-http.json | 265 - .../scripts/server.accept-failed-ws-key.json | 265 - .../tests/scripts/server.accept-timeout.json | 289 - .../tests/scripts/server.accept.json | 287 - .../websocket/tests/scripts/server.close.json | 70 - .../server.construct-error-socket-server.json | 28 - ...server.construct-failed-socket-server.json | 20 - .../tests/scripts/server.construct.json | 11 - .../think-helper/.github/workflows/ci.yml | 36 - .../think-helper/.github/workflows/php.yml | 36 - .../vendor/topthink/think-helper/.gitignore | 4 - Server/vendor/topthink/think-helper/LICENSE | 201 - Server/vendor/topthink/think-helper/README.md | 35 - .../topthink/think-helper/composer.json | 36 - .../topthink/think-helper/phpunit.xml.dist | 17 - .../topthink/think-helper/src/Collection.php | 678 -- .../think-helper/src/contract/Arrayable.php | 8 - .../think-helper/src/contract/Jsonable.php | 8 - .../topthink/think-helper/src/helper.php | 317 - .../topthink/think-helper/src/helper/Arr.php | 657 -- .../think-helper/src/helper/Macroable.php | 66 - .../topthink/think-helper/src/helper/Str.php | 234 - .../topthink/think-helper/tests/ArrTest.php | 372 -- .../think-helper/tests/CollectionTest.php | 70 - .../topthink/think-helper/tests/StrTest.php | 59 - .../topthink/think-helper/tests/TestCase.php | 13 - Server/vendor/topthink/think-queue/.gitignore | 4 - Server/vendor/topthink/think-queue/LICENSE | 201 - Server/vendor/topthink/think-queue/README.md | 135 - .../vendor/topthink/think-queue/composer.json | 30 - .../vendor/topthink/think-queue/src/Queue.php | 49 - .../topthink/think-queue/src/common.php | 36 - .../topthink/think-queue/src/config.php | 14 - .../src/queue/CallQueuedHandler.php | 36 - .../think-queue/src/queue/Connector.php | 69 - .../topthink/think-queue/src/queue/Job.php | 213 - .../think-queue/src/queue/Listener.php | 164 - .../think-queue/src/queue/Queueable.php | 46 - .../think-queue/src/queue/ShouldQueue.php | 17 - .../topthink/think-queue/src/queue/Worker.php | 119 - .../think-queue/src/queue/command/Listen.php | 60 - .../think-queue/src/queue/command/Restart.php | 31 - .../src/queue/command/Subscribe.php | 46 - .../think-queue/src/queue/command/Work.php | 210 - .../src/queue/connector/Database.php | 169 - .../think-queue/src/queue/connector/Redis.php | 236 - .../think-queue/src/queue/connector/Sync.php | 57 - .../src/queue/connector/Topthink.php | 223 - .../think-queue/src/queue/job/Database.php | 88 - .../think-queue/src/queue/job/Redis.php | 92 - .../think-queue/src/queue/job/Sync.php | 56 - .../think-queue/src/queue/job/Topthink.php | 85 - 416 files changed, 26268 insertions(+), 28381 deletions(-) create mode 100644 Server/application/common/view/tpl/dispatch_jump.tpl delete mode 100644 Server/vendor/alibabacloud/credentials/src/Credential/CredentialModel.php delete mode 100644 Server/vendor/alibabacloud/credentials/src/Credential/RefreshResult.php delete mode 100644 Server/vendor/alibabacloud/credentials/src/CredentialsProviderWrap.php create mode 100644 Server/vendor/alibabacloud/credentials/src/Filter.php rename Server/vendor/alibabacloud/credentials/src/{Utils => }/Helper.php (76%) rename Server/vendor/alibabacloud/credentials/src/{Utils => }/MockTrait.php (81%) delete mode 100644 Server/vendor/alibabacloud/credentials/src/Providers/CLIProfileCredentialsProvider.php delete mode 100644 Server/vendor/alibabacloud/credentials/src/Providers/Credentials.php delete mode 100644 Server/vendor/alibabacloud/credentials/src/Providers/CredentialsProvider.php delete mode 100644 Server/vendor/alibabacloud/credentials/src/Providers/DefaultCredentialsProvider.php delete mode 100644 Server/vendor/alibabacloud/credentials/src/Providers/EcsRamRoleCredentialsProvider.php create mode 100644 Server/vendor/alibabacloud/credentials/src/Providers/EcsRamRoleProvider.php delete mode 100644 Server/vendor/alibabacloud/credentials/src/Providers/EnvironmentVariableCredentialsProvider.php delete mode 100644 Server/vendor/alibabacloud/credentials/src/Providers/OIDCRoleArnCredentialsProvider.php delete mode 100644 Server/vendor/alibabacloud/credentials/src/Providers/ProfileCredentialsProvider.php create mode 100644 Server/vendor/alibabacloud/credentials/src/Providers/Provider.php delete mode 100644 Server/vendor/alibabacloud/credentials/src/Providers/RamRoleArnCredentialsProvider.php create mode 100644 Server/vendor/alibabacloud/credentials/src/Providers/RamRoleArnProvider.php delete mode 100644 Server/vendor/alibabacloud/credentials/src/Providers/RsaKeyPairCredentialsProvider.php create mode 100644 Server/vendor/alibabacloud/credentials/src/Providers/RsaKeyPairProvider.php delete mode 100644 Server/vendor/alibabacloud/credentials/src/Providers/SessionCredentialsProvider.php delete mode 100644 Server/vendor/alibabacloud/credentials/src/Providers/StaticAKCredentialsProvider.php delete mode 100644 Server/vendor/alibabacloud/credentials/src/Providers/StaticSTSCredentialsProvider.php delete mode 100644 Server/vendor/alibabacloud/credentials/src/Providers/URLCredentialsProvider.php create mode 100644 Server/vendor/alibabacloud/credentials/src/Request/AssumeRole.php create mode 100644 Server/vendor/alibabacloud/credentials/src/Request/GenerateSessionAccessKey.php delete mode 100644 Server/vendor/alibabacloud/credentials/src/Utils/Filter.php delete mode 100644 Server/vendor/alibabacloud/darabonba-openapi/phpunit.xml delete mode 100644 Server/vendor/alibabacloud/darabonba-openapi/tests/OpenApiClientTest.php delete mode 100644 Server/vendor/alibabacloud/darabonba-openapi/tests/bootstrap.php delete mode 100644 Server/vendor/alibabacloud/tea-utils/src/Utils/ExtendsParameters.php delete mode 100644 Server/vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/OssClientPresignTest.php create mode 100644 Server/vendor/composer/platform_check.php create mode 100644 Server/vendor/guzzlehttp/guzzle/.php_cs create mode 100644 Server/vendor/guzzlehttp/guzzle/Dockerfile delete mode 100644 Server/vendor/guzzlehttp/guzzle/src/BodySummarizer.php delete mode 100644 Server/vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php delete mode 100644 Server/vendor/guzzlehttp/guzzle/src/ClientTrait.php create mode 100644 Server/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php delete mode 100644 Server/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php delete mode 100644 Server/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php create mode 100644 Server/vendor/guzzlehttp/guzzle/src/UriTemplate.php create mode 100644 Server/vendor/guzzlehttp/promises/Makefile create mode 100644 Server/vendor/guzzlehttp/promises/src/functions.php create mode 100644 Server/vendor/guzzlehttp/promises/src/functions_include.php create mode 100644 Server/vendor/guzzlehttp/psr7/.github/FUNDING.yml create mode 100644 Server/vendor/guzzlehttp/psr7/.github/stale.yml create mode 100644 Server/vendor/guzzlehttp/psr7/.github/workflows/ci.yml create mode 100644 Server/vendor/guzzlehttp/psr7/.github/workflows/integration.yml create mode 100644 Server/vendor/guzzlehttp/psr7/.github/workflows/static.yml create mode 100644 Server/vendor/guzzlehttp/psr7/.php_cs.dist delete mode 100644 Server/vendor/guzzlehttp/psr7/src/Exception/MalformedUriException.php delete mode 100644 Server/vendor/guzzlehttp/psr7/src/HttpFactory.php create mode 100644 Server/vendor/guzzlehttp/psr7/src/functions.php create mode 100644 Server/vendor/guzzlehttp/psr7/src/functions_include.php create mode 100644 Server/vendor/myclabs/php-enum/psalm.xml delete mode 100644 Server/vendor/myclabs/php-enum/stubs/Stringable.php delete mode 100644 Server/vendor/psr/http-client/CHANGELOG.md delete mode 100644 Server/vendor/psr/http-client/README.md delete mode 100644 Server/vendor/psr/http-client/composer.json delete mode 100644 Server/vendor/psr/http-client/src/ClientExceptionInterface.php delete mode 100644 Server/vendor/psr/http-client/src/ClientInterface.php delete mode 100644 Server/vendor/psr/http-client/src/NetworkExceptionInterface.php delete mode 100644 Server/vendor/psr/http-client/src/RequestExceptionInterface.php delete mode 100644 Server/vendor/psr/http-factory/README.md delete mode 100644 Server/vendor/psr/http-factory/composer.json delete mode 100644 Server/vendor/psr/http-factory/src/RequestFactoryInterface.php delete mode 100644 Server/vendor/psr/http-factory/src/ResponseFactoryInterface.php delete mode 100644 Server/vendor/psr/http-factory/src/ServerRequestFactoryInterface.php delete mode 100644 Server/vendor/psr/http-factory/src/StreamFactoryInterface.php delete mode 100644 Server/vendor/psr/http-factory/src/UploadedFileFactoryInterface.php delete mode 100644 Server/vendor/psr/http-factory/src/UriFactoryInterface.php delete mode 100644 Server/vendor/psr/http-message/docs/PSR7-Interfaces.md delete mode 100644 Server/vendor/psr/http-message/docs/PSR7-Usage.md delete mode 100644 Server/vendor/psr/log/LICENSE delete mode 100644 Server/vendor/psr/log/README.md delete mode 100644 Server/vendor/psr/log/composer.json delete mode 100644 Server/vendor/psr/log/src/AbstractLogger.php delete mode 100644 Server/vendor/psr/log/src/InvalidArgumentException.php delete mode 100644 Server/vendor/psr/log/src/LogLevel.php delete mode 100644 Server/vendor/psr/log/src/LoggerAwareInterface.php delete mode 100644 Server/vendor/psr/log/src/LoggerAwareTrait.php delete mode 100644 Server/vendor/psr/log/src/LoggerInterface.php delete mode 100644 Server/vendor/psr/log/src/LoggerTrait.php delete mode 100644 Server/vendor/psr/log/src/NullLogger.php delete mode 100644 Server/vendor/symfony/deprecation-contracts/CHANGELOG.md delete mode 100644 Server/vendor/symfony/deprecation-contracts/README.md delete mode 100644 Server/vendor/symfony/deprecation-contracts/function.php create mode 100644 Server/vendor/symfony/polyfill-intl-idn/Idn.php create mode 100644 Server/vendor/symfony/polyfill-intl-idn/Info.php rename Server/vendor/{psr/http-client => symfony/polyfill-intl-idn}/LICENSE (77%) create mode 100644 Server/vendor/symfony/polyfill-intl-idn/README.md create mode 100644 Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php create mode 100644 Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php create mode 100644 Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/deviation.php create mode 100644 Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php create mode 100644 Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php create mode 100644 Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php create mode 100644 Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/ignored.php create mode 100644 Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/mapped.php create mode 100644 Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/virama.php create mode 100644 Server/vendor/symfony/polyfill-intl-idn/bootstrap.php create mode 100644 Server/vendor/symfony/polyfill-intl-idn/bootstrap80.php create mode 100644 Server/vendor/symfony/polyfill-intl-idn/composer.json rename Server/vendor/symfony/{deprecation-contracts => polyfill-intl-normalizer}/LICENSE (95%) create mode 100644 Server/vendor/symfony/polyfill-intl-normalizer/Normalizer.php create mode 100644 Server/vendor/symfony/polyfill-intl-normalizer/README.md create mode 100644 Server/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php create mode 100644 Server/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalComposition.php create mode 100644 Server/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php create mode 100644 Server/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php create mode 100644 Server/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php create mode 100644 Server/vendor/symfony/polyfill-intl-normalizer/bootstrap.php create mode 100644 Server/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php create mode 100644 Server/vendor/symfony/polyfill-intl-normalizer/composer.json rename Server/vendor/{psr/http-factory => symfony/polyfill-php72}/LICENSE (87%) create mode 100644 Server/vendor/symfony/polyfill-php72/Php72.php create mode 100644 Server/vendor/symfony/polyfill-php72/README.md create mode 100644 Server/vendor/symfony/polyfill-php72/bootstrap.php rename Server/vendor/symfony/{deprecation-contracts => polyfill-php72}/composer.json (52%) delete mode 100644 Server/vendor/textalk/websocket/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 Server/vendor/textalk/websocket/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 Server/vendor/textalk/websocket/.github/ISSUE_TEMPLATE/other-issue.md delete mode 100644 Server/vendor/textalk/websocket/.github/workflows/acceptance.yml delete mode 100644 Server/vendor/textalk/websocket/.gitignore delete mode 100644 Server/vendor/textalk/websocket/COPYING.md delete mode 100644 Server/vendor/textalk/websocket/Makefile delete mode 100644 Server/vendor/textalk/websocket/README.md delete mode 100644 Server/vendor/textalk/websocket/codestandard.xml delete mode 100644 Server/vendor/textalk/websocket/composer.json delete mode 100644 Server/vendor/textalk/websocket/docs/Changelog.md delete mode 100644 Server/vendor/textalk/websocket/docs/Client.md delete mode 100644 Server/vendor/textalk/websocket/docs/Contributing.md delete mode 100644 Server/vendor/textalk/websocket/docs/Examples.md delete mode 100644 Server/vendor/textalk/websocket/docs/Message.md delete mode 100644 Server/vendor/textalk/websocket/docs/Server.md delete mode 100644 Server/vendor/textalk/websocket/examples/echoserver.php delete mode 100644 Server/vendor/textalk/websocket/examples/random_client.php delete mode 100644 Server/vendor/textalk/websocket/examples/random_server.php delete mode 100644 Server/vendor/textalk/websocket/examples/send.php delete mode 100644 Server/vendor/textalk/websocket/lib/BadOpcodeException.php delete mode 100644 Server/vendor/textalk/websocket/lib/BadUriException.php delete mode 100644 Server/vendor/textalk/websocket/lib/Base.php delete mode 100644 Server/vendor/textalk/websocket/lib/Client.php delete mode 100644 Server/vendor/textalk/websocket/lib/ConnectionException.php delete mode 100644 Server/vendor/textalk/websocket/lib/Exception.php delete mode 100644 Server/vendor/textalk/websocket/lib/Message/Binary.php delete mode 100644 Server/vendor/textalk/websocket/lib/Message/Close.php delete mode 100644 Server/vendor/textalk/websocket/lib/Message/Factory.php delete mode 100644 Server/vendor/textalk/websocket/lib/Message/Message.php delete mode 100644 Server/vendor/textalk/websocket/lib/Message/Ping.php delete mode 100644 Server/vendor/textalk/websocket/lib/Message/Pong.php delete mode 100644 Server/vendor/textalk/websocket/lib/Message/Text.php delete mode 100644 Server/vendor/textalk/websocket/lib/Server.php delete mode 100644 Server/vendor/textalk/websocket/lib/TimeoutException.php delete mode 100644 Server/vendor/textalk/websocket/phpunit.xml.dist delete mode 100644 Server/vendor/textalk/websocket/tests/ClientTest.php delete mode 100644 Server/vendor/textalk/websocket/tests/ExceptionTest.php delete mode 100644 Server/vendor/textalk/websocket/tests/MessageTest.php delete mode 100644 Server/vendor/textalk/websocket/tests/README.md delete mode 100644 Server/vendor/textalk/websocket/tests/ServerTest.php delete mode 100644 Server/vendor/textalk/websocket/tests/bootstrap.php delete mode 100644 Server/vendor/textalk/websocket/tests/mock/EchoLog.php delete mode 100644 Server/vendor/textalk/websocket/tests/mock/MockSocket.php delete mode 100644 Server/vendor/textalk/websocket/tests/mock/mock-socket.php delete mode 100644 Server/vendor/textalk/websocket/tests/mock/payload.128.txt delete mode 100644 Server/vendor/textalk/websocket/tests/mock/payload.65536.txt delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/client.close.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/client.connect-authed.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/client.connect-bad-context.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/client.connect-context.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/client.connect-error.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/client.connect-extended.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/client.connect-failed.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/client.connect-handshake-error.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/client.connect-headers.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/client.connect-invalid-key.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/client.connect-invalid-upgrade.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/client.connect-persistent.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/client.connect-timeout.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/client.connect.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/client.destruct.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/client.reconnect.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/close-remote.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/config-timeout.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/ping-pong.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/receive-bad-opcode.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/receive-broken-read.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/receive-client-timeout.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/receive-empty-read.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/receive-fragmentation.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/send-bad-opcode.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/send-broken-write.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/send-convenicance.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/send-failed-write.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/send-receive-128.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/send-receive-65536.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/send-receive-multi-fragment.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/send-receive.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/server.accept-destruct.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/server.accept-error-connect.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/server.accept-failed-connect.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/server.accept-failed-http.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/server.accept-failed-ws-key.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/server.accept-timeout.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/server.accept.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/server.close.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/server.construct-error-socket-server.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/server.construct-failed-socket-server.json delete mode 100644 Server/vendor/textalk/websocket/tests/scripts/server.construct.json delete mode 100644 Server/vendor/topthink/think-helper/.github/workflows/ci.yml delete mode 100644 Server/vendor/topthink/think-helper/.github/workflows/php.yml delete mode 100644 Server/vendor/topthink/think-helper/.gitignore delete mode 100644 Server/vendor/topthink/think-helper/LICENSE delete mode 100644 Server/vendor/topthink/think-helper/README.md delete mode 100644 Server/vendor/topthink/think-helper/composer.json delete mode 100644 Server/vendor/topthink/think-helper/phpunit.xml.dist delete mode 100644 Server/vendor/topthink/think-helper/src/Collection.php delete mode 100644 Server/vendor/topthink/think-helper/src/contract/Arrayable.php delete mode 100644 Server/vendor/topthink/think-helper/src/contract/Jsonable.php delete mode 100644 Server/vendor/topthink/think-helper/src/helper.php delete mode 100644 Server/vendor/topthink/think-helper/src/helper/Arr.php delete mode 100644 Server/vendor/topthink/think-helper/src/helper/Macroable.php delete mode 100644 Server/vendor/topthink/think-helper/src/helper/Str.php delete mode 100644 Server/vendor/topthink/think-helper/tests/ArrTest.php delete mode 100644 Server/vendor/topthink/think-helper/tests/CollectionTest.php delete mode 100644 Server/vendor/topthink/think-helper/tests/StrTest.php delete mode 100644 Server/vendor/topthink/think-helper/tests/TestCase.php delete mode 100644 Server/vendor/topthink/think-queue/.gitignore delete mode 100644 Server/vendor/topthink/think-queue/LICENSE delete mode 100644 Server/vendor/topthink/think-queue/README.md delete mode 100644 Server/vendor/topthink/think-queue/composer.json delete mode 100644 Server/vendor/topthink/think-queue/src/Queue.php delete mode 100644 Server/vendor/topthink/think-queue/src/common.php delete mode 100644 Server/vendor/topthink/think-queue/src/config.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/CallQueuedHandler.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/Connector.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/Job.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/Listener.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/Queueable.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/ShouldQueue.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/Worker.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/command/Listen.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/command/Restart.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/command/Subscribe.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/command/Work.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/connector/Database.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/connector/Redis.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/connector/Sync.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/connector/Topthink.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/job/Database.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/job/Redis.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/job/Sync.php delete mode 100644 Server/vendor/topthink/think-queue/src/queue/job/Topthink.php diff --git a/Server/application/common/view/tpl/dispatch_jump.tpl b/Server/application/common/view/tpl/dispatch_jump.tpl new file mode 100644 index 00000000..50d63d75 --- /dev/null +++ b/Server/application/common/view/tpl/dispatch_jump.tpl @@ -0,0 +1,93 @@ +{__NOLAYOUT__} + + + + + 跳转提示 + + + +
+ + +

:)

+

+ + +

:(

+

+ + +

+

+ 页面自动 跳转 等待时间: +

+
+ + + \ No newline at end of file diff --git a/Server/vendor/adbario/php-dot-notation/src/Dot.php b/Server/vendor/adbario/php-dot-notation/src/Dot.php index 3cd1c501..34cb4f65 100644 --- a/Server/vendor/adbario/php-dot-notation/src/Dot.php +++ b/Server/vendor/adbario/php-dot-notation/src/Dot.php @@ -29,25 +29,14 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable */ protected $items = []; - - /** - * The delimiter (alternative to a '.') to be used. - * - * @var string - */ - protected $delimiter = '.'; - - /** * Create a new Dot instance * * @param mixed $items - * @param string $delimiter */ - public function __construct($items = [], $delimiter = '.') + public function __construct($items = []) { $this->items = $this->getArrayItems($items); - $this->delimiter = strlen($delimiter) ? $delimiter : '.'; } /** @@ -115,7 +104,7 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable } $items = &$this->items; - $segments = explode($this->delimiter, $key); + $segments = explode('.', $key); $lastSegment = array_pop($segments); foreach ($segments as $segment) { @@ -159,10 +148,6 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable $items = $this->items; } - if (!func_num_args()) { - $delimiter = $this->delimiter; - } - foreach ($items as $key => $value) { if (is_array($value) && !empty($value)) { $flatten = array_merge( @@ -194,13 +179,13 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable return $this->items[$key]; } - if (strpos($key, $this->delimiter) === false) { + if (strpos($key, '.') === false) { return $default; } $items = $this->items; - foreach (explode($this->delimiter, $key) as $segment) { + foreach (explode('.', $key) as $segment) { if (!is_array($items) || !$this->exists($items, $segment)) { return $default; } @@ -249,7 +234,7 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable continue; } - foreach (explode($this->delimiter, $key) as $segment) { + foreach (explode('.', $key) as $segment) { if (!is_array($items) || !$this->exists($items, $segment)) { return false; } @@ -461,7 +446,7 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable $items = &$this->items; - foreach (explode($this->delimiter, $keys) as $key) { + foreach (explode('.', $keys) as $key) { if (!isset($items[$key]) || !is_array($items[$key])) { $items[$key] = []; } @@ -615,7 +600,6 @@ class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable * * @return array */ - #[\ReturnTypeWillChange] public function jsonSerialize() { return $this->items; diff --git a/Server/vendor/adbario/php-dot-notation/src/helpers.php b/Server/vendor/adbario/php-dot-notation/src/helpers.php index bebb9527..ffdc8268 100644 --- a/Server/vendor/adbario/php-dot-notation/src/helpers.php +++ b/Server/vendor/adbario/php-dot-notation/src/helpers.php @@ -11,14 +11,13 @@ use Adbar\Dot; if (! function_exists('dot')) { /** - * Create a new Dot object with the given items and optional delimiter + * Create a new Dot object with the given items * - * @param mixed $items - * @param string $delimiter + * @param mixed $items * @return \Adbar\Dot */ - function dot($items, $delimiter = '.') + function dot($items) { - return new Dot($items, $delimiter); + return new Dot($items); } } diff --git a/Server/vendor/alibabacloud/credentials/CHANGELOG.md b/Server/vendor/alibabacloud/credentials/CHANGELOG.md index 703a5581..6180270e 100644 --- a/Server/vendor/alibabacloud/credentials/CHANGELOG.md +++ b/Server/vendor/alibabacloud/credentials/CHANGELOG.md @@ -1,9 +1,5 @@ # CHANGELOG -## 1.2.0 - 2024-10-17 - -- Refactor all credentials providers. - ## 1.1.3 - 2020-12-24 - Require guzzle ^6.3|^7.0 diff --git a/Server/vendor/alibabacloud/credentials/README-zh-CN.md b/Server/vendor/alibabacloud/credentials/README-zh-CN.md index 5ef6ecd3..262cad91 100644 --- a/Server/vendor/alibabacloud/credentials/README-zh-CN.md +++ b/Server/vendor/alibabacloud/credentials/README-zh-CN.md @@ -1,57 +1,41 @@ [English](/README.md) | 简体中文 -![](https://aliyunsdk-pages.alicdn.com/icons/AlibabaCloud.svg) # Alibaba Cloud Credentials for PHP - -[![PHP CI](https://github.com/aliyun/credentials-php/actions/workflows/ci.yml/badge.svg)](https://github.com/aliyun/credentials-php/actions/workflows/ci.yml) -[![codecov](https://codecov.io/gh/aliyun/credentials-php/graph/badge.svg?token=YIkSjtfKbB)](https://codecov.io/gh/aliyun/credentials-php) [![Latest Stable Version](https://poser.pugx.org/alibabacloud/credentials/v/stable)](https://packagist.org/packages/alibabacloud/credentials) [![composer.lock](https://poser.pugx.org/alibabacloud/credentials/composerlock)](https://packagist.org/packages/alibabacloud/credentials) [![Total Downloads](https://poser.pugx.org/alibabacloud/credentials/downloads)](https://packagist.org/packages/alibabacloud/credentials) [![License](https://poser.pugx.org/alibabacloud/credentials/license)](https://packagist.org/packages/alibabacloud/credentials) +[![codecov](https://codecov.io/gh/aliyun/credentials-php/branch/master/graph/badge.svg)](https://codecov.io/gh/aliyun/credentials-php) +[![Travis Build Status](https://travis-ci.org/aliyun/credentials-php.svg?branch=master)](https://travis-ci.org/aliyun/credentials-php) +[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/6jxpwmhyfipagtge/branch/master?svg=true)](https://ci.appveyor.com/project/aliyun/credentials-php) + + +![](https://aliyunsdk-pages.alicdn.com/icons/AlibabaCloud.svg) + Alibaba Cloud Credentials for PHP 是帮助 PHP 开发者管理凭据的工具。 -## 先决条件 +## 先决条件 您的系统需要满足[先决条件](/docs/zh-CN/0-Prerequisites.md),包括 PHP> = 5.6。 我们强烈建议使用cURL扩展,并使用TLS后端编译cURL 7.16.2+。 + ## 安装依赖 - 如果已在系统上[全局安装 Composer](https://getcomposer.org/doc/00-intro.md#globally),请直接在项目目录中运行以下内容来安装 Alibaba Cloud Credentials for PHP 作为依赖项: - -```sh +``` composer require alibabacloud/credentials ``` - > 一些用户可能由于网络问题无法安装,可以使用[阿里云 Composer 全量镜像](https://developer.aliyun.com/composer)。 请看[安装](/docs/zh-CN/1-Installation.md)有关通过 Composer 和其他方式安装的详细信息。 -## 快速使用 +## 快速使用 在您开始之前,您需要注册阿里云帐户并获取您的[凭证](https://usercenter.console.aliyun.com/#/manage/ak)。 ### 凭证类型 -#### 使用默认凭据链 -当您在初始化凭据客户端不传入任何参数时,Credentials工具会使用默认凭据链方式初始化客户端。默认凭据的读取逻辑请参见[默认凭据链](#默认凭证提供程序链)。 - -```php -getCredential(); -$credential->getAccessKeyId(); -$credential->getAccessKeySecret(); -$credential->getSecurityToken(); -``` - #### AccessKey 通过[用户信息管理][ak]设置 access_key,它们具有该账户完全的权限,请妥善保管。有时出于安全考虑,您不能把具有完全访问权限的主账户 AccessKey 交于一个项目的开发者使用,您可以[创建RAM子账户][ram]并为子账户[授权][permissions],使用RAM子用户的 AccessKey 来进行API调用。 @@ -60,19 +44,20 @@ $credential->getSecurityToken(); 'access_key', - 'accessKeyId' => '', - 'accessKeySecret' => '', -]); -$client = new Credential($config); - -$credential = $client->getCredential(); +// Chain Provider if no Parameter +$credential = new Credential(); $credential->getAccessKeyId(); $credential->getAccessKeySecret(); + +// Access Key +$ak = new Credential([ + 'type' => 'access_key', + 'access_key_id' => '', + 'access_key_secret' => '', +]); +$ak->getAccessKeyId(); +$ak->getAccessKeySecret(); ``` #### STS @@ -83,256 +68,102 @@ $credential->getAccessKeySecret(); 'sts', - 'accessKeyId' => '', - 'accessKeySecret' => '', - 'securityToken' => '', +$sts = new Credential([ + 'type' => 'sts', + 'access_key_id' => '', + 'accessKey_secret' => '', + 'security_token' => '', ]); -$client = new Credential($config); - -$credential = $client->getCredential(); -$credential->getAccessKeyId(); -$credential->getAccessKeySecret(); -$credential->getSecurityToken(); +$sts->getAccessKeyId(); +$sts->getAccessKeySecret(); +$sts->getSecurityToken(); ``` #### RamRoleArn -通过指定RAM角色的ARN(Alibabacloud Resource Name),Credentials工具可以帮助开发者前往STS换取STS Token。您也可以通过为 `Policy` 赋值来限制RAM角色到一个更小的权限集合。 +通过指定[RAM角色][RAM Role],让凭证自动申请维护 STS Token。你可以通过为 `Policy` 赋值来限制获取到的 STS Token 的权限。 ```php 'ram_role_arn', - 'accessKeyId' => '', - 'accessKeySecret' => '', - // 要扮演的RAM角色ARN,示例值:acs:ram::123456789012****:role/adminrole,可以通过环境变量ALIBABA_CLOUD_ROLE_ARN设置role_arn - 'roleArn' => '', - // 角色会话名称,可以通过环境变量ALIBABA_CLOUD_ROLE_SESSION_NAME设置role_session_name - 'roleSessionName' => '', - // 设置更小的权限策略,非必填。示例值:{"Statement": [{"Action": ["*"],"Effect": "Allow","Resource": ["*"]}],"Version":"1"} - 'policy' => '', - // 设置session过期时间,非必填。 - 'roleSessionExpiration' => 3600, +$ramRoleArn = new Credential([ + 'type' => 'ram_role_arn', + 'access_key_id' => '', + 'access_key_secret' => '', + 'role_arn' => '', + 'role_session_name' => '', + 'policy' => '', ]); -$client = new Credential($config); - -$credential = $client->getCredential(); -$credential->getAccessKeyId(); -$credential->getAccessKeySecret(); -$credential->getSecurityToken(); +$ramRoleArn->getAccessKeyId(); +$ramRoleArn->getAccessKeySecret(); +$ramRoleArn->getRoleArn(); +$ramRoleArn->getRoleSessionName(); +$ramRoleArn->getPolicy(); ``` #### EcsRamRole -ECS和ECI实例均支持绑定实例RAM角色,当在实例中使用Credentials工具时,将自动获取实例绑定的RAM角色,并通过访问元数据服务获取RAM角色的STS Token,以完成凭据客户端的初始化。 - -实例元数据服务器支持加固模式和普通模式两种访问方式,Credentials工具默认使用加固模式(IMDSv2)获取访问凭据。若使用加固模式时发生异常,您可以通过设置disableIMDSv1来执行不同的异常处理逻辑: - -- 当值为false(默认值)时,会使用普通模式继续获取访问凭据。 - -- 当值为true时,表示只能使用加固模式获取访问凭据,会抛出异常。 - -服务端是否支持IMDSv2,取决于您在服务器的配置。 +通过指定角色名称,让凭证自动申请维护 STS Token ```php 'ecs_ram_role', - // 选填,该ECS角色的角色名称,不填会自动获取,但是建议加上以减少请求次数,可以通过环境变量ALIBABA_CLOUD_ECS_METADATA设置role_name - 'roleName' => '', - // 选填,是否强制关闭IMDSv1,即必须使用IMDSv2加固模式,可以通过环境变量ALIBABA_CLOUD_IMDSV1_DISABLED设置 - 'disableIMDSv1' => true, +$ecsRamRole = new Credential([ + 'type' => 'ecs_ram_role', + 'role_name' => '', ]); -$client = new Credential($config); - -$credential = $client->getCredential(); -$credential->getAccessKeyId(); -$credential->getAccessKeySecret(); -$credential->getSecurityToken(); +$ecsRamRole->getRoleName(); +// Note: `role_name` is optional. It will be retrieved automatically if not set. It is highly recommended to set it up to reduce requests. ``` -#### OIDCRoleArn +#### RsaKeyPair -在容器服务 Kubernetes 版中设置了Worker节点RAM角色后,对应节点内的Pod中的应用也就可以像ECS上部署的应用一样,通过元数据服务(Meta Data Server)获取关联角色的STS Token。但如果容器集群上部署的是不可信的应用(比如部署您的客户提交的应用,代码也没有对您开放),您可能并不希望它们能通过元数据服务获取Worker节点关联实例RAM角色的STS Token。为了避免影响云上资源的安全,同时又能让这些不可信的应用安全地获取所需的 STS Token,实现应用级别的权限最小化,您可以使用RRSA(RAM Roles for Service Account)功能。阿里云容器集群会为不同的应用Pod创建和挂载相应的服务账户OIDC Token文件,并将相关配置信息注入到环境变量中,Credentials工具通过获取环境变量的配置信息,调用STS服务的AssumeRoleWithOIDC - OIDC角色SSO时获取扮演角色的临时身份凭证接口换取绑定角色的STS Token。详情请参见[通过RRSA配置ServiceAccount的RAM权限实现Pod权限隔离](https://help.aliyun.com/zh/ack/ack-managed-and-ack-dedicated/user-guide/use-rrsa-to-authorize-pods-to-access-different-cloud-services#task-2142941)。 +通过指定公钥Id和私钥文件,让凭证自动申请维护 AccessKey。仅支持日本站。 ```php 'oidc_role_arn', - // OIDC提供商ARN,可以通过环境变量ALIBABA_CLOUD_OIDC_PROVIDER_ARN设置oidc_provider_arn - 'oidcProviderArn' => '', - // OIDC Token文件路径,可以通过环境变量ALIBABA_CLOUD_OIDC_TOKEN_FILE设置oidc_token_file_path - 'oidcTokenFilePath' => '', - // 要扮演的RAM角色ARN,示例值:acs:ram::123456789012****:role/adminrole,可以通过环境变量ALIBABA_CLOUD_ROLE_ARN设置role_arn - 'roleArn' => '', - // 角色会话名称,可以通过环境变量ALIBABA_CLOUD_ROLE_SESSION_NAME设置role_session_name - 'roleSessionName' => '', - // 设置更小的权限策略,非必填。示例值:{"Statement": [{"Action": ["*"],"Effect": "Allow","Resource": ["*"]}],"Version":"1"} - 'policy' => '', - # 设置session过期时间 - 'roleSessionExpiration' => 3600, +$rsaKeyPair = new Credential([ + 'type' => 'rsa_key_pair', + 'public_key_id' => '', + 'private_key_file' => '', ]); -$client = new Credential($config); - -$credential = $client->getCredential(); -$credential->getAccessKeyId(); -$credential->getAccessKeySecret(); -$credential->getSecurityToken(); -``` - -#### Credentials URI - -通过指定提供凭证的自定义网络服务地址,让凭证自动申请维护 STS Token。 - -```php - 'credentials_uri', - // 凭证的 URI,格式为http://local_or_remote_uri/,可以通过环境变量ALIBABA_CLOUD_CREDENTIALS_URI设置credentials_uri - 'credentialsURI' => '', -]); -$client = new Credential($config); - -$credential = $client->getCredential(); -$credential->getAccessKeyId(); -$credential->getAccessKeySecret(); -$credential->getSecurityToken(); +$rsaKeyPair->getPublicKeyId(); +$rsaKeyPair->getPrivateKey(); ``` #### Bearer Token -目前只有云呼叫中心 CCC 这款产品支持 Bearer Token 的凭据初始化方式。 +如呼叫中心(CCC)需用此凭证,请自行申请维护 Bearer Token。 ```php 'bearer', - // 填入您的Bearer Token - 'bearerToken' => '', +$bearerToken = new Credential([ + 'type' => 'bearer_token', + 'bearer_token' => '', ]); -$client = new Credential($config); - -$credential = $client->getCredential(); -$credential->getBearerToken(); +$bearerToken->getBearerToken(); +$bearerToken->getSignature(); ``` ## 默认凭证提供程序链 +默认凭证提供程序链查找可用的凭证,寻找顺序如下: -当您的程序开发环境和生产环境采用不同的凭据类型,常见做法是在代码中获取当前环境信息,编写获取不同凭据的分支代码。借助Credentials工具的默认凭据链,您可以用同一套代码,通过程序之外的配置来控制不同环境下的凭据获取方式。当您在不传入参数的情况下,直接使用$credential = new Credential();初始化凭据客户端时,阿里云SDK将会尝试按照如下顺序查找相关凭据信息。 +### 1. 环境凭证 +程序首先会在环境变量里寻找环境凭证,如果定义了 `ALIBABA_CLOUD_ACCESS_KEY_ID` 和 `ALIBABA_CLOUD_ACCESS_KEY_SECRET` 环境变量且不为空,程序将使用他们创建默认凭证。 -### 1. 使用环境变量 - -Credentials工具会优先在环境变量中获取凭据信息。 - -- 如果系统环境变量 `ALIBABA_CLOUD_ACCESS_KEY_ID`(密钥Key) 和 `ALIBABA_CLOUD_ACCESS_KEY_SECRET`(密钥Value) 不为空,Credentials工具会优先使用它们作为默认凭据。 - -- 如果系统环境变量 `ALIBABA_CLOUD_ACCESS_KEY_ID`(密钥Key)、`ALIBABA_CLOUD_ACCESS_KEY_SECRET`(密钥Value)、`ALIBABA_CLOUD_SECURITY_TOKEN`(Token)均不为空,Credentials工具会优先使用STS Token作为默认凭据。 - -### 2. 使用OIDC RAM角色 -若不存在优先级更高的凭据信息,Credentials工具会在环境变量中获取如下内容: - -`ALIBABA_CLOUD_ROLE_ARN`:RAM角色名称ARN; - -`ALIBABA_CLOUD_OIDC_PROVIDER_ARN`:OIDC提供商ARN; - -`ALIBABA_CLOUD_OIDC_TOKEN_FILE`:OIDC Token文件路径; - -若以上三个环境变量都已设置内容,Credentials将会使用变量内容调用STS服务的[AssumeRoleWithOIDC - OIDC角色SSO时获取扮演角色的临时身份凭证](https://help.aliyun.com/zh/ram/developer-reference/api-sts-2015-04-01-assumerolewithoidc)接口换取STS Token作为默认凭据。 - -### 3. 使用 Aliyun CLI 工具的 config.json 配置文件 - -若不存在优先级更高的凭据信息,Credentials工具会优先在如下位置查找 `config.json` 文件是否存在: -Linux系统:`~/.aliyun/config.json` -Windows系统: `C:\Users\USER_NAME\.aliyun\config.json` -如果文件存在,程序将会使用配置文件中 `current` 指定的凭据信息初始化凭据客户端。当然,您也可以通过环境变量 `ALIBABA_CLOUD_PROFILE` 来指定凭据信息,例如设置 `ALIBABA_CLOUD_PROFILE` 的值为 `AK`。 - -在config.json配置文件中每个module的值代表了不同的凭据信息获取方式: - -- AK:使用用户的Access Key作为凭据信息; -- RamRoleArn:使用RAM角色的ARN来获取凭据信息; -- EcsRamRole:利用ECS绑定的RAM角色来获取凭据信息; -- OIDC:通过OIDC ARN和OIDC Token来获取凭据信息; -- ChainableRamRoleArn:采用角色链的方式,通过指定JSON文件中的其他凭据,以重新获取新的凭据信息。 - -配置示例信息如下: - -```json -{ - "current": "AK", - "profiles": [ - { - "name": "AK", - "mode": "AK", - "access_key_id": "access_key_id", - "access_key_secret": "access_key_secret" - }, - { - "name": "RamRoleArn", - "mode": "RamRoleArn", - "access_key_id": "access_key_id", - "access_key_secret": "access_key_secret", - "ram_role_arn": "ram_role_arn", - "ram_session_name": "ram_session_name", - "expired_seconds": 3600, - "sts_region": "cn-hangzhou" - }, - { - "name": "EcsRamRole", - "mode": "EcsRamRole", - "ram_role_name": "ram_role_name" - }, - { - "name": "OIDC", - "mode": "OIDC", - "ram_role_arn": "ram_role_arn", - "oidc_token_file": "path/to/oidc/file", - "oidc_provider_arn": "oidc_provider_arn", - "ram_session_name": "ram_session_name", - "expired_seconds": 3600, - "sts_region": "cn-hangzhou" - }, - { - "name": "ChainableRamRoleArn", - "mode": "ChainableRamRoleArn", - "source_profile": "AK", - "ram_role_arn": "ram_role_arn", - "ram_session_name": "ram_session_name", - "expired_seconds": 3600, - "sts_region": "cn-hangzhou" - } - ] -} -``` - -### 4. 使用配置文件 -> -> 如果用户主目录存在默认文件 `~/.alibabacloud/credentials` (Windows 为 `C:\Users\USER_NAME\.alibabacloud\credentials`),程序会自动创建指定类型和名称的凭证。您也可通过环境变量 `ALIBABA_CLOUD_CREDENTIALS_FILE` 指定配置文件路径。如果文件存在,程序将会使用配置文件中 default 指定的凭据信息初始化凭据客户端。当然,您也可以通过环境变量 `ALIBABA_CLOUD_PROFILE` 来指定凭据信息,例如设置 `ALIBABA_CLOUD_PROFILE` 的值为 `client1`。 - -配置示例信息如下: +### 2. 配置文件 +> 如果用户主目录存在默认文件 `~/.alibabacloud/credentials` (Windows 为 `C:\Users\USER_NAME\.alibabacloud\credentials`),程序会自动创建指定类型和名称的凭证。默认文件可以不存在,但解析错误会抛出异常。 凭证名称不分大小写,若凭证同名,后者会覆盖前者。不同的项目、工具之间可以共用这个配置文件,因为超出项目之外,也不会被意外提交到版本控制。Windows 上可以使用环境变量引用到主目录 %UserProfile%。类 Unix 的系统可以使用环境变量 $HOME 或 ~ (tilde)。 可以通过定义 `ALIBABA_CLOUD_CREDENTIALS_FILE` 环境变量修改默认文件的路径。 ```ini [default] @@ -352,72 +183,68 @@ role_arn = role_arn role_session_name = session_name [project3] -type=oidc_role_arn # 认证方式为 oidc_role_arn -oidc_provider_arn=oidc_provider_arn -oidc_token_file_path=oidc_token_file_path -role_arn=role_arn -role_session_name=session_name +type = rsa_key_pair # 认证方式为 rsa_key_pair +public_key_id = publicKeyId # Public Key ID +private_key_file = /your/pk.pem # Private Key 文件 ``` -### 5. 使用 ECS 实例RAM角色 +### 3. 实例 RAM 角色 +如果定义了环境变量 `ALIBABA_CLOUD_ECS_METADATA` 且不为空,程序会将该环境变量的值作为角色名称,请求 `http://100.100.100.200/latest/meta-data/ram/security-credentials/` 获取临时安全凭证作为默认凭证。 -若不存在优先级更高的凭据信息,Credentials工具将通过环境变量获取ALIBABA_CLOUD_ECS_METADATA(ECS实例RAM角色名称)的值。若该变量的值存在,程序将采用加固模式(IMDSv2)访问ECS的元数据服务(Meta Data Server),以获取ECS实例RAM角色的STS Token作为默认凭据信息。在使用加固模式时若发生异常,将使用普通模式兜底来获取访问凭据。您也可以通过设置环境变量ALIBABA_CLOUD_IMDSV1_DISABLED,执行不同的异常处理逻辑: +### 自定义凭证提供程序链 +可通过自定义程序链代替默认程序链的寻找顺序,也可以自行编写闭包传入提供者。 +```php + = 5.6. We strongly recommend using the cURL extension and compiling cURL 7.16.2+ using the TLS backend. + ## Installation - If you have [Globally Install Composer](https://getcomposer.org/doc/00-intro.md#globally) on your system, install Alibaba Cloud Credentials for PHP as a dependency by running the following directly in the project directory: - -```sh +``` composer require alibabacloud/credentials ``` - > Some users may not be able to install due to network problems, you can switch to the [Alibaba Cloud Composer Mirror](https://developer.aliyun.com/composer). See [Installation](/docs/zh-CN/1-Installation.md) for details on installing through Composer and other means. -## Quick Examples +## Quick Examples Before you begin, you need to sign up for an Alibaba Cloud account and retrieve your [Credentials](https://usercenter.console.aliyun.com/#/manage/ak). ### Credential Type -#### Default credential provider chain - -If you do not specify a method to initialize a Credentials client, the default credential provider chain is used. For more information, see the Default credential provider chain section of this topic. - -```php -getCredential(); -$credential->getAccessKeyId(); -$credential->getAccessKeySecret(); -$credential->getSecurityToken(); -``` - #### AccessKey Setup access_key credential through [User Information Management][ak], it have full authority over the account, please keep it safe. Sometimes for security reasons, you cannot hand over a primary account AccessKey with full access to the developer of a project. You may create a sub-account [RAM Sub-account][ram] , grant its [authorization][permissions],and use the AccessKey of RAM Sub-account. @@ -62,19 +44,20 @@ Setup access_key credential through [User Information Management][ak], it have f 'access_key', - 'accessKeyId' => '', - 'accessKeySecret' => '', -]); -$client = new Credential($config); - -$credential = $client->getCredential(); +// Chain Provider if no Parameter +$credential = new Credential(); $credential->getAccessKeyId(); $credential->getAccessKeySecret(); + +// Access Key +$ak = new Credential([ + 'type' => 'access_key', + 'access_key_id' => '', + 'access_key_secret' => '', +]); +$ak->getAccessKeyId(); +$ak->getAccessKeySecret(); ``` #### STS @@ -85,20 +68,16 @@ Create a temporary security credential by applying Temporary Security Credential 'sts', - 'accessKeyId' => '', - 'accessKeySecret' => '', - 'securityToken' => '', +$sts = new Credential([ + 'type' => 'sts', + 'access_key_id' => '', + 'accessKey_secret' => '', + 'security_token' => '', ]); -$client = new Credential($config); - -$credential = $client->getCredential(); -$credential->getAccessKeyId(); -$credential->getAccessKeySecret(); -$credential->getSecurityToken(); +$sts->getAccessKeyId(); +$sts->getAccessKeySecret(); +$sts->getSecurityToken(); ``` #### RamRoleArn @@ -109,116 +88,56 @@ By specifying [RAM Role][RAM Role], the credential will be able to automatically 'ram_role_arn', - 'accessKeyId' => '', - 'accessKeySecret' => '', - // Specify the ARN of the RAM role to be assumed. Example: acs:ram::123456789012****:role/adminrole. - 'roleArn' => '', - // Specify the name of the role session. - 'roleSessionName' => '', - // Optional. Specify limited permissions for the RAM role. Example: {"Statement": [{"Action": ["*"],"Effect": "Allow","Resource": ["*"]}],"Version":"1"}. - 'policy' => '', - // Optional. Specify the expiration of the session - 'roleSessionExpiration' => 3600, +$ramRoleArn = new Credential([ + 'type' => 'ram_role_arn', + 'access_key_id' => '', + 'access_key_secret' => '', + 'role_arn' => '', + 'role_session_name' => '', + 'policy' => '', ]); -$client = new Credential($config); - -$credential = $client->getCredential(); -$credential->getAccessKeyId(); -$credential->getAccessKeySecret(); -$credential->getSecurityToken(); +$ramRoleArn->getAccessKeyId(); +$ramRoleArn->getAccessKeySecret(); +$ramRoleArn->getRoleArn(); +$ramRoleArn->getRoleSessionName(); +$ramRoleArn->getPolicy(); ``` #### EcsRamRole -Both ECS and ECI instances support binding instance RAM roles. When the Credentials tool is used in an instance, the RAM role bound to the instance will be automatically obtained, and the STS Token of the RAM role will be obtained by accessing the metadata service to complete the initialization of the credential client. - -The instance metadata server supports two access modes: hardened mode and normal mode. The Credentials tool uses hardened mode (IMDSv2) by default to obtain access credentials. If an exception occurs when using hardened mode, you can set disableIMDSv1 to perform different exception handling logic: - -- When the value is false (default value), the normal mode will continue to be used to obtain access credentials. - -- When the value is true, it means that only hardened mode can be used to obtain access credentials, and an exception will be thrown. - -Whether the server supports IMDSv2 depends on your configuration on the server. +By specifying the role name, the credential will be able to automatically request maintenance of STS Token. ```php 'ecs_ram_role', - // Optional. Specify the name of the RAM role of the ECS instance. If you do not specify this parameter, its value is automatically obtained. To reduce the number of requests, we recommend that you specify this parameter. - 'roleName' => '', - //Optional, whether to forcibly disable IMDSv1, that is, to use IMDSv2 hardening mode, which can be set by the environment variable ALIBABA_CLOUD_IMDSV1_DISABLED - 'disableIMDSv1' => true, +$ecsRamRole = new Credential([ + 'type' => 'ecs_ram_role', + 'role_name' => '', ]); -$client = new Credential($config); - -$credential = $client->getCredential(); -$credential->getAccessKeyId(); -$credential->getAccessKeySecret(); -$credential->getSecurityToken(); +$ecsRamRole->getRoleName(); +// Note: `role_name` is optional. It will be retrieved automatically if not set. It is highly recommended to set it up to reduce requests. ``` -#### OIDCRoleArn +#### RsaKeyPair + +By specifying the public key Id and the private key file, the credential will be able to automatically request maintenance of the AccessKey before sending the request. Only Japan station is supported. -After you attach a RAM role to a worker node in an Container Service for Kubernetes, applications in the pods on the worker node can use the metadata server to obtain an STS token the same way in which applications on ECS instances do. However, if an untrusted application is deployed on the worker node, such as an application that is submitted by your customer and whose code is unavailable to you, you may not want the application to use the metadata server to obtain an STS token of the RAM role attached to the worker node. To ensure the security of cloud resources and enable untrusted applications to securely obtain required STS tokens, you can use the RAM Roles for Service Accounts (RRSA) feature to grant minimum necessary permissions to an application. In this case, the ACK cluster creates a service account OpenID Connect (OIDC) token file, associates the token file with a pod, and then injects relevant environment variables into the pod. Then, the Credentials tool uses the environment variables to call the AssumeRoleWithOIDC operation of STS and obtains an STS token of the RAM role. For more information about the RRSA feature, see [Use RRSA to authorize different pods to access different cloud services](https://www.alibabacloud.com/help/en/ack/ack-managed-and-ack-dedicated/user-guide/use-rrsa-to-authorize-pods-to-access-different-cloud-services#task-2142941). ```php 'oidc_role_arn', - // Specify the ARN of the OIDC IdP by specifying the ALIBABA_CLOUD_OIDC_PROVIDER_ARN environment variable. - 'oidcProviderArn' => '', - // Specify the path of the OIDC token file by specifying the ALIBABA_CLOUD_OIDC_TOKEN_FILE environment variable. - 'oidcTokenFilePath' => '', - // Specify the ARN of the RAM role by specifying the ALIBABA_CLOUD_ROLE_ARN environment variable. - 'roleArn' => '', - // Specify the role session name by specifying the ALIBABA_CLOUD_ROLE_SESSION_NAME environment variable. - 'roleSessionName' => '', - // Optional. Specify limited permissions for the RAM role. Example: {"Statement": [{"Action": ["*"],"Effect": "Allow","Resource": ["*"]}],"Version":"1"}. - 'policy' => '', - // Optional. Specify the validity period of the session. - 'roleSessionExpiration' => 3600, +$rsaKeyPair = new Credential([ + 'type' => 'rsa_key_pair', + 'public_key_id' => '', + 'private_key_file' => '', ]); -$client = new Credential($config); - -$credential = $client->getCredential(); -$credential->getAccessKeyId(); -$credential->getAccessKeySecret(); -$credential->getSecurityToken(); -``` - -#### Credentials URI - -By specifying the url, the credential will be able to automatically request maintenance of STS Token. - -```php - 'credentials_uri', - // Format: http url. `credentialsURI` can be replaced by setting environment variable: ALIBABA_CLOUD_CREDENTIALS_URI - 'credentialsURI' => '', -]); -$client = new Credential($config); - -$credential = $client->getCredential(); -$credential->getAccessKeyId(); -$credential->getAccessKeySecret(); -$credential->getSecurityToken(); +$rsaKeyPair->getPublicKeyId(); +$rsaKeyPair->getPrivateKey(); ``` #### Bearer Token @@ -229,110 +148,24 @@ If credential is required by the Cloud Call Centre (CCC), please apply for Beare 'bearer', - 'bearerToken' => '', +$bearerToken = new Credential([ + 'type' => 'bearer_token', + 'bearer_token' => '', ]); -$client = new Credential($config); - -$credential = $client->getCredential(); -$credential->getBearerToken(); +$bearerToken->getBearerToken(); +$bearerToken->getSignature(); ``` ## Default credential provider chain - -If you want to use different types of credentials in the development and production environments of your application, you generally need to obtain the environment information from the code and write code branches to obtain different credentials for the development and production environments. The default credential provider chain of the Credentials tool allows you to use the same code to obtain credentials for different environments based on configurations independent of the application. If you use $credential = new Credential(); to initialize a Credentials client without specifying an initialization method, the Credentials tool obtains the credential information in the following order: +The default credential provider chain looks for available credentials, looking in the following order: ### 1. Environmental certificate +The program first looks for environment credentials in the environment variable. If the `ALIBABA_CLOUD_ACCESS_KEY_ID` and `ALIBABA_CLOUD_ACCESS_KEY_SECRET` environment variables are defined and not empty, the program will use them to create default credentials. -Look for environment credentials in environment variable. -- If the `ALIBABA_CLOUD_ACCESS_KEY_ID` and `ALIBABA_CLOUD_ACCESS_KEY_SECRET` environment variables are defined and are not empty, the program will use them to create default credentials. -- If the `ALIBABA_CLOUD_ACCESS_KEY_ID`, `ALIBABA_CLOUD_ACCESS_KEY_SECRET` and `ALIBABA_CLOUD_SECURITY_TOKEN` environment variables are defined and are not empty, the program will use them to create temporary security credentials(STS). Note: This token has an expiration time, it is recommended to use it in a temporary environment. +### 2. Configuration file +> If the user's home directory has the default file `~/.alibabacloud/credentials` (Windows is `C:\Users\USER_NAME\.alibabacloud\credentials`), the program will automatically create credentials with the specified type and name. The default file may not exist, but parsing errors will throw an exception. The voucher name is not case sensitive. If the voucher has the same name, the latter will overwrite the former. This configuration file can be shared between different projects and tools, and it will not be accidentally submitted to version control because it is outside the project. Environment variables can be referenced to the home directory %UserProfile% on Windows. Unix-like systems can use the environment variable $HOME or ~ (tilde). The path to the default file can be modified by defining the `ALIBABA_CLOUD_CREDENTIALS_FILE` environment variable. -### 2. The RAM role of an OIDC IdP - -If no credentials are found in the previous step, the Credentials tool obtains the values of the following environment variables: - -`ALIBABA_CLOUD_ROLE_ARN`: the ARN of the RAM role. - -`ALIBABA_CLOUD_OIDC_PROVIDER_ARN`: the ARN of the OIDC IdP. - -`ALIBABA_CLOUD_OIDC_TOKEN_FILE`: the path of the OIDC token file. - -If the preceding three environment variables are specified, the Credentials tool uses the environment variables to call the [AssumeRoleWithOIDC](https://www.alibabacloud.com/help/en/ram/developer-reference/api-sts-2015-04-01-assumerolewithoidc) operation of STS to obtain an STS token as the default credential. - -### 3. Using the config.json Configuration File of Aliyun CLI Tool -If there is no higher-priority credential information, the Credentials tool will first check the following locations to see if the config.json file exists: - -Linux system: `~/.aliyun/config.json` -Windows system: `C:\Users\USER_NAME\.aliyun\config.json` -If the file exists, the program will use the credential information specified by `current` in the configuration file to initialize the credentials client. Of course, you can also use the environment variable `ALIBABA_CLOUD_PROFILE` to specify the credential information, for example by setting the value of `ALIBABA_CLOUD_PROFILE` to `AK`. - -In the config.json configuration file, the value of each module represents different ways to obtain credential information: - -- AK: Use the Access Key of the user as credential information; -- RamRoleArn: Use the ARN of the RAM role to obtain credential information; -- EcsRamRole: Use the RAM role bound to the ECS to obtain credential information; -- OIDC: Obtain credential information through OIDC ARN and OIDC Token; -- ChainableRamRoleArn: Use the role chaining method to obtain new credential information by specifying other credentials in the JSON file. - -The configuration example information is as follows: - -```json -{ - "current": "AK", - "profiles": [ - { - "name": "AK", - "mode": "AK", - "access_key_id": "access_key_id", - "access_key_secret": "access_key_secret" - }, - { - "name": "RamRoleArn", - "mode": "RamRoleArn", - "access_key_id": "access_key_id", - "access_key_secret": "access_key_secret", - "ram_role_arn": "ram_role_arn", - "ram_session_name": "ram_session_name", - "expired_seconds": 3600, - "sts_region": "cn-hangzhou" - }, - { - "name": "EcsRamRole", - "mode": "EcsRamRole", - "ram_role_name": "ram_role_name" - }, - { - "name": "OIDC", - "mode": "OIDC", - "ram_role_arn": "ram_role_arn", - "oidc_token_file": "path/to/oidc/file", - "oidc_provider_arn": "oidc_provider_arn", - "ram_session_name": "ram_session_name", - "expired_seconds": 3600, - "sts_region": "cn-hangzhou" - }, - { - "name": "ChainableRamRoleArn", - "mode": "ChainableRamRoleArn", - "source_profile": "AK", - "ram_role_arn": "ram_role_arn", - "ram_session_name": "ram_session_name", - "expired_seconds": 3600, - "sts_region": "cn-hangzhou" - } - ] -} -``` - -### 4. Configuration file -> -> If the user's home directory has the default file `~/.alibabacloud/credentials` (Windows is `C:\Users\USER_NAME\.alibabacloud\credentials`), the program will automatically create credentials with the specified type and name. You can also specify the configuration file path by configuring the `ALIBABA_CLOUD_CREDENTIALS_FILE` environment variable. If the configuration file exists, the application initializes a Credentials client by using the credential information that is specified by default in the configuration file. You can also configure the `ALIBABA_CLOUD_PROFILE` environment variable to modify the default credential information that is read. - -Configuration example: ```ini [default] type = access_key # Authentication method is access_key @@ -351,72 +184,68 @@ role_arn = role_arn role_session_name = session_name [project3] -type=oidc_role_arn # Authentication method is oidc_role_arn -oidc_provider_arn=oidc_provider_arn -oidc_token_file_path=oidc_token_file_path -role_arn=role_arn -role_session_name=session_name +type = rsa_key_pair # Authentication method is rsa_key_pair +public_key_id = publicKeyId # Public Key ID +private_key_file = /your/pk.pem # Private Key File ``` -### 5. Instance RAM role +### 3. Instance RAM role +If the environment variable `ALIBABA_CLOUD_ECS_METADATA` is defined and not empty, the program will take the value of the environment variable as the role name and request `http://100.100.100.200/latest/meta-data/ram/security-credentials/` to get the temporary Security credentials are used as default credentials. -If there is no credential information with a higher priority, the Credentials tool will obtain the value of ALIBABA_CLOUD_ECS_METADATA (ECS instance RAM role name) through the environment variable. If the value of this variable exists, the program will use the hardened mode (IMDSv2) to access the metadata service (Meta Data Server) of ECS to obtain the STS Token of the ECS instance RAM role as the default credential information. If an exception occurs when using the hardened mode, the normal mode will be used as a fallback to obtain access credentials. You can also set the environment variable ALIBABA_CLOUD_IMDSV1_DISABLED to perform different exception handling logic: +### Custom credential provider chain +You can replace the default order of the program chain by customizing the program chain, or you can write the closure to the provider. +```php +accessKeyId = $access_key_id; + $this->accessKeyId = $access_key_id; $this->accessKeySecret = $access_key_secret; } @@ -72,15 +69,4 @@ class AccessKeyCredential implements CredentialsInterface { return ''; } - /** - * @inheritDoc - */ - public function getCredential() - { - return new CredentialModel([ - 'accessKeyId' => $this->accessKeyId, - 'accessKeySecret' => $this->accessKeySecret, - 'type' => 'access_key', - ]); - } } diff --git a/Server/vendor/alibabacloud/credentials/src/BearerTokenCredential.php b/Server/vendor/alibabacloud/credentials/src/BearerTokenCredential.php index 34fab6f0..fb574306 100644 --- a/Server/vendor/alibabacloud/credentials/src/BearerTokenCredential.php +++ b/Server/vendor/alibabacloud/credentials/src/BearerTokenCredential.php @@ -2,8 +2,6 @@ namespace AlibabaCloud\Credentials; -use AlibabaCloud\Credentials\Utils\Filter; -use AlibabaCloud\Credentials\Credential\CredentialModel; use AlibabaCloud\Credentials\Signature\BearerTokenSignature; /** @@ -20,13 +18,13 @@ class BearerTokenCredential implements CredentialsInterface /** * BearerTokenCredential constructor. * - * @param $bearer_token + * @param $bearerToken */ - public function __construct($bearer_token) + public function __construct($bearerToken) { - Filter::bearerToken($bearer_token); + Filter::bearerToken($bearerToken); - $this->bearerToken = $bearer_token; + $this->bearerToken = $bearerToken; } /** @@ -52,16 +50,4 @@ class BearerTokenCredential implements CredentialsInterface { return new BearerTokenSignature(); } - - /** - * @inheritDoc - */ - public function getCredential() - { - return new CredentialModel([ - 'bearerToken' => $this->bearerToken, - 'type' => 'bearer', - ]); - } - } diff --git a/Server/vendor/alibabacloud/credentials/src/Credential.php b/Server/vendor/alibabacloud/credentials/src/Credential.php index fb890185..5ff5859b 100644 --- a/Server/vendor/alibabacloud/credentials/src/Credential.php +++ b/Server/vendor/alibabacloud/credentials/src/Credential.php @@ -3,188 +3,153 @@ namespace AlibabaCloud\Credentials; use AlibabaCloud\Credentials\Credential\Config; -use AlibabaCloud\Credentials\Credential\CredentialModel; -use AlibabaCloud\Credentials\Providers\DefaultCredentialsProvider; -use AlibabaCloud\Credentials\Providers\EcsRamRoleCredentialsProvider; -use AlibabaCloud\Credentials\Providers\OIDCRoleArnCredentialsProvider; -use AlibabaCloud\Credentials\Providers\RamRoleArnCredentialsProvider; -use AlibabaCloud\Credentials\Providers\RsaKeyPairCredentialsProvider; -use AlibabaCloud\Credentials\Providers\StaticAKCredentialsProvider; -use AlibabaCloud\Credentials\Providers\StaticSTSCredentialsProvider; -use AlibabaCloud\Credentials\Providers\URLCredentialsProvider; -use AlibabaCloud\Credentials\Utils\Helper; -use GuzzleHttp\Exception\GuzzleException; use InvalidArgumentException; -use RuntimeException; +use ReflectionClass; +use ReflectionException; +use ReflectionParameter; /** * Class Credential * * @package AlibabaCloud\Credentials * + * @mixin AccessKeyCredential + * @mixin BearerTokenCredential + * @mixin EcsRamRoleCredential + * @mixin RamRoleArnCredential + * @mixin RsaKeyPairCredential */ class Credential { - /** - * Version of the Client + * @var array */ - const VERSION = '1.1.5'; + protected $config = []; /** - * @var Config + * @var array */ - protected $config; + protected $types = [ + 'access_key' => AccessKeyCredential::class, + 'sts' => StsCredential::class, + 'ecs_ram_role' => EcsRamRoleCredential::class, + 'ram_role_arn' => RamRoleArnCredential::class, + 'rsa_key_pair' => RsaKeyPairCredential::class, + ]; /** - * @var CredentialsInterface + * @var AccessKeyCredential|BearerTokenCredential|EcsRamRoleCredential|RamRoleArnCredential|RsaKeyPairCredential */ protected $credential; + /** + * @var string + */ + protected $type; + /** * Credential constructor. * * @param array|Config $config + * + * @throws ReflectionException */ public function __construct($config = []) { - if (\is_array($config)) { - if (empty($config)) { - $this->config = null; - } else { - $this->config = new Config($this->parseConfig($config)); - } - } else { - $this->config = $config; + if ($config instanceof Config) { + $config = $this->parse($config); + } + if ($config !== []) { + $this->config = array_change_key_case($config); + $this->parseConfig(); + } else { + $this->credential = Credentials::get()->getCredential(); } - $this->credential = $this->getCredentials($this->config); } /** - * @param array $config + * @param Config $config * * @return array */ - private function parseConfig($config) + private function parse($config) { - $res = []; - foreach (\array_change_key_case($config) as $key => $value) { - $res[Helper::snakeToCamelCase($key)] = $value; + $config = get_object_vars($config); + $res = []; + foreach ($config as $key => $value) { + $res[$this->toUnderScore($key)] = $value; } return $res; } - - - /** - * Credentials getter. - * - * @param Config $config - * @return CredentialsInterface - * - */ - private function getCredentials($config) + private function toUnderScore($str) { - if (is_null($config)) { - return new CredentialsProviderWrap('default', new DefaultCredentialsProvider()); - } - switch ($config->type) { - case 'access_key': - $provider = new StaticAKCredentialsProvider([ - 'accessKeyId' => $config->accessKeyId, - 'accessKeySecret' => $config->accessKeySecret, - ]); - return new CredentialsProviderWrap('access_key', $provider); - case 'sts': - $provider = new StaticSTSCredentialsProvider([ - 'accessKeyId' => $config->accessKeyId, - 'accessKeySecret' => $config->accessKeySecret, - 'securityToken' => $config->securityToken, - ]); - return new CredentialsProviderWrap('sts', $provider); - case 'bearer': - return new BearerTokenCredential($config->bearerToken); - case 'ram_role_arn': - if (!is_null($config->securityToken) && $config->securityToken !== '') { - $innerProvider = new StaticSTSCredentialsProvider([ - 'accessKeyId' => $config->accessKeyId, - 'accessKeySecret' => $config->accessKeySecret, - 'securityToken' => $config->securityToken, - ]); - } else { - $innerProvider = new StaticAKCredentialsProvider([ - 'accessKeyId' => $config->accessKeyId, - 'accessKeySecret' => $config->accessKeySecret, - ]); - } - $provider = new RamRoleArnCredentialsProvider([ - 'credentialsProvider' => $innerProvider, - 'roleArn' => $config->roleArn, - 'roleSessionName' => $config->roleSessionName, - 'policy' => $config->policy, - 'durationSeconds' => $config->roleSessionExpiration, - 'externalId' => $config->externalId, - 'stsEndpoint' => $config->STSEndpoint, - ], [ - 'connectTimeout' => $config->connectTimeout, - 'readTimeout' => $config->readTimeout, - ]); - return new CredentialsProviderWrap('ram_role_arn', $provider); - case 'rsa_key_pair': - $provider = new RsaKeyPairCredentialsProvider([ - 'publicKeyId' => $config->publicKeyId, - 'privateKeyFile' => $config->privateKeyFile, - 'durationSeconds' => $config->roleSessionExpiration, - 'stsEndpoint' => $config->STSEndpoint, - ], [ - 'connectTimeout' => $config->connectTimeout, - 'readTimeout' => $config->readTimeout, - ]); - return new CredentialsProviderWrap('rsa_key_pair', $provider); - case 'ecs_ram_role': - $provider = new EcsRamRoleCredentialsProvider([ - 'roleName' => $config->roleName, - 'disableIMDSv1' => $config->disableIMDSv1, - ], [ - 'connectTimeout' => $config->connectTimeout, - 'readTimeout' => $config->readTimeout, - ]); - return new CredentialsProviderWrap('ecs_ram_role', $provider); - case 'oidc_role_arn': - $provider = new OIDCRoleArnCredentialsProvider([ - 'roleArn' => $config->roleArn, - 'oidcProviderArn' => $config->oidcProviderArn, - 'oidcTokenFilePath' => $config->oidcTokenFilePath, - 'roleSessionName' => $config->roleSessionName, - 'policy' => $config->policy, - 'durationSeconds' => $config->roleSessionExpiration, - 'stsEndpoint' => $config->STSEndpoint, - ], [ - 'connectTimeout' => $config->connectTimeout, - 'readTimeout' => $config->readTimeout, - ]); - return new CredentialsProviderWrap('oidc_role_arn', $provider); - case "credentials_uri": - $provider = new URLCredentialsProvider([ - 'credentialsURI' => $config->credentialsURI, - ], [ - 'connectTimeout' => $config->connectTimeout, - 'readTimeout' => $config->readTimeout, - ]); - return new CredentialsProviderWrap('credentials_uri', $provider); - default: - throw new InvalidArgumentException('Unsupported credential type option: ' . $config->type . ', support: access_key, sts, bearer, ecs_ram_role, ram_role_arn, rsa_key_pair, oidc_role_arn, credentials_uri'); - } + $dstr = preg_replace_callback('/([A-Z]+)/', function ($matchs) { + return '_' . strtolower($matchs[0]); + }, $str); + return trim(preg_replace('/_{2,}/', '_', $dstr), '_'); } /** - * @return CredentialModel - * @throws RuntimeException - * @throws GuzzleException + * @throws ReflectionException + */ + private function parseConfig() + { + if (!isset($this->config['type'])) { + throw new InvalidArgumentException('Missing required type option'); + } + + $this->type = $this->config['type']; + if (!isset($this->types[$this->type])) { + throw new InvalidArgumentException( + 'Invalid type option, support: ' . + implode(', ', array_keys($this->types)) + ); + } + + $class = new ReflectionClass($this->types[$this->type]); + $parameters = []; + /** + * @var $parameter ReflectionParameter + */ + foreach ($class->getConstructor()->getParameters() as $parameter) { + $parameters[] = $this->getValue($parameter); + } + + $this->credential = $class->newInstance(...$parameters); + } + + /** + * @param ReflectionParameter $parameter + * + * @return string|array + * @throws ReflectionException + */ + protected function getValue(ReflectionParameter $parameter) + { + if ($parameter->name === 'config' || $parameter->name === 'credential') { + return $this->config; + } + + foreach ($this->config as $key => $value) { + if (strtolower($parameter->name) === $key) { + return $value; + } + } + + if ($parameter->isDefaultValueAvailable()) { + return $parameter->getDefaultValue(); + } + + throw new InvalidArgumentException("Missing required {$parameter->name} option in config for {$this->type}"); + } + + /** + * @return AccessKeyCredential|BearerTokenCredential|EcsRamRoleCredential|RamRoleArnCredential|RsaKeyPairCredential */ public function getCredential() { - return $this->credential->getCredential(); + return $this->credential; } /** @@ -192,68 +157,17 @@ class Credential */ public function getConfig() { - return $this->config->toMap(); + return $this->config; } /** - * @deprecated use getCredential() instead - * * @return string - * @throws RuntimeException - * @throws GuzzleException */ public function getType() { - return $this->credential->getCredential()->getType(); + return $this->type; } - /** - * @deprecated use getCredential() instead - * - * @return string - * @throws RuntimeException - * @throws GuzzleException - */ - public function getAccessKeyId() - { - return $this->credential->getCredential()->getAccessKeyId(); - } - - /** - * @deprecated use getCredential() instead - * - * @return string - * @throws RuntimeException - * @throws GuzzleException - */ - public function getAccessKeySecret() - { - return $this->credential->getCredential()->getAccessKeySecret(); - } - - /** - * @deprecated use getCredential() instead - * - * @return string - * @throws RuntimeException - * @throws GuzzleException - */ - public function getSecurityToken() - { - return $this->credential->getCredential()->getSecurityToken(); - } - - /** - * @deprecated use getCredential() instead - * - * @return string - * @throws RuntimeException - * @throws GuzzleException - */ - public function getBearerToken() - { - return $this->credential->getCredential()->getBearerToken(); - } /** * @param string $name diff --git a/Server/vendor/alibabacloud/credentials/src/Credential/Config.php b/Server/vendor/alibabacloud/credentials/src/Credential/Config.php index 1fb57e3f..3fa1608d 100644 --- a/Server/vendor/alibabacloud/credentials/src/Credential/Config.php +++ b/Server/vendor/alibabacloud/credentials/src/Credential/Config.php @@ -2,269 +2,49 @@ namespace AlibabaCloud\Credentials\Credential; -use AlibabaCloud\Tea\Model; - -class Config extends Model +class Config { - public function validate() - { - } - public function toMap() - { - $res = []; - if (null !== $this->accessKeyId) { - $res['accessKeyId'] = $this->accessKeyId; - } - if (null !== $this->accessKeySecret) { - $res['accessKeySecret'] = $this->accessKeySecret; - } - if (null !== $this->securityToken) { - $res['securityToken'] = $this->securityToken; - } - if (null !== $this->bearerToken) { - $res['bearerToken'] = $this->bearerToken; - } - if (null !== $this->durationSeconds) { - $res['durationSeconds'] = $this->durationSeconds; - } - if (null !== $this->roleArn) { - $res['roleArn'] = $this->roleArn; - } - if (null !== $this->policy) { - $res['policy'] = $this->policy; - } - if (null !== $this->roleSessionExpiration) { - $res['roleSessionExpiration'] = $this->roleSessionExpiration; - } - if (null !== $this->roleSessionName) { - $res['roleSessionName'] = $this->roleSessionName; - } - if (null !== $this->publicKeyId) { - $res['publicKeyId'] = $this->publicKeyId; - } - if (null !== $this->privateKeyFile) { - $res['privateKeyFile'] = $this->privateKeyFile; - } - if (null !== $this->roleName) { - $res['roleName'] = $this->roleName; - } - if (null !== $this->credentialsURI) { - $res['credentialsURI'] = $this->credentialsURI; - } - if (null !== $this->type) { - $res['type'] = $this->type; - } - if (null !== $this->STSEndpoint) { - $res['STSEndpoint'] = $this->STSEndpoint; - } - if (null !== $this->externalId) { - $res['externalId'] = $this->externalId; - } - return $res; - } /** - * @param array $map - * @return Config - */ - public static function fromMap($map = []) - { - $model = new self(); - if (isset($map['accessKeyId'])) { - $model->accessKeyId = $map['accessKeyId']; - } - if (isset($map['accessKeySecret'])) { - $model->accessKeySecret = $map['accessKeySecret']; - } - if (isset($map['securityToken'])) { - $model->securityToken = $map['securityToken']; - } - if (isset($map['bearerToken'])) { - $model->bearerToken = $map['bearerToken']; - } - if (isset($map['durationSeconds'])) { - $model->durationSeconds = $map['durationSeconds']; - } - if (isset($map['roleArn'])) { - $model->roleArn = $map['roleArn']; - } - if (isset($map['policy'])) { - $model->policy = $map['policy']; - } - if (isset($map['roleSessionExpiration'])) { - $model->roleSessionExpiration = $map['roleSessionExpiration']; - } - if (isset($map['roleSessionName'])) { - $model->roleSessionName = $map['roleSessionName']; - } - if (isset($map['publicKeyId'])) { - $model->publicKeyId = $map['publicKeyId']; - } - if (isset($map['privateKeyFile'])) { - $model->privateKeyFile = $map['privateKeyFile']; - } - if (isset($map['roleName'])) { - $model->roleName = $map['roleName']; - } - if (isset($map['credentialsURI'])) { - $model->credentialsURI = $map['credentialsURI']; - } - if (isset($map['type'])) { - $model->type = $map['type']; - } - if (isset($map['STSEndpoint'])) { - $model->STSEndpoint = $map['STSEndpoint']; - } - if (isset($map['externalId'])) { - $model->externalId = $map['externalId']; - } - return $model; - } - /** - * @description credential type - * @example access_key * @var string */ public $type = 'default'; - /** - * @description accesskey id - * @var string - */ - public $accessKeyId; + public $accessKeyId = ""; - /** - * @description accesskey secret - * @var string - */ - public $accessKeySecret; + public $accessKeySecret = ""; - /** - * @description security token - * @var string - */ - public $securityToken; + public $securityToken = ""; - /** - * @description bearer token - * @var string - */ - public $bearerToken; + public $bearerToken = ""; - /** - * @description role name - * @var string - */ - public $roleName; + public $roleName = ""; - /** - * @description role arn - * @var string - */ - public $roleArn; + public $roleArn = ""; - /** - * @description oidc provider arn - * @var string - */ - public $oidcProviderArn; + public $roleSessionName = ""; - /** - * @description oidc token file path - * @var string - */ - public $oidcTokenFilePath; + public $host = ""; - /** - * @description role session expiration - * @example 3600 - * @var int - */ - public $roleSessionExpiration; + public $publicKeyId = ""; - /** - * @description role session name - * @var string - */ - public $roleSessionName; + public $privateKeyFile = ""; - /** - * @description role arn policy - * @var string - */ - public $policy; + public $readTimeout = 0; - /** - * @description external id for ram role arn - * @var string - */ - public $externalId; + public $connectTimeout = 0; - /** - * @description sts endpoint - * @var string - */ - public $STSEndpoint; - - public $publicKeyId; - - public $privateKeyFile; - - /** - * @description read timeout - * @var int - */ - public $readTimeout; - - /** - * @description connection timeout - * @var int - */ - public $connectTimeout; - - /** - * @description disable IMDS v1 - * @var bool - */ - public $disableIMDSv1; - - /** - * @description credentials URI - * @var string - */ - public $credentialsURI; - - /** - * @deprecated - */ - public $metadataTokenDuration; - - /** - * @deprecated - */ - public $durationSeconds; - - /** - * @deprecated - */ - public $host; - - /** - * @deprecated - */ - public $expiration; - - /** - * @deprecated - */ public $certFile = ""; - /** - * @deprecated - */ public $certPassword = ""; - /** - * @internal - */ - public $proxy; + public $proxy = ""; + + public $expiration = 0; + + public function __construct($config) + { + foreach ($config as $k => $v) { + $this->{$k} = $v; + } + } } diff --git a/Server/vendor/alibabacloud/credentials/src/Credential/CredentialModel.php b/Server/vendor/alibabacloud/credentials/src/Credential/CredentialModel.php deleted file mode 100644 index 8d516d90..00000000 --- a/Server/vendor/alibabacloud/credentials/src/Credential/CredentialModel.php +++ /dev/null @@ -1,143 +0,0 @@ -accessKeyId) { - $res['accessKeyId'] = $this->accessKeyId; - } - if (null !== $this->accessKeySecret) { - $res['accessKeySecret'] = $this->accessKeySecret; - } - if (null !== $this->securityToken) { - $res['securityToken'] = $this->securityToken; - } - if (null !== $this->bearerToken) { - $res['bearerToken'] = $this->bearerToken; - } - if (null !== $this->type) { - $res['type'] = $this->type; - } - if (null !== $this->providerName) { - $res['providerName'] = $this->providerName; - } - return $res; - } - /** - * @param array $map - * @return CredentialModel - */ - public static function fromMap($map = []) - { - $model = new self(); - if (isset($map['accessKeyId'])) { - $model->accessKeyId = $map['accessKeyId']; - } - if (isset($map['accessKeySecret'])) { - $model->accessKeySecret = $map['accessKeySecret']; - } - if (isset($map['securityToken'])) { - $model->securityToken = $map['securityToken']; - } - if (isset($map['bearerToken'])) { - $model->bearerToken = $map['bearerToken']; - } - if (isset($map['type'])) { - $model->type = $map['type']; - } - if(isset($map['providerName'])){ - $model->providerName = $map['providerName']; - } - return $model; - } - /** - * @description accesskey id - * @var string - */ - public $accessKeyId; - - /** - * @description accesskey secret - * @var string - */ - public $accessKeySecret; - - /** - * @description security token - * @var string - */ - public $securityToken; - - /** - * @description bearer token - * @var string - */ - public $bearerToken; - - /** - * @description type - * @example access_key - * @var string - */ - public $type; - - /** - * @description provider name - * @example cli_profile/static_ak - * @var string - */ - public $providerName; - - /** - * @return string - */ - public function getAccessKeyId() - { - return $this->accessKeyId; - } - - /** - * @return string - */ - public function getAccessKeySecret() - { - return $this->accessKeySecret; - } - - /** - * @return string - */ - public function getSecurityToken() - { - return $this->securityToken; - } - - /** - * @return string - */ - public function getBearerToken() - { - return $this->bearerToken; - } - - public function getType() - { - return $this->type; - } - - public function getProviderName() - { - return $this->providerName; - } - -} diff --git a/Server/vendor/alibabacloud/credentials/src/Credential/RefreshResult.php b/Server/vendor/alibabacloud/credentials/src/Credential/RefreshResult.php deleted file mode 100644 index fd83446a..00000000 --- a/Server/vendor/alibabacloud/credentials/src/Credential/RefreshResult.php +++ /dev/null @@ -1,99 +0,0 @@ -credentials = $credentials; - $this->staleTime = $staleTime; - $this->prefetchTime = $prefetchTime; - } - public function validate() {} - public function toMap() - { - $res = []; - if (null !== $this->staleTime) { - $res['staleTime'] = $this->staleTime; - } - if (null !== $this->prefetchTime) { - $res['prefetchTime'] = $this->prefetchTime; - } - if (null !== $this->credentials) { - $res['credentials'] = $this->credentials; - } - return $res; - } - /** - * @param array $map - * @return RefreshResult - */ - public static function fromMap($map = []) - { - $model = new self(); - if (isset($map['staleTime'])) { - $model->staleTime = $map['staleTime']; - } - if (isset($map['prefetchTime'])) { - $model->staleTime = $map['prefetchTime']; - } - if (isset($map['credentials'])) { - $model->staleTime = $map['credentials']; - } - return $model; - } - /** - * @description staleTime - * @var int - */ - public $staleTime; - - /** - * @description prefetchTime - * @var int - */ - public $prefetchTime; - - /** - * @description credentials - * @var Credentials - */ - public $credentials; - - - /** - * @return Credentials - */ - public function credentials() - { - return $this->credentials; - } - - /** - * @var int - */ - public function staleTime() - { - return $this->staleTime; - } - - /** - * @var int - */ - public function prefetchTime() - { - return $this->prefetchTime; - } -} diff --git a/Server/vendor/alibabacloud/credentials/src/Credentials.php b/Server/vendor/alibabacloud/credentials/src/Credentials.php index f064b864..11e68abf 100644 --- a/Server/vendor/alibabacloud/credentials/src/Credentials.php +++ b/Server/vendor/alibabacloud/credentials/src/Credentials.php @@ -3,8 +3,6 @@ namespace AlibabaCloud\Credentials; use AlibabaCloud\Credentials\Providers\ChainProvider; -use AlibabaCloud\Credentials\Utils\Filter; -use AlibabaCloud\Credentials\Utils\MockTrait; use ReflectionException; use RuntimeException; @@ -101,4 +99,4 @@ class Credentials self::$credentials[\strtolower($name)] = \array_change_key_case($credential); } -} \ No newline at end of file +} diff --git a/Server/vendor/alibabacloud/credentials/src/CredentialsInterface.php b/Server/vendor/alibabacloud/credentials/src/CredentialsInterface.php index 0d109e28..e8ff0fbd 100644 --- a/Server/vendor/alibabacloud/credentials/src/CredentialsInterface.php +++ b/Server/vendor/alibabacloud/credentials/src/CredentialsInterface.php @@ -2,11 +2,9 @@ namespace AlibabaCloud\Credentials; -use AlibabaCloud\Credentials\Credential\CredentialModel; use AlibabaCloud\Credentials\Signature\SignatureInterface; /** - * @internal This class is intended for internal use within the package. * Interface CredentialsInterface * * @codeCoverageIgnore @@ -14,19 +12,12 @@ use AlibabaCloud\Credentials\Signature\SignatureInterface; interface CredentialsInterface { /** - * @deprecated * @return string */ public function __toString(); /** - * @deprecated * @return SignatureInterface */ public function getSignature(); - - /** - * @return CredentialModel - */ - public function getCredential(); } diff --git a/Server/vendor/alibabacloud/credentials/src/CredentialsProviderWrap.php b/Server/vendor/alibabacloud/credentials/src/CredentialsProviderWrap.php deleted file mode 100644 index 4e8611ef..00000000 --- a/Server/vendor/alibabacloud/credentials/src/CredentialsProviderWrap.php +++ /dev/null @@ -1,76 +0,0 @@ -typeName = $typeName; - $this->credentialsProvider = $credentialsProvider; - } - - /** - * @inheritDoc - */ - public function getCredential() - { - $credentials = $this->credentialsProvider->getCredentials(); - return new CredentialModel([ - 'accessKeyId' => $credentials->getAccessKeyId(), - 'accessKeySecret' => $credentials->getAccessKeySecret(), - 'securityToken' => $credentials->getSecurityToken(), - 'type' => $this->typeName, - 'providerName' => $credentials->getProviderName(), - ]); - } - - /** - * @param string $name - * @param array $arguments - * - * @return mixed - */ - public function __call($name, $arguments) - { - return $this->credentialsProvider->$name($arguments); - } - - public function __toString() - { - return "credentialsProviderWrap#$this->typeName"; - } - - /** - * @return ShaHmac1Signature - */ - public function getSignature() - { - return null; - } -} \ No newline at end of file diff --git a/Server/vendor/alibabacloud/credentials/src/EcsRamRoleCredential.php b/Server/vendor/alibabacloud/credentials/src/EcsRamRoleCredential.php index ba66c0df..08d8fda4 100644 --- a/Server/vendor/alibabacloud/credentials/src/EcsRamRoleCredential.php +++ b/Server/vendor/alibabacloud/credentials/src/EcsRamRoleCredential.php @@ -2,18 +2,15 @@ namespace AlibabaCloud\Credentials; -use AlibabaCloud\Credentials\Providers\EcsRamRoleCredentialsProvider; -use AlibabaCloud\Credentials\Credential\CredentialModel; -use AlibabaCloud\Credentials\Signature\ShaHmac1Signature; +use AlibabaCloud\Credentials\Providers\EcsRamRoleProvider; use AlibabaCloud\Credentials\Request\Request; -use AlibabaCloud\Credentials\Utils\Filter; +use AlibabaCloud\Credentials\Signature\ShaHmac1Signature; use Exception; use GuzzleHttp\Exception\GuzzleException; use InvalidArgumentException; use RuntimeException; /** - * @deprecated * Use the RAM role of an ECS instance to complete the authentication. */ class EcsRamRoleCredential implements CredentialsInterface @@ -24,33 +21,16 @@ class EcsRamRoleCredential implements CredentialsInterface */ private $roleName; - /** - * @var boolean - */ - private $disableIMDSv1; - - /** - * @var int - */ - private $metadataTokenDuration; - - /** * EcsRamRoleCredential constructor. * * @param $role_name */ - public function __construct($role_name = null, $disable_imdsv1 = false, $metadata_token_duration = 21600) + public function __construct($role_name = null) { Filter::roleName($role_name); $this->roleName = $role_name; - - Filter::disableIMDSv1($disable_imdsv1); - - $this->disableIMDSv1 = $disable_imdsv1; - - $this->metadataTokenDuration = $metadata_token_duration; } /** @@ -76,8 +56,8 @@ class EcsRamRoleCredential implements CredentialsInterface public function getRoleNameFromMeta() { $options = [ - 'http_errors' => false, - 'timeout' => 1, + 'http_errors' => false, + 'timeout' => 1, 'connect_timeout' => 1, ]; @@ -95,7 +75,7 @@ class EcsRamRoleCredential implements CredentialsInterface throw new RuntimeException('Error retrieving credentials from result: ' . $result->getBody()); } - $role_name = (string) $result; + $role_name = (string)$result; if (!$role_name) { throw new RuntimeException('Error retrieving credentials from result is empty'); } @@ -130,18 +110,13 @@ class EcsRamRoleCredential implements CredentialsInterface } /** - * @return AlibabaCloud\Credentials\Providers\Credentials + * @return StsCredential * @throws Exception * @throws GuzzleException */ protected function getSessionCredential() { - $params = [ - "roleName" => $this->roleName, - 'disableIMDSv1' => $this->disableIMDSv1, - 'metadataTokenDuration' => $this->metadataTokenDuration, - ]; - return (new EcsRamRoleCredentialsProvider($params))->getCredentials(); + return (new EcsRamRoleProvider($this))->get(); } /** @@ -173,27 +148,4 @@ class EcsRamRoleCredential implements CredentialsInterface { return $this->getSessionCredential()->getExpiration(); } - - /** - * @return bool - */ - public function isDisableIMDSv1() - { - return $this->disableIMDSv1; - } - - /** - * @inheritDoc - */ - public function getCredential() - { - $credentials = $this->getSessionCredential(); - return new CredentialModel([ - 'accessKeyId' => $credentials->getAccessKeyId(), - 'accessKeySecret' => $credentials->getAccessKeySecret(), - 'securityToken' => $credentials->getSecurityToken(), - 'type' => 'ecs_ram_role', - ]); - } - } diff --git a/Server/vendor/alibabacloud/credentials/src/Filter.php b/Server/vendor/alibabacloud/credentials/src/Filter.php new file mode 100644 index 00000000..d17ec4cc --- /dev/null +++ b/Server/vendor/alibabacloud/credentials/src/Filter.php @@ -0,0 +1,134 @@ +filterProfileName($params); - } - - private function filterProfileName(array $params) - { - if (Helper::envNotEmpty('ALIBABA_CLOUD_PROFILE')) { - $this->profileName = Helper::env('ALIBABA_CLOUD_PROFILE'); - } - - if (isset($params['profileName'])) { - $this->profileName = $params['profileName']; - } - } - - /** - * @return bool - */ - private function shouldReloadCredentialsProvider() - { - if (is_null($this->credentialsProvider)) { - return true; - } - - return false; - } - - /** - * @return CredentialsProvider - */ - protected function reloadCredentialsProvider($profileFile, $profileName) - { - if (!Helper::inOpenBasedir($profileFile)) { - throw new RuntimeException('Unable to open credentials file: ' . $profileFile); - } - - if (!\is_readable($profileFile) || !\is_file($profileFile)) { - throw new RuntimeException('Credentials file is not readable: ' . $profileFile); - } - - $jsonContent = \file_get_contents($profileFile); - $fileArray = json_decode($jsonContent, true); - - if (\is_array($fileArray) && !empty($fileArray)) { - if (is_null($profileName) || $profileName === '') { - $profileName = $fileArray['current']; - } - if (isset($fileArray['profiles'])) { - foreach ($fileArray['profiles'] as $profile) { - if (Helper::unsetReturnNull($profile, 'name') === $profileName) { - switch (Helper::unsetReturnNull($profile, 'mode')) { - case 'AK': - return new StaticAKCredentialsProvider([ - 'accessKeyId' => Helper::unsetReturnNull($profile, 'access_key_id'), - 'accessKeySecret' => Helper::unsetReturnNull($profile, 'access_key_secret'), - ]); - case 'RamRoleArn': - $innerProvider = new StaticAKCredentialsProvider([ - 'accessKeyId' => Helper::unsetReturnNull($profile, 'access_key_id'), - 'accessKeySecret' => Helper::unsetReturnNull($profile, 'access_key_secret'), - ]); - return new RamRoleArnCredentialsProvider([ - 'credentialsProvider' => $innerProvider, - 'roleArn' => Helper::unsetReturnNull($profile, 'ram_role_arn'), - 'roleSessionName' => Helper::unsetReturnNull($profile, 'ram_session_name'), - 'durationSeconds' => Helper::unsetReturnNull($profile, 'expired_seconds'), - 'policy' => Helper::unsetReturnNull($profile, 'policy'), - 'externalId' => Helper::unsetReturnNull($profile, 'external_id'), - 'stsRegionId' => Helper::unsetReturnNull($profile, 'sts_region'), - 'enableVpc' => Helper::unsetReturnNull($profile, 'enable_vpc'), - ]); - case 'EcsRamRole': - return new EcsRamRoleCredentialsProvider([ - 'roleName' => Helper::unsetReturnNull($profile, 'ram_role_name'), - ]); - case 'OIDC': - return new OIDCRoleArnCredentialsProvider([ - 'roleArn' => Helper::unsetReturnNull($profile, 'ram_role_arn'), - 'oidcProviderArn' => Helper::unsetReturnNull($profile, 'oidc_provider_arn'), - 'oidcTokenFilePath' => Helper::unsetReturnNull($profile, 'oidc_token_file'), - 'roleSessionName' => Helper::unsetReturnNull($profile, 'ram_session_name'), - 'durationSeconds' => Helper::unsetReturnNull($profile, 'expired_seconds'), - 'policy' => Helper::unsetReturnNull($profile, 'policy'), - 'stsRegionId' => Helper::unsetReturnNull($profile, 'sts_region'), - 'enableVpc' => Helper::unsetReturnNull($profile, 'enable_vpc'), - ]); - case 'ChainableRamRoleArn': - $previousProvider = $this->reloadCredentialsProvider($profileFile, Helper::unsetReturnNull($profile, 'source_profile')); - return new RamRoleArnCredentialsProvider([ - 'credentialsProvider' => $previousProvider, - 'roleArn' => Helper::unsetReturnNull($profile, 'ram_role_arn'), - 'roleSessionName' => Helper::unsetReturnNull($profile, 'ram_session_name'), - 'durationSeconds' => Helper::unsetReturnNull($profile, 'expired_seconds'), - 'policy' => Helper::unsetReturnNull($profile, 'policy'), - 'externalId' => Helper::unsetReturnNull($profile, 'external_id'), - 'stsRegionId' => Helper::unsetReturnNull($profile, 'sts_region'), - 'enableVpc' => Helper::unsetReturnNull($profile, 'enable_vpc'), - ]); - default: - throw new RuntimeException('Unsupported credential mode from CLI credentials file: ' . Helper::unsetReturnNull($profile, 'mode')); - } - } - } - } - } - throw new RuntimeException('Failed to get credential from CLI credentials file: ' . $profileFile); - } - /** - * Get credential. - * - * @return Credentials - * @throws RuntimeException - */ - public function getCredentials() - { - if (Helper::envNotEmpty('ALIBABA_CLOUD_CLI_PROFILE_DISABLED') && Helper::env('ALIBABA_CLOUD_CLI_PROFILE_DISABLED') === true) { - throw new RuntimeException('CLI credentials file is disabled'); - } - $cliProfileFile = self::getDefaultFile(); - if ($this->shouldReloadCredentialsProvider()) { - $this->credentialsProvider = $this->reloadCredentialsProvider($cliProfileFile, $this->profileName); - } - - $credentials = $this->credentialsProvider->getCredentials(); - return new Credentials([ - 'accessKeyId' => $credentials->getAccessKeyId(), - 'accessKeySecret' => $credentials->getAccessKeySecret(), - 'securityToken' => $credentials->getSecurityToken(), - 'providerName' => $this->getProviderName() . '/' . $this->credentialsProvider->getProviderName(), - ]); - } - - /** - * Get the default credential file. - * - * @return string - */ - private function getDefaultFile() - { - return Helper::getHomeDirectory() . - DIRECTORY_SEPARATOR . - '.aliyun' . - DIRECTORY_SEPARATOR . - 'config.json'; - } - - /** - * @return string - */ - public function getProviderName() - { - return 'cli_profile'; - } -} diff --git a/Server/vendor/alibabacloud/credentials/src/Providers/ChainProvider.php b/Server/vendor/alibabacloud/credentials/src/Providers/ChainProvider.php index d6c15403..83cb6502 100644 --- a/Server/vendor/alibabacloud/credentials/src/Providers/ChainProvider.php +++ b/Server/vendor/alibabacloud/credentials/src/Providers/ChainProvider.php @@ -3,13 +3,12 @@ namespace AlibabaCloud\Credentials\Providers; use AlibabaCloud\Credentials\Credentials; -use AlibabaCloud\Credentials\Utils\Helper; +use AlibabaCloud\Credentials\Helper; use Closure; use InvalidArgumentException; use RuntimeException; /** - * @deprecated * Class ChainProvider * * @package AlibabaCloud\Credentials\Providers @@ -185,4 +184,4 @@ class ChainProvider } }; } -} \ No newline at end of file +} diff --git a/Server/vendor/alibabacloud/credentials/src/Providers/Credentials.php b/Server/vendor/alibabacloud/credentials/src/Providers/Credentials.php deleted file mode 100644 index bfd4fe31..00000000 --- a/Server/vendor/alibabacloud/credentials/src/Providers/Credentials.php +++ /dev/null @@ -1,87 +0,0 @@ - $v) { - $this->{$k} = $v; - } - } - } - - /** - * @return string - */ - public function getAccessKeyId() - { - return $this->accessKeyId; - } - - /** - * @return string - */ - public function getAccessKeySecret() - { - return $this->accessKeySecret; - } - - /** - * @return string - */ - public function getSecurityToken() - { - return $this->securityToken; - } - - /** - * @return int - */ - public function getExpiration() - { - return $this->expiration; - } - - /** - * @return string - */ - public function getProviderName() - { - return $this->providerName; - } -} diff --git a/Server/vendor/alibabacloud/credentials/src/Providers/CredentialsProvider.php b/Server/vendor/alibabacloud/credentials/src/Providers/CredentialsProvider.php deleted file mode 100644 index ddbd1a18..00000000 --- a/Server/vendor/alibabacloud/credentials/src/Providers/CredentialsProvider.php +++ /dev/null @@ -1,24 +0,0 @@ -filterReuseLastProviderEnabled($params); - $this->createDefaultChain(); - Filter::reuseLastProviderEnabled($this->reuseLastProviderEnabled); - } - - private function filterReuseLastProviderEnabled(array $params) - { - $this->reuseLastProviderEnabled = true; - if (isset($params['reuseLastProviderEnabled'])) { - $this->reuseLastProviderEnabled = $params['reuseLastProviderEnabled']; - } - } - - private function createDefaultChain() - { - self::$defaultProviders = [ - new EnvironmentVariableCredentialsProvider(), - ]; - if ( - Helper::envNotEmpty('ALIBABA_CLOUD_ROLE_ARN') - && Helper::envNotEmpty('ALIBABA_CLOUD_OIDC_PROVIDER_ARN') - && Helper::envNotEmpty('ALIBABA_CLOUD_OIDC_TOKEN_FILE') - ) { - array_push( - self::$defaultProviders, - new OIDCRoleArnCredentialsProvider() - ); - } - array_push( - self::$defaultProviders, - new CLIProfileCredentialsProvider() - ); - array_push( - self::$defaultProviders, - new ProfileCredentialsProvider() - ); - array_push( - self::$defaultProviders, - new EcsRamRoleCredentialsProvider() - ); - if (Helper::envNotEmpty('ALIBABA_CLOUD_CREDENTIALS_URI')) { - array_push( - self::$defaultProviders, - new URLCredentialsProvider() - ); - } - } - - /** - * @param CredentialsProvider ...$providers - */ - public static function set(...$providers) - { - if (empty($providers)) { - throw new InvalidArgumentException('No providers in chain'); - } - - foreach ($providers as $provider) { - if (!$provider instanceof CredentialsProvider) { - throw new InvalidArgumentException('Providers must all be CredentialsProvider'); - } - } - - self::$customChain = $providers; - } - - /** - * @return bool - */ - public static function hasCustomChain() - { - return (bool) self::$customChain; - } - - public static function flush() - { - self::$customChain = []; - } - - /** - * Get credential. - * - * @return Credentials - * @throws RuntimeException - */ - public function getCredentials() - { - if ($this->reuseLastProviderEnabled && !is_null($this->lastUsedCredentialsProvider)) { - $credentials = $this->lastUsedCredentialsProvider->getCredentials(); - return new Credentials([ - 'accessKeyId' => $credentials->getAccessKeyId(), - 'accessKeySecret' => $credentials->getAccessKeySecret(), - 'securityToken' => $credentials->getSecurityToken(), - 'providerName' => $this->getProviderName() . '/' . $this->lastUsedCredentialsProvider->getProviderName(), - ]); - } - - $providerChain = array_merge( - self::$customChain, - self::$defaultProviders - ); - - $exceptionMessages = []; - - foreach ($providerChain as $provider) { - try { - $credentials = $provider->getCredentials(); - $this->lastUsedCredentialsProvider = $provider; - return new Credentials([ - 'accessKeyId' => $credentials->getAccessKeyId(), - 'accessKeySecret' => $credentials->getAccessKeySecret(), - 'securityToken' => $credentials->getSecurityToken(), - 'providerName' => $this->getProviderName() . '/' . $provider->getProviderName(), - ]); - } catch (Exception $exception) { - array_push($exceptionMessages, basename(str_replace('\\', '/', get_class($provider))) . ': ' . $exception->getMessage()); - } - } - throw new RuntimeException('Unable to load credentials from any of the providers in the chain: ' . implode(', ', $exceptionMessages)); - - } - - /** - * @inheritDoc - */ - public function getProviderName() - { - return "default"; - } -} \ No newline at end of file diff --git a/Server/vendor/alibabacloud/credentials/src/Providers/EcsRamRoleCredentialsProvider.php b/Server/vendor/alibabacloud/credentials/src/Providers/EcsRamRoleCredentialsProvider.php deleted file mode 100644 index 8dffb50d..00000000 --- a/Server/vendor/alibabacloud/credentials/src/Providers/EcsRamRoleCredentialsProvider.php +++ /dev/null @@ -1,276 +0,0 @@ -filterOptions($options); - $this->filterRoleName($params); - $this->filterDisableECSIMDSv1($params); - Filter::roleName($this->roleName); - Filter::disableIMDSv1($this->disableIMDSv1); - } - - private function filterOptions(array $options) - { - if (isset($options['connectTimeout'])) { - $this->connectTimeout = $options['connectTimeout']; - } - - if (isset($options['readTimeout'])) { - $this->readTimeout = $options['readTimeout']; - } - - Filter::timeout($this->connectTimeout, $this->readTimeout); - } - - private function filterRoleName(array $params) - { - if (Helper::envNotEmpty('ALIBABA_CLOUD_ECS_METADATA')) { - $this->roleName = Helper::env('ALIBABA_CLOUD_ECS_METADATA'); - } - - if (isset($params['roleName'])) { - $this->roleName = $params['roleName']; - } - } - - private function filterDisableECSIMDSv1($params) - { - if (Helper::envNotEmpty('ALIBABA_CLOUD_IMDSV1_DISABLED')) { - $this->disableIMDSv1 = Helper::env('ALIBABA_CLOUD_IMDSV1_DISABLED') === true ? true : false; - } - - if (isset($params['disableIMDSv1'])) { - $this->disableIMDSv1 = $params['disableIMDSv1']; - } - } - - /** - * Get credentials by request. - * - * @return RefreshResult - * @throws InvalidArgumentException - * @throws RuntimeException - * @throws GuzzleException - */ - public function refreshCredentials() - { - if (Helper::envNotEmpty('ALIBABA_CLOUD_ECS_METADATA_DISABLED') && Helper::env('ALIBABA_CLOUD_ECS_METADATA_DISABLED') === true) { - throw new RuntimeException('IMDS credentials is disabled'); - } - - if (is_null($this->roleName) || $this->roleName === '') { - $this->roleName = $this->getRoleNameFromMeta(); - } - - $url = $this->metadataHost . $this->ecsUri . $this->roleName; - $options = Request::commonOptions(); - $options['read_timeout'] = $this->readTimeout; - $options['connect_timeout'] = $this->connectTimeout; - - $metadataToken = $this->getMetadataToken(); - if (!is_null($metadataToken)) { - $options['headers']['X-aliyun-ecs-metadata-token'] = $metadataToken; - } - - $result = Request::createClient()->request('GET', $url, $options); - - if ($result->getStatusCode() === 404) { - throw new InvalidArgumentException('The role was not found in the instance' . (string) $result); - } - - if ($result->getStatusCode() !== 200) { - throw new RuntimeException('Error refreshing credentials from IMDS, statusCode: ' . $result->getStatusCode() . ', result: ' . (string) $result); - } - - $credentials = $result->toArray(); - - if (!isset($credentials['AccessKeyId']) || !isset($credentials['AccessKeySecret']) || !isset($credentials['SecurityToken'])) { - throw new RuntimeException('Error retrieving credentials from IMDS result:' . $result->toJson()); - } - - if (!isset($credentials['Code']) || $credentials['Code'] !== 'Success') { - throw new RuntimeException('Error retrieving credentials from IMDS result, Code is not Success:' . $result->toJson()); - } - - return new RefreshResult(new Credentials([ - 'accessKeyId' => $credentials['AccessKeyId'], - 'accessKeySecret' => $credentials['AccessKeySecret'], - 'securityToken' => $credentials['SecurityToken'], - 'expiration' => \strtotime($credentials['Expiration']), - 'providerName' => $this->getProviderName(), - ]), $this->getStaleTime(strtotime($credentials["Expiration"])), $this->getPrefetchTime(strtotime($credentials["Expiration"]))); - } - - /** - * @return string - * @throws InvalidArgumentException - * @throws RuntimeException - * @throws GuzzleException - */ - private function getRoleNameFromMeta() - { - $options = Request::commonOptions(); - $options['read_timeout'] = $this->readTimeout; - $options['connect_timeout'] = $this->connectTimeout; - - $metadataToken = $this->getMetadataToken(); - if (!is_null($metadataToken)) { - $options['headers']['X-aliyun-ecs-metadata-token'] = $metadataToken; - } - - $result = Request::createClient()->request( - 'GET', - 'http://100.100.100.200/latest/meta-data/ram/security-credentials/', - $options - ); - - if ($result->getStatusCode() === 404) { - throw new InvalidArgumentException('The role name was not found in the instance' . (string) $result); - } - - if ($result->getStatusCode() !== 200) { - throw new RuntimeException('Error retrieving role name from result: ' . (string) $result); - } - - $role_name = (string) $result; - if (!$role_name) { - throw new RuntimeException('Error retrieving role name from result is empty'); - } - - return $role_name; - } - - /** - * Get metadata token by request. - * - * @return string - * @throws RuntimeException - * @throws GuzzleException - */ - private function getMetadataToken() - { - $url = $this->metadataHost . $this->metadataTokenUri; - $options = Request::commonOptions(); - $options['read_timeout'] = $this->readTimeout; - $options['connect_timeout'] = $this->connectTimeout; - $options['headers']['X-aliyun-ecs-metadata-token-ttl-seconds'] = $this->metadataTokenDuration; - - $result = Request::createClient()->request('PUT', $url, $options); - - if ($result->getStatusCode() != 200) { - if ($this->disableIMDSv1) { - throw new RuntimeException('Failed to get token from ECS Metadata Service. HttpCode= ' . $result->getStatusCode()); - } - return null; - } - return (string) $result; - } - - /** - * @var int - */ - public function getPrefetchTime($expiration) - { - return $expiration <= 0 ? - time() + (5 * 60) : - time() + (60 * 60); - } - - /** - * @return string - */ - public function key() - { - return 'ecs_ram_role#roleName#' . $this->roleName; - } - - /** - * @return string - */ - public function getProviderName() - { - return 'ecs_ram_role'; - } - - /** - * @return string - */ - public function getRoleName() - { - return $this->roleName; - } - - /** - * @return bool - */ - public function isDisableIMDSv1() - { - return $this->disableIMDSv1; - } -} diff --git a/Server/vendor/alibabacloud/credentials/src/Providers/EcsRamRoleProvider.php b/Server/vendor/alibabacloud/credentials/src/Providers/EcsRamRoleProvider.php new file mode 100644 index 00000000..828bdade --- /dev/null +++ b/Server/vendor/alibabacloud/credentials/src/Providers/EcsRamRoleProvider.php @@ -0,0 +1,94 @@ +getCredentialsInCache(); + + if ($result === null) { + $result = $this->request(); + + if (!isset($result['AccessKeyId'], $result['AccessKeySecret'], $result['SecurityToken'])) { + throw new RuntimeException($this->error); + } + + $this->cache($result->toArray()); + } + + return new StsCredential( + $result['AccessKeyId'], + $result['AccessKeySecret'], + strtotime($result['Expiration']), + $result['SecurityToken'] + ); + } + + /** + * Get credentials by request. + * + * @return ResponseInterface + * @throws Exception + * @throws GuzzleException + */ + public function request() + { + $credential = $this->credential; + $url = $this->uri . $credential->getRoleName(); + + $options = [ + 'http_errors' => false, + 'timeout' => 1, + 'connect_timeout' => 1, + ]; + + $result = Request::createClient()->request('GET', $url, $options); + + if ($result->getStatusCode() === 404) { + $message = 'The role was not found in the instance'; + throw new InvalidArgumentException($message); + } + + if ($result->getStatusCode() !== 200) { + throw new RuntimeException('Error retrieving credentials from result: ' . $result->toJson()); + } + + return $result; + } +} diff --git a/Server/vendor/alibabacloud/credentials/src/Providers/EnvironmentVariableCredentialsProvider.php b/Server/vendor/alibabacloud/credentials/src/Providers/EnvironmentVariableCredentialsProvider.php deleted file mode 100644 index b6dd5795..00000000 --- a/Server/vendor/alibabacloud/credentials/src/Providers/EnvironmentVariableCredentialsProvider.php +++ /dev/null @@ -1,65 +0,0 @@ - $accessKeyId, - 'accessKeySecret' => $accessKeySecret, - 'securityToken' => $securityToken, - 'providerName' => $this->getProviderName(), - ]); - } - - return new Credentials([ - 'accessKeyId' => $accessKeyId, - 'accessKeySecret' => $accessKeySecret, - 'providerName' => $this->getProviderName(), - ]); - } - - /** - * @inheritDoc - */ - public function getProviderName() - { - return "env"; - } -} diff --git a/Server/vendor/alibabacloud/credentials/src/Providers/OIDCRoleArnCredentialsProvider.php b/Server/vendor/alibabacloud/credentials/src/Providers/OIDCRoleArnCredentialsProvider.php deleted file mode 100644 index 680ccc4e..00000000 --- a/Server/vendor/alibabacloud/credentials/src/Providers/OIDCRoleArnCredentialsProvider.php +++ /dev/null @@ -1,264 +0,0 @@ -filterOptions($options); - $this->filterRoleArn($params); - $this->filterOIDCProviderArn($params); - $this->filterOIDCTokenFilePath($params); - $this->filterRoleSessionName($params); - $this->filterDurationSeconds($params); - $this->filterPolicy($params); - $this->filterSTSEndpoint($params); - } - - private function filterRoleArn(array $params) - { - if (Helper::envNotEmpty('ALIBABA_CLOUD_ROLE_ARN')) { - $this->roleArn = Helper::env('ALIBABA_CLOUD_ROLE_ARN'); - } - - if (isset($params['roleArn'])) { - $this->roleArn = $params['roleArn']; - } - - Filter::roleArn($this->roleArn); - } - - private function filterOIDCProviderArn(array $params) - { - if (Helper::envNotEmpty('ALIBABA_CLOUD_OIDC_PROVIDER_ARN')) { - $this->oidcProviderArn = Helper::env('ALIBABA_CLOUD_OIDC_PROVIDER_ARN'); - } - - if (isset($params['oidcProviderArn'])) { - $this->oidcProviderArn = $params['oidcProviderArn']; - } - - Filter::oidcProviderArn($this->oidcProviderArn); - } - - private function filterOIDCTokenFilePath(array $params) - { - if (Helper::envNotEmpty('ALIBABA_CLOUD_OIDC_TOKEN_FILE')) { - $this->oidcTokenFilePath = Helper::env('ALIBABA_CLOUD_OIDC_TOKEN_FILE'); - } - - if (isset($params['oidcTokenFilePath'])) { - $this->oidcTokenFilePath = $params['oidcTokenFilePath']; - } - - Filter::oidcTokenFilePath($this->oidcTokenFilePath); - } - - private function filterRoleSessionName(array $params) - { - if (Helper::envNotEmpty('ALIBABA_CLOUD_ROLE_SESSION_NAME')) { - $this->roleSessionName = Helper::env('ALIBABA_CLOUD_ROLE_SESSION_NAME'); - } - - if (isset($params['roleSessionName'])) { - $this->roleSessionName = $params['roleSessionName']; - } - - if (is_null($this->roleSessionName) || $this->roleSessionName === '') { - $this->roleSessionName = 'phpSdkRoleSessionName'; - } - } - - private function filterDurationSeconds(array $params) - { - if (isset($params['durationSeconds'])) { - if (is_int($params['durationSeconds'])) { - $this->durationSeconds = $params['durationSeconds']; - } - } - if ($this->durationSeconds < 900) { - throw new InvalidArgumentException('Role session expiration should be in the range of 900s - max session duration'); - } - } - - private function filterPolicy(array $params) - { - if (isset($params['policy'])) { - if (is_string($params['policy'])) { - $this->policy = $params['policy']; - } - - if (is_array($params['policy'])) { - $this->policy = json_encode($params['policy']); - } - } - } - - private function filterSTSEndpoint(array $params) - { - if (Helper::envNotEmpty('ALIBABA_CLOUD_STS_REGION')) { - $this->stsEndpoint = 'sts' . Helper::env('ALIBABA_CLOUD_STS_REGION') . '.aliyuncs.com'; - } - - if (isset($params['stsRegionId'])) { - $this->stsEndpoint = 'sts' . $params['stsRegionId'] . '.aliyuncs.com'; - } - - if (isset($params['stsEndpoint'])) { - $this->stsEndpoint = $params['stsEndpoint']; - } - - if (is_null($this->stsEndpoint) || $this->stsEndpoint === '') { - $this->stsEndpoint = 'sts.aliyuncs.com'; - } - } - - private function filterOptions(array $options) - { - if (isset($options['connectTimeout'])) { - $this->connectTimeout = $options['connectTimeout']; - } - - if (isset($options['readTimeout'])) { - $this->readTimeout = $options['readTimeout']; - } - - Filter::timeout($this->connectTimeout, $this->readTimeout); - } - - /** - * Get credentials by request. - * - * @return RefreshResult - * @throws RuntimeException - * @throws GuzzleException - */ - public function refreshCredentials() - { - $options = Request::commonOptions(); - $options['read_timeout'] = $this->readTimeout; - $options['connect_timeout'] = $this->connectTimeout; - - $options['query']['Action'] = 'AssumeRoleWithOIDC'; - $options['query']['Version'] = '2015-04-01'; - $options['query']['Format'] = 'JSON'; - $options['query']['Timestamp'] = gmdate('Y-m-d\TH:i:s\Z'); - $options['query']['RoleArn'] = $this->roleArn; - $options['query']['OIDCProviderArn'] = $this->oidcProviderArn; - try { - $oidcToken = file_get_contents($this->oidcTokenFilePath); - $options['query']['OIDCToken'] = $oidcToken; - } catch (Exception $exception) { - throw new InvalidArgumentException($exception->getMessage()); - } - $options['query']['RoleSessionName'] = $this->roleSessionName; - $options['query']['DurationSeconds'] = (string) $this->durationSeconds; - if (!is_null($this->policy)) { - $options['query']['Policy'] = $this->policy; - } - - $url = (new Uri())->withScheme('https')->withHost($this->stsEndpoint); - - $result = Request::createClient()->request('POST', $url, $options); - - if ($result->getStatusCode() !== 200) { - throw new RuntimeException('Error refreshing credentials from OIDC, statusCode: ' . $result->getStatusCode() . ', result: ' . (string) $result); - } - - $json = $result->toArray(); - $credentials = $json['Credentials']; - - if (!isset($credentials['AccessKeyId']) || !isset($credentials['AccessKeySecret']) || !isset($credentials['SecurityToken'])) { - throw new RuntimeException('Error retrieving credentials from OIDC result:' . $result->toJson()); - } - - return new RefreshResult(new Credentials([ - 'accessKeyId' => $credentials['AccessKeyId'], - 'accessKeySecret' => $credentials['AccessKeySecret'], - 'securityToken' => $credentials['SecurityToken'], - 'expiration' => \strtotime($credentials['Expiration']), - 'providerName' => $this->getProviderName(), - ]), $this->getStaleTime(strtotime($credentials['Expiration'])) ); - } - - public function key() - { - return 'oidc_role_arn#roleArn#' . $this->roleArn . '#oidcProviderArn#' . $this->oidcProviderArn . '#roleSessionName#' . $this->roleSessionName; - } - - public function getProviderName() - { - return 'oidc_role_arn'; - } -} diff --git a/Server/vendor/alibabacloud/credentials/src/Providers/ProfileCredentialsProvider.php b/Server/vendor/alibabacloud/credentials/src/Providers/ProfileCredentialsProvider.php deleted file mode 100644 index ab07efe9..00000000 --- a/Server/vendor/alibabacloud/credentials/src/Providers/ProfileCredentialsProvider.php +++ /dev/null @@ -1,188 +0,0 @@ -filterProfileName($params); - $this->filterProfileFile(); - } - - private function filterProfileName(array $params) - { - if (Helper::envNotEmpty('ALIBABA_CLOUD_PROFILE')) { - $this->profileName = Helper::env('ALIBABA_CLOUD_PROFILE'); - } - - if (isset($params['profileName'])) { - $this->profileName = $params['profileName']; - } - - if (is_null($this->profileName) || $this->profileName === '') { - $this->profileName = 'default'; - } - } - - private function filterProfileFile() - { - $this->profileFile = Helper::envNotEmpty('ALIBABA_CLOUD_CREDENTIALS_FILE'); - - if (!$this->profileFile) { - $this->profileFile = self::getDefaultFile(); - } - } - - /** - * @return bool - */ - private function shouldReloadCredentialsProvider() - { - if (is_null($this->credentialsProvider)) { - return true; - } - - return false; - } - - /** - * @return CredentialsProvider - */ - private function reloadCredentialsProvider($profileFile, $profileName) - { - if (!Helper::inOpenBasedir($profileFile)) { - throw new RuntimeException('Unable to open credentials file: ' . $profileFile); - } - - if (!\is_readable($profileFile) || !\is_file($profileFile)) { - throw new RuntimeException('Credentials file is not readable: ' . $profileFile); - } - - $fileArray = \parse_ini_file($profileFile, true); - - if (\is_array($fileArray) && !empty($fileArray)) { - $credentialsConfigures = []; - foreach (\array_change_key_case($fileArray) as $name => $configures) { - if ($name === $profileName) { - $credentialsConfigures = $configures; - break; - } - } - if (\is_array($credentialsConfigures) && !empty($credentialsConfigures)) { - switch (Helper::unsetReturnNull($credentialsConfigures, 'type')) { - case 'access_key': - return new StaticAKCredentialsProvider([ - 'accessKeyId' => Helper::unsetReturnNull($credentialsConfigures, 'access_key_id'), - 'accessKeySecret' => Helper::unsetReturnNull($credentialsConfigures, 'access_key_secret'), - ]); - case 'ram_role_arn': - $innerProvider = new StaticAKCredentialsProvider([ - 'accessKeyId' => Helper::unsetReturnNull($credentialsConfigures, 'access_key_id'), - 'accessKeySecret' => Helper::unsetReturnNull($credentialsConfigures, 'access_key_secret'), - ]); - return new RamRoleArnCredentialsProvider([ - 'credentialsProvider' => $innerProvider, - 'roleArn' => Helper::unsetReturnNull($credentialsConfigures, 'role_arn'), - 'roleSessionName' => Helper::unsetReturnNull($credentialsConfigures, 'role_session_name'), - 'policy' => Helper::unsetReturnNull($credentialsConfigures, 'policy'), - ]); - case 'ecs_ram_role': - return new EcsRamRoleCredentialsProvider([ - 'roleName' => Helper::unsetReturnNull($credentialsConfigures, 'role_name'), - ]); - case 'oidc_role_arn': - return new OIDCRoleArnCredentialsProvider([ - 'roleArn' => Helper::unsetReturnNull($credentialsConfigures, 'role_arn'), - 'oidcProviderArn' => Helper::unsetReturnNull($credentialsConfigures, 'oidc_provider_arn'), - 'oidcTokenFilePath' => Helper::unsetReturnNull($credentialsConfigures, 'oidc_token_file_path'), - 'roleSessionName' => Helper::unsetReturnNull($credentialsConfigures, 'role_session_name'), - 'policy' => Helper::unsetReturnNull($credentialsConfigures, 'policy'), - ]); - case 'rsa_key_pair': - return new RsaKeyPairCredentialsProvider([ - 'publicKeyId' => Helper::unsetReturnNull($credentialsConfigures, 'public_key_id'), - 'privateKeyFile' => Helper::unsetReturnNull($credentialsConfigures, 'private_key_file'), - ]); - default: - throw new RuntimeException('Unsupported credential type from credentials file: ' . Helper::unsetReturnNull($credentialsConfigures, 'type')); - } - } - } - throw new RuntimeException('Failed to get credential from credentials file: ' . $profileFile); - } - /** - * Get credential. - * - * @return Credentials - * @throws RuntimeException - */ - public function getCredentials() - { - if ($this->shouldReloadCredentialsProvider()) { - $this->credentialsProvider = $this->reloadCredentialsProvider($this->profileFile, $this->profileName); - } - - $credentials = $this->credentialsProvider->getCredentials(); - return new Credentials([ - 'accessKeyId' => $credentials->getAccessKeyId(), - 'accessKeySecret' => $credentials->getAccessKeySecret(), - 'securityToken' => $credentials->getSecurityToken(), - 'providerName' => $this->getProviderName() . '/' . $this->credentialsProvider->getProviderName(), - ]); - - } - - /** - * Get the default credential file. - * - * @return string - */ - private function getDefaultFile() - { - return Helper::getHomeDirectory() . - DIRECTORY_SEPARATOR . - '.alibabacloud' . - DIRECTORY_SEPARATOR . - 'credentials'; - } - - /** - * @return string - */ - public function getProviderName() - { - return 'profile'; - } -} diff --git a/Server/vendor/alibabacloud/credentials/src/Providers/Provider.php b/Server/vendor/alibabacloud/credentials/src/Providers/Provider.php new file mode 100644 index 00000000..e1e869d5 --- /dev/null +++ b/Server/vendor/alibabacloud/credentials/src/Providers/Provider.php @@ -0,0 +1,82 @@ +credential = $credential; + $this->config = $config; + } + + /** + * Get the credentials from the cache in the validity period. + * + * @return array|null + */ + public function getCredentialsInCache() + { + if (isset(self::$credentialsCache[(string)$this->credential])) { + $result = self::$credentialsCache[(string)$this->credential]; + if (\strtotime($result['Expiration']) - \time() >= $this->expirationSlot) { + return $result; + } + } + + return null; + } + + /** + * Cache credentials. + * + * @param array $credential + */ + protected function cache(array $credential) + { + self::$credentialsCache[(string)$this->credential] = $credential; + } +} diff --git a/Server/vendor/alibabacloud/credentials/src/Providers/RamRoleArnCredentialsProvider.php b/Server/vendor/alibabacloud/credentials/src/Providers/RamRoleArnCredentialsProvider.php deleted file mode 100644 index 266fb112..00000000 --- a/Server/vendor/alibabacloud/credentials/src/Providers/RamRoleArnCredentialsProvider.php +++ /dev/null @@ -1,317 +0,0 @@ -filterOptions($options); - $this->filterCredentials($params); - $this->filterRoleArn($params); - $this->filterRoleSessionName($params); - $this->filterDurationSeconds($params); - $this->filterPolicy($params); - $this->filterExternalId($params); - $this->filterSTSEndpoint($params); - } - - private function filterRoleArn(array $params) - { - if (Helper::envNotEmpty('ALIBABA_CLOUD_ROLE_ARN')) { - $this->roleArn = Helper::env('ALIBABA_CLOUD_ROLE_ARN'); - } - - if (isset($params['roleArn'])) { - $this->roleArn = $params['roleArn']; - } - - Filter::roleArn($this->roleArn); - } - - private function filterRoleSessionName(array $params) - { - if (Helper::envNotEmpty('ALIBABA_CLOUD_ROLE_SESSION_NAME')) { - $this->roleSessionName = Helper::env('ALIBABA_CLOUD_ROLE_SESSION_NAME'); - } - - if (isset($params['roleSessionName'])) { - $this->roleSessionName = $params['roleSessionName']; - } - - if (is_null($this->roleSessionName) || $this->roleSessionName === '') { - $this->roleSessionName = 'phpSdkRoleSessionName'; - } - } - - private function filterDurationSeconds(array $params) - { - if (isset($params['durationSeconds'])) { - if (is_int($params['durationSeconds'])) { - $this->durationSeconds = $params['durationSeconds']; - } - } - if ($this->durationSeconds < 900) { - throw new InvalidArgumentException('Role session expiration should be in the range of 900s - max session duration'); - } - } - - private function filterPolicy(array $params) - { - if (isset($params['policy'])) { - if (is_string($params['policy'])) { - $this->policy = $params['policy']; - } - - if (is_array($params['policy'])) { - $this->policy = json_encode($params['policy']); - } - } - } - - private function filterExternalId(array $params) - { - if (isset($params['externalId'])) { - if (is_string($params['externalId'])) { - $this->externalId = $params['externalId']; - } - } - } - - private function filterSTSEndpoint(array $params) - { - if (Helper::envNotEmpty('ALIBABA_CLOUD_STS_REGION')) { - $this->stsEndpoint = 'sts.' . Helper::env('ALIBABA_CLOUD_STS_REGION') . '.aliyuncs.com'; - } - - if (isset($params['stsRegionId'])) { - $this->stsEndpoint = 'sts.' . $params['stsRegionId'] . '.aliyuncs.com'; - } - - if (isset($params['stsEndpoint'])) { - $this->stsEndpoint = $params['stsEndpoint']; - } - - if (is_null($this->stsEndpoint) || $this->stsEndpoint === '') { - $this->stsEndpoint = 'sts.aliyuncs.com'; - } - } - - private function filterCredentials(array $params) - { - if (isset($params['credentialsProvider'])) { - if (!($params['credentialsProvider'] instanceof CredentialsProvider)) { - throw new InvalidArgumentException('Invalid credentialsProvider option for ram_role_arn'); - } - $this->credentialsProvider = $params['credentialsProvider']; - } else if (isset($params['accessKeyId']) && isset($params['accessKeySecret']) && isset($params['securityToken'])) { - Filter::accessKey($params['accessKeyId'], $params['accessKeySecret']); - Filter::securityToken($params['securityToken']); - $this->credentialsProvider = new StaticSTSCredentialsProvider($params); - } else if (isset($params['accessKeyId']) && isset($params['accessKeySecret'])) { - Filter::accessKey($params['accessKeyId'], $params['accessKeySecret']); - $this->credentialsProvider = new StaticAKCredentialsProvider($params); - } else { - throw new InvalidArgumentException('Missing required credentials option for ram_role_arn'); - } - } - - private function filterOptions(array $options) - { - if (isset($options['connectTimeout'])) { - $this->connectTimeout = $options['connectTimeout']; - } - - if (isset($options['readTimeout'])) { - $this->readTimeout = $options['readTimeout']; - } - - Filter::timeout($this->connectTimeout, $this->readTimeout); - } - - /** - * Get credentials by request. - * - * @return RefreshResult - * @throws RuntimeException - * @throws GuzzleException - */ - public function refreshCredentials() - { - $options = Request::commonOptions(); - $options['read_timeout'] = $this->readTimeout; - $options['connect_timeout'] = $this->connectTimeout; - - $options['query']['Action'] = 'AssumeRole'; - $options['query']['Version'] = '2015-04-01'; - $options['query']['Format'] = 'JSON'; - $options['query']['Timestamp'] = gmdate('Y-m-d\TH:i:s\Z'); - $options['query']['SignatureMethod'] = 'HMAC-SHA1'; - $options['query']['SignatureVersion'] = '1.0'; - $options['query']['SignatureNonce'] = Request::uuid(json_encode($options['query'])); - $options['query']['RoleArn'] = $this->roleArn; - $options['query']['RoleSessionName'] = $this->roleSessionName; - $options['query']['DurationSeconds'] = (string) $this->durationSeconds; - if (!is_null($this->policy) && $this->policy !== '') { - $options['query']['Policy'] = $this->policy; - } - if (!is_null($this->externalId) && $this->externalId !== '') { - $options['query']['ExternalId'] = $this->externalId; - } - - $sessionCredentials = $this->credentialsProvider->getCredentials(); - $options['query']['AccessKeyId'] = $sessionCredentials->getAccessKeyId(); - if (!is_null($sessionCredentials->getSecurityToken())) { - $options['query']['SecurityToken'] = $sessionCredentials->getSecurityToken(); - } - $options['query']['Signature'] = Request::shaHmac1sign( - Request::signString('GET', $options['query']), - $sessionCredentials->getAccessKeySecret() . '&' - ); - - $url = (new Uri())->withScheme('https')->withHost($this->stsEndpoint); - - $result = Request::createClient()->request('GET', $url, $options); - - if ($result->getStatusCode() !== 200) { - throw new RuntimeException('Error refreshing credentials from RamRoleArn, statusCode: ' . $result->getStatusCode() . ', result: ' . (string) $result); - } - - $json = $result->toArray(); - $credentials = $json['Credentials']; - - if (!isset($credentials['AccessKeyId']) || !isset($credentials['AccessKeySecret']) || !isset($credentials['SecurityToken'])) { - throw new RuntimeException('Error retrieving credentials from RamRoleArn result:' . $result->toJson()); - } - - return new RefreshResult(new Credentials([ - 'accessKeyId' => $credentials['AccessKeyId'], - 'accessKeySecret' => $credentials['AccessKeySecret'], - 'securityToken' => $credentials['SecurityToken'], - 'expiration' => \strtotime($credentials['Expiration']), - 'providerName' => $this->getProviderName(), - ]), $this->getStaleTime(strtotime($credentials['Expiration']))); - } - - public function key() - { - $credentials = $this->credentialsProvider->getCredentials(); - return 'ram_role_arn#credential#' . $credentials->getAccessKeyId() . '#roleArn#' . $this->roleArn . '#roleSessionName#' . $this->roleSessionName; - } - - public function getProviderName() - { - return 'ram_role_arn/' . $this->credentialsProvider->getProviderName(); - } - - /** - * @return string - */ - public function getRoleArn() - { - return $this->roleArn; - } - - /** - * @return string - */ - public function getRoleSessionName() - { - return $this->roleSessionName; - } - - /** - * @return string - */ - public function getPolicy() - { - return $this->policy; - } - - /** - * @deprecated - * @return string - */ - public function getOriginalAccessKeyId() - { - return $this->credentialsProvider->getCredentials()->getAccessKeyId(); - } - - /** - * @deprecated - * @return string - */ - public function getOriginalAccessKeySecret() - { - return $this->credentialsProvider->getCredentials()->getAccessKeySecret(); - } -} diff --git a/Server/vendor/alibabacloud/credentials/src/Providers/RamRoleArnProvider.php b/Server/vendor/alibabacloud/credentials/src/Providers/RamRoleArnProvider.php new file mode 100644 index 00000000..c6a87293 --- /dev/null +++ b/Server/vendor/alibabacloud/credentials/src/Providers/RamRoleArnProvider.php @@ -0,0 +1,49 @@ +getCredentialsInCache(); + + if (null === $credential) { + $result = (new AssumeRole($this->credential))->request(); + + if ($result->getStatusCode() !== 200) { + throw new RuntimeException(isset($result['Message']) ? $result['Message'] : (string)$result->getBody()); + } + + if (!isset($result['Credentials']['AccessKeyId'], + $result['Credentials']['AccessKeySecret'], + $result['Credentials']['SecurityToken'])) { + throw new RuntimeException($this->error); + } + + $credential = $result['Credentials']; + $this->cache($credential); + } + + return new StsCredential( + $credential['AccessKeyId'], + $credential['AccessKeySecret'], + strtotime($credential['Expiration']), + $credential['SecurityToken'] + ); + } +} diff --git a/Server/vendor/alibabacloud/credentials/src/Providers/RsaKeyPairCredentialsProvider.php b/Server/vendor/alibabacloud/credentials/src/Providers/RsaKeyPairCredentialsProvider.php deleted file mode 100644 index 8c85db6f..00000000 --- a/Server/vendor/alibabacloud/credentials/src/Providers/RsaKeyPairCredentialsProvider.php +++ /dev/null @@ -1,200 +0,0 @@ -filterOptions($options); - $this->filterDurationSeconds($params); - $this->filterSTSEndpoint($params); - $this->publicKeyId = isset($params['publicKeyId']) ? $params['publicKeyId'] : null; - $privateKeyFile = isset($params['privateKeyFile']) ? $params['privateKeyFile'] : null; - Filter::publicKeyId($this->publicKeyId); - Filter::privateKeyFile($privateKeyFile); - - try { - $this->privateKey = file_get_contents($privateKeyFile); - } catch (Exception $exception) { - throw new InvalidArgumentException($exception->getMessage()); - } - } - - private function filterOptions(array $options) - { - if (isset($options['connectTimeout'])) { - $this->connectTimeout = $options['connectTimeout']; - } - - if (isset($options['readTimeout'])) { - $this->readTimeout = $options['readTimeout']; - } - - Filter::timeout($this->connectTimeout, $this->readTimeout); - } - - private function filterDurationSeconds(array $params) - { - if (isset($params['durationSeconds'])) { - if (is_int($params['durationSeconds'])) { - $this->durationSeconds = $params['durationSeconds']; - } - } - if ($this->durationSeconds < 900) { - throw new InvalidArgumentException('Role session expiration should be in the range of 900s - max session duration'); - } - } - - private function filterSTSEndpoint(array $params) - { - if (isset($params['stsEndpoint'])) { - $this->stsEndpoint = $params['stsEndpoint']; - } - - if (is_null($this->stsEndpoint) || $this->stsEndpoint === '') { - $this->stsEndpoint = 'sts.ap-northeast-1.aliyuncs.com'; - } - } - - - /** - * Get credentials by request. - * - * @return RefreshResult - * @throws RuntimeException - * @throws GuzzleException - */ - public function refreshCredentials() - { - $options = Request::commonOptions(); - $options['read_timeout'] = $this->readTimeout; - $options['connect_timeout'] = $this->connectTimeout; - - $options['query']['Action'] = 'GenerateSessionAccessKey'; - $options['query']['Version'] = '2015-04-01'; - $options['query']['Format'] = 'JSON'; - $options['query']['Timestamp'] = gmdate('Y-m-d\TH:i:s\Z'); - $options['query']['SignatureMethod'] = 'SHA256withRSA'; - $options['query']['SignatureType'] = 'PRIVATEKEY'; - $options['query']['SignatureVersion'] = '1.0'; - $options['query']['SignatureNonce'] = Request::uuid(json_encode($options['query'])); - $options['query']['DurationSeconds'] = (string) $this->durationSeconds; - $options['query']['AccessKeyId'] = $this->publicKeyId; - $options['query']['Signature'] = Request::shaHmac256WithRsasign( - Request::signString('GET', $options['query']), - $this->privateKey - ); - - $url = (new Uri())->withScheme('https')->withHost($this->stsEndpoint); - - $result = Request::createClient()->request('GET', $url, $options); - - if ($result->getStatusCode() !== 200) { - throw new RuntimeException('Error refreshing credentials from RsaKeyPair, statusCode: ' . $result->getStatusCode() . ', result: ' . (string) $result); - } - - $json = $result->toArray(); - - if (!isset($json['SessionAccessKey']['SessionAccessKeyId']) || !isset($json['SessionAccessKey']['SessionAccessKeySecret'])) { - throw new RuntimeException('Error retrieving credentials from RsaKeyPair result:' . $result->toJson()); - } - - $credentials = []; - $credentials['AccessKeyId'] = $json['SessionAccessKey']['SessionAccessKeyId']; - $credentials['AccessKeySecret'] = $json['SessionAccessKey']['SessionAccessKeySecret']; - $credentials['Expiration'] = $json['SessionAccessKey']['Expiration']; - $credentials['SecurityToken'] = null; - - - return new RefreshResult(new Credentials([ - 'accessKeyId' => $credentials['AccessKeyId'], - 'accessKeySecret' => $credentials['AccessKeySecret'], - 'securityToken' => $credentials['SecurityToken'], - 'expiration' => \strtotime($credentials['Expiration']), - 'providerName' => $this->getProviderName(), - ]), $this->getStaleTime(strtotime($credentials['Expiration']))); - } - - public function key() - { - return 'rsa_key_pair#publicKeyId#' . $this->publicKeyId; - } - - public function getProviderName() - { - return 'rsa_key_pair'; - } - - /** - * @return string - */ - public function getPublicKeyId() - { - return $this->publicKeyId; - } - - /** - * @return mixed - */ - public function getPrivateKey() - { - return $this->privateKey; - } -} diff --git a/Server/vendor/alibabacloud/credentials/src/Providers/RsaKeyPairProvider.php b/Server/vendor/alibabacloud/credentials/src/Providers/RsaKeyPairProvider.php new file mode 100644 index 00000000..c2d03fc2 --- /dev/null +++ b/Server/vendor/alibabacloud/credentials/src/Providers/RsaKeyPairProvider.php @@ -0,0 +1,53 @@ +getCredentialsInCache(); + + if ($credential === null) { + $result = (new GenerateSessionAccessKey($this->credential))->request(); + + if ($result->getStatusCode() !== 200) { + throw new RuntimeException(isset($result['Message']) ? $result['Message'] : (string)$result->getBody()); + } + + if (!isset($result['SessionAccessKey']['SessionAccessKeyId'], + $result['SessionAccessKey']['SessionAccessKeySecret'])) { + throw new RuntimeException($this->error); + } + + $credential = $result['SessionAccessKey']; + $this->cache($credential); + } + + return new StsCredential( + $credential['SessionAccessKeyId'], + $credential['SessionAccessKeySecret'], + strtotime($credential['Expiration']) + ); + } +} diff --git a/Server/vendor/alibabacloud/credentials/src/Providers/SessionCredentialsProvider.php b/Server/vendor/alibabacloud/credentials/src/Providers/SessionCredentialsProvider.php deleted file mode 100644 index 60b92deb..00000000 --- a/Server/vendor/alibabacloud/credentials/src/Providers/SessionCredentialsProvider.php +++ /dev/null @@ -1,161 +0,0 @@ -key()])) { - $result = self::$credentialsCache[$this->key()]; - return $result; - } - return null; - } - - /** - * Cache credentials. - * - * @param RefreshResult $credential - */ - protected function cache(RefreshResult $credential) - { - self::$credentialsCache[$this->key()] = $credential; - } - - /** - * Get credential. - * - * @return Credentials - */ - public function getCredentials() - { - if ($this->cacheIsStale() || $this->shouldInitiateCachePrefetch()) { - $result = $this->refreshCache(); - $this->cache($result); - } - - $result = $this->getCredentialsInCache(); - - return $result->credentials(); - } - - /** - * @return RefreshResult - */ - protected function refreshCache() - { - try { - return $this->handleFetchedSuccess($this->refreshCredentials()); - } catch (\Exception $e) { - return $this->handleFetchedFailure($e); - } - } - - /** - * @return RefreshResult - * @throws \Exception - */ - protected function handleFetchedFailure(\Exception $e) - { - $currentCachedValue = $this->getCredentialsInCache(); - if (is_null($currentCachedValue)) { - throw $e; - } - - if (time() < $currentCachedValue->staleTime()) { - return $currentCachedValue; - } - - throw $e; - } - /** - * @return RefreshResult - */ - protected function handleFetchedSuccess(RefreshResult $value) - { - $now = time(); - // 过期时间大于15分钟,不用管 - if ($now < $value->staleTime()) { - return $value; - } - // 不足或等于15分钟,但未过期,下次会再次刷新 - if ($now < $value->staleTime() + 15 * 60) { - $value->staleTime = $now; - return $value; - } - // 已过期,看缓存,缓存若大于15分钟,返回缓存,若小于15分钟,则稍后重试 - if (is_null($this->getCredentialsInCache())) { - throw new \Exception("The fetched credentials have expired and no cache is available."); - } else if ($now < $this->getCredentialsInCache()->staleTime()) { - return $this->getCredentialsInCache(); - } else { - // 返回成功,延长有效期 1 分钟 - $expectation = mt_rand(50, 70); - $value->staleTime = time() + $expectation; - return $value; - } - } - - /** - * @return bool - */ - protected function cacheIsStale() - { - return is_null($this->getCredentialsInCache()) || time() >= $this->getCredentialsInCache()->staleTime(); - } - - /** - * @return bool - */ - protected function shouldInitiateCachePrefetch() - { - return is_null($this->getCredentialsInCache()) || time() >= $this->getCredentialsInCache()->prefetchTime(); - } - - /** - * @return int - */ - public function getStaleTime($expiration) - { - return $expiration <= 0 ? - time() + (60 * 60) : - $expiration - (15 * 60); - } - - /** - * @return RefreshResult - */ - abstract function refreshCredentials(); - - /** - * Get the toString of the credentials provider as the key. - * - * @return string - */ - abstract function key(); -} diff --git a/Server/vendor/alibabacloud/credentials/src/Providers/StaticAKCredentialsProvider.php b/Server/vendor/alibabacloud/credentials/src/Providers/StaticAKCredentialsProvider.php deleted file mode 100644 index 7e73cd07..00000000 --- a/Server/vendor/alibabacloud/credentials/src/Providers/StaticAKCredentialsProvider.php +++ /dev/null @@ -1,78 +0,0 @@ -filterAK($params); - } - - private function filterAK(array $params) - { - if (Helper::envNotEmpty('ALIBABA_CLOUD_ACCESS_KEY_ID')) { - $this->accessKeyId = Helper::env('ALIBABA_CLOUD_ACCESS_KEY_ID'); - } - - if (Helper::envNotEmpty('ALIBABA_CLOUD_ACCESS_KEY_SECRET')) { - $this->accessKeySecret = Helper::env('ALIBABA_CLOUD_ACCESS_KEY_SECRET'); - } - - if (isset($params['accessKeyId'])) { - $this->accessKeyId = $params['accessKeyId']; - } - if (isset($params['accessKeySecret'])) { - $this->accessKeySecret = $params['accessKeySecret']; - } - - Filter::accessKey($this->accessKeyId, $this->accessKeySecret); - } - - /** - * Get credential. - * - * @return Credentials - */ - public function getCredentials() - { - return new Credentials([ - 'accessKeyId' => $this->accessKeyId, - 'accessKeySecret' => $this->accessKeySecret, - 'providerName' => $this->getProviderName(), - ]); - } - - /** - * @inheritDoc - */ - public function getProviderName() - { - return "static_ak"; - } -} \ No newline at end of file diff --git a/Server/vendor/alibabacloud/credentials/src/Providers/StaticSTSCredentialsProvider.php b/Server/vendor/alibabacloud/credentials/src/Providers/StaticSTSCredentialsProvider.php deleted file mode 100644 index 957b25d8..00000000 --- a/Server/vendor/alibabacloud/credentials/src/Providers/StaticSTSCredentialsProvider.php +++ /dev/null @@ -1,92 +0,0 @@ -filterSTS($params); - } - - private function filterSTS(array $params) - { - if (Helper::envNotEmpty('ALIBABA_CLOUD_ACCESS_KEY_ID')) { - $this->accessKeyId = Helper::env('ALIBABA_CLOUD_ACCESS_KEY_ID'); - } - - if (Helper::envNotEmpty('ALIBABA_CLOUD_ACCESS_KEY_SECRET')) { - $this->accessKeySecret = Helper::env('ALIBABA_CLOUD_ACCESS_KEY_SECRET'); - } - - if (Helper::envNotEmpty('ALIBABA_CLOUD_SECURITY_TOKEN')) { - $this->securityToken = Helper::env('ALIBABA_CLOUD_SECURITY_TOKEN'); - } - - if (isset($params['accessKeyId'])) { - $this->accessKeyId = $params['accessKeyId']; - } - if (isset($params['accessKeySecret'])) { - $this->accessKeySecret = $params['accessKeySecret']; - } - if (isset($params['securityToken'])) { - $this->securityToken = $params['securityToken']; - } - - Filter::accessKey($this->accessKeyId, $this->accessKeySecret); - Filter::securityToken($this->securityToken); - } - - /** - * Get credential. - * - * @return Credentials - */ - public function getCredentials() - { - return new Credentials([ - 'accessKeyId' => $this->accessKeyId, - 'accessKeySecret' => $this->accessKeySecret, - 'securityToken' => $this->securityToken, - 'providerName' => $this->getProviderName(), - ]); - } - - /** - * @inheritDoc - */ - public function getProviderName() - { - return "static_sts"; - } -} \ No newline at end of file diff --git a/Server/vendor/alibabacloud/credentials/src/Providers/URLCredentialsProvider.php b/Server/vendor/alibabacloud/credentials/src/Providers/URLCredentialsProvider.php deleted file mode 100644 index 617c19f1..00000000 --- a/Server/vendor/alibabacloud/credentials/src/Providers/URLCredentialsProvider.php +++ /dev/null @@ -1,126 +0,0 @@ -filterOptions($options); - $this->filterCredentialsURI($params); - } - - private function filterOptions(array $options) - { - if (isset($options['connectTimeout'])) { - $this->connectTimeout = $options['connectTimeout']; - } - - if (isset($options['readTimeout'])) { - $this->readTimeout = $options['readTimeout']; - } - - Filter::timeout($this->connectTimeout, $this->readTimeout); - } - - private function filterCredentialsURI(array $params) - { - if (Helper::envNotEmpty('ALIBABA_CLOUD_CREDENTIALS_URI')) { - $this->credentialsURI = Helper::env('ALIBABA_CLOUD_CREDENTIALS_URI'); - } - - if (isset($params['credentialsURI'])) { - $this->credentialsURI = $params['credentialsURI']; - } - - Filter::credentialsURI($this->credentialsURI); - } - - /** - * Get credentials by request. - * - * @return RefreshResult - * @throws InvalidArgumentException - * @throws RuntimeException - * @throws GuzzleException - */ - public function refreshCredentials() - { - $options = Request::commonOptions(); - $options['read_timeout'] = $this->readTimeout; - $options['connect_timeout'] = $this->connectTimeout; - - $result = Request::createClient()->request('GET', $this->credentialsURI, $options); - - if ($result->getStatusCode() !== 200) { - throw new RuntimeException('Error refreshing credentials from credentialsURI, statusCode: ' . $result->getStatusCode() . ', result: ' . (string) $result); - } - - $credentials = $result->toArray(); - - if (!isset($credentials['AccessKeyId']) || !isset($credentials['AccessKeySecret']) || !isset($credentials['SecurityToken']) || !isset($credentials['Expiration'])) { - throw new RuntimeException('Error retrieving credentials from credentialsURI result:' . $result->toJson()); - } - - return new RefreshResult(new Credentials([ - 'accessKeyId' => $credentials['AccessKeyId'], - 'accessKeySecret' => $credentials['AccessKeySecret'], - 'securityToken' => $credentials['SecurityToken'], - 'expiration' => \strtotime($credentials['Expiration']), - 'providerName' => $this->getProviderName(), - ]), $this->getStaleTime(strtotime($credentials['Expiration']))); - } - - - /** - * @return string - */ - public function key() - { - return 'credential_uri#' . $this->credentialsURI; - } - - /** - * @return string - */ - public function getProviderName() - { - return 'credential_uri'; - } -} diff --git a/Server/vendor/alibabacloud/credentials/src/RamRoleArnCredential.php b/Server/vendor/alibabacloud/credentials/src/RamRoleArnCredential.php index ed756408..b82c608f 100644 --- a/Server/vendor/alibabacloud/credentials/src/RamRoleArnCredential.php +++ b/Server/vendor/alibabacloud/credentials/src/RamRoleArnCredential.php @@ -2,16 +2,13 @@ namespace AlibabaCloud\Credentials; -use AlibabaCloud\Credentials\Providers\RamRoleArnCredentialsProvider; -use AlibabaCloud\Credentials\Credential\CredentialModel; +use AlibabaCloud\Credentials\Providers\RamRoleArnProvider; use AlibabaCloud\Credentials\Signature\ShaHmac1Signature; -use AlibabaCloud\Credentials\Utils\Filter; use Exception; use GuzzleHttp\Exception\GuzzleException; use InvalidArgumentException; /** - * @deprecated * Use the AssumeRole of the RAM account to complete the authentication. */ class RamRoleArnCredential implements CredentialsInterface @@ -60,10 +57,10 @@ class RamRoleArnCredential implements CredentialsInterface Filter::accessKey($credential['access_key_id'], $credential['access_key_secret']); - $this->config = $config; - $this->accessKeyId = $credential['access_key_id']; + $this->config = $config; + $this->accessKeyId = $credential['access_key_id']; $this->accessKeySecret = $credential['access_key_secret']; - $this->roleArn = $credential['role_arn']; + $this->roleArn = $credential['role_arn']; $this->roleSessionName = $credential['role_session_name']; } @@ -180,20 +177,13 @@ class RamRoleArnCredential implements CredentialsInterface } /** - * @return AlibabaCloud\Credentials\Providers\Credentials + * @return StsCredential * @throws Exception * @throws GuzzleException */ protected function getSessionCredential() { - $params = [ - 'accessKeyId' => $this->accessKeyId, - 'accessKeySecret' => $this->accessKeyId, - 'roleArn' => $this->roleArn, - 'roleSessionName' => $this->roleSessionName, - 'policy' => $this->policy, - ]; - return (new RamRoleArnCredentialsProvider($params))->getCredentials(); + return (new RamRoleArnProvider($this))->get(); } /** @@ -225,18 +215,4 @@ class RamRoleArnCredential implements CredentialsInterface { return $this->getSessionCredential()->getExpiration(); } - - /** - * @inheritDoc - */ - public function getCredential() - { - $credentials = $this->getSessionCredential(); - return new CredentialModel([ - 'accessKeyId' => $credentials->getAccessKeyId(), - 'accessKeySecret' => $credentials->getAccessKeySecret(), - 'securityToken' => $credentials->getSecurityToken(), - 'type' => 'ram_role_arn', - ]); - } } diff --git a/Server/vendor/alibabacloud/credentials/src/Request/AssumeRole.php b/Server/vendor/alibabacloud/credentials/src/Request/AssumeRole.php new file mode 100644 index 00000000..962a7334 --- /dev/null +++ b/Server/vendor/alibabacloud/credentials/src/Request/AssumeRole.php @@ -0,0 +1,37 @@ +signature = new ShaHmac1Signature(); + $this->credential = $arnCredential; + $this->uri = $this->uri->withHost('sts.aliyuncs.com'); + $this->options['verify'] = false; + $this->options['query']['RoleArn'] = $arnCredential->getRoleArn(); + $this->options['query']['RoleSessionName'] = $arnCredential->getRoleSessionName(); + $this->options['query']['DurationSeconds'] = Provider::DURATION_SECONDS; + $this->options['query']['AccessKeyId'] = $this->credential->getOriginalAccessKeyId(); + $this->options['query']['Version'] = '2015-04-01'; + $this->options['query']['Action'] = 'AssumeRole'; + $this->options['query']['RegionId'] = 'cn-hangzhou'; + if ($arnCredential->getPolicy()) { + $this->options['query']['Policy'] = $arnCredential->getPolicy(); + } + } +} diff --git a/Server/vendor/alibabacloud/credentials/src/Request/GenerateSessionAccessKey.php b/Server/vendor/alibabacloud/credentials/src/Request/GenerateSessionAccessKey.php new file mode 100644 index 00000000..35db5859 --- /dev/null +++ b/Server/vendor/alibabacloud/credentials/src/Request/GenerateSessionAccessKey.php @@ -0,0 +1,33 @@ +signature = new ShaHmac256WithRsaSignature(); + $this->credential = $credential; + $this->uri = $this->uri->withHost('sts.ap-northeast-1.aliyuncs.com'); + $this->options['verify'] = false; + $this->options['query']['Version'] = '2015-04-01'; + $this->options['query']['Action'] = 'GenerateSessionAccessKey'; + $this->options['query']['RegionId'] = 'cn-hangzhou'; + $this->options['query']['AccessKeyId'] = $credential->getPublicKeyId(); + $this->options['query']['PublicKeyId'] = $credential->getPublicKeyId(); + $this->options['query']['DurationSeconds'] = Provider::DURATION_SECONDS; + } +} diff --git a/Server/vendor/alibabacloud/credentials/src/Request/Request.php b/Server/vendor/alibabacloud/credentials/src/Request/Request.php index f0ba62f7..1bf1418f 100644 --- a/Server/vendor/alibabacloud/credentials/src/Request/Request.php +++ b/Server/vendor/alibabacloud/credentials/src/Request/Request.php @@ -3,16 +3,19 @@ namespace AlibabaCloud\Credentials\Request; use AlibabaCloud\Credentials\Credentials; -use AlibabaCloud\Credentials\Utils\Helper; +use AlibabaCloud\Credentials\EcsRamRoleCredential; +use AlibabaCloud\Credentials\Helper; +use AlibabaCloud\Credentials\RamRoleArnCredential; +use AlibabaCloud\Credentials\Signature\ShaHmac1Signature; +use AlibabaCloud\Credentials\Signature\ShaHmac256WithRsaSignature; +use Exception; use GuzzleHttp\Client; use GuzzleHttp\HandlerStack; use GuzzleHttp\Middleware; +use GuzzleHttp\Psr7\Uri; use AlibabaCloud\Tea\Response; use Psr\Http\Message\ResponseInterface; -use Exception; -use InvalidArgumentException; - /** * RESTful RPC Request. */ @@ -25,33 +28,67 @@ class Request const CONNECT_TIMEOUT = 5; /** - * Request Read Timeout + * Request Timeout */ - const READ_TIMEOUT = 5; + const TIMEOUT = 10; /** * @var array */ private static $config = []; + /** + * @var array + */ + public $options = []; /** - * - * @return array + * @var Uri */ - public static function commonOptions() + public $uri; + + /** + * @var EcsRamRoleCredential|RamRoleArnCredential + */ + protected $credential; + + /** + * @var ShaHmac256WithRsaSignature|ShaHmac1Signature + */ + protected $signature; + + /** + * Request constructor. + */ + public function __construct() { - $options = []; - $options['http_errors'] = false; - $options['connect_timeout'] = self::CONNECT_TIMEOUT; - $options['read_timeout'] = self::READ_TIMEOUT; - $options['headers']['User-Agent'] = Helper::getUserAgent(); + $this->uri = (new Uri())->withScheme('https'); + $this->options['http_errors'] = false; + $this->options['connect_timeout'] = self::CONNECT_TIMEOUT; + $this->options['timeout'] = self::TIMEOUT; // Turn on debug mode based on environment variable. if (strtolower(Helper::env('DEBUG')) === 'sdk') { - $options['debug'] = true; + $this->options['debug'] = true; } - return $options; + } + + /** + * @return ResponseInterface + * @throws Exception + */ + public function request() + { + $this->options['query']['Format'] = 'JSON'; + $this->options['query']['SignatureMethod'] = $this->signature->getMethod(); + $this->options['query']['SignatureVersion'] = $this->signature->getVersion(); + $this->options['query']['SignatureNonce'] = self::uuid(json_encode($this->options['query'])); + $this->options['query']['Timestamp'] = gmdate('Y-m-d\TH:i:s\Z'); + $this->options['query']['Signature'] = $this->signature->sign( + self::signString('GET', $this->options['query']), + $this->credential->getOriginalAccessKeySecret() . '&' + ); + return self::createClient()->request('GET', (string)$this->uri, $this->options); } /** @@ -81,53 +118,6 @@ class Request return $method . '&%2F&' . self::percentEncode(substr($canonicalized, 1)); } - /** - * @param string $string - * @param string $accessKeySecret - * - * @return string - */ - public static function shaHmac1sign($string, $accessKeySecret) - { - return base64_encode(hash_hmac('sha1', $string, $accessKeySecret, true)); - } - - /** - * @param string $string - * @param string $accessKeySecret - * - * @return string - */ - public static function shaHmac256sign($string, $accessKeySecret) - { - return base64_encode(hash_hmac('sha256', $string, $accessKeySecret, true)); - } - - /** - * @param string $string - * @param string $privateKey - * - * @return string - */ - public static function shaHmac256WithRsasign($string, $privateKey) - { - $binarySignature = ''; - try { - openssl_sign( - $string, - $binarySignature, - $privateKey, - \OPENSSL_ALGO_SHA256 - ); - } catch (Exception $exception) { - throw new InvalidArgumentException( - $exception->getMessage() - ); - } - - return base64_encode($binarySignature); - } - /** * @param string $string * @@ -150,8 +140,6 @@ class Request { if (Credentials::hasMock()) { $stack = HandlerStack::create(Credentials::getMock()); - $history = Credentials::getHandlerHistory(); - $stack->push($history); } else { $stack = HandlerStack::create(); } diff --git a/Server/vendor/alibabacloud/credentials/src/RsaKeyPairCredential.php b/Server/vendor/alibabacloud/credentials/src/RsaKeyPairCredential.php index 12e719e1..bb47f6b4 100644 --- a/Server/vendor/alibabacloud/credentials/src/RsaKeyPairCredential.php +++ b/Server/vendor/alibabacloud/credentials/src/RsaKeyPairCredential.php @@ -2,16 +2,13 @@ namespace AlibabaCloud\Credentials; -use AlibabaCloud\Credentials\Providers\RsaKeyPairCredentialsProvider; -use AlibabaCloud\Credentials\Credential\CredentialModel; +use AlibabaCloud\Credentials\Providers\RsaKeyPairProvider; use AlibabaCloud\Credentials\Signature\ShaHmac1Signature; -use AlibabaCloud\Credentials\Utils\Filter; use Exception; use GuzzleHttp\Exception\GuzzleException; use InvalidArgumentException; /** - * @deprecated * Use the RSA key pair to complete the authentication (supported only on Japanese site) */ class RsaKeyPairCredential implements CredentialsInterface @@ -22,11 +19,6 @@ class RsaKeyPairCredential implements CredentialsInterface */ private $publicKeyId; - /** - * @var string - */ - private $privateKeyFile; - /** * @var string */ @@ -50,8 +42,7 @@ class RsaKeyPairCredential implements CredentialsInterface Filter::privateKeyFile($private_key_file); $this->publicKeyId = $public_key_id; - $this->privateKeyFile = $private_key_file; - $this->config = $config; + $this->config = $config; try { $this->privateKey = file_get_contents($private_key_file); } catch (Exception $exception) { @@ -126,17 +117,13 @@ class RsaKeyPairCredential implements CredentialsInterface } /** - * @return AlibabaCloud\Credentials\Providers\Credentials + * @return StsCredential * @throws Exception * @throws GuzzleException */ protected function getSessionCredential() { - $params = [ - 'publicKeyId' => $this->publicKeyId, - 'privateKeyFile' => $this->privateKeyFile, - ]; - return (new RsaKeyPairCredentialsProvider($params))->getCredentials(); + return (new RsaKeyPairProvider($this))->get(); } /** @@ -168,18 +155,4 @@ class RsaKeyPairCredential implements CredentialsInterface { return $this->getSessionCredential()->getExpiration(); } - - /** - * @inheritDoc - */ - public function getCredential() - { - $credentials = $this->getSessionCredential(); - return new CredentialModel([ - 'accessKeyId' => $credentials->getAccessKeyId(), - 'accessKeySecret' => $credentials->getAccessKeySecret(), - 'securityToken' => $credentials->getSecurityToken(), - 'type' => 'rsa_key_pair', - ]); - } } diff --git a/Server/vendor/alibabacloud/credentials/src/StsCredential.php b/Server/vendor/alibabacloud/credentials/src/StsCredential.php index 709a8ee1..89a3a84a 100644 --- a/Server/vendor/alibabacloud/credentials/src/StsCredential.php +++ b/Server/vendor/alibabacloud/credentials/src/StsCredential.php @@ -2,12 +2,9 @@ namespace AlibabaCloud\Credentials; -use AlibabaCloud\Credentials\Utils\Filter; -use AlibabaCloud\Credentials\Credential\CredentialModel; use AlibabaCloud\Credentials\Signature\ShaHmac1Signature; /** - * @deprecated * Use the STS Token to complete the authentication. */ class StsCredential implements CredentialsInterface @@ -45,10 +42,10 @@ class StsCredential implements CredentialsInterface { Filter::accessKey($access_key_id, $access_key_secret); Filter::expiration($expiration); - $this->accessKeyId = $access_key_id; + $this->accessKeyId = $access_key_id; $this->accessKeySecret = $access_key_secret; - $this->expiration = $expiration; - $this->securityToken = $security_token; + $this->expiration = $expiration; + $this->securityToken = $security_token; } /** @@ -98,18 +95,4 @@ class StsCredential implements CredentialsInterface { return new ShaHmac1Signature(); } - - /** - * @inheritDoc - */ - public function getCredential() - { - return new CredentialModel([ - 'accessKeyId' => $this->accessKeyId, - 'accessKeySecret' => $this->accessKeySecret, - 'securityToken' => $this->securityToken, - 'type' => 'sts', - ]); - } - } diff --git a/Server/vendor/alibabacloud/credentials/src/Utils/Filter.php b/Server/vendor/alibabacloud/credentials/src/Utils/Filter.php deleted file mode 100644 index 959fd8f1..00000000 --- a/Server/vendor/alibabacloud/credentials/src/Utils/Filter.php +++ /dev/null @@ -1,233 +0,0 @@ -5.5", - "alibabacloud/tea-utils": "^0.2.21", + "alibabacloud/tea-utils": "^0.2.0", "alibabacloud/credentials": "^1.1", - "alibabacloud/openapi-util": "^0.1.10|^0.2.1", + "alibabacloud/openapi-util": "^0.1.10", "alibabacloud/gateway-spi": "^1", "alibabacloud/tea-xml": "^0.2" }, diff --git a/Server/vendor/alibabacloud/darabonba-openapi/phpunit.xml b/Server/vendor/alibabacloud/darabonba-openapi/phpunit.xml deleted file mode 100644 index 796384a5..00000000 --- a/Server/vendor/alibabacloud/darabonba-openapi/phpunit.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - tests - - - ./tests/Unit - - - - - - integration - - - - - - - - - - - ./src - - - diff --git a/Server/vendor/alibabacloud/darabonba-openapi/src/Models/Config.php b/Server/vendor/alibabacloud/darabonba-openapi/src/Models/Config.php index 6e8e1878..3242c251 100644 --- a/Server/vendor/alibabacloud/darabonba-openapi/src/Models/Config.php +++ b/Server/vendor/alibabacloud/darabonba-openapi/src/Models/Config.php @@ -1,15 +1,14 @@ '', 'accessKeySecret' => '', 'securityToken' => '', - 'bearerToken' => '', 'protocol' => 'http', 'method' => '', 'regionId' => '', @@ -39,13 +37,12 @@ class Config extends Model 'type' => '', 'signatureVersion' => '', 'signatureAlgorithm' => '', - 'key' => '', - 'cert' => '', - 'ca' => '', ]; + public function validate() { } + public function toMap() { $res = []; @@ -58,9 +55,6 @@ class Config extends Model if (null !== $this->securityToken) { $res['securityToken'] = $this->securityToken; } - if (null !== $this->bearerToken) { - $res['bearerToken'] = $this->bearerToken; - } if (null !== $this->protocol) { $res['protocol'] = $this->protocol; } @@ -127,22 +121,13 @@ class Config extends Model if (null !== $this->globalParameters) { $res['globalParameters'] = null !== $this->globalParameters ? $this->globalParameters->toMap() : null; } - if (null !== $this->key) { - $res['key'] = $this->key; - } - if (null !== $this->cert) { - $res['cert'] = $this->cert; - } - if (null !== $this->ca) { - $res['ca'] = $this->ca; - } - if (null !== $this->disableHttp2) { - $res['disableHttp2'] = $this->disableHttp2; - } + return $res; } + /** * @param array $map + * * @return Config */ public static function fromMap($map = []) @@ -157,9 +142,6 @@ class Config extends Model if (isset($map['securityToken'])) { $model->securityToken = $map['securityToken']; } - if (isset($map['bearerToken'])) { - $model->bearerToken = $map['bearerToken']; - } if (isset($map['protocol'])) { $model->protocol = $map['protocol']; } @@ -226,225 +208,226 @@ class Config extends Model if (isset($map['globalParameters'])) { $model->globalParameters = GlobalParameters::fromMap($map['globalParameters']); } - if (isset($map['key'])) { - $model->key = $map['key']; - } - if (isset($map['cert'])) { - $model->cert = $map['cert']; - } - if (isset($map['ca'])) { - $model->ca = $map['ca']; - } - if (isset($map['disableHttp2'])) { - $model->disableHttp2 = $map['disableHttp2']; - } + return $model; } + /** * @description accesskey id + * * @var string */ public $accessKeyId; /** * @description accesskey secret + * * @var string */ public $accessKeySecret; /** * @description security token + * * @example a.txt + * * @var string */ public $securityToken; - /** - * @description bearer token - * @example the-bearer-token - * @var string - */ - public $bearerToken; - /** * @description http protocol + * * @example http + * * @var string */ public $protocol; /** * @description http method + * * @example GET + * * @var string */ public $method; /** * @description region id + * * @example cn-hangzhou + * * @var string */ public $regionId; /** * @description read timeout + * * @example 10 + * * @var int */ public $readTimeout; /** * @description connect timeout + * * @example 10 + * * @var int */ public $connectTimeout; /** * @description http proxy + * * @example http://localhost + * * @var string */ public $httpProxy; /** * @description https proxy + * * @example https://localhost + * * @var string */ public $httpsProxy; /** * @description credential - * @example + * + * @example + * * @var Credential */ public $credential; /** * @description endpoint + * * @example cs.aliyuncs.com + * * @var string */ public $endpoint; /** * @description proxy white list + * * @example http://localhost + * * @var string */ public $noProxy; /** * @description max idle conns + * * @example 3 + * * @var int */ public $maxIdleConns; /** * @description network for endpoint + * * @example public + * * @var string */ public $network; /** * @description user agent + * * @example Alibabacloud/1 + * * @var string */ public $userAgent; /** * @description suffix for endpoint + * * @example aliyun + * * @var string */ public $suffix; /** * @description socks5 proxy + * * @var string */ public $socks5Proxy; /** * @description socks5 network + * * @example TCP + * * @var string */ public $socks5NetWork; /** * @description endpoint type + * * @example internal + * * @var string */ public $endpointType; /** * @description OpenPlatform endpoint + * * @example openplatform.aliyuncs.com + * * @var string */ public $openPlatformEndpoint; /** * @description credential type + * * @example access_key + * * @deprecated + * * @var string */ public $type; /** * @description Signature Version + * * @example v1 + * * @var string */ public $signatureVersion; /** * @description Signature Algorithm + * * @example ACS3-HMAC-SHA256 + * * @var string */ public $signatureAlgorithm; /** * @description Global Parameters + * * @var GlobalParameters */ public $globalParameters; - - /** - * @description privite key for client certificate - * @example MIIEvQ - * @var string - */ - public $key; - - /** - * @description client certificate - * @example -----BEGIN CERTIFICATE-----xxx-----END CERTIFICATE----- - * @var string - */ - public $cert; - - /** - * @description server certificate - * @example -----BEGIN CERTIFICATE-----xxx-----END CERTIFICATE----- - * @var string - */ - public $ca; - - /** - * @description disable HTTP/2 - * @example false - * @var bool - */ - public $disableHttp2; - } diff --git a/Server/vendor/alibabacloud/darabonba-openapi/src/Models/GlobalParameters.php b/Server/vendor/alibabacloud/darabonba-openapi/src/Models/GlobalParameters.php index b09df097..41c4cd1f 100644 --- a/Server/vendor/alibabacloud/darabonba-openapi/src/Models/GlobalParameters.php +++ b/Server/vendor/alibabacloud/darabonba-openapi/src/Models/GlobalParameters.php @@ -1,6 +1,7 @@ queries) { $res['queries'] = $this->queries; } + return $res; } + /** * @param array $map + * * @return GlobalParameters */ public static function fromMap($map = []) @@ -34,10 +39,11 @@ class GlobalParameters extends Model if (isset($map['queries'])) { $model->queries = $map['queries']; } + return $model; } + public $headers; public $queries; - } diff --git a/Server/vendor/alibabacloud/darabonba-openapi/src/Models/OpenApiRequest.php b/Server/vendor/alibabacloud/darabonba-openapi/src/Models/OpenApiRequest.php index d8a4a301..9d20b6de 100644 --- a/Server/vendor/alibabacloud/darabonba-openapi/src/Models/OpenApiRequest.php +++ b/Server/vendor/alibabacloud/darabonba-openapi/src/Models/OpenApiRequest.php @@ -1,6 +1,7 @@ endpointOverride) { $res['endpointOverride'] = $this->endpointOverride; } + return $res; } + /** * @param array $map + * * @return OpenApiRequest */ public static function fromMap($map = []) @@ -58,8 +63,10 @@ class OpenApiRequest extends Model if (isset($map['endpointOverride'])) { $model->endpointOverride = $map['endpointOverride']; } + return $model; } + public $headers; public $query; @@ -71,5 +78,4 @@ class OpenApiRequest extends Model public $hostMap; public $endpointOverride; - } diff --git a/Server/vendor/alibabacloud/darabonba-openapi/src/Models/Params.php b/Server/vendor/alibabacloud/darabonba-openapi/src/Models/Params.php index 77687aca..0d104c59 100644 --- a/Server/vendor/alibabacloud/darabonba-openapi/src/Models/Params.php +++ b/Server/vendor/alibabacloud/darabonba-openapi/src/Models/Params.php @@ -1,6 +1,7 @@ bodyType, true); Model::validateRequired('reqBodyType', $this->reqBodyType, true); } + public function toMap() { $res = []; @@ -48,10 +50,13 @@ class Params extends Model if (null !== $this->style) { $res['style'] = $this->style; } + return $res; } + /** * @param array $map + * * @return Params */ public static function fromMap($map = []) @@ -84,8 +89,10 @@ class Params extends Model if (isset($map['style'])) { $model->style = $map['style']; } + return $model; } + /** * @var string */ @@ -127,5 +134,4 @@ class Params extends Model public $reqBodyType; public $style; - } diff --git a/Server/vendor/alibabacloud/darabonba-openapi/src/OpenApiClient.php b/Server/vendor/alibabacloud/darabonba-openapi/src/OpenApiClient.php index f428e556..3e526e22 100644 --- a/Server/vendor/alibabacloud/darabonba-openapi/src/OpenApiClient.php +++ b/Server/vendor/alibabacloud/darabonba-openapi/src/OpenApiClient.php @@ -1,30 +1,29 @@ "ParameterMissing", - "message" => "'config' can not be unset" - ]); + throw new TeaError(['code' => 'ParameterMissing', 'message' => "'config' can not be unset"]); } if (!Utils::empty_($config->accessKeyId) && !Utils::empty_($config->accessKeySecret)) { if (!Utils::empty_($config->securityToken)) { - $config->type = "sts"; + $config->type = 'sts'; } else { - $config->type = "access_key"; + $config->type = 'access_key'; } $credentialConfig = new Config([ - "accessKeyId" => $config->accessKeyId, - "type" => $config->type, - "accessKeySecret" => $config->accessKeySecret + 'accessKeyId' => $config->accessKeyId, + 'type' => $config->type, + 'accessKeySecret' => $config->accessKeySecret, + 'securityToken' => $config->securityToken, ]); - $credentialConfig->securityToken = $config->securityToken; $this->_credential = new Credential($credentialConfig); - } else if (!Utils::empty_($config->bearerToken)) { - $cc = new Config([ - "type" => "bearer", - "bearerToken" => $config->bearerToken - ]); - $this->_credential = new Credential($cc); - } else if (!Utils::isUnset($config->credential)) { + } elseif (!Utils::isUnset($config->credential)) { $this->_credential = $config->credential; } $this->_endpoint = $config->endpoint; @@ -141,23 +124,22 @@ class OpenApiClient $this->_signatureVersion = $config->signatureVersion; $this->_signatureAlgorithm = $config->signatureAlgorithm; $this->_globalParameters = $config->globalParameters; - $this->_key = $config->key; - $this->_cert = $config->cert; - $this->_ca = $config->ca; - $this->_disableHttp2 = $config->disableHttp2; } /** - * Encapsulate the request and invoke the network - * @param string $action api name - * @param string $version product version - * @param string $protocol http or https - * @param string $method e.g. GET - * @param string $authType authorization type e.g. AK - * @param string $bodyType response body type e.g. String - * @param OpenApiRequest $request object of OpenApiRequest - * @param RuntimeOptions $runtime which controls some details of call api, such as retry times + * Encapsulate the request and invoke the network. + * + * @param string $action api name + * @param string $version product version + * @param string $protocol http or https + * @param string $method e.g. GET + * @param string $authType authorization type e.g. AK + * @param string $bodyType response body type e.g. String + * @param OpenApiRequest $request object of OpenApiRequest + * @param RuntimeOptions $runtime which controls some details of call api, such as retry times + * * @return array the response + * * @throws TeaError * @throws Exception * @throws TeaUnableRetryError @@ -167,35 +149,32 @@ class OpenApiClient $request->validate(); $runtime->validate(); $_runtime = [ - "timeouted" => "retry", - "key" => Utils::defaultString($runtime->key, $this->_key), - "cert" => Utils::defaultString($runtime->cert, $this->_cert), - "ca" => Utils::defaultString($runtime->ca, $this->_ca), - "readTimeout" => Utils::defaultNumber($runtime->readTimeout, $this->_readTimeout), - "connectTimeout" => Utils::defaultNumber($runtime->connectTimeout, $this->_connectTimeout), - "httpProxy" => Utils::defaultString($runtime->httpProxy, $this->_httpProxy), - "httpsProxy" => Utils::defaultString($runtime->httpsProxy, $this->_httpsProxy), - "noProxy" => Utils::defaultString($runtime->noProxy, $this->_noProxy), - "socks5Proxy" => Utils::defaultString($runtime->socks5Proxy, $this->_socks5Proxy), - "socks5NetWork" => Utils::defaultString($runtime->socks5NetWork, $this->_socks5NetWork), - "maxIdleConns" => Utils::defaultNumber($runtime->maxIdleConns, $this->_maxIdleConns), - "retry" => [ - "retryable" => $runtime->autoretry, - "maxAttempts" => Utils::defaultNumber($runtime->maxAttempts, 3) + 'timeouted' => 'retry', + 'readTimeout' => Utils::defaultNumber($runtime->readTimeout, $this->_readTimeout), + 'connectTimeout' => Utils::defaultNumber($runtime->connectTimeout, $this->_connectTimeout), + 'httpProxy' => Utils::defaultString($runtime->httpProxy, $this->_httpProxy), + 'httpsProxy' => Utils::defaultString($runtime->httpsProxy, $this->_httpsProxy), + 'noProxy' => Utils::defaultString($runtime->noProxy, $this->_noProxy), + 'socks5Proxy' => Utils::defaultString($runtime->socks5Proxy, $this->_socks5Proxy), + 'socks5NetWork' => Utils::defaultString($runtime->socks5NetWork, $this->_socks5NetWork), + 'maxIdleConns' => Utils::defaultNumber($runtime->maxIdleConns, $this->_maxIdleConns), + 'retry' => [ + 'retryable' => $runtime->autoretry, + 'maxAttempts' => Utils::defaultNumber($runtime->maxAttempts, 3), ], - "backoff" => [ - "policy" => Utils::defaultString($runtime->backoffPolicy, "no"), - "period" => Utils::defaultNumber($runtime->backoffPeriod, 1) + 'backoff' => [ + 'policy' => Utils::defaultString($runtime->backoffPolicy, 'no'), + 'period' => Utils::defaultNumber($runtime->backoffPeriod, 1), ], - "ignoreSSL" => $runtime->ignoreSSL + 'ignoreSSL' => $runtime->ignoreSSL, ]; $_lastRequest = null; $_lastException = null; $_now = time(); $_retryTimes = 0; - while (Tea::allowRetry(@$_runtime["retry"], $_retryTimes, $_now)) { + while (Tea::allowRetry(@$_runtime['retry'], $_retryTimes, $_now)) { if ($_retryTimes > 0) { - $_backoffTime = Tea::getBackoffTime(@$_runtime["backoff"], $_retryTimes); + $_backoffTime = Tea::getBackoffTime(@$_runtime['backoff'], $_retryTimes); if ($_backoffTime > 0) { Tea::sleep($_backoffTime); } @@ -205,138 +184,101 @@ class OpenApiClient $_request = new Request(); $_request->protocol = Utils::defaultString($this->_protocol, $protocol); $_request->method = $method; - $_request->pathname = "/"; - $globalQueries = []; - $globalHeaders = []; - if (!Utils::isUnset($this->_globalParameters)) { - $globalParams = $this->_globalParameters; - if (!Utils::isUnset($globalParams->queries)) { - $globalQueries = $globalParams->queries; - } - if (!Utils::isUnset($globalParams->headers)) { - $globalHeaders = $globalParams->headers; - } - } - $extendsHeaders = []; - $extendsQueries = []; - if (!Utils::isUnset($runtime->extendsParameters)) { - $extendsParameters = $runtime->extendsParameters; - if (!Utils::isUnset($extendsParameters->headers)) { - $extendsHeaders = $extendsParameters->headers; - } - if (!Utils::isUnset($extendsParameters->queries)) { - $extendsQueries = $extendsParameters->queries; - } - } + $_request->pathname = '/'; $_request->query = Tea::merge([ - "Action" => $action, - "Format" => "json", - "Version" => $version, - "Timestamp" => OpenApiUtilClient::getTimestamp(), - "SignatureNonce" => Utils::getNonce() - ], $globalQueries, $extendsQueries, $request->query); + 'Action' => $action, + 'Format' => 'json', + 'Version' => $version, + 'Timestamp' => OpenApiUtilClient::getTimestamp(), + 'SignatureNonce' => Utils::getNonce(), + ], $request->query); $headers = $this->getRpcHeaders(); if (Utils::isUnset($headers)) { // endpoint is setted in product client - $_request->headers = Tea::merge([ - "host" => $this->_endpoint, - "x-acs-version" => $version, - "x-acs-action" => $action, - "user-agent" => $this->getUserAgent() - ], $globalHeaders, $extendsHeaders); + $_request->headers = [ + 'host' => $this->_endpoint, + 'x-acs-version' => $version, + 'x-acs-action' => $action, + 'user-agent' => $this->getUserAgent(), + ]; } else { $_request->headers = Tea::merge([ - "host" => $this->_endpoint, - "x-acs-version" => $version, - "x-acs-action" => $action, - "user-agent" => $this->getUserAgent() - ], $globalHeaders, $extendsHeaders, $headers); + 'host' => $this->_endpoint, + 'x-acs-version' => $version, + 'x-acs-action' => $action, + 'user-agent' => $this->getUserAgent(), + ], $headers); } if (!Utils::isUnset($request->body)) { $m = Utils::assertAsMap($request->body); $tmp = Utils::anyifyMapValue(OpenApiUtilClient::query($m)); $_request->body = Utils::toFormString($tmp); - $_request->headers["content-type"] = "application/x-www-form-urlencoded"; + $_request->headers['content-type'] = 'application/x-www-form-urlencoded'; } - if (!Utils::equalString($authType, "Anonymous")) { - $credentialType = $this->getType(); - if (Utils::equalString($credentialType, "bearer")) { - $bearerToken = $this->getBearerToken(); - $_request->query["BearerToken"] = $bearerToken; - $_request->query["SignatureType"] = "BEARERTOKEN"; - } else { - $accessKeyId = $this->getAccessKeyId(); - $accessKeySecret = $this->getAccessKeySecret(); - $securityToken = $this->getSecurityToken(); - if (!Utils::empty_($securityToken)) { - $_request->query["SecurityToken"] = $securityToken; - } - $_request->query["SignatureMethod"] = "HMAC-SHA1"; - $_request->query["SignatureVersion"] = "1.0"; - $_request->query["AccessKeyId"] = $accessKeyId; - $t = null; - if (!Utils::isUnset($request->body)) { - $t = Utils::assertAsMap($request->body); - } - $signedParam = Tea::merge($_request->query, OpenApiUtilClient::query($t)); - $_request->query["Signature"] = OpenApiUtilClient::getRPCSignature($signedParam, $_request->method, $accessKeySecret); + if (!Utils::equalString($authType, 'Anonymous')) { + $accessKeyId = $this->getAccessKeyId(); + $accessKeySecret = $this->getAccessKeySecret(); + $securityToken = $this->getSecurityToken(); + if (!Utils::empty_($securityToken)) { + $_request->query['SecurityToken'] = $securityToken; } + $_request->query['SignatureMethod'] = 'HMAC-SHA1'; + $_request->query['SignatureVersion'] = '1.0'; + $_request->query['AccessKeyId'] = $accessKeyId; + $t = null; + if (!Utils::isUnset($request->body)) { + $t = Utils::assertAsMap($request->body); + } + $signedParam = Tea::merge($_request->query, OpenApiUtilClient::query($t)); + $_request->query['Signature'] = OpenApiUtilClient::getRPCSignature($signedParam, $_request->method, $accessKeySecret); } $_lastRequest = $_request; $_response = Tea::send($_request, $_runtime); if (Utils::is4xx($_response->statusCode) || Utils::is5xx($_response->statusCode)) { $_res = Utils::readAsJSON($_response->body); $err = Utils::assertAsMap($_res); - $requestId = self::defaultAny(@$err["RequestId"], @$err["requestId"]); - @$err["statusCode"] = $_response->statusCode; - throw new TeaError([ - "code" => "" . (string) (self::defaultAny(@$err["Code"], @$err["code"])) . "", - "message" => "code: " . (string) ($_response->statusCode) . ", " . (string) (self::defaultAny(@$err["Message"], @$err["message"])) . " request id: " . (string) ($requestId) . "", - "data" => $err, - "description" => "" . (string) (self::defaultAny(@$err["Description"], @$err["description"])) . "", - "accessDeniedDetail" => self::defaultAny(@$err["AccessDeniedDetail"], @$err["accessDeniedDetail"]) - ]); + $requestId = self::defaultAny(@$err['RequestId'], @$err['requestId']); + throw new TeaError(['code' => ''.(string) (self::defaultAny(@$err['Code'], @$err['code'])).'', 'message' => 'code: '.(string) ($_response->statusCode).', '.(string) (self::defaultAny(@$err['Message'], @$err['message'])).' request id: '.(string) ($requestId).'', 'data' => $err]); } - if (Utils::equalString($bodyType, "binary")) { + if (Utils::equalString($bodyType, 'binary')) { $resp = [ - "body" => $_response->body, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $_response->body, + 'headers' => $_response->headers, ]; + return $resp; - } else if (Utils::equalString($bodyType, "byte")) { + } elseif (Utils::equalString($bodyType, 'byte')) { $byt = Utils::readAsBytes($_response->body); + return [ - "body" => $byt, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $byt, + 'headers' => $_response->headers, ]; - } else if (Utils::equalString($bodyType, "string")) { + } elseif (Utils::equalString($bodyType, 'string')) { $str = Utils::readAsString($_response->body); + return [ - "body" => $str, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $str, + 'headers' => $_response->headers, ]; - } else if (Utils::equalString($bodyType, "json")) { + } elseif (Utils::equalString($bodyType, 'json')) { $obj = Utils::readAsJSON($_response->body); $res = Utils::assertAsMap($obj); + return [ - "body" => $res, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $res, + 'headers' => $_response->headers, ]; - } else if (Utils::equalString($bodyType, "array")) { + } elseif (Utils::equalString($bodyType, 'array')) { $arr = Utils::readAsJSON($_response->body); + return [ - "body" => $arr, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $arr, + 'headers' => $_response->headers, ]; } else { return [ - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'headers' => $_response->headers, ]; } } catch (Exception $e) { @@ -354,17 +296,20 @@ class OpenApiClient } /** - * Encapsulate the request and invoke the network - * @param string $action api name - * @param string $version product version - * @param string $protocol http or https - * @param string $method e.g. GET - * @param string $authType authorization type e.g. AK - * @param string $pathname pathname of every api - * @param string $bodyType response body type e.g. String - * @param OpenApiRequest $request object of OpenApiRequest - * @param RuntimeOptions $runtime which controls some details of call api, such as retry times + * Encapsulate the request and invoke the network. + * + * @param string $action api name + * @param string $version product version + * @param string $protocol http or https + * @param string $method e.g. GET + * @param string $authType authorization type e.g. AK + * @param string $pathname pathname of every api + * @param string $bodyType response body type e.g. String + * @param OpenApiRequest $request object of OpenApiRequest + * @param RuntimeOptions $runtime which controls some details of call api, such as retry times + * * @return array the response + * * @throws TeaError * @throws Exception * @throws TeaUnableRetryError @@ -374,35 +319,32 @@ class OpenApiClient $request->validate(); $runtime->validate(); $_runtime = [ - "timeouted" => "retry", - "key" => Utils::defaultString($runtime->key, $this->_key), - "cert" => Utils::defaultString($runtime->cert, $this->_cert), - "ca" => Utils::defaultString($runtime->ca, $this->_ca), - "readTimeout" => Utils::defaultNumber($runtime->readTimeout, $this->_readTimeout), - "connectTimeout" => Utils::defaultNumber($runtime->connectTimeout, $this->_connectTimeout), - "httpProxy" => Utils::defaultString($runtime->httpProxy, $this->_httpProxy), - "httpsProxy" => Utils::defaultString($runtime->httpsProxy, $this->_httpsProxy), - "noProxy" => Utils::defaultString($runtime->noProxy, $this->_noProxy), - "socks5Proxy" => Utils::defaultString($runtime->socks5Proxy, $this->_socks5Proxy), - "socks5NetWork" => Utils::defaultString($runtime->socks5NetWork, $this->_socks5NetWork), - "maxIdleConns" => Utils::defaultNumber($runtime->maxIdleConns, $this->_maxIdleConns), - "retry" => [ - "retryable" => $runtime->autoretry, - "maxAttempts" => Utils::defaultNumber($runtime->maxAttempts, 3) - ], - "backoff" => [ - "policy" => Utils::defaultString($runtime->backoffPolicy, "no"), - "period" => Utils::defaultNumber($runtime->backoffPeriod, 1) - ], - "ignoreSSL" => $runtime->ignoreSSL + 'timeouted' => 'retry', + 'readTimeout' => Utils::defaultNumber($runtime->readTimeout, $this->_readTimeout), + 'connectTimeout' => Utils::defaultNumber($runtime->connectTimeout, $this->_connectTimeout), + 'httpProxy' => Utils::defaultString($runtime->httpProxy, $this->_httpProxy), + 'httpsProxy' => Utils::defaultString($runtime->httpsProxy, $this->_httpsProxy), + 'noProxy' => Utils::defaultString($runtime->noProxy, $this->_noProxy), + 'socks5Proxy' => Utils::defaultString($runtime->socks5Proxy, $this->_socks5Proxy), + 'socks5NetWork' => Utils::defaultString($runtime->socks5NetWork, $this->_socks5NetWork), + 'maxIdleConns' => Utils::defaultNumber($runtime->maxIdleConns, $this->_maxIdleConns), + 'retry' => [ + 'retryable' => $runtime->autoretry, + 'maxAttempts' => Utils::defaultNumber($runtime->maxAttempts, 3), + ], + 'backoff' => [ + 'policy' => Utils::defaultString($runtime->backoffPolicy, 'no'), + 'period' => Utils::defaultNumber($runtime->backoffPeriod, 1), + ], + 'ignoreSSL' => $runtime->ignoreSSL, ]; $_lastRequest = null; $_lastException = null; $_now = time(); $_retryTimes = 0; - while (Tea::allowRetry(@$_runtime["retry"], $_retryTimes, $_now)) { + while (Tea::allowRetry(@$_runtime['retry'], $_retryTimes, $_now)) { if ($_retryTimes > 0) { - $_backoffTime = Tea::getBackoffTime(@$_runtime["backoff"], $_retryTimes); + $_backoffTime = Tea::getBackoffTime(@$_runtime['backoff'], $_retryTimes); if ($_backoffTime > 0) { Tea::sleep($_backoffTime); } @@ -413,126 +355,88 @@ class OpenApiClient $_request->protocol = Utils::defaultString($this->_protocol, $protocol); $_request->method = $method; $_request->pathname = $pathname; - $globalQueries = []; - $globalHeaders = []; - if (!Utils::isUnset($this->_globalParameters)) { - $globalParams = $this->_globalParameters; - if (!Utils::isUnset($globalParams->queries)) { - $globalQueries = $globalParams->queries; - } - if (!Utils::isUnset($globalParams->headers)) { - $globalHeaders = $globalParams->headers; - } - } - $extendsHeaders = []; - $extendsQueries = []; - if (!Utils::isUnset($runtime->extendsParameters)) { - $extendsParameters = $runtime->extendsParameters; - if (!Utils::isUnset($extendsParameters->headers)) { - $extendsHeaders = $extendsParameters->headers; - } - if (!Utils::isUnset($extendsParameters->queries)) { - $extendsQueries = $extendsParameters->queries; - } - } $_request->headers = Tea::merge([ - "date" => Utils::getDateUTCString(), - "host" => $this->_endpoint, - "accept" => "application/json", - "x-acs-signature-nonce" => Utils::getNonce(), - "x-acs-signature-method" => "HMAC-SHA1", - "x-acs-signature-version" => "1.0", - "x-acs-version" => $version, - "x-acs-action" => $action, - "user-agent" => Utils::getUserAgent($this->_userAgent) - ], $globalHeaders, $extendsHeaders, $request->headers); + 'date' => Utils::getDateUTCString(), + 'host' => $this->_endpoint, + 'accept' => 'application/json', + 'x-acs-signature-nonce' => Utils::getNonce(), + 'x-acs-signature-method' => 'HMAC-SHA1', + 'x-acs-signature-version' => '1.0', + 'x-acs-version' => $version, + 'x-acs-action' => $action, + 'user-agent' => Utils::getUserAgent($this->_userAgent), + ], $request->headers); if (!Utils::isUnset($request->body)) { $_request->body = Utils::toJSONString($request->body); - $_request->headers["content-type"] = "application/json; charset=utf-8"; + $_request->headers['content-type'] = 'application/json; charset=utf-8'; } - $_request->query = Tea::merge($globalQueries, $extendsQueries); if (!Utils::isUnset($request->query)) { - $_request->query = Tea::merge($_request->query, $request->query); + $_request->query = $request->query; } - if (!Utils::equalString($authType, "Anonymous")) { - $credentialType = $this->getType(); - if (Utils::equalString($credentialType, "bearer")) { - $bearerToken = $this->getBearerToken(); - $_request->headers["x-acs-bearer-token"] = $bearerToken; - $_request->headers["x-acs-signature-type"] = "BEARERTOKEN"; - } else { - $accessKeyId = $this->getAccessKeyId(); - $accessKeySecret = $this->getAccessKeySecret(); - $securityToken = $this->getSecurityToken(); - if (!Utils::empty_($securityToken)) { - $_request->headers["x-acs-accesskey-id"] = $accessKeyId; - $_request->headers["x-acs-security-token"] = $securityToken; - } - $stringToSign = OpenApiUtilClient::getStringToSign($_request); - $_request->headers["authorization"] = "acs " . $accessKeyId . ":" . OpenApiUtilClient::getROASignature($stringToSign, $accessKeySecret) . ""; + if (!Utils::equalString($authType, 'Anonymous')) { + $accessKeyId = $this->getAccessKeyId(); + $accessKeySecret = $this->getAccessKeySecret(); + $securityToken = $this->getSecurityToken(); + if (!Utils::empty_($securityToken)) { + $_request->headers['x-acs-accesskey-id'] = $accessKeyId; + $_request->headers['x-acs-security-token'] = $securityToken; } + $stringToSign = OpenApiUtilClient::getStringToSign($_request); + $_request->headers['authorization'] = 'acs '.$accessKeyId.':'.OpenApiUtilClient::getROASignature($stringToSign, $accessKeySecret).''; } $_lastRequest = $_request; $_response = Tea::send($_request, $_runtime); if (Utils::equalNumber($_response->statusCode, 204)) { return [ - "headers" => $_response->headers + 'headers' => $_response->headers, ]; } if (Utils::is4xx($_response->statusCode) || Utils::is5xx($_response->statusCode)) { $_res = Utils::readAsJSON($_response->body); $err = Utils::assertAsMap($_res); - $requestId = self::defaultAny(@$err["RequestId"], @$err["requestId"]); - $requestId = self::defaultAny($requestId, @$err["requestid"]); - @$err["statusCode"] = $_response->statusCode; - throw new TeaError([ - "code" => "" . (string) (self::defaultAny(@$err["Code"], @$err["code"])) . "", - "message" => "code: " . (string) ($_response->statusCode) . ", " . (string) (self::defaultAny(@$err["Message"], @$err["message"])) . " request id: " . (string) ($requestId) . "", - "data" => $err, - "description" => "" . (string) (self::defaultAny(@$err["Description"], @$err["description"])) . "", - "accessDeniedDetail" => self::defaultAny(@$err["AccessDeniedDetail"], @$err["accessDeniedDetail"]) - ]); + $requestId = self::defaultAny(@$err['RequestId'], @$err['requestId']); + $requestId = self::defaultAny($requestId, @$err['requestid']); + throw new TeaError(['code' => ''.(string) (self::defaultAny(@$err['Code'], @$err['code'])).'', 'message' => 'code: '.(string) ($_response->statusCode).', '.(string) (self::defaultAny(@$err['Message'], @$err['message'])).' request id: '.(string) ($requestId).'', 'data' => $err]); } - if (Utils::equalString($bodyType, "binary")) { + if (Utils::equalString($bodyType, 'binary')) { $resp = [ - "body" => $_response->body, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $_response->body, + 'headers' => $_response->headers, ]; + return $resp; - } else if (Utils::equalString($bodyType, "byte")) { + } elseif (Utils::equalString($bodyType, 'byte')) { $byt = Utils::readAsBytes($_response->body); + return [ - "body" => $byt, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $byt, + 'headers' => $_response->headers, ]; - } else if (Utils::equalString($bodyType, "string")) { + } elseif (Utils::equalString($bodyType, 'string')) { $str = Utils::readAsString($_response->body); + return [ - "body" => $str, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $str, + 'headers' => $_response->headers, ]; - } else if (Utils::equalString($bodyType, "json")) { + } elseif (Utils::equalString($bodyType, 'json')) { $obj = Utils::readAsJSON($_response->body); $res = Utils::assertAsMap($obj); + return [ - "body" => $res, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $res, + 'headers' => $_response->headers, ]; - } else if (Utils::equalString($bodyType, "array")) { + } elseif (Utils::equalString($bodyType, 'array')) { $arr = Utils::readAsJSON($_response->body); + return [ - "body" => $arr, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $arr, + 'headers' => $_response->headers, ]; } else { return [ - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'headers' => $_response->headers, ]; } } catch (Exception $e) { @@ -550,17 +454,20 @@ class OpenApiClient } /** - * Encapsulate the request and invoke the network with form body - * @param string $action api name - * @param string $version product version - * @param string $protocol http or https - * @param string $method e.g. GET - * @param string $authType authorization type e.g. AK - * @param string $pathname pathname of every api - * @param string $bodyType response body type e.g. String - * @param OpenApiRequest $request object of OpenApiRequest - * @param RuntimeOptions $runtime which controls some details of call api, such as retry times + * Encapsulate the request and invoke the network with form body. + * + * @param string $action api name + * @param string $version product version + * @param string $protocol http or https + * @param string $method e.g. GET + * @param string $authType authorization type e.g. AK + * @param string $pathname pathname of every api + * @param string $bodyType response body type e.g. String + * @param OpenApiRequest $request object of OpenApiRequest + * @param RuntimeOptions $runtime which controls some details of call api, such as retry times + * * @return array the response + * * @throws TeaError * @throws Exception * @throws TeaUnableRetryError @@ -570,35 +477,32 @@ class OpenApiClient $request->validate(); $runtime->validate(); $_runtime = [ - "timeouted" => "retry", - "key" => Utils::defaultString($runtime->key, $this->_key), - "cert" => Utils::defaultString($runtime->cert, $this->_cert), - "ca" => Utils::defaultString($runtime->ca, $this->_ca), - "readTimeout" => Utils::defaultNumber($runtime->readTimeout, $this->_readTimeout), - "connectTimeout" => Utils::defaultNumber($runtime->connectTimeout, $this->_connectTimeout), - "httpProxy" => Utils::defaultString($runtime->httpProxy, $this->_httpProxy), - "httpsProxy" => Utils::defaultString($runtime->httpsProxy, $this->_httpsProxy), - "noProxy" => Utils::defaultString($runtime->noProxy, $this->_noProxy), - "socks5Proxy" => Utils::defaultString($runtime->socks5Proxy, $this->_socks5Proxy), - "socks5NetWork" => Utils::defaultString($runtime->socks5NetWork, $this->_socks5NetWork), - "maxIdleConns" => Utils::defaultNumber($runtime->maxIdleConns, $this->_maxIdleConns), - "retry" => [ - "retryable" => $runtime->autoretry, - "maxAttempts" => Utils::defaultNumber($runtime->maxAttempts, 3) + 'timeouted' => 'retry', + 'readTimeout' => Utils::defaultNumber($runtime->readTimeout, $this->_readTimeout), + 'connectTimeout' => Utils::defaultNumber($runtime->connectTimeout, $this->_connectTimeout), + 'httpProxy' => Utils::defaultString($runtime->httpProxy, $this->_httpProxy), + 'httpsProxy' => Utils::defaultString($runtime->httpsProxy, $this->_httpsProxy), + 'noProxy' => Utils::defaultString($runtime->noProxy, $this->_noProxy), + 'socks5Proxy' => Utils::defaultString($runtime->socks5Proxy, $this->_socks5Proxy), + 'socks5NetWork' => Utils::defaultString($runtime->socks5NetWork, $this->_socks5NetWork), + 'maxIdleConns' => Utils::defaultNumber($runtime->maxIdleConns, $this->_maxIdleConns), + 'retry' => [ + 'retryable' => $runtime->autoretry, + 'maxAttempts' => Utils::defaultNumber($runtime->maxAttempts, 3), ], - "backoff" => [ - "policy" => Utils::defaultString($runtime->backoffPolicy, "no"), - "period" => Utils::defaultNumber($runtime->backoffPeriod, 1) - ], - "ignoreSSL" => $runtime->ignoreSSL + 'backoff' => [ + 'policy' => Utils::defaultString($runtime->backoffPolicy, 'no'), + 'period' => Utils::defaultNumber($runtime->backoffPeriod, 1), + ], + 'ignoreSSL' => $runtime->ignoreSSL, ]; $_lastRequest = null; $_lastException = null; $_now = time(); $_retryTimes = 0; - while (Tea::allowRetry(@$_runtime["retry"], $_retryTimes, $_now)) { + while (Tea::allowRetry(@$_runtime['retry'], $_retryTimes, $_now)) { if ($_retryTimes > 0) { - $_backoffTime = Tea::getBackoffTime(@$_runtime["backoff"], $_retryTimes); + $_backoffTime = Tea::getBackoffTime(@$_runtime['backoff'], $_retryTimes); if ($_backoffTime > 0) { Tea::sleep($_backoffTime); } @@ -609,125 +513,87 @@ class OpenApiClient $_request->protocol = Utils::defaultString($this->_protocol, $protocol); $_request->method = $method; $_request->pathname = $pathname; - $globalQueries = []; - $globalHeaders = []; - if (!Utils::isUnset($this->_globalParameters)) { - $globalParams = $this->_globalParameters; - if (!Utils::isUnset($globalParams->queries)) { - $globalQueries = $globalParams->queries; - } - if (!Utils::isUnset($globalParams->headers)) { - $globalHeaders = $globalParams->headers; - } - } - $extendsHeaders = []; - $extendsQueries = []; - if (!Utils::isUnset($runtime->extendsParameters)) { - $extendsParameters = $runtime->extendsParameters; - if (!Utils::isUnset($extendsParameters->headers)) { - $extendsHeaders = $extendsParameters->headers; - } - if (!Utils::isUnset($extendsParameters->queries)) { - $extendsQueries = $extendsParameters->queries; - } - } $_request->headers = Tea::merge([ - "date" => Utils::getDateUTCString(), - "host" => $this->_endpoint, - "accept" => "application/json", - "x-acs-signature-nonce" => Utils::getNonce(), - "x-acs-signature-method" => "HMAC-SHA1", - "x-acs-signature-version" => "1.0", - "x-acs-version" => $version, - "x-acs-action" => $action, - "user-agent" => Utils::getUserAgent($this->_userAgent) - ], $globalHeaders, $extendsHeaders, $request->headers); + 'date' => Utils::getDateUTCString(), + 'host' => $this->_endpoint, + 'accept' => 'application/json', + 'x-acs-signature-nonce' => Utils::getNonce(), + 'x-acs-signature-method' => 'HMAC-SHA1', + 'x-acs-signature-version' => '1.0', + 'x-acs-version' => $version, + 'x-acs-action' => $action, + 'user-agent' => Utils::getUserAgent($this->_userAgent), + ], $request->headers); if (!Utils::isUnset($request->body)) { $m = Utils::assertAsMap($request->body); $_request->body = OpenApiUtilClient::toForm($m); - $_request->headers["content-type"] = "application/x-www-form-urlencoded"; + $_request->headers['content-type'] = 'application/x-www-form-urlencoded'; } - $_request->query = Tea::merge($globalQueries, $extendsQueries); if (!Utils::isUnset($request->query)) { - $_request->query = Tea::merge($_request->query, $request->query); + $_request->query = $request->query; } - if (!Utils::equalString($authType, "Anonymous")) { - $credentialType = $this->getType(); - if (Utils::equalString($credentialType, "bearer")) { - $bearerToken = $this->getBearerToken(); - $_request->headers["x-acs-bearer-token"] = $bearerToken; - $_request->headers["x-acs-signature-type"] = "BEARERTOKEN"; - } else { - $accessKeyId = $this->getAccessKeyId(); - $accessKeySecret = $this->getAccessKeySecret(); - $securityToken = $this->getSecurityToken(); - if (!Utils::empty_($securityToken)) { - $_request->headers["x-acs-accesskey-id"] = $accessKeyId; - $_request->headers["x-acs-security-token"] = $securityToken; - } - $stringToSign = OpenApiUtilClient::getStringToSign($_request); - $_request->headers["authorization"] = "acs " . $accessKeyId . ":" . OpenApiUtilClient::getROASignature($stringToSign, $accessKeySecret) . ""; + if (!Utils::equalString($authType, 'Anonymous')) { + $accessKeyId = $this->getAccessKeyId(); + $accessKeySecret = $this->getAccessKeySecret(); + $securityToken = $this->getSecurityToken(); + if (!Utils::empty_($securityToken)) { + $_request->headers['x-acs-accesskey-id'] = $accessKeyId; + $_request->headers['x-acs-security-token'] = $securityToken; } + $stringToSign = OpenApiUtilClient::getStringToSign($_request); + $_request->headers['authorization'] = 'acs '.$accessKeyId.':'.OpenApiUtilClient::getROASignature($stringToSign, $accessKeySecret).''; } $_lastRequest = $_request; $_response = Tea::send($_request, $_runtime); if (Utils::equalNumber($_response->statusCode, 204)) { return [ - "headers" => $_response->headers + 'headers' => $_response->headers, ]; } if (Utils::is4xx($_response->statusCode) || Utils::is5xx($_response->statusCode)) { $_res = Utils::readAsJSON($_response->body); $err = Utils::assertAsMap($_res); - @$err["statusCode"] = $_response->statusCode; - throw new TeaError([ - "code" => "" . (string) (self::defaultAny(@$err["Code"], @$err["code"])) . "", - "message" => "code: " . (string) ($_response->statusCode) . ", " . (string) (self::defaultAny(@$err["Message"], @$err["message"])) . " request id: " . (string) (self::defaultAny(@$err["RequestId"], @$err["requestId"])) . "", - "data" => $err, - "description" => "" . (string) (self::defaultAny(@$err["Description"], @$err["description"])) . "", - "accessDeniedDetail" => self::defaultAny(@$err["AccessDeniedDetail"], @$err["accessDeniedDetail"]) - ]); + throw new TeaError(['code' => ''.(string) (self::defaultAny(@$err['Code'], @$err['code'])).'', 'message' => 'code: '.(string) ($_response->statusCode).', '.(string) (self::defaultAny(@$err['Message'], @$err['message'])).' request id: '.(string) (self::defaultAny(@$err['RequestId'], @$err['requestId'])).'', 'data' => $err]); } - if (Utils::equalString($bodyType, "binary")) { + if (Utils::equalString($bodyType, 'binary')) { $resp = [ - "body" => $_response->body, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $_response->body, + 'headers' => $_response->headers, ]; + return $resp; - } else if (Utils::equalString($bodyType, "byte")) { + } elseif (Utils::equalString($bodyType, 'byte')) { $byt = Utils::readAsBytes($_response->body); + return [ - "body" => $byt, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $byt, + 'headers' => $_response->headers, ]; - } else if (Utils::equalString($bodyType, "string")) { + } elseif (Utils::equalString($bodyType, 'string')) { $str = Utils::readAsString($_response->body); + return [ - "body" => $str, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $str, + 'headers' => $_response->headers, ]; - } else if (Utils::equalString($bodyType, "json")) { + } elseif (Utils::equalString($bodyType, 'json')) { $obj = Utils::readAsJSON($_response->body); $res = Utils::assertAsMap($obj); + return [ - "body" => $res, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $res, + 'headers' => $_response->headers, ]; - } else if (Utils::equalString($bodyType, "array")) { + } elseif (Utils::equalString($bodyType, 'array')) { $arr = Utils::readAsJSON($_response->body); + return [ - "body" => $arr, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $arr, + 'headers' => $_response->headers, ]; } else { return [ - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'headers' => $_response->headers, ]; } } catch (Exception $e) { @@ -745,11 +611,14 @@ class OpenApiClient } /** - * Encapsulate the request and invoke the network - * @param Params $params + * Encapsulate the request and invoke the network. + * + * @param Params $params * @param OpenApiRequest $request object of OpenApiRequest * @param RuntimeOptions $runtime which controls some details of call api, such as retry times + * * @return array the response + * * @throws TeaError * @throws Exception * @throws TeaUnableRetryError @@ -760,35 +629,32 @@ class OpenApiClient $request->validate(); $runtime->validate(); $_runtime = [ - "timeouted" => "retry", - "key" => Utils::defaultString($runtime->key, $this->_key), - "cert" => Utils::defaultString($runtime->cert, $this->_cert), - "ca" => Utils::defaultString($runtime->ca, $this->_ca), - "readTimeout" => Utils::defaultNumber($runtime->readTimeout, $this->_readTimeout), - "connectTimeout" => Utils::defaultNumber($runtime->connectTimeout, $this->_connectTimeout), - "httpProxy" => Utils::defaultString($runtime->httpProxy, $this->_httpProxy), - "httpsProxy" => Utils::defaultString($runtime->httpsProxy, $this->_httpsProxy), - "noProxy" => Utils::defaultString($runtime->noProxy, $this->_noProxy), - "socks5Proxy" => Utils::defaultString($runtime->socks5Proxy, $this->_socks5Proxy), - "socks5NetWork" => Utils::defaultString($runtime->socks5NetWork, $this->_socks5NetWork), - "maxIdleConns" => Utils::defaultNumber($runtime->maxIdleConns, $this->_maxIdleConns), - "retry" => [ - "retryable" => $runtime->autoretry, - "maxAttempts" => Utils::defaultNumber($runtime->maxAttempts, 3) + 'timeouted' => 'retry', + 'readTimeout' => Utils::defaultNumber($runtime->readTimeout, $this->_readTimeout), + 'connectTimeout' => Utils::defaultNumber($runtime->connectTimeout, $this->_connectTimeout), + 'httpProxy' => Utils::defaultString($runtime->httpProxy, $this->_httpProxy), + 'httpsProxy' => Utils::defaultString($runtime->httpsProxy, $this->_httpsProxy), + 'noProxy' => Utils::defaultString($runtime->noProxy, $this->_noProxy), + 'socks5Proxy' => Utils::defaultString($runtime->socks5Proxy, $this->_socks5Proxy), + 'socks5NetWork' => Utils::defaultString($runtime->socks5NetWork, $this->_socks5NetWork), + 'maxIdleConns' => Utils::defaultNumber($runtime->maxIdleConns, $this->_maxIdleConns), + 'retry' => [ + 'retryable' => $runtime->autoretry, + 'maxAttempts' => Utils::defaultNumber($runtime->maxAttempts, 3), ], - "backoff" => [ - "policy" => Utils::defaultString($runtime->backoffPolicy, "no"), - "period" => Utils::defaultNumber($runtime->backoffPeriod, 1) + 'backoff' => [ + 'policy' => Utils::defaultString($runtime->backoffPolicy, 'no'), + 'period' => Utils::defaultNumber($runtime->backoffPeriod, 1), ], - "ignoreSSL" => $runtime->ignoreSSL + 'ignoreSSL' => $runtime->ignoreSSL, ]; $_lastRequest = null; $_lastException = null; $_now = time(); $_retryTimes = 0; - while (Tea::allowRetry(@$_runtime["retry"], $_retryTimes, $_now)) { + while (Tea::allowRetry(@$_runtime['retry'], $_retryTimes, $_now)) { if ($_retryTimes > 0) { - $_backoffTime = Tea::getBackoffTime(@$_runtime["backoff"], $_retryTimes); + $_backoffTime = Tea::getBackoffTime(@$_runtime['backoff'], $_retryTimes); if ($_backoffTime > 0) { Tea::sleep($_backoffTime); } @@ -810,139 +676,125 @@ class OpenApiClient $globalHeaders = $globalParams->headers; } } - $extendsHeaders = []; - $extendsQueries = []; - if (!Utils::isUnset($runtime->extendsParameters)) { - $extendsParameters = $runtime->extendsParameters; - if (!Utils::isUnset($extendsParameters->headers)) { - $extendsHeaders = $extendsParameters->headers; - } - if (!Utils::isUnset($extendsParameters->queries)) { - $extendsQueries = $extendsParameters->queries; - } - } - $_request->query = Tea::merge($globalQueries, $extendsQueries, $request->query); + $_request->query = Tea::merge($globalQueries, $request->query); // endpoint is setted in product client $_request->headers = Tea::merge([ - "host" => $this->_endpoint, - "x-acs-version" => $params->version, - "x-acs-action" => $params->action, - "user-agent" => $this->getUserAgent(), - "x-acs-date" => OpenApiUtilClient::getTimestamp(), - "x-acs-signature-nonce" => Utils::getNonce(), - "accept" => "application/json" - ], $globalHeaders, $extendsHeaders, $request->headers); - if (Utils::equalString($params->style, "RPC")) { + 'host' => $this->_endpoint, + 'x-acs-version' => $params->version, + 'x-acs-action' => $params->action, + 'user-agent' => $this->getUserAgent(), + 'x-acs-date' => OpenApiUtilClient::getTimestamp(), + 'x-acs-signature-nonce' => Utils::getNonce(), + 'accept' => 'application/json', + ], $globalHeaders, $request->headers); + if (Utils::equalString($params->style, 'RPC')) { $headers = $this->getRpcHeaders(); if (!Utils::isUnset($headers)) { $_request->headers = Tea::merge($_request->headers, $headers); } } - $signatureAlgorithm = Utils::defaultString($this->_signatureAlgorithm, "ACS3-HMAC-SHA256"); - $hashedRequestPayload = OpenApiUtilClient::hexEncode(OpenApiUtilClient::hash(Utils::toBytes(""), $signatureAlgorithm)); + $signatureAlgorithm = Utils::defaultString($this->_signatureAlgorithm, 'ACS3-HMAC-SHA256'); + $hashedRequestPayload = OpenApiUtilClient::hexEncode(OpenApiUtilClient::hash(Utils::toBytes(''), $signatureAlgorithm)); if (!Utils::isUnset($request->stream)) { $tmp = Utils::readAsBytes($request->stream); $hashedRequestPayload = OpenApiUtilClient::hexEncode(OpenApiUtilClient::hash($tmp, $signatureAlgorithm)); $_request->body = $tmp; - $_request->headers["content-type"] = "application/octet-stream"; + $_request->headers['content-type'] = 'application/octet-stream'; } else { if (!Utils::isUnset($request->body)) { - if (Utils::equalString($params->reqBodyType, "byte")) { - $byteObj = Utils::assertAsBytes($request->body); - $hashedRequestPayload = OpenApiUtilClient::hexEncode(OpenApiUtilClient::hash($byteObj, $signatureAlgorithm)); - $_request->body = $byteObj; - } else if (Utils::equalString($params->reqBodyType, "json")) { + if (Utils::equalString($params->reqBodyType, 'json')) { $jsonObj = Utils::toJSONString($request->body); $hashedRequestPayload = OpenApiUtilClient::hexEncode(OpenApiUtilClient::hash(Utils::toBytes($jsonObj), $signatureAlgorithm)); $_request->body = $jsonObj; - $_request->headers["content-type"] = "application/json; charset=utf-8"; + $_request->headers['content-type'] = 'application/json; charset=utf-8'; } else { $m = Utils::assertAsMap($request->body); $formObj = OpenApiUtilClient::toForm($m); $hashedRequestPayload = OpenApiUtilClient::hexEncode(OpenApiUtilClient::hash(Utils::toBytes($formObj), $signatureAlgorithm)); $_request->body = $formObj; - $_request->headers["content-type"] = "application/x-www-form-urlencoded"; + $_request->headers['content-type'] = 'application/x-www-form-urlencoded'; } } } - $_request->headers["x-acs-content-sha256"] = $hashedRequestPayload; - if (!Utils::equalString($params->authType, "Anonymous")) { + $_request->headers['x-acs-content-sha256'] = $hashedRequestPayload; + if (!Utils::equalString($params->authType, 'Anonymous')) { $authType = $this->getType(); - if (Utils::equalString($authType, "bearer")) { + if (Utils::equalString($authType, 'bearer')) { $bearerToken = $this->getBearerToken(); - $_request->headers["x-acs-bearer-token"] = $bearerToken; - if (Utils::equalString($params->style, "RPC")) { - $_request->query["SignatureType"] = "BEARERTOKEN"; - } else { - $_request->headers["x-acs-signature-type"] = "BEARERTOKEN"; - } + $_request->headers['x-acs-bearer-token'] = $bearerToken; } else { $accessKeyId = $this->getAccessKeyId(); $accessKeySecret = $this->getAccessKeySecret(); $securityToken = $this->getSecurityToken(); if (!Utils::empty_($securityToken)) { - $_request->headers["x-acs-accesskey-id"] = $accessKeyId; - $_request->headers["x-acs-security-token"] = $securityToken; + $_request->headers['x-acs-accesskey-id'] = $accessKeyId; + $_request->headers['x-acs-security-token'] = $securityToken; } - $_request->headers["Authorization"] = OpenApiUtilClient::getAuthorization($_request, $signatureAlgorithm, $hashedRequestPayload, $accessKeyId, $accessKeySecret); + $_request->headers['Authorization'] = OpenApiUtilClient::getAuthorization($_request, $signatureAlgorithm, $hashedRequestPayload, $accessKeyId, $accessKeySecret); } } $_lastRequest = $_request; $_response = Tea::send($_request, $_runtime); if (Utils::is4xx($_response->statusCode) || Utils::is5xx($_response->statusCode)) { + $err = []; + // if (!Utils::isUnset(@$_response->headers['content-type']) && Utils::equalString(@$_response->headers['content-type'], 'text/xml;charset=utf-8')) { + // $_str = Utils::readAsString($_response->body); + // $respMap = XML::parseXml($_str, null); + // $err = Utils::assertAsMap(@$respMap['Error']); + // } else { + // $_res = Utils::readAsJSON($_response->body); + // $err = Utils::assertAsMap($_res); + // } $_res = Utils::readAsJSON($_response->body); $err = Utils::assertAsMap($_res); - @$err["statusCode"] = $_response->statusCode; - throw new TeaError([ - "code" => "" . (string) (self::defaultAny(@$err["Code"], @$err["code"])) . "", - "message" => "code: " . (string) ($_response->statusCode) . ", " . (string) (self::defaultAny(@$err["Message"], @$err["message"])) . " request id: " . (string) (self::defaultAny(@$err["RequestId"], @$err["requestId"])) . "", - "data" => $err, - "description" => "" . (string) (self::defaultAny(@$err["Description"], @$err["description"])) . "", - "accessDeniedDetail" => self::defaultAny(@$err["AccessDeniedDetail"], @$err["accessDeniedDetail"]) - ]); + @$err['statusCode'] = $_response->statusCode; + throw new TeaError(['code' => ''.(string) (self::defaultAny(@$err['Code'], @$err['code'])).'', 'message' => 'code: '.(string) ($_response->statusCode).', '.(string) (self::defaultAny(@$err['Message'], @$err['message'])).' request id: '.(string) (self::defaultAny(@$err['RequestId'], @$err['requestId'])).'', 'data' => $err]); } - if (Utils::equalString($params->bodyType, "binary")) { + if (Utils::equalString($params->bodyType, 'binary')) { $resp = [ - "body" => $_response->body, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $_response->body, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, ]; + return $resp; - } else if (Utils::equalString($params->bodyType, "byte")) { + } elseif (Utils::equalString($params->bodyType, 'byte')) { $byt = Utils::readAsBytes($_response->body); + return [ - "body" => $byt, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $byt, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, ]; - } else if (Utils::equalString($params->bodyType, "string")) { + } elseif (Utils::equalString($params->bodyType, 'string')) { $str = Utils::readAsString($_response->body); + return [ - "body" => $str, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $str, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, ]; - } else if (Utils::equalString($params->bodyType, "json")) { + } elseif (Utils::equalString($params->bodyType, 'json')) { $obj = Utils::readAsJSON($_response->body); $res = Utils::assertAsMap($obj); + return [ - "body" => $res, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $res, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, ]; - } else if (Utils::equalString($params->bodyType, "array")) { + } elseif (Utils::equalString($params->bodyType, 'array')) { $arr = Utils::readAsJSON($_response->body); + return [ - "body" => $arr, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'body' => $arr, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, ]; } else { - $anything = Utils::readAsString($_response->body); return [ - "body" => $anything, - "headers" => $_response->headers, - "statusCode" => $_response->statusCode + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, ]; } } catch (Exception $e) { @@ -960,11 +812,14 @@ class OpenApiClient } /** - * Encapsulate the request and invoke the network - * @param Params $params + * Encapsulate the request and invoke the network. + * + * @param Params $params * @param OpenApiRequest $request object of OpenApiRequest * @param RuntimeOptions $runtime which controls some details of call api, such as retry times + * * @return array the response + * * @throws TeaError * @throws Exception * @throws TeaUnableRetryError @@ -975,36 +830,32 @@ class OpenApiClient $request->validate(); $runtime->validate(); $_runtime = [ - "timeouted" => "retry", - "key" => Utils::defaultString($runtime->key, $this->_key), - "cert" => Utils::defaultString($runtime->cert, $this->_cert), - "ca" => Utils::defaultString($runtime->ca, $this->_ca), - "readTimeout" => Utils::defaultNumber($runtime->readTimeout, $this->_readTimeout), - "connectTimeout" => Utils::defaultNumber($runtime->connectTimeout, $this->_connectTimeout), - "httpProxy" => Utils::defaultString($runtime->httpProxy, $this->_httpProxy), - "httpsProxy" => Utils::defaultString($runtime->httpsProxy, $this->_httpsProxy), - "noProxy" => Utils::defaultString($runtime->noProxy, $this->_noProxy), - "socks5Proxy" => Utils::defaultString($runtime->socks5Proxy, $this->_socks5Proxy), - "socks5NetWork" => Utils::defaultString($runtime->socks5NetWork, $this->_socks5NetWork), - "maxIdleConns" => Utils::defaultNumber($runtime->maxIdleConns, $this->_maxIdleConns), - "retry" => [ - "retryable" => $runtime->autoretry, - "maxAttempts" => Utils::defaultNumber($runtime->maxAttempts, 3) + 'timeouted' => 'retry', + 'readTimeout' => Utils::defaultNumber($runtime->readTimeout, $this->_readTimeout), + 'connectTimeout' => Utils::defaultNumber($runtime->connectTimeout, $this->_connectTimeout), + 'httpProxy' => Utils::defaultString($runtime->httpProxy, $this->_httpProxy), + 'httpsProxy' => Utils::defaultString($runtime->httpsProxy, $this->_httpsProxy), + 'noProxy' => Utils::defaultString($runtime->noProxy, $this->_noProxy), + 'socks5Proxy' => Utils::defaultString($runtime->socks5Proxy, $this->_socks5Proxy), + 'socks5NetWork' => Utils::defaultString($runtime->socks5NetWork, $this->_socks5NetWork), + 'maxIdleConns' => Utils::defaultNumber($runtime->maxIdleConns, $this->_maxIdleConns), + 'retry' => [ + 'retryable' => $runtime->autoretry, + 'maxAttempts' => Utils::defaultNumber($runtime->maxAttempts, 3), ], - "backoff" => [ - "policy" => Utils::defaultString($runtime->backoffPolicy, "no"), - "period" => Utils::defaultNumber($runtime->backoffPeriod, 1) + 'backoff' => [ + 'policy' => Utils::defaultString($runtime->backoffPolicy, 'no'), + 'period' => Utils::defaultNumber($runtime->backoffPeriod, 1), ], - "ignoreSSL" => $runtime->ignoreSSL, - "disableHttp2" => self::defaultAny($this->_disableHttp2, false) + 'ignoreSSL' => $runtime->ignoreSSL, ]; $_lastRequest = null; $_lastException = null; $_now = time(); $_retryTimes = 0; - while (Tea::allowRetry(@$_runtime["retry"], $_retryTimes, $_now)) { + while (Tea::allowRetry(@$_runtime['retry'], $_retryTimes, $_now)) { if ($_retryTimes > 0) { - $_backoffTime = Tea::getBackoffTime(@$_runtime["backoff"], $_retryTimes); + $_backoffTime = Tea::getBackoffTime(@$_runtime['backoff'], $_retryTimes); if ($_backoffTime > 0) { Tea::sleep($_backoffTime); } @@ -1025,50 +876,39 @@ class OpenApiClient $globalHeaders = $globalParams->headers; } } - $extendsHeaders = []; - $extendsQueries = []; - if (!Utils::isUnset($runtime->extendsParameters)) { - $extendsParameters = $runtime->extendsParameters; - if (!Utils::isUnset($extendsParameters->headers)) { - $extendsHeaders = $extendsParameters->headers; - } - if (!Utils::isUnset($extendsParameters->queries)) { - $extendsQueries = $extendsParameters->queries; - } - } $requestContext = new \Darabonba\GatewaySpi\Models\InterceptorContext\request([ - "headers" => Tea::merge($globalHeaders, $extendsHeaders, $request->headers, $headers), - "query" => Tea::merge($globalQueries, $extendsQueries, $request->query), - "body" => $request->body, - "stream" => $request->stream, - "hostMap" => $request->hostMap, - "pathname" => $params->pathname, - "productId" => $this->_productId, - "action" => $params->action, - "version" => $params->version, - "protocol" => Utils::defaultString($this->_protocol, $params->protocol), - "method" => Utils::defaultString($this->_method, $params->method), - "authType" => $params->authType, - "bodyType" => $params->bodyType, - "reqBodyType" => $params->reqBodyType, - "style" => $params->style, - "credential" => $this->_credential, - "signatureVersion" => $this->_signatureVersion, - "signatureAlgorithm" => $this->_signatureAlgorithm, - "userAgent" => $this->getUserAgent() + 'headers' => Tea::merge($globalHeaders, $request->headers, $headers), + 'query' => Tea::merge($globalQueries, $request->query), + 'body' => $request->body, + 'stream' => $request->stream, + 'hostMap' => $request->hostMap, + 'pathname' => $params->pathname, + 'productId' => $this->_productId, + 'action' => $params->action, + 'version' => $params->version, + 'protocol' => Utils::defaultString($this->_protocol, $params->protocol), + 'method' => Utils::defaultString($this->_method, $params->method), + 'authType' => $params->authType, + 'bodyType' => $params->bodyType, + 'reqBodyType' => $params->reqBodyType, + 'style' => $params->style, + 'credential' => $this->_credential, + 'signatureVersion' => $this->_signatureVersion, + 'signatureAlgorithm' => $this->_signatureAlgorithm, + 'userAgent' => $this->getUserAgent(), ]); $configurationContext = new configuration([ - "regionId" => $this->_regionId, - "endpoint" => Utils::defaultString($request->endpointOverride, $this->_endpoint), - "endpointRule" => $this->_endpointRule, - "endpointMap" => $this->_endpointMap, - "endpointType" => $this->_endpointType, - "network" => $this->_network, - "suffix" => $this->_suffix + 'regionId' => $this->_regionId, + 'endpoint' => Utils::defaultString($request->endpointOverride, $this->_endpoint), + 'endpointRule' => $this->_endpointRule, + 'endpointMap' => $this->_endpointMap, + 'endpointType' => $this->_endpointType, + 'network' => $this->_network, + 'suffix' => $this->_suffix, ]); $interceptorContext = new InterceptorContext([ - "request" => $requestContext, - "configuration" => $configurationContext + 'request' => $requestContext, + 'configuration' => $configurationContext, ]); $attributeMap = new AttributeMap([]); // 1. spi.modifyConfiguration(context: SPI.InterceptorContext, attributeMap: SPI.AttributeMap); @@ -1084,17 +924,18 @@ class OpenApiClient $_lastRequest = $_request; $_response = Tea::send($_request, $_runtime); $responseContext = new response([ - "statusCode" => $_response->statusCode, - "headers" => $_response->headers, - "body" => $_response->body + 'statusCode' => $_response->statusCode, + 'headers' => $_response->headers, + 'body' => $_response->body, ]); $interceptorContext->response = $responseContext; // 3. spi.modifyResponse(context: SPI.InterceptorContext, attributeMap: SPI.AttributeMap); $this->_spi->modifyResponse($interceptorContext, $attributeMap); + return [ - "headers" => $interceptorContext->response->headers, - "statusCode" => $interceptorContext->response->statusCode, - "body" => $interceptorContext->response->deserializedBody + 'headers' => $interceptorContext->response->headers, + 'statusCode' => $interceptorContext->response->statusCode, + 'body' => $interceptorContext->response->deserializedBody, ]; } catch (Exception $e) { if (!($e instanceof TeaError)) { @@ -1111,25 +952,24 @@ class OpenApiClient } /** - * @param Params $params + * @param Params $params * @param OpenApiRequest $request * @param RuntimeOptions $runtime + * * @return array + * * @throws TeaError */ public function callApi($params, $request, $runtime) { if (Utils::isUnset($params)) { - throw new TeaError([ - "code" => "ParameterMissing", - "message" => "'params' can not be unset" - ]); + throw new TeaError(['code' => 'ParameterMissing', 'message' => "'params' can not be unset"]); } - if (Utils::isUnset($this->_signatureAlgorithm) || !Utils::equalString($this->_signatureAlgorithm, "v2")) { + if (Utils::isUnset($this->_signatureAlgorithm) || !Utils::equalString($this->_signatureAlgorithm, 'v2')) { return $this->doRequest($params, $request, $runtime); - } else if (Utils::equalString($params->style, "ROA") && Utils::equalString($params->reqBodyType, "json")) { + } elseif (Utils::equalString($params->style, 'ROA') && Utils::equalString($params->reqBodyType, 'json')) { return $this->doROARequest($params->action, $params->version, $params->protocol, $params->method, $params->authType, $params->pathname, $params->bodyType, $request, $runtime); - } else if (Utils::equalString($params->style, "ROA")) { + } elseif (Utils::equalString($params->style, 'ROA')) { return $this->doROARequestWithForm($params->action, $params->version, $params->protocol, $params->method, $params->authType, $params->pathname, $params->bodyType, $request, $runtime); } else { return $this->doRPCRequest($params->action, $params->version, $params->protocol, $params->method, $params->authType, $params->bodyType, $request, $runtime); @@ -1137,17 +977,20 @@ class OpenApiClient } /** - * Get user agent + * Get user agent. + * * @return string user agent */ public function getUserAgent() { $userAgent = Utils::getUserAgent($this->_userAgent); + return $userAgent; } /** - * Get accesskey id by using credential + * Get accesskey id by using credential. + * * @return string accesskey id */ public function getAccessKeyId() @@ -1156,11 +999,13 @@ class OpenApiClient return ''; } $accessKeyId = $this->_credential->getAccessKeyId(); + return $accessKeyId; } /** - * Get accesskey secret by using credential + * Get accesskey secret by using credential. + * * @return string accesskey secret */ public function getAccessKeySecret() @@ -1169,11 +1014,13 @@ class OpenApiClient return ''; } $secret = $this->_credential->getAccessKeySecret(); + return $secret; } /** - * Get security token by using credential + * Get security token by using credential. + * * @return string security token */ public function getSecurityToken() @@ -1182,11 +1029,13 @@ class OpenApiClient return ''; } $token = $this->_credential->getSecurityToken(); + return $token; } /** - * Get bearer token by credential + * Get bearer token by credential. + * * @return string bearer token */ public function getBearerToken() @@ -1195,11 +1044,13 @@ class OpenApiClient return ''; } $token = $this->_credential->getBearerToken(); + return $token; } /** - * Get credential type by credential + * Get credential type by credential. + * * @return string credential type e.g. access_key */ public function getType() @@ -1208,13 +1059,16 @@ class OpenApiClient return ''; } $authType = $this->_credential->getType(); + return $authType; } /** - * If inputValue is not null, return it or return defaultValue - * @param mixed $inputValue users input value + * If inputValue is not null, return it or return defaultValue. + * + * @param mixed $inputValue users input value * @param mixed $defaultValue default value + * * @return any the final result */ public static function defaultAny($inputValue, $defaultValue) @@ -1222,38 +1076,31 @@ class OpenApiClient if (Utils::isUnset($inputValue)) { return $defaultValue; } + return $inputValue; } /** - * If the endpointRule and config.endpoint are empty, throw error + * If the endpointRule and config.endpoint are empty, throw error. + * * @param \Darabonba\OpenApi\Models\Config $config config contains the necessary information to create a client + * * @return void + * * @throws TeaError */ public function checkConfig($config) { if (Utils::empty_($this->_endpointRule) && Utils::empty_($config->endpoint)) { - throw new TeaError([ - "code" => "ParameterMissing", - "message" => "'config.endpoint' can not be empty" - ]); + throw new TeaError(['code' => 'ParameterMissing', 'message' => "'config.endpoint' can not be empty"]); } } /** - * set gateway client - * @param Client $spi - * @return void - */ - public function setGatewayClient($spi) - { - $this->_spi = $spi; - } - - /** - * set RPC header for debug - * @param string[] $headers headers for debug, this header can be used only once. + * set RPC header for debug. + * + * @param string[] $headers headers for debug, this header can be used only once + * * @return void */ public function setRpcHeaders($headers) @@ -1262,13 +1109,15 @@ class OpenApiClient } /** - * get RPC header for debug + * get RPC header for debug. + * * @return array */ public function getRpcHeaders() { $headers = $this->_headers; $this->_headers = null; + return $headers; } } diff --git a/Server/vendor/alibabacloud/darabonba-openapi/tests/OpenApiClientTest.php b/Server/vendor/alibabacloud/darabonba-openapi/tests/OpenApiClientTest.php deleted file mode 100644 index 9ce72e27..00000000 --- a/Server/vendor/alibabacloud/darabonba-openapi/tests/OpenApiClientTest.php +++ /dev/null @@ -1,328 +0,0 @@ - [ - "global-key" => "global-value" - ], - "queries" => [ - "global-query" => "global-value" - ] - ]); - $config = new Config([ - "endpoint" => "config.endpoint", - "endpointType" => "regional", - "network" => "config.network", - "suffix" => "config.suffix", - "protocol" => "config.protocol", - "method" => "config.method", - "regionId" => "config.regionId", - "userAgent" => "config.userAgent", - "readTimeout" => 3000, - "connectTimeout" => 3000, - "httpProxy" => "config.httpProxy", - "httpsProxy" => "config.httpsProxy", - "noProxy" => "config.noProxy", - "socks5Proxy" => "config.socks5Proxy", - "socks5NetWork" => "config.socks5NetWork", - "maxIdleConns" => 128, - "signatureVersion" => "config.signatureVersion", - "signatureAlgorithm" => "config.signatureAlgorithm", - "globalParameters" => $globalParameters - ]); - $creConfig = new \AlibabaCloud\Credentials\Credential\Config([ - "accessKeyId" => "accessKeyId", - "accessKeySecret" => "accessKeySecret", - "securityToken" => "securityToken", - "type" => "sts" - ]); - $credential = new Credential($creConfig); - $config->credential = $credential; - $client = new OpenApiClient($config); - $config->accessKeyId = "ak"; - $config->accessKeySecret = "secret"; - $config->securityToken = "token"; - $config->type = "sts"; - $client = new OpenApiClient($config); - } - - /** - * @return Config - */ - public static function createConfig(){ - $globalParameters = new GlobalParameters([ - "headers" => [ - "global-key" => "global-value" - ], - "queries" => [ - "global-query" => "global-value" - ] - ]); - $config = new Config([ - "accessKeyId" => "ak", - "accessKeySecret" => "secret", - "securityToken" => "token", - "type" => "sts", - "userAgent" => "config.userAgent", - "readTimeout" => 3000, - "connectTimeout" => 3000, - "maxIdleConns" => 128, - "signatureVersion" => "config.signatureVersion", - "signatureAlgorithm" => "ACS3-HMAC-SHA256", - "globalParameters" => $globalParameters - ]); - return $config; - } - - /** - * @return RuntimeOptions - */ - public static function createRuntimeOptions(){ - $runtime = new RuntimeOptions([ - "readTimeout" => 4000, - "connectTimeout" => 4000, - "maxIdleConns" => 100, - "autoretry" => true, - "maxAttempts" => 1, - "backoffPolicy" => "no", - "backoffPeriod" => 1, - "ignoreSSL" => true - ]); - return $runtime; - } - - /** - * @return OpenApiRequest - */ - public static function createOpenApiRequest(){ - $query = []; - $query["key1"] = "value"; - $query["key2"] = 1; - $query["key3"] = true; - $body = []; - $body["key1"] = "value"; - $body["key2"] = 1; - $body["key3"] = true; - $headers = [ - "for-test" => "sdk" - ]; - $req = new OpenApiRequest([ - "headers" => $headers, - "query" => OpenApiUtilClient::query($query), - "body" => OpenApiUtilClient::parseToMap($body) - ]); - return $req; - } - - public function testCallApiForRPCWithV2Sign_AK_Form(){ - $config = self::createConfig(); - $runtime = self::createRuntimeOptions(); - $config->protocol = "HTTP"; - $config->signatureAlgorithm = "v2"; - $config->endpoint = "test.aliyuncs.com"; - $client = new OpenApiClient($config); - $request = self::createOpenApiRequest(); - $params = new Params([ - "action" => "TestAPI", - "version" => "2022-06-01", - "protocol" => "HTTPS", - "pathname" => "/", - "method" => "POST", - "authType" => "AK", - "style" => "RPC", - "reqBodyType" => "formData", - "bodyType" => "json" - ]); - $client->callApi($params, $request, $runtime); - } - - public function testCallApiForRPCWithV2Sign_Anonymous_JSON(){ - $config = self::createConfig(); - $runtime = self::createRuntimeOptions(); - $config->protocol = "HTTP"; - $config->signatureAlgorithm = "v2"; - $config->endpoint = "test.aliyuncs.com"; - $client = new OpenApiClient($config); - $request = self::createOpenApiRequest(); - $params = new Params([ - "action" => "TestAPI", - "version" => "2022-06-01", - "protocol" => "HTTPS", - "pathname" => "/", - "method" => "POST", - "authType" => "Anonymous", - "style" => "RPC", - "reqBodyType" => "json", - "bodyType" => "json" - ]); - $client->callApi($params, $request, $runtime); - } - - public function testCallApiForROAWithV2Sign_HTTPS_AK_Form(){ - $config = self::createConfig(); - $runtime = self::createRuntimeOptions(); - $config->signatureAlgorithm = "v2"; - $config->endpoint = "test.aliyuncs.com"; - $client = new OpenApiClient($config); - $request = self::createOpenApiRequest(); - $params = new Params([ - "action" => "TestAPI", - "version" => "2022-06-01", - "protocol" => "HTTPS", - "pathname" => "/test", - "method" => "POST", - "authType" => "AK", - "style" => "ROA", - "reqBodyType" => "formData", - "bodyType" => "json" - ]); - $client->callApi($params, $request, $runtime); - } - - public function testCallApiForROAWithV2Sign_Anonymous_JSON(){ - $config = self::createConfig(); - $runtime = self::createRuntimeOptions(); - $config->protocol = "HTTP"; - $config->signatureAlgorithm = "v2"; - $config->endpoint = "test.aliyuncs.com"; - $client = new OpenApiClient($config); - $request = self::createOpenApiRequest(); - $params = new Params([ - "action" => "TestAPI", - "version" => "2022-06-01", - "protocol" => "HTTPS", - "pathname" => "/test", - "method" => "POST", - "authType" => "Anonymous", - "style" => "ROA", - "reqBodyType" => "json", - "bodyType" => "json" - ]); - $client->callApi($params, $request, $runtime); - } - - public function testCallApiForRPCWithV3Sign_AK_Form(){ - $config = self::createConfig(); - $runtime = self::createRuntimeOptions(); - $config->protocol = "HTTP"; - $config->endpoint = "test.aliyuncs.com"; - $client = new OpenApiClient($config); - $request = self::createOpenApiRequest(); - $params = new Params([ - "action" => "TestAPI", - "version" => "2022-06-01", - "protocol" => "HTTPS", - "pathname" => "/", - "method" => "POST", - "authType" => "AK", - "style" => "RPC", - "reqBodyType" => "formData", - "bodyType" => "json" - ]); - $client->callApi($params, $request, $runtime); - } - - public function testCallApiForRPCWithV3Sign_Anonymous_JSON(){ - $config = self::createConfig(); - $runtime = self::createRuntimeOptions(); - $config->protocol = "HTTP"; - $config->endpoint = "test.aliyuncs.com"; - $client = new OpenApiClient($config); - $request = self::createOpenApiRequest(); - $params = new Params([ - "action" => "TestAPI", - "version" => "2022-06-01", - "protocol" => "HTTPS", - "pathname" => "/", - "method" => "POST", - "authType" => "Anonymous", - "style" => "RPC", - "reqBodyType" => "json", - "bodyType" => "json" - ]); - $client->callApi($params, $request, $runtime); - } - - public function testCallApiForROAWithV3Sign_AK_Form(){ - $config = self::createConfig(); - $runtime = self::createRuntimeOptions(); - $config->protocol = "HTTP"; - $config->endpoint = "test.aliyuncs.com"; - $client = new OpenApiClient($config); - $request = self::createOpenApiRequest(); - $params = new Params([ - "action" => "TestAPI", - "version" => "2022-06-01", - "protocol" => "HTTPS", - "pathname" => "/test", - "method" => "POST", - "authType" => "AK", - "style" => "ROA", - "reqBodyType" => "formData", - "bodyType" => "json" - ]); - $client->callApi($params, $request, $runtime); - } - - public function testCallApiForROAWithV3Sign_Anonymous_JSON(){ - $config = self::createConfig(); - $runtime = self::createRuntimeOptions(); - $config->protocol = "HTTP"; - $config->endpoint = "test.aliyuncs.com"; - $client = new OpenApiClient($config); - $request = self::createOpenApiRequest(); - $params = new Params([ - "action" => "TestAPI", - "version" => "2022-06-01", - "protocol" => "HTTPS", - "pathname" => "/test", - "method" => "POST", - "authType" => "Anonymous", - "style" => "ROA", - "reqBodyType" => "json", - "bodyType" => "json" - ]); - $client->callApi($params, $request, $runtime); - } - - public function testResponseBodyType(){ - $config = self::createConfig(); - $runtime = self::createRuntimeOptions(); - $config->protocol = "HTTP"; - $config->endpoint = "test.aliyuncs.com"; - $client = new OpenApiClient($config); - $request = self::createOpenApiRequest(); - $params = new Params([ - "action" => "TestAPI", - "version" => "2022-06-01", - "protocol" => "HTTPS", - "pathname" => "/test", - "method" => "POST", - "authType" => "AK", - "style" => "ROA", - "reqBodyType" => "formData", - "bodyType" => "json" - ]); - $client->callApi($params, $request, $runtime); - $params->bodyType = "array"; - $client->callApi($params, $request, $runtime); - $params->bodyType = "string"; - $client->callApi($params, $request, $runtime); - $params->bodyType = "byte"; - $client->callApi($params, $request, $runtime); - } -} diff --git a/Server/vendor/alibabacloud/darabonba-openapi/tests/bootstrap.php b/Server/vendor/alibabacloud/darabonba-openapi/tests/bootstrap.php deleted file mode 100644 index c62c4e81..00000000 --- a/Server/vendor/alibabacloud/darabonba-openapi/tests/bootstrap.php +++ /dev/null @@ -1,3 +0,0 @@ -tests - ./tests + ./tests/Unit diff --git a/Server/vendor/alibabacloud/openapi-util/src/OpenApiUtilClient.php b/Server/vendor/alibabacloud/openapi-util/src/OpenApiUtilClient.php index e6ba0b90..38d2b961 100644 --- a/Server/vendor/alibabacloud/openapi-util/src/OpenApiUtilClient.php +++ b/Server/vendor/alibabacloud/openapi-util/src/OpenApiUtilClient.php @@ -160,26 +160,26 @@ class OpenApiUtilClient } /** - * Parse object into a string with specified style. + * Parse array into a string with specified style. * * @style specified style e.g. repeatList * - * @param mixed $object the object + * @param mixed $array the array * @param string $prefix the prefix string * @param string $style * * @return string the string */ - public static function arrayToStringWithSpecifiedStyle($object, $prefix, $style) + public static function arrayToStringWithSpecifiedStyle($array, $prefix, $style) { - if (null === $object) { + if (null === $array) { return ''; } if ('repeatList' === $style) { - return self::toForm([$prefix => $object]); + return self::toForm([$prefix => $array]); } if ('simple' == $style || 'spaceDelimited' == $style || 'pipeDelimited' == $style) { - $strs = self::flatten($object); + $strs = self::flatten($array); switch ($style) { case 'spaceDelimited': @@ -192,8 +192,7 @@ class OpenApiUtilClient return implode(',', $strs); } } elseif ('json' === $style) { - self::parse($object, $parsed); - return json_encode($parsed); + return json_encode($array); } return ''; @@ -424,7 +423,7 @@ class OpenApiUtilClient foreach ($items as $key => $value) { $pos = \is_int($key) ? $key + 1 : $key; - + if ($value instanceof Model) { $value = $value->toMap(); } elseif (\is_object($value)) { @@ -437,9 +436,6 @@ class OpenApiUtilClient self::flatten($value, $delimiter, $prepend . $pos . $delimiter) ); } else { - if (\is_bool($value)) { - $value = true === $value ? 'true' : 'false'; - } $flatten[$prepend . $pos] = $value; } } diff --git a/Server/vendor/alibabacloud/openapi-util/tests/OpenApiUtilClientTest.php b/Server/vendor/alibabacloud/openapi-util/tests/OpenApiUtilClientTest.php index b0f5046d..31c951d8 100644 --- a/Server/vendor/alibabacloud/openapi-util/tests/OpenApiUtilClientTest.php +++ b/Server/vendor/alibabacloud/openapi-util/tests/OpenApiUtilClientTest.php @@ -63,14 +63,12 @@ class OpenApiUtilClientTest extends TestCase public function testToForm() { - $this->assertEquals('bool=true&client=test&strs.1=str1&strs.2=str2&strs.3=false&tag.key=value', OpenApiUtilClient::toForm([ + $this->assertEquals('client=test&strs.1=str1&strs.2=str2&tag.key=value', OpenApiUtilClient::toForm([ 'client' => 'test', 'tag' => [ 'key' => 'value', ], - 'strs' => ['str1', 'str2', false], - 'bool' => true, - 'null' => null, + 'strs' => ['str1', 'str2'], ])); } @@ -85,7 +83,6 @@ class OpenApiUtilClientTest extends TestCase $model = new MockModel(); $model->a = 'foo'; $model->c = 'boo'; - $model->r = true; $array = [ 'a' => 'a', @@ -98,9 +95,7 @@ class OpenApiUtilClientTest extends TestCase 'c' => ['x', 'y', 'z'], 'd' => [ $model - ], - 'e' => true, - 'f' => null, + ] ]; $this->assertEquals([ 'a' => 'a', @@ -112,10 +107,6 @@ class OpenApiUtilClientTest extends TestCase 'd.1.A' => 'foo', 'd.1.b' => '', 'd.1.c' => 'boo', - 'd.1.c' => 'boo', - 'd.1.r' => 'true', - 'e' => 'true', - 'f' => null ], OpenApiUtilClient::query($array)); } @@ -151,48 +142,6 @@ class OpenApiUtilClientTest extends TestCase ) ); - $test = new ParseModel([ - 'str' => 'A', - 'model' => new ParseModel(['str' => 'sub model']), - 'array' => [1, 2, 3], - ]); - $this->assertEquals( - '{"str":"A","model":{"str":"sub model","model":null,"array":null},"array":[1,2,3]}', - OpenApiUtilClient::arrayToStringWithSpecifiedStyle( - $test, - 'instance', - 'json' - ) - ); - // model item in array - $test = [ - new ParseModel([ - 'str' => 'A', - ]), - ]; - $this->assertEquals( - '[{"str":"A","model":null,"array":null}]', - OpenApiUtilClient::arrayToStringWithSpecifiedStyle( - $test, - 'instance', - 'json' - ) - ); - // model item in map - $test = [ - 'model' => new ParseModel([ - 'str' => 'A', - ]), - ]; - $this->assertEquals( - '{"model":{"str":"A","model":null,"array":null}}', - OpenApiUtilClient::arrayToStringWithSpecifiedStyle( - $test, - 'instance', - 'json' - ) - ); - $this->assertEquals( 'ok,test,2,3', OpenApiUtilClient::arrayToStringWithSpecifiedStyle( @@ -346,8 +295,7 @@ class OpenApiUtilClientTest extends TestCase 'b9ff646822f41ef647c1416fa2b8408923828abc0464af6706e18db3e8553da8', OpenApiUtilClient::hexEncode(OpenApiUtilClient::sign('secret', 'source', 'ACS3-HMAC-SM3')) ); - $this->assertEquals( - '1d93c62698a1c26427265668e79fac099aa26c1df873669599a2fb2f272e64c9', + $this->assertEquals('1d93c62698a1c26427265668e79fac099aa26c1df873669599a2fb2f272e64c9', OpenApiUtilClient::hexEncode(OpenApiUtilClient::sign('secret', 'source', 'ACS3-HMAC-SHA256')) ); } @@ -363,14 +311,14 @@ class OpenApiUtilClientTest extends TestCase 'array' => [1, 2, 3], ]), [ // model item in array - new ParseModel([ - 'str' => 'A', - ]), + new ParseModel([ + 'str' => 'A', + ]), ], [ // model item in map - 'model' => new ParseModel([ - 'str' => 'A', - ]), + 'model' => new ParseModel([ + 'str' => 'A', + ]), ], ], 'expected' => [ @@ -399,12 +347,6 @@ class OpenApiUtilClientTest extends TestCase ], ], ], - 'expectedJsonStr' => [ - '["NotArray"]', - 'NotArray', - 'NotArray', - 'NotArray', - ], ]; } } diff --git a/Server/vendor/alibabacloud/tea-utils/phpunit.xml b/Server/vendor/alibabacloud/tea-utils/phpunit.xml index a44c1a27..ce66fc80 100644 --- a/Server/vendor/alibabacloud/tea-utils/phpunit.xml +++ b/Server/vendor/alibabacloud/tea-utils/phpunit.xml @@ -1,18 +1,15 @@ - - - - src - - - - - - - - - - tests - - + + + + + + + + + tests + + diff --git a/Server/vendor/alibabacloud/tea-utils/src/Utils.php b/Server/vendor/alibabacloud/tea-utils/src/Utils.php index 13ca84ff..7f4757d5 100644 --- a/Server/vendor/alibabacloud/tea-utils/src/Utils.php +++ b/Server/vendor/alibabacloud/tea-utils/src/Utils.php @@ -19,9 +19,6 @@ class Utils */ public static function toBytes($string) { - if (self::is_bytes($string)) { - return $string; - } $bytes = []; for ($i = 0; $i < \strlen($string); ++$i) { $bytes[] = \ord($string[$i]); @@ -39,9 +36,6 @@ class Utils */ public static function toString($bytes) { - if (\is_string($bytes)) { - return $bytes; - } $str = ''; foreach ($bytes as $ch) { $str .= \chr($ch); @@ -191,7 +185,7 @@ class Utils $object = $object->toMap(); } - return json_encode($object, JSON_UNESCAPED_UNICODE + JSON_UNESCAPED_SLASHES); + return json_encode($object); } /** @@ -386,7 +380,7 @@ class Utils * * @param mixed $value * - * @return int the number value + * @return bool the number value */ public static function assertAsNumber($value) { @@ -397,19 +391,6 @@ class Utils throw new \InvalidArgumentException('It is not a number value.'); } - /** - * Assert a value, if it is a integer, return it, otherwise throws - * @param mixed $value - * @return int the integer value - */ - public static function assertAsInteger($value){ - if (\is_int($value)) { - return $value; - } - - throw new \InvalidArgumentException('It is not a int value.'); - } - /** * Assert a value, if it is a map, return it, otherwise throws. * diff --git a/Server/vendor/alibabacloud/tea-utils/src/Utils/ExtendsParameters.php b/Server/vendor/alibabacloud/tea-utils/src/Utils/ExtendsParameters.php deleted file mode 100644 index 670b2da4..00000000 --- a/Server/vendor/alibabacloud/tea-utils/src/Utils/ExtendsParameters.php +++ /dev/null @@ -1,38 +0,0 @@ -headers) { - $res['headers'] = $this->headers; - } - if (null !== $this->queries) { - $res['queries'] = $this->queries; - } - return $res; - } - /** - * @param array $map - * @return ExtendsParameters - */ - public static function fromMap($map = []) { - $model = new self(); - if(isset($map['headers'])){ - $model->headers = $map['headers']; - } - if(isset($map['queries'])){ - $model->queries = $map['queries']; - } - return $model; - } - public $headers; - - public $queries; - -} diff --git a/Server/vendor/alibabacloud/tea-utils/src/Utils/RuntimeOptions.php b/Server/vendor/alibabacloud/tea-utils/src/Utils/RuntimeOptions.php index 59242289..329c0d3a 100644 --- a/Server/vendor/alibabacloud/tea-utils/src/Utils/RuntimeOptions.php +++ b/Server/vendor/alibabacloud/tea-utils/src/Utils/RuntimeOptions.php @@ -1,273 +1,41 @@ 'autoretry', - 'ignoreSSL' => 'ignoreSSL', - 'key' => 'key', - 'cert' => 'cert', - 'ca' => 'ca', - 'maxAttempts' => 'max_attempts', - 'backoffPolicy' => 'backoff_policy', - 'backoffPeriod' => 'backoff_period', - 'readTimeout' => 'readTimeout', - 'connectTimeout' => 'connectTimeout', - 'httpProxy' => 'httpProxy', - 'httpsProxy' => 'httpsProxy', - 'noProxy' => 'noProxy', - 'maxIdleConns' => 'maxIdleConns', - 'localAddr' => 'localAddr', - 'socks5Proxy' => 'socks5Proxy', - 'socks5NetWork' => 'socks5NetWork', - 'keepAlive' => 'keepAlive', - ]; - public function validate() {} - public function toMap() { - $res = []; - if (null !== $this->autoretry) { - $res['autoretry'] = $this->autoretry; - } - if (null !== $this->ignoreSSL) { - $res['ignoreSSL'] = $this->ignoreSSL; - } - if (null !== $this->key) { - $res['key'] = $this->key; - } - if (null !== $this->cert) { - $res['cert'] = $this->cert; - } - if (null !== $this->ca) { - $res['ca'] = $this->ca; - } - if (null !== $this->maxAttempts) { - $res['max_attempts'] = $this->maxAttempts; - } - if (null !== $this->backoffPolicy) { - $res['backoff_policy'] = $this->backoffPolicy; - } - if (null !== $this->backoffPeriod) { - $res['backoff_period'] = $this->backoffPeriod; - } - if (null !== $this->readTimeout) { - $res['readTimeout'] = $this->readTimeout; - } - if (null !== $this->connectTimeout) { - $res['connectTimeout'] = $this->connectTimeout; - } - if (null !== $this->httpProxy) { - $res['httpProxy'] = $this->httpProxy; - } - if (null !== $this->httpsProxy) { - $res['httpsProxy'] = $this->httpsProxy; - } - if (null !== $this->noProxy) { - $res['noProxy'] = $this->noProxy; - } - if (null !== $this->maxIdleConns) { - $res['maxIdleConns'] = $this->maxIdleConns; - } - if (null !== $this->localAddr) { - $res['localAddr'] = $this->localAddr; - } - if (null !== $this->socks5Proxy) { - $res['socks5Proxy'] = $this->socks5Proxy; - } - if (null !== $this->socks5NetWork) { - $res['socks5NetWork'] = $this->socks5NetWork; - } - if (null !== $this->keepAlive) { - $res['keepAlive'] = $this->keepAlive; - } - if (null !== $this->extendsParameters) { - $res['extendsParameters'] = null !== $this->extendsParameters ? $this->extendsParameters->toMap() : null; - } - return $res; - } - /** - * @param array $map - * @return RuntimeOptions - */ - public static function fromMap($map = []) { - $model = new self(); - if(isset($map['autoretry'])){ - $model->autoretry = $map['autoretry']; - } - if(isset($map['ignoreSSL'])){ - $model->ignoreSSL = $map['ignoreSSL']; - } - if(isset($map['key'])){ - $model->key = $map['key']; - } - if(isset($map['cert'])){ - $model->cert = $map['cert']; - } - if(isset($map['ca'])){ - $model->ca = $map['ca']; - } - if(isset($map['max_attempts'])){ - $model->maxAttempts = $map['max_attempts']; - } - if(isset($map['backoff_policy'])){ - $model->backoffPolicy = $map['backoff_policy']; - } - if(isset($map['backoff_period'])){ - $model->backoffPeriod = $map['backoff_period']; - } - if(isset($map['readTimeout'])){ - $model->readTimeout = $map['readTimeout']; - } - if(isset($map['connectTimeout'])){ - $model->connectTimeout = $map['connectTimeout']; - } - if(isset($map['httpProxy'])){ - $model->httpProxy = $map['httpProxy']; - } - if(isset($map['httpsProxy'])){ - $model->httpsProxy = $map['httpsProxy']; - } - if(isset($map['noProxy'])){ - $model->noProxy = $map['noProxy']; - } - if(isset($map['maxIdleConns'])){ - $model->maxIdleConns = $map['maxIdleConns']; - } - if(isset($map['localAddr'])){ - $model->localAddr = $map['localAddr']; - } - if(isset($map['socks5Proxy'])){ - $model->socks5Proxy = $map['socks5Proxy']; - } - if(isset($map['socks5NetWork'])){ - $model->socks5NetWork = $map['socks5NetWork']; - } - if(isset($map['keepAlive'])){ - $model->keepAlive = $map['keepAlive']; - } - if(isset($map['extendsParameters'])){ - $model->extendsParameters = ExtendsParameters::fromMap($map['extendsParameters']); - } - return $model; - } - /** - * @description whether to try again - * @var bool - */ +class RuntimeOptions extends Model +{ public $autoretry; - /** - * @description ignore SSL validation - * @var bool - */ public $ignoreSSL; - /** - * @description privite key for client certificate - * @var string - */ - public $key; - - /** - * @description client certificate - * @var string - */ - public $cert; - - /** - * @description server certificate - * @var string - */ - public $ca; - - /** - * @description maximum number of retries - * @var int - */ public $maxAttempts; - /** - * @description backoff policy - * @var string - */ public $backoffPolicy; - /** - * @description backoff period - * @var int - */ public $backoffPeriod; - /** - * @description read timeout - * @var int - */ public $readTimeout; - /** - * @description connect timeout - * @var int - */ public $connectTimeout; - /** - * @description http proxy url - * @var string - */ public $httpProxy; - /** - * @description https Proxy url - * @var string - */ public $httpsProxy; - /** - * @description agent blacklist - * @var string - */ public $noProxy; - /** - * @description maximum number of connections - * @var int - */ public $maxIdleConns; - /** - * @description local addr - * @var string - */ public $localAddr; - /** - * @description SOCKS5 proxy - * @var string - */ public $socks5Proxy; - /** - * @description SOCKS5 netWork - * @var string - */ public $socks5NetWork; - /** - * @description whether to enable keep-alive - * @var bool - */ public $keepAlive; - - /** - * @description Extends Parameters - * @var ExtendsParameters - */ - public $extendsParameters; - + protected $_name = []; } diff --git a/Server/vendor/alibabacloud/tea-utils/tests/UtilsTest.php b/Server/vendor/alibabacloud/tea-utils/tests/UtilsTest.php index 70d54f47..1073a790 100644 --- a/Server/vendor/alibabacloud/tea-utils/tests/UtilsTest.php +++ b/Server/vendor/alibabacloud/tea-utils/tests/UtilsTest.php @@ -4,8 +4,6 @@ namespace AlibabaCloud\Tea\Utils\Tests; use AlibabaCloud\Tea\Model; use AlibabaCloud\Tea\Utils\Utils; -use AlibabaCloud\Tea\Utils\Utils\ExtendsParameters; -use AlibabaCloud\Tea\Utils\Utils\RuntimeOptions; use GuzzleHttp\Psr7\Stream; use PHPUnit\Framework\TestCase; use Psr\Http\Message\StreamInterface; @@ -26,11 +24,6 @@ final class UtilsTest extends TestCase $this->assertEquals([ 115, 116, 114, 105, 110, 103, ], Utils::toBytes('string')); - $this->assertEquals([ - 115, 116, 114, 105, 110, 103, - ], Utils::toBytes([ - 115, 116, 114, 105, 110, 103, - ])); } public function testToString() @@ -38,7 +31,6 @@ final class UtilsTest extends TestCase $this->assertEquals('string', Utils::toString([ 115, 116, 114, 105, 110, 103, ])); - $this->assertEquals('string', Utils::toString('string')); } public function testParseJSON() @@ -116,17 +108,12 @@ final class UtilsTest extends TestCase $this->assertJson(Utils::toJSONString($object)); $this->assertEquals('[]', Utils::toJSONString([])); $this->assertEquals('["foo"]', Utils::toJSONString(['foo'])); - $this->assertEquals( - '{"str":"test","number":1,"bool":false,"null":null,"chinese":"中文","http":"https://aliyun.com:8080/zh/中文.html"}', - Utils::toJSONString([ - 'str' => 'test', - 'number' => 1, - 'bool' => FALSE, - 'null' => null, - 'chinese' => '中文', - 'http' => 'https://aliyun.com:8080/zh/中文.html', - ]) - ); + $this->assertEquals('{"str":"test","number":1,"bool":false,"null":null}', Utils::toJSONString([ + 'str' => 'test', + 'number' => 1, + 'bool' => FALSE, + 'null' => null, + ])); $this->assertEquals('1', Utils::toJSONString(1)); $this->assertEquals('true', Utils::toJSONString(TRUE)); $this->assertEquals('null', Utils::toJSONString(null)); @@ -263,21 +250,6 @@ final class UtilsTest extends TestCase } } - public function testAssertAsInteger() - { - $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage('It is not a int value.'); - Utils::assertAsInteger('is not int'); - - try { - $map = 123; - $this->assertEquals($map, Utils::assertAsInteger($map)); - } catch (\Exception $e) { - // should not be here - $this->assertTrue(false); - } - } - public function testAssertAsMap() { $this->expectException(\InvalidArgumentException::class); @@ -399,48 +371,6 @@ final class UtilsTest extends TestCase Utils::assertAsReadable(0); } - public function testRuntimeOptions() - { - $opts = new RuntimeOptions([ - "autoretry" => false, - "ignoreSSL" => false, - "key" => "key", - "cert" => "cert", - "ca" => "ca", - "maxAttempts" => 3, - "backoffPolicy" => "backoffPolicy", - "backoffPeriod" => 10, - "readTimeout" => 3000, - "connectTimeout" => 3000, - "httpProxy" => "httpProxy", - "httpsProxy" => "httpsProxy", - "noProxy" => "noProxy", - "maxIdleConns" => 300, - "keepAlive" => true, - "extendsParameters" => new ExtendsParameters([ - "headers" => ['key' => 'value'], - "queries" => ['key' => 'value'], - ]), - ]); - $this->assertEquals(false, $opts->autoretry); - $this->assertEquals(false, $opts->ignoreSSL); - $this->assertEquals("key", $opts->key); - $this->assertEquals("cert", $opts->cert); - $this->assertEquals("ca", $opts->ca); - $this->assertEquals(3, $opts->maxAttempts); - $this->assertEquals("backoffPolicy", $opts->backoffPolicy); - $this->assertEquals(10, $opts->backoffPeriod); - $this->assertEquals(3000, $opts->readTimeout); - $this->assertEquals(3000, $opts->connectTimeout); - $this->assertEquals("httpProxy", $opts->httpProxy); - $this->assertEquals("httpsProxy", $opts->httpsProxy); - $this->assertEquals("noProxy", $opts->noProxy); - $this->assertEquals(300, $opts->maxIdleConns); - $this->assertEquals(true, $opts->keepAlive); - $this->assertEquals('value', $opts->extendsParameters->headers['key']); - $this->assertEquals('value', $opts->extendsParameters->queries['key']); - } - private function convert($body, &$content) { $class = new \ReflectionClass($body); diff --git a/Server/vendor/alibabacloud/tea-xml/composer.json b/Server/vendor/alibabacloud/tea-xml/composer.json index 5322b044..c2d31430 100644 --- a/Server/vendor/alibabacloud/tea-xml/composer.json +++ b/Server/vendor/alibabacloud/tea-xml/composer.json @@ -13,7 +13,7 @@ "php": ">5.5" }, "require-dev": { - "phpunit/phpunit": "*", + "phpunit/phpunit": "^4.8.35|^5.4.3", "symfony/var-dumper": "*" }, "autoload": { diff --git a/Server/vendor/alibabacloud/tea-xml/phpunit.xml b/Server/vendor/alibabacloud/tea-xml/phpunit.xml index d43dde9f..8306a799 100644 --- a/Server/vendor/alibabacloud/tea-xml/phpunit.xml +++ b/Server/vendor/alibabacloud/tea-xml/phpunit.xml @@ -8,7 +8,7 @@ tests - ./tests + ./tests/Unit diff --git a/Server/vendor/alibabacloud/tea-xml/src/XML.php b/Server/vendor/alibabacloud/tea-xml/src/XML.php index 3550e046..e2289597 100644 --- a/Server/vendor/alibabacloud/tea-xml/src/XML.php +++ b/Server/vendor/alibabacloud/tea-xml/src/XML.php @@ -8,14 +8,14 @@ class XML { $res = self::parse($xmlStr); if ($response === null) { - return $res; + return $ref; } else { if (\is_string($response)) { $response = new $response(); } $prop = get_object_vars($response); $target = []; - + foreach ($res as $k => $v) { if (isset($prop[$k])) { $target[$k] = $v; @@ -45,9 +45,7 @@ class XML private static function parse($xml) { - if (\PHP_VERSION_ID < 80000) { - libxml_disable_entity_loader(true); - } + libxml_disable_entity_loader(true); return json_decode( json_encode( diff --git a/Server/vendor/alibabacloud/tea-xml/tests/XMLTest.php b/Server/vendor/alibabacloud/tea-xml/tests/XMLTest.php index 9bc5059f..5d721c6e 100644 --- a/Server/vendor/alibabacloud/tea-xml/tests/XMLTest.php +++ b/Server/vendor/alibabacloud/tea-xml/tests/XMLTest.php @@ -23,13 +23,13 @@ class RpcUtilsTest extends TestCase $name = $res['name']; $value = $res['value']; $this->assertEquals('test', $name); - $this->assertEquals(1, $value); + $this->assertEquals('1', $value); $res = XML::parseXml($this->xmlStr, null); $name = $res['name']; $value = $res['value']; $this->assertEquals('test', $name); - $this->assertEquals(1, $value); + $this->assertEquals('1', $value); } public function testArrayToXML() diff --git a/Server/vendor/alibabacloud/tea/composer.json b/Server/vendor/alibabacloud/tea/composer.json index 163689ec..eaeb7766 100644 --- a/Server/vendor/alibabacloud/tea/composer.json +++ b/Server/vendor/alibabacloud/tea/composer.json @@ -31,7 +31,7 @@ "ext-simplexml": "*", "ext-xmlwriter": "*", "guzzlehttp/guzzle": "^6.3|^7.0", - "adbario/php-dot-notation": "^2.4" + "adbario/php-dot-notation": "^2.3" }, "require-dev": { "symfony/dotenv": "^3.4", diff --git a/Server/vendor/alibabacloud/tea/src/Exception/TeaError.php b/Server/vendor/alibabacloud/tea/src/Exception/TeaError.php index f4ef0d9a..3d8fb9c2 100644 --- a/Server/vendor/alibabacloud/tea/src/Exception/TeaError.php +++ b/Server/vendor/alibabacloud/tea/src/Exception/TeaError.php @@ -13,9 +13,6 @@ class TeaError extends RuntimeException public $code = 0; public $data; public $name = ''; - public $statusCode; - public $description; - public $accessDeniedDetail; private $errorInfo; /** @@ -31,13 +28,10 @@ class TeaError extends RuntimeException parent::__construct((string) $message, (int) $code, $previous); $this->errorInfo = $errorInfo; if (!empty($errorInfo)) { - $properties = ['name', 'message', 'code', 'data', 'description', 'accessDeniedDetail']; + $properties = ['name', 'message', 'code', 'data']; foreach ($properties as $property) { if (isset($errorInfo[$property])) { $this->{$property} = $errorInfo[$property]; - if ($property === 'data' && isset($errorInfo['data']['statusCode'])) { - $this->statusCode = $errorInfo['data']['statusCode']; - } } } } diff --git a/Server/vendor/alibabacloud/tea/src/Helper.php b/Server/vendor/alibabacloud/tea/src/Helper.php index f1c0fd4f..c9efd978 100644 --- a/Server/vendor/alibabacloud/tea/src/Helper.php +++ b/Server/vendor/alibabacloud/tea/src/Helper.php @@ -37,50 +37,6 @@ class Helper return \JSON_ERROR_NONE == json_last_error(); } - /** - * @param mixed $value - * - * @return bool - */ - public static function isBytes($value) - { - if (!\is_array($value)) { - return false; - } - $i = 0; - foreach ($value as $k => $ord) { - if ($k !== $i) { - return false; - } - if (!\is_int($ord)) { - return false; - } - if ($ord < 0 || $ord > 255) { - return false; - } - ++$i; - } - - return true; - } - - /** - * Convert a bytes to string(utf8). - * - * @param array $bytes - * - * @return string the return string - */ - public static function toString($bytes) - { - $str = ''; - foreach ($bytes as $ch) { - $str .= \chr($ch); - } - - return $str; - } - /** * @return array */ diff --git a/Server/vendor/alibabacloud/tea/src/Request.php b/Server/vendor/alibabacloud/tea/src/Request.php index db49142e..0a8b790d 100644 --- a/Server/vendor/alibabacloud/tea/src/Request.php +++ b/Server/vendor/alibabacloud/tea/src/Request.php @@ -89,15 +89,11 @@ class Request extends PsrRequest if ($this->body instanceof StreamInterface) { $request = $request->withBody($this->body); } else { - $body = $this->body; - if (Helper::isBytes($this->body)) { - $body = Helper::toString($this->body); - } if (\function_exists('\GuzzleHttp\Psr7\stream_for')) { // @deprecated stream_for will be removed in guzzlehttp/psr7:2.0 - $request = $request->withBody(\GuzzleHttp\Psr7\stream_for($body)); + $request = $request->withBody(\GuzzleHttp\Psr7\stream_for($this->body)); } else { - $request = $request->withBody(\GuzzleHttp\Psr7\Utils::streamFor($body)); + $request = $request->withBody(\GuzzleHttp\Psr7\Utils::streamFor($this->body)); } } } diff --git a/Server/vendor/alibabacloud/tea/src/Tea.php b/Server/vendor/alibabacloud/tea/src/Tea.php index a138ad9a..f42cb59a 100644 --- a/Server/vendor/alibabacloud/tea/src/Tea.php +++ b/Server/vendor/alibabacloud/tea/src/Tea.php @@ -273,9 +273,6 @@ class Tea if (isset($config['noProxy']) && !empty($config['noProxy'])) { $options->set('proxy.no', $config['noProxy']); } - if (isset($config['ignoreSSL']) && !empty($config['ignoreSSL'])) { - $options->set('verify',!((bool)$config['ignoreSSL'])); - } // readTimeout&connectTimeout unit is millisecond $read_timeout = isset($config['readTimeout']) && !empty($config['readTimeout']) ? (int) $config['readTimeout'] : 0; $con_timeout = isset($config['connectTimeout']) && !empty($config['connectTimeout']) ? (int) $config['connectTimeout'] : 0; diff --git a/Server/vendor/aliyuncs/oss-sdk-php/CHANGELOG.md b/Server/vendor/aliyuncs/oss-sdk-php/CHANGELOG.md index 9cb01567..d9c48092 100644 --- a/Server/vendor/aliyuncs/oss-sdk-php/CHANGELOG.md +++ b/Server/vendor/aliyuncs/oss-sdk-php/CHANGELOG.md @@ -1,9 +1,5 @@ # ChangeLog - Aliyun OSS SDK for PHP -## v2.7.2 / 2024-10-28 -* Added: presign supports response-* parameters -* Added: forcePathStyle option. - ## v2.7.1 / 2024-02-28 * Fixed: fix deprecated diff --git a/Server/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php b/Server/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php index ab6b7fd3..fa3e2b87 100644 --- a/Server/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php +++ b/Server/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php @@ -169,11 +169,6 @@ class OssClient throw new OssException("endpoint is empty"); } $this->hostname = $this->checkEndpoint($endpoint, $isCName); - if (isset($config['forcePathStyle'])) { - if ($config['forcePathStyle'] === true) { - $this->hostType = self::OSS_HOST_TYPE_PATH_STYLE; - } - } $this->requestProxy = $requestProxy; if (!$provider instanceof CredentialsProvider) { throw new OssException("provider must be an instance of CredentialsProvider"); @@ -2377,7 +2372,7 @@ class OssClient $options[self::OSS_OBJECT] = $object; $options[self::OSS_SUB_RESOURCE] = 'x-oss-async-process'; $options[self::OSS_CONTENT_TYPE] = 'application/octet-stream'; - $options[self::OSS_CONTENT] = 'x-oss-async-process=' . $asyncProcess; + $options[self::OSS_CONTENT] = 'x-oss-async-process='.$asyncProcess; $response = $this->auth($options); $result = new BodyResult($response); return $result->getData(); @@ -3004,7 +2999,7 @@ class OssClient return $this->getValue($options, self::OSS_CHECK_MD5, false, true, true); } - /** + /** * Gets value of the specified key from the options * * @param array $options @@ -3274,7 +3269,7 @@ class OssClient try { $tmp_object = $options[self::OSS_OBJECT]; - $encoding = array('UTF-8', 'GB2312', 'GBK'); + $encoding = array('UTF-8','GB2312', 'GBK'); $encode = mb_detect_encoding($tmp_object, $encoding); if ($encode === 'UTF-8' || $encode === false) { return; @@ -3338,9 +3333,6 @@ class OssClient if ('' !== $bucket) { if ($this->hostType === self::OSS_HOST_TYPE_IP || $this->hostType === self::OSS_HOST_TYPE_PATH_STYLE) { $paths[] = $bucket; - if ('' === $object) { - $paths[] = ''; - } } } // + object @@ -3362,12 +3354,6 @@ class OssClient $query = array(); $queryList = array( self::OSS_PART_NUM, - 'response-content-type', - 'response-content-language', - 'response-cache-control', - 'response-content-encoding', - 'response-expires', - 'response-content-disposition', self::OSS_UPLOAD_ID, self::OSS_COMP, self::OSS_LIVE_CHANNEL_STATUS, @@ -3395,7 +3381,6 @@ class OssClient if (isset($options[self::OSS_SUB_RESOURCE])) { $query[$options[self::OSS_SUB_RESOURCE]] = ''; } - return OssUtil::toQueryString($query); } @@ -3534,7 +3519,7 @@ class OssClient } try { - $encoding = array('UTF-8', 'GB2312', 'GBK'); + $encoding = array('UTF-8','GB2312', 'GBK'); $encode = mb_detect_encoding($filepath, $encoding); if ($encode !== 'UTF-8') { return $filepath; @@ -3549,7 +3534,7 @@ class OssClient return $filepath; } - /** + /** * Decodes the file path from GBK to UTF-8. * * @param $filepath @@ -3565,7 +3550,7 @@ class OssClient } try { - $encoding = array('UTF-8', 'GB2312', 'GBK'); + $encoding = array('UTF-8','GB2312', 'GBK'); $encode = mb_detect_encoding($filepath, $encoding); if ($encode === 'UTF-8' || $encode === false) { return $filepath; @@ -3760,8 +3745,8 @@ class OssClient ); // OssClient version information const OSS_NAME = "aliyun-sdk-php"; - const OSS_VERSION = "2.7.2"; - const OSS_BUILD = "20241028"; + const OSS_VERSION = "2.7.1"; + const OSS_BUILD = "20240228"; const OSS_AUTHOR = ""; const OSS_OPTIONS_ORIGIN = 'Origin'; const OSS_OPTIONS_REQUEST_METHOD = 'Access-Control-Request-Method'; diff --git a/Server/vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/Common.php b/Server/vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/Common.php index 5b76a76a..813bbbb3 100644 --- a/Server/vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/Common.php +++ b/Server/vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/Common.php @@ -133,11 +133,6 @@ class Common return OssClient::OSS_SIGNATURE_VERSION_V1; } - public static function getPathStyleBucket() - { - return getenv('OSS_TEST_PATHSTYLE_BUCKET'); - } - /** * Tool method, create a bucket */ diff --git a/Server/vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/OssClientForcePathStyleTest.php b/Server/vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/OssClientForcePathStyleTest.php index a441718e..fd4540a6 100644 --- a/Server/vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/OssClientForcePathStyleTest.php +++ b/Server/vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/OssClientForcePathStyleTest.php @@ -3,7 +3,10 @@ namespace OSS\Tests; use OSS\Core\OssException; -use OSS\Http\RequestCore; +use OSS\Credentials\StaticCredentialsProvider; +use OSS\Model\LifecycleConfig; +use OSS\Model\LifecycleRule; +use OSS\Model\LifecycleAction; use OSS\OssClient; require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php'; @@ -15,14 +18,12 @@ class OssClientForcePathStyleTest extends TestOssClientBase { $config = array( 'signatureVersion' => OssClient::OSS_SIGNATURE_VERSION_V4, - 'forcePathStyle' => true, + 'hostType' => OssClient::OSS_HOST_TYPE_PATH_STYLE, ); - - $pathStyleClient = Common::getOssClient($config); + $this->ossClient = Common::getOssClient($config); try { - $pathStyleClient->getBucketInfo($this->bucket); - $this->assertTrue(false, "should not here"); + $this->ossClient->getBucketInfo($this->bucket); } catch (OssException $e) { $this->assertEquals($e->getErrorCode(), "SecondLevelDomainForbidden"); $this->assertTrue(true); @@ -30,8 +31,7 @@ class OssClientForcePathStyleTest extends TestOssClientBase try { $object = "oss-php-sdk-test/upload-test-object-name.txt"; - $pathStyleClient->putObject($this->bucket, $object, 'hi oss'); - $this->assertTrue(false, "should not here"); + $this->ossClient->putObject($this->bucket, $object, 'hi oss'); } catch (OssException $e) { $this->assertEquals($e->getErrorCode(), "SecondLevelDomainForbidden"); $this->assertTrue(true); @@ -40,85 +40,11 @@ class OssClientForcePathStyleTest extends TestOssClientBase try { $endpoint = Common::getEndpoint(); $endpoint = str_replace(array('http://', 'https://'), '', $endpoint); - $strUrl = $endpoint . "/" . $this->bucket . '/' . $object; - $signUrl = $pathStyleClient->signUrl($this->bucket, $object, 3600); + $strUrl = $this->bucket . '.' . $endpoint . "/" . $object; + $signUrl = $this->ossClient->signUrl($this->bucket, $object, 3600); $this->assertTrue(strpos($signUrl, $strUrl) !== false); } catch (OssException $e) { $this->assertFalse(true); } } - - public function testForcePathStyleOKV1() - { - $bucket = Common::getPathStyleBucket(); - - $this->assertFalse(empty($bucket), "path style bucket is not set."); - - $config = array( - 'signatureVersion' => OssClient::OSS_SIGNATURE_VERSION_V1, - 'forcePathStyle' => true, - ); - - $pathStyleClient = Common::getOssClient($config); - - // bucket - $info = $pathStyleClient->getBucketInfo($bucket); - $this->assertEquals($bucket, $info->getName()); - - // object - $object = "upload-test-object-name.txt"; - $pathStyleClient->putObject($bucket, $object, 'hi oss'); - $res = $pathStyleClient->getObject($bucket, $object); - $this->assertEquals($res, 'hi oss'); - - //presign - $signUrl = $pathStyleClient->signUrl($bucket, $object, 3600); - - $httpCore = new RequestCore($signUrl); - $httpCore->set_body(""); - $httpCore->set_method("GET"); - $httpCore->connect_timeout = 10; - $httpCore->timeout = 10; - $httpCore->add_header("Content-Type", ""); - $httpCore->send_request(); - $this->assertEquals(200, $httpCore->response_code); - } - - public function testForcePathStyleOKV4() - { - $bucket = Common::getPathStyleBucket(); - - $this->assertFalse(empty($bucket), "path style bucket is not set."); - - $config = array( - 'signatureVersion' => OssClient::OSS_SIGNATURE_VERSION_V4, - 'forcePathStyle' => true, - ); - - $pathStyleClient = Common::getOssClient($config); - - // bucket - $info = $pathStyleClient->getBucketInfo($bucket); - $this->assertEquals($bucket, $info->getName()); - - // object - $object = "upload-test-object-name.txt"; - $pathStyleClient->putObject($bucket, $object, 'hi oss'); - $res = $pathStyleClient->getObject($bucket, $object); - $this->assertEquals($res, 'hi oss'); - - //presign - $signUrl = $pathStyleClient->signUrl($bucket, $object, 3600); - - #print("signUrl" . $signUrl . "\n"); - - $httpCore = new RequestCore($signUrl); - $httpCore->set_body(""); - $httpCore->set_method("GET"); - $httpCore->connect_timeout = 10; - $httpCore->timeout = 10; - $httpCore->add_header("Content-Type", ""); - $httpCore->send_request(); - $this->assertEquals(200, $httpCore->response_code); - } } diff --git a/Server/vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/OssClientPresignTest.php b/Server/vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/OssClientPresignTest.php deleted file mode 100644 index 14dc0470..00000000 --- a/Server/vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/OssClientPresignTest.php +++ /dev/null @@ -1,70 +0,0 @@ - OssClient::OSS_SIGNATURE_VERSION_V1 - ); - $this->bucket = Common::getBucketName() . '-' . time(); - $this->ossClient = Common::getOssClient($config); - $this->ossClient->createBucket($this->bucket); - Common::waitMetaSync(); - - $object = "a.file"; - $this->ossClient->putObject($this->bucket, $object, "hi oss"); - $timeout = 3600; - $options = array( - "response-content-disposition" => "inline" - ); - try { - $signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, OssClient::OSS_HTTP_GET, $options); - } catch (OssException $e) { - $this->assertFalse(true); - } - $this->assertStringContainsString("response-content-disposition=inline", $signedUrl); - $options = array( - "response-content-disposition" => "attachment", - ); - - try { - $signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, OssClient::OSS_HTTP_GET, $options); - } catch (OssException $e) { - $this->assertFalse(true); - } - $this->assertStringContainsString("response-content-disposition=attachment", $signedUrl); - - $httpCore = new RequestCore($signedUrl); - $httpCore->set_body(""); - $httpCore->set_method("GET"); - $httpCore->connect_timeout = 10; - $httpCore->timeout = 10; - $httpCore->add_header("Content-Type", ""); - $httpCore->send_request(); - $this->assertEquals(200, $httpCore->response_code); - } - - protected function tearDown(): void - { - $this->ossClient->deleteObject($this->bucket, "a.file"); - parent::tearDown(); - } - - protected function setUp(): void - { - } -} diff --git a/Server/vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/OssClientPresignV4Test.php b/Server/vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/OssClientPresignV4Test.php index 28296bc0..cc126ac4 100644 --- a/Server/vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/OssClientPresignV4Test.php +++ b/Server/vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/OssClientPresignV4Test.php @@ -305,49 +305,6 @@ class OssClientPresignV4Test extends TestOssClientBase } } - public function testObjectWithSignV4AndResponseQuery() - { - $config = array( - 'signatureVersion' => OssClient::OSS_SIGNATURE_VERSION_V4 - ); - $this->bucket = Common::getBucketName() . '-' . time(); - $this->ossClient = Common::getOssClient($config); - $this->ossClient->createBucket($this->bucket); - Common::waitMetaSync(); - - $object = "a.file"; - $this->ossClient->putObject($this->bucket, $object, "hi oss"); - $timeout = 3600; - $options = array( - "response-content-disposition" => "inline" - ); - try { - $signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, OssClient::OSS_HTTP_GET, $options); - } catch (OssException $e) { - $this->assertFalse(true); - } - $this->assertStringContainsString("response-content-disposition=inline", $signedUrl); - $options = array( - "response-content-disposition" => "attachment" - ); - - try { - $signedUrl = $this->ossClient->signUrl($this->bucket, $object, $timeout, OssClient::OSS_HTTP_GET, $options); - } catch (OssException $e) { - $this->assertFalse(true); - } - $this->assertStringContainsString("response-content-disposition=attachment", $signedUrl); - - $httpCore = new RequestCore($signedUrl); - $httpCore->set_body(""); - $httpCore->set_method("GET"); - $httpCore->connect_timeout = 10; - $httpCore->timeout = 10; - $httpCore->add_header("Content-Type", ""); - $httpCore->send_request(); - $this->assertEquals(200, $httpCore->response_code); - } - protected function tearDown(): void { $this->ossClient->deleteObject($this->bucket, "a.file"); diff --git a/Server/vendor/autoload.php b/Server/vendor/autoload.php index 4b97ec7d..01ab542c 100644 --- a/Server/vendor/autoload.php +++ b/Server/vendor/autoload.php @@ -2,24 +2,6 @@ // autoload.php @generated by Composer -if (PHP_VERSION_ID < 50600) { - if (!headers_sent()) { - header('HTTP/1.1 500 Internal Server Error'); - } - $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; - if (!ini_get('display_errors')) { - if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { - fwrite(STDERR, $err); - } elseif (!headers_sent()) { - echo $err; - } - } - trigger_error( - $err, - E_USER_ERROR - ); -} - require_once __DIR__ . '/composer/autoload_real.php'; return ComposerAutoloaderInit075712db3cd06cc0fc14f5ab72673de0::getLoader(); diff --git a/Server/vendor/composer/ClassLoader.php b/Server/vendor/composer/ClassLoader.php index 7824d8f7..afef3fa2 100644 --- a/Server/vendor/composer/ClassLoader.php +++ b/Server/vendor/composer/ClassLoader.php @@ -42,37 +42,35 @@ namespace Composer\Autoload; */ class ClassLoader { - /** @var \Closure(string):void */ - private static $includeFile; - - /** @var string|null */ + /** @var ?string */ private $vendorDir; // PSR-4 /** - * @var array> + * @var array[] + * @psalm-var array> */ private $prefixLengthsPsr4 = array(); /** - * @var array> + * @var array[] + * @psalm-var array> */ private $prefixDirsPsr4 = array(); /** - * @var list + * @var array[] + * @psalm-var array */ private $fallbackDirsPsr4 = array(); // PSR-0 /** - * List of PSR-0 prefixes - * - * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) - * - * @var array>> + * @var array[] + * @psalm-var array> */ private $prefixesPsr0 = array(); /** - * @var list + * @var array[] + * @psalm-var array */ private $fallbackDirsPsr0 = array(); @@ -80,7 +78,8 @@ class ClassLoader private $useIncludePath = false; /** - * @var array + * @var string[] + * @psalm-var array */ private $classMap = array(); @@ -88,29 +87,29 @@ class ClassLoader private $classMapAuthoritative = false; /** - * @var array + * @var bool[] + * @psalm-var array */ private $missingClasses = array(); - /** @var string|null */ + /** @var ?string */ private $apcuPrefix; /** - * @var array + * @var self[] */ private static $registeredLoaders = array(); /** - * @param string|null $vendorDir + * @param ?string $vendorDir */ public function __construct($vendorDir = null) { $this->vendorDir = $vendorDir; - self::initializeIncludeClosure(); } /** - * @return array> + * @return string[] */ public function getPrefixes() { @@ -122,7 +121,8 @@ class ClassLoader } /** - * @return array> + * @return array[] + * @psalm-return array> */ public function getPrefixesPsr4() { @@ -130,7 +130,8 @@ class ClassLoader } /** - * @return list + * @return array[] + * @psalm-return array */ public function getFallbackDirs() { @@ -138,7 +139,8 @@ class ClassLoader } /** - * @return list + * @return array[] + * @psalm-return array */ public function getFallbackDirsPsr4() { @@ -146,7 +148,8 @@ class ClassLoader } /** - * @return array Array of classname => path + * @return string[] Array of classname => path + * @psalm-return array */ public function getClassMap() { @@ -154,7 +157,8 @@ class ClassLoader } /** - * @param array $classMap Class to filename map + * @param string[] $classMap Class to filename map + * @psalm-param array $classMap * * @return void */ @@ -171,25 +175,24 @@ class ClassLoader * Registers a set of PSR-0 directories for a given prefix, either * appending or prepending to the ones previously set for this prefix. * - * @param string $prefix The prefix - * @param list|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix + * @param string[]|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories * * @return void */ public function add($prefix, $paths, $prepend = false) { - $paths = (array) $paths; if (!$prefix) { if ($prepend) { $this->fallbackDirsPsr0 = array_merge( - $paths, + (array) $paths, $this->fallbackDirsPsr0 ); } else { $this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0, - $paths + (array) $paths ); } @@ -198,19 +201,19 @@ class ClassLoader $first = $prefix[0]; if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = $paths; + $this->prefixesPsr0[$first][$prefix] = (array) $paths; return; } if ($prepend) { $this->prefixesPsr0[$first][$prefix] = array_merge( - $paths, + (array) $paths, $this->prefixesPsr0[$first][$prefix] ); } else { $this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix], - $paths + (array) $paths ); } } @@ -219,9 +222,9 @@ class ClassLoader * Registers a set of PSR-4 directories for a given namespace, either * appending or prepending to the ones previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param list|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param string[]|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories * * @throws \InvalidArgumentException * @@ -229,18 +232,17 @@ class ClassLoader */ public function addPsr4($prefix, $paths, $prepend = false) { - $paths = (array) $paths; if (!$prefix) { // Register directories for the root namespace. if ($prepend) { $this->fallbackDirsPsr4 = array_merge( - $paths, + (array) $paths, $this->fallbackDirsPsr4 ); } else { $this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4, - $paths + (array) $paths ); } } elseif (!isset($this->prefixDirsPsr4[$prefix])) { @@ -250,18 +252,18 @@ class ClassLoader throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); } $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = $paths; + $this->prefixDirsPsr4[$prefix] = (array) $paths; } elseif ($prepend) { // Prepend directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( - $paths, + (array) $paths, $this->prefixDirsPsr4[$prefix] ); } else { // Append directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix], - $paths + (array) $paths ); } } @@ -270,8 +272,8 @@ class ClassLoader * Registers a set of PSR-0 directories for a given prefix, * replacing any others previously set for this prefix. * - * @param string $prefix The prefix - * @param list|string $paths The PSR-0 base directories + * @param string $prefix The prefix + * @param string[]|string $paths The PSR-0 base directories * * @return void */ @@ -288,8 +290,8 @@ class ClassLoader * Registers a set of PSR-4 directories for a given namespace, * replacing any others previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param list|string $paths The PSR-4 base directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param string[]|string $paths The PSR-4 base directories * * @throws \InvalidArgumentException * @@ -423,8 +425,7 @@ class ClassLoader public function loadClass($class) { if ($file = $this->findFile($class)) { - $includeFile = self::$includeFile; - $includeFile($file); + includeFile($file); return true; } @@ -475,9 +476,9 @@ class ClassLoader } /** - * Returns the currently registered loaders keyed by their corresponding vendor directories. + * Returns the currently registered loaders indexed by their corresponding vendor directories. * - * @return array + * @return self[] */ public static function getRegisteredLoaders() { @@ -554,26 +555,18 @@ class ClassLoader return false; } - - /** - * @return void - */ - private static function initializeIncludeClosure() - { - if (self::$includeFile !== null) { - return; - } - - /** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - * - * @param string $file - * @return void - */ - self::$includeFile = \Closure::bind(static function($file) { - include $file; - }, null, null); - } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + * @private + */ +function includeFile($file) +{ + include $file; } diff --git a/Server/vendor/composer/InstalledVersions.php b/Server/vendor/composer/InstalledVersions.php index 51e734a7..d50e0c9f 100644 --- a/Server/vendor/composer/InstalledVersions.php +++ b/Server/vendor/composer/InstalledVersions.php @@ -21,14 +21,12 @@ use Composer\Semver\VersionParser; * See also https://getcomposer.org/doc/07-runtime.md#installed-versions * * To require its presence, you can require `composer-runtime-api ^2.0` - * - * @final */ class InstalledVersions { /** * @var mixed[]|null - * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null + * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}|array{}|null */ private static $installed; @@ -39,7 +37,7 @@ class InstalledVersions /** * @var array[] - * @psalm-var array}> + * @psalm-var array}> */ private static $installedByVendor = array(); @@ -98,7 +96,7 @@ class InstalledVersions { foreach (self::getInstalled() as $installed) { if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; + return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); } } @@ -119,7 +117,7 @@ class InstalledVersions */ public static function satisfies(VersionParser $parser, $packageName, $constraint) { - $constraint = $parser->parseConstraints((string) $constraint); + $constraint = $parser->parseConstraints($constraint); $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); return $provided->matches($constraint); @@ -243,7 +241,7 @@ class InstalledVersions /** * @return array - * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} + * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} */ public static function getRootPackage() { @@ -257,7 +255,7 @@ class InstalledVersions * * @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, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} + * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} */ public static function getRawData() { @@ -280,7 +278,7 @@ class InstalledVersions * Returns the raw data of all installed.php which are currently loaded for custom implementations * * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ public static function getAllRawData() { @@ -303,7 +301,7 @@ class InstalledVersions * @param array[] $data A vendor/composer/installed.php data set * @return void * - * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data + * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} $data */ public static function reload($data) { @@ -313,7 +311,7 @@ class InstalledVersions /** * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ private static function getInstalled() { @@ -328,9 +326,7 @@ class InstalledVersions if (isset(self::$installedByVendor[$vendorDir])) { $installed[] = self::$installedByVendor[$vendorDir]; } elseif (is_file($vendorDir.'/composer/installed.php')) { - /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ - $required = require $vendorDir.'/composer/installed.php'; - $installed[] = self::$installedByVendor[$vendorDir] = $required; + $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { self::$installed = $installed[count($installed) - 1]; } @@ -342,17 +338,12 @@ class InstalledVersions // 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') { - /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ - $required = require __DIR__ . '/installed.php'; - self::$installed = $required; + self::$installed = require __DIR__ . '/installed.php'; } else { self::$installed = array(); } } - - if (self::$installed !== array()) { - $installed[] = self::$installed; - } + $installed[] = self::$installed; return $installed; } diff --git a/Server/vendor/composer/autoload_classmap.php b/Server/vendor/composer/autoload_classmap.php index 5d606348..766b8dab 100644 --- a/Server/vendor/composer/autoload_classmap.php +++ b/Server/vendor/composer/autoload_classmap.php @@ -2,13 +2,13 @@ // autoload_classmap.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', + 'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', 'QrReader' => $vendorDir . '/khanamiryan/qrcode-detector-decoder/lib/QrReader.php', - 'Stringable' => $vendorDir . '/myclabs/php-enum/stubs/Stringable.php', 'Zxing\\Binarizer' => $vendorDir . '/khanamiryan/qrcode-detector-decoder/lib/Binarizer.php', 'Zxing\\BinaryBitmap' => $vendorDir . '/khanamiryan/qrcode-detector-decoder/lib/BinaryBitmap.php', 'Zxing\\ChecksumException' => $vendorDir . '/khanamiryan/qrcode-detector-decoder/lib/ChecksumException.php', diff --git a/Server/vendor/composer/autoload_files.php b/Server/vendor/composer/autoload_files.php index 1a7005a0..6ce4e2a9 100644 --- a/Server/vendor/composer/autoload_files.php +++ b/Server/vendor/composer/autoload_files.php @@ -2,17 +2,19 @@ // autoload_files.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', - '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', + 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', + '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', + 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', + 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', + 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', 'd767e4fc2dc52fe66584ab8c6684783e' => $vendorDir . '/adbario/php-dot-notation/src/helpers.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', '626dcc41390ebdaa619faa02d99943b0' => $vendorDir . '/khanamiryan/qrcode-detector-decoder/lib/common/customFunctions.php', - '9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php', - 'cc56288302d9df745d97c934d6a6e5f0' => $vendorDir . '/topthink/think-queue/src/common.php', 'ffc1d7141d4fcbaeb47a6929f0811ed1' => $vendorDir . '/topthink/think-worker/src/command.php', ); diff --git a/Server/vendor/composer/autoload_namespaces.php b/Server/vendor/composer/autoload_namespaces.php index f68af532..76648f71 100644 --- a/Server/vendor/composer/autoload_namespaces.php +++ b/Server/vendor/composer/autoload_namespaces.php @@ -2,7 +2,7 @@ // autoload_namespaces.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( diff --git a/Server/vendor/composer/autoload_psr4.php b/Server/vendor/composer/autoload_psr4.php index 0258bf6a..7bb56fdf 100644 --- a/Server/vendor/composer/autoload_psr4.php +++ b/Server/vendor/composer/autoload_psr4.php @@ -2,22 +2,21 @@ // autoload_psr4.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( 'think\\worker\\' => array($vendorDir . '/topthink/think-worker/src'), 'think\\composer\\' => array($vendorDir . '/topthink/think-installer/src'), - 'think\\' => array($vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-queue/src'), 'app\\' => array($baseDir . '/application'), 'Workerman\\' => array($vendorDir . '/workerman/workerman'), - 'WebSocket\\' => array($vendorDir . '/textalk/websocket/lib'), + 'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'), + 'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'), + 'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'), 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'), 'Symfony\\Component\\PropertyAccess\\' => array($vendorDir . '/symfony/property-access'), 'Symfony\\Component\\OptionsResolver\\' => array($vendorDir . '/symfony/options-resolver'), - 'Psr\\Log\\' => array($vendorDir . '/psr/log/src'), - 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'), - 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'), + 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'), 'OneSm\\' => array($vendorDir . '/lizhichao/one-sm/src'), 'OSS\\' => array($vendorDir . '/aliyuncs/oss-sdk-php/src/OSS'), 'MyCLabs\\Enum\\' => array($vendorDir . '/myclabs/php-enum/src'), diff --git a/Server/vendor/composer/autoload_real.php b/Server/vendor/composer/autoload_real.php index f41fe4b7..39f5153d 100644 --- a/Server/vendor/composer/autoload_real.php +++ b/Server/vendor/composer/autoload_real.php @@ -22,27 +22,59 @@ class ComposerAutoloaderInit075712db3cd06cc0fc14f5ab72673de0 return self::$loader; } + require __DIR__ . '/platform_check.php'; + spl_autoload_register(array('ComposerAutoloaderInit075712db3cd06cc0fc14f5ab72673de0', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); spl_autoload_unregister(array('ComposerAutoloaderInit075712db3cd06cc0fc14f5ab72673de0', 'loadClassLoader')); - require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit075712db3cd06cc0fc14f5ab72673de0::getInitializer($loader)); + $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit075712db3cd06cc0fc14f5ab72673de0::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInit075712db3cd06cc0fc14f5ab72673de0::$files; - $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - - require $file; - } - }, null, null); - foreach ($filesToLoad as $fileIdentifier => $file) { - $requireFile($fileIdentifier, $file); + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInit075712db3cd06cc0fc14f5ab72673de0::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequire075712db3cd06cc0fc14f5ab72673de0($fileIdentifier, $file); } return $loader; } } + +/** + * @param string $fileIdentifier + * @param string $file + * @return void + */ +function composerRequire075712db3cd06cc0fc14f5ab72673de0($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + + require $file; + } +} diff --git a/Server/vendor/composer/autoload_static.php b/Server/vendor/composer/autoload_static.php index 5844a051..4b6f301d 100644 --- a/Server/vendor/composer/autoload_static.php +++ b/Server/vendor/composer/autoload_static.php @@ -8,13 +8,15 @@ class ComposerStaticInit075712db3cd06cc0fc14f5ab72673de0 { public static $files = array ( '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', - '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', + 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', + '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', + 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', + 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', + 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', 'd767e4fc2dc52fe66584ab8c6684783e' => __DIR__ . '/..' . '/adbario/php-dot-notation/src/helpers.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', '626dcc41390ebdaa619faa02d99943b0' => __DIR__ . '/..' . '/khanamiryan/qrcode-detector-decoder/lib/common/customFunctions.php', - '9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php', - 'cc56288302d9df745d97c934d6a6e5f0' => __DIR__ . '/..' . '/topthink/think-queue/src/common.php', 'ffc1d7141d4fcbaeb47a6929f0811ed1' => __DIR__ . '/..' . '/topthink/think-worker/src/command.php', ); @@ -23,7 +25,6 @@ class ComposerStaticInit075712db3cd06cc0fc14f5ab72673de0 array ( 'think\\worker\\' => 13, 'think\\composer\\' => 15, - 'think\\' => 6, ), 'a' => array ( @@ -32,19 +33,19 @@ class ComposerStaticInit075712db3cd06cc0fc14f5ab72673de0 'W' => array ( 'Workerman\\' => 10, - 'WebSocket\\' => 10, ), 'S' => array ( + 'Symfony\\Polyfill\\Php72\\' => 23, + 'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33, + 'Symfony\\Polyfill\\Intl\\Idn\\' => 26, 'Symfony\\Polyfill\\Ctype\\' => 23, 'Symfony\\Component\\PropertyAccess\\' => 33, 'Symfony\\Component\\OptionsResolver\\' => 34, ), 'P' => array ( - 'Psr\\Log\\' => 8, 'Psr\\Http\\Message\\' => 17, - 'Psr\\Http\\Client\\' => 16, ), 'O' => array ( @@ -97,11 +98,6 @@ class ComposerStaticInit075712db3cd06cc0fc14f5ab72673de0 array ( 0 => __DIR__ . '/..' . '/topthink/think-installer/src', ), - 'think\\' => - array ( - 0 => __DIR__ . '/..' . '/topthink/think-helper/src', - 1 => __DIR__ . '/..' . '/topthink/think-queue/src', - ), 'app\\' => array ( 0 => __DIR__ . '/../..' . '/application', @@ -110,9 +106,17 @@ class ComposerStaticInit075712db3cd06cc0fc14f5ab72673de0 array ( 0 => __DIR__ . '/..' . '/workerman/workerman', ), - 'WebSocket\\' => + 'Symfony\\Polyfill\\Php72\\' => array ( - 0 => __DIR__ . '/..' . '/textalk/websocket/lib', + 0 => __DIR__ . '/..' . '/symfony/polyfill-php72', + ), + 'Symfony\\Polyfill\\Intl\\Normalizer\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer', + ), + 'Symfony\\Polyfill\\Intl\\Idn\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn', ), 'Symfony\\Polyfill\\Ctype\\' => array ( @@ -126,18 +130,9 @@ class ComposerStaticInit075712db3cd06cc0fc14f5ab72673de0 array ( 0 => __DIR__ . '/..' . '/symfony/options-resolver', ), - 'Psr\\Log\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/log/src', - ), 'Psr\\Http\\Message\\' => array ( - 0 => __DIR__ . '/..' . '/psr/http-factory/src', - 1 => __DIR__ . '/..' . '/psr/http-message/src', - ), - 'Psr\\Http\\Client\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/http-client/src', + 0 => __DIR__ . '/..' . '/psr/http-message/src', ), 'OneSm\\' => array ( @@ -236,8 +231,8 @@ class ComposerStaticInit075712db3cd06cc0fc14f5ab72673de0 public static $classMap = array ( 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + 'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', 'QrReader' => __DIR__ . '/..' . '/khanamiryan/qrcode-detector-decoder/lib/QrReader.php', - 'Stringable' => __DIR__ . '/..' . '/myclabs/php-enum/stubs/Stringable.php', 'Zxing\\Binarizer' => __DIR__ . '/..' . '/khanamiryan/qrcode-detector-decoder/lib/Binarizer.php', 'Zxing\\BinaryBitmap' => __DIR__ . '/..' . '/khanamiryan/qrcode-detector-decoder/lib/BinaryBitmap.php', 'Zxing\\ChecksumException' => __DIR__ . '/..' . '/khanamiryan/qrcode-detector-decoder/lib/ChecksumException.php', diff --git a/Server/vendor/composer/installed.json b/Server/vendor/composer/installed.json index 5b014546..fcdd8ea2 100644 --- a/Server/vendor/composer/installed.json +++ b/Server/vendor/composer/installed.json @@ -2,17 +2,17 @@ "packages": [ { "name": "adbario/php-dot-notation", - "version": "2.5.0", - "version_normalized": "2.5.0.0", + "version": "2.3.0", + "version_normalized": "2.3.0.0", "source": { "type": "git", "url": "https://github.com/adbario/php-dot-notation.git", - "reference": "081e2cca50c84bfeeea2e3ef9b2c8d206d80ccae" + "reference": "39ece8d385ce2f5e03718c693932d83ab0cb5972" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/adbario/php-dot-notation/zipball/081e2cca50c84bfeeea2e3ef9b2c8d206d80ccae", - "reference": "081e2cca50c84bfeeea2e3ef9b2c8d206d80ccae", + "url": "https://api.github.com/repos/adbario/php-dot-notation/zipball/39ece8d385ce2f5e03718c693932d83ab0cb5972", + "reference": "39ece8d385ce2f5e03718c693932d83ab0cb5972", "shasum": "", "mirrors": [ { @@ -29,7 +29,7 @@ "phpunit/phpunit": "^4.8|^5.7|^6.6|^7.5|^8.5|^9.5", "squizlabs/php_codesniffer": "^3.6" }, - "time": "2022-10-14T20:31:46+00:00", + "time": "2022-07-12T02:52:50+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -58,23 +58,23 @@ ], "support": { "issues": "https://github.com/adbario/php-dot-notation/issues", - "source": "https://github.com/adbario/php-dot-notation/tree/2.5.0" + "source": "https://github.com/adbario/php-dot-notation/tree/2.3.0" }, "install-path": "../adbario/php-dot-notation" }, { "name": "alibabacloud/credentials", - "version": "1.2.1", - "version_normalized": "1.2.1.0", + "version": "1.1.4", + "version_normalized": "1.1.4.0", "source": { "type": "git", "url": "https://github.com/aliyun/credentials-php.git", - "reference": "cd0f65127d010ce3be5ced13fa9b69218dcfc555" + "reference": "e79d4151ad8924c0cf79d4fe0ec151b8d7663a25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aliyun/credentials-php/zipball/cd0f65127d010ce3be5ced13fa9b69218dcfc555", - "reference": "cd0f65127d010ce3be5ced13fa9b69218dcfc555", + "url": "https://api.github.com/repos/aliyun/credentials-php/zipball/e79d4151ad8924c0cf79d4fe0ec151b8d7663a25", + "reference": "e79d4151ad8924c0cf79d4fe0ec151b8d7663a25", "shasum": "", "mirrors": [ { @@ -105,7 +105,7 @@ "ext-spl": "*", "mikey179/vfsstream": "^1.6", "monolog/monolog": "^1.24", - "phpunit/phpunit": "^5.7|^6.6|^9.3", + "phpunit/phpunit": "^4.8.35|^5.4.3", "psr/cache": "^1.0", "symfony/dotenv": "^3.4", "symfony/var-dumper": "^3.4" @@ -113,7 +113,7 @@ "suggest": { "ext-sockets": "To use client-side monitoring" }, - "time": "2025-03-03T12:51:01+00:00", + "time": "2021-06-08T10:49:34+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -153,17 +153,17 @@ }, { "name": "alibabacloud/darabonba-openapi", - "version": "0.2.13", - "version_normalized": "0.2.13.0", + "version": "0.2.6", + "version_normalized": "0.2.6.0", "source": { "type": "git", "url": "https://github.com/alibabacloud-sdk-php/darabonba-openapi.git", - "reference": "0213396384e2c064eefd614f3dd53636a63f987f" + "reference": "c64a2bafde3aaf8d11ba5aebfc08f59916b4c742" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alibabacloud-sdk-php/darabonba-openapi/zipball/0213396384e2c064eefd614f3dd53636a63f987f", - "reference": "0213396384e2c064eefd614f3dd53636a63f987f", + "url": "https://api.github.com/repos/alibabacloud-sdk-php/darabonba-openapi/zipball/c64a2bafde3aaf8d11ba5aebfc08f59916b4c742", + "reference": "c64a2bafde3aaf8d11ba5aebfc08f59916b4c742", "shasum": "", "mirrors": [ { @@ -175,12 +175,12 @@ "require": { "alibabacloud/credentials": "^1.1", "alibabacloud/gateway-spi": "^1", - "alibabacloud/openapi-util": "^0.1.10|^0.2.1", - "alibabacloud/tea-utils": "^0.2.21", + "alibabacloud/openapi-util": "^0.1.10", + "alibabacloud/tea-utils": "^0.2.0", "alibabacloud/tea-xml": "^0.2", "php": ">5.5" }, - "time": "2024-07-15T13:11:36+00:00", + "time": "2022-07-20T08:38:03+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -201,7 +201,7 @@ "description": "Alibaba Cloud OpenApi Client", "support": { "issues": "https://github.com/alibabacloud-sdk-php/darabonba-openapi/issues", - "source": "https://github.com/alibabacloud-sdk-php/darabonba-openapi/tree/0.2.13" + "source": "https://github.com/alibabacloud-sdk-php/darabonba-openapi/tree/0.2.6" }, "install-path": "../alibabacloud/darabonba-openapi" }, @@ -359,17 +359,17 @@ }, { "name": "alibabacloud/openapi-util", - "version": "0.1.13", - "version_normalized": "0.1.13.0", + "version": "0.1.11", + "version_normalized": "0.1.11.0", "source": { "type": "git", "url": "https://github.com/alibabacloud-sdk-php/openapi-util.git", - "reference": "870e59984f05e104aa303c85b8214e339ba0a0ac" + "reference": "61ee137955a25c9f5f33170babb6071d4bccf12c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alibabacloud-sdk-php/openapi-util/zipball/870e59984f05e104aa303c85b8214e339ba0a0ac", - "reference": "870e59984f05e104aa303c85b8214e339ba0a0ac", + "url": "https://api.github.com/repos/alibabacloud-sdk-php/openapi-util/zipball/61ee137955a25c9f5f33170babb6071d4bccf12c", + "reference": "61ee137955a25c9f5f33170babb6071d4bccf12c", "shasum": "", "mirrors": [ { @@ -385,9 +385,9 @@ "php": ">5.5" }, "require-dev": { - "phpunit/phpunit": "*" + "phpunit/phpunit": "^4.8.35|^5.4.3" }, - "time": "2022-11-06T05:49:55+00:00", + "time": "2021-12-28T07:57:21+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -408,23 +408,23 @@ "description": "Alibaba Cloud OpenApi Util", "support": { "issues": "https://github.com/alibabacloud-sdk-php/openapi-util/issues", - "source": "https://github.com/alibabacloud-sdk-php/openapi-util/tree/0.2.0" + "source": "https://github.com/alibabacloud-sdk-php/openapi-util/tree/0.1.11" }, "install-path": "../alibabacloud/openapi-util" }, { "name": "alibabacloud/tea", - "version": "3.2.1", - "version_normalized": "3.2.1.0", + "version": "3.1.24", + "version_normalized": "3.1.24.0", "source": { "type": "git", "url": "https://github.com/aliyun/tea-php.git", - "reference": "1619cb96c158384f72b873e1f85de8b299c9c367" + "reference": "bb33395f47db3847d1940d6eb8ba1e56cd0623cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aliyun/tea-php/zipball/1619cb96c158384f72b873e1f85de8b299c9c367", - "reference": "1619cb96c158384f72b873e1f85de8b299c9c367", + "url": "https://api.github.com/repos/aliyun/tea-php/zipball/bb33395f47db3847d1940d6eb8ba1e56cd0623cb", + "reference": "bb33395f47db3847d1940d6eb8ba1e56cd0623cb", "shasum": "", "mirrors": [ { @@ -434,7 +434,7 @@ ] }, "require": { - "adbario/php-dot-notation": "^2.4", + "adbario/php-dot-notation": "^2.3", "ext-curl": "*", "ext-json": "*", "ext-libxml": "*", @@ -453,7 +453,7 @@ "suggest": { "ext-sockets": "To use client-side monitoring" }, - "time": "2023-05-16T06:43:41+00:00", + "time": "2022-07-18T11:27:29+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -488,17 +488,17 @@ }, { "name": "alibabacloud/tea-utils", - "version": "0.2.21", - "version_normalized": "0.2.21.0", + "version": "0.2.16", + "version_normalized": "0.2.16.0", "source": { "type": "git", "url": "https://github.com/alibabacloud-sdk-php/tea-utils.git", - "reference": "5039e45714c6456186d267f5d81a4b260a652495" + "reference": "ae10b306509a196e4af71803db710a0a05c54e60" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alibabacloud-sdk-php/tea-utils/zipball/5039e45714c6456186d267f5d81a4b260a652495", - "reference": "5039e45714c6456186d267f5d81a4b260a652495", + "url": "https://api.github.com/repos/alibabacloud-sdk-php/tea-utils/zipball/ae10b306509a196e4af71803db710a0a05c54e60", + "reference": "ae10b306509a196e4af71803db710a0a05c54e60", "shasum": "", "mirrors": [ { @@ -511,7 +511,7 @@ "alibabacloud/tea": "^3.1", "php": ">5.5" }, - "time": "2024-07-05T06:05:54+00:00", + "time": "2022-07-05T09:58:20+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -538,17 +538,17 @@ }, { "name": "alibabacloud/tea-xml", - "version": "0.2.4", - "version_normalized": "0.2.4.0", + "version": "0.2.3", + "version_normalized": "0.2.3.0", "source": { "type": "git", "url": "https://github.com/alibabacloud-sdk-php/tea-xml.git", - "reference": "3e0c000bf536224eebbac913c371bef174c0a16a" + "reference": "4bd2303d71c968cb7ae4e487c5fa3023aed3ff3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alibabacloud-sdk-php/tea-xml/zipball/3e0c000bf536224eebbac913c371bef174c0a16a", - "reference": "3e0c000bf536224eebbac913c371bef174c0a16a", + "url": "https://api.github.com/repos/alibabacloud-sdk-php/tea-xml/zipball/4bd2303d71c968cb7ae4e487c5fa3023aed3ff3b", + "reference": "4bd2303d71c968cb7ae4e487c5fa3023aed3ff3b", "shasum": "", "mirrors": [ { @@ -561,10 +561,10 @@ "php": ">5.5" }, "require-dev": { - "phpunit/phpunit": "*", + "phpunit/phpunit": "^4.8.35|^5.4.3", "symfony/var-dumper": "*" }, - "time": "2022-08-02T04:12:58+00:00", + "time": "2021-12-08T06:43:00+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -584,30 +584,24 @@ ], "description": "Alibaba Cloud Tea XML Library for PHP", "support": { - "source": "https://github.com/alibabacloud-sdk-php/tea-xml/tree/0.2.4" + "source": "https://github.com/alibabacloud-sdk-php/tea-xml/tree/0.2.3" }, "install-path": "../alibabacloud/tea-xml" }, { "name": "aliyuncs/oss-sdk-php", - "version": "v2.7.2", - "version_normalized": "2.7.2.0", + "version": "v2.7.1", + "version_normalized": "2.7.1.0", "source": { "type": "git", "url": "https://github.com/aliyun/aliyun-oss-php-sdk.git", - "reference": "483dd0b8bff5d47f0e4ffc99f6077a295c5ccbb5" + "reference": "ce5d34dae9868237a32248788ea175c7e9da14b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aliyun/aliyun-oss-php-sdk/zipball/483dd0b8bff5d47f0e4ffc99f6077a295c5ccbb5", - "reference": "483dd0b8bff5d47f0e4ffc99f6077a295c5ccbb5", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/aliyun/aliyun-oss-php-sdk/zipball/ce5d34dae9868237a32248788ea175c7e9da14b1", + "reference": "ce5d34dae9868237a32248788ea175c7e9da14b1", + "shasum": "" }, "require": { "php": ">=5.3" @@ -616,7 +610,7 @@ "php-coveralls/php-coveralls": "*", "phpunit/phpunit": "*" }, - "time": "2024-10-28T10:41:12+00:00", + "time": "2024-02-28T11:22:18+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -638,7 +632,7 @@ "homepage": "http://www.aliyun.com/product/oss/", "support": { "issues": "https://github.com/aliyun/aliyun-oss-php-sdk/issues", - "source": "https://github.com/aliyun/aliyun-oss-php-sdk/tree/v2.7.2" + "source": "https://github.com/aliyun/aliyun-oss-php-sdk/tree/v2.7.1" }, "install-path": "../aliyuncs/oss-sdk-php" }, @@ -777,17 +771,17 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.9.2", - "version_normalized": "7.9.2.0", + "version": "6.5.8", + "version_normalized": "6.5.8.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b" + "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a52f0440530b54fa079ce76e8c5d196a42cad981", + "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981", "shasum": "", "mirrors": [ { @@ -798,34 +792,24 @@ }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.3", - "guzzlehttp/psr7": "^2.7.0", - "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0", - "symfony/deprecation-contracts": "^2.2 || ^3.0" - }, - "provide": { - "psr/http-client-implementation": "1.0" + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.9", + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.17" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "guzzle/client-integration-tests": "3.0.2", - "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.39 || ^9.6.20", - "psr/log": "^1.1 || ^2.0 || ^3.0" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.1" }, "suggest": { - "ext-curl": "Required for CURL handler support", - "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, - "time": "2024-07-24T11:22:20+00:00", + "time": "2022-06-20T22:16:07+00:00", "type": "library", "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false + "branch-alias": { + "dev-master": "6.5-dev" } }, "installation-source": "dist", @@ -879,20 +863,19 @@ } ], "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", "keywords": [ "client", "curl", "framework", "http", "http client", - "psr-18", - "psr-7", "rest", "web service" ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.9.2" + "source": "https://github.com/guzzle/guzzle/tree/6.5.8" }, "funding": [ { @@ -912,17 +895,17 @@ }, { "name": "guzzlehttp/promises", - "version": "2.0.3", - "version_normalized": "2.0.3.0", + "version": "1.5.1", + "version_normalized": "1.5.1.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8" + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", - "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", + "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", "shasum": "", "mirrors": [ { @@ -932,22 +915,23 @@ ] }, "require": { - "php": "^7.2.5 || ^8.0" + "php": ">=5.5" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.39 || ^9.6.20" + "symfony/phpunit-bridge": "^4.4 || ^5.1" }, - "time": "2024-07-18T10:29:17+00:00", + "time": "2021-10-22T20:56:57+00:00", "type": "library", "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false + "branch-alias": { + "dev-master": "1.5-dev" } }, "installation-source": "dist", "autoload": { + "files": [ + "src/functions_include.php" + ], "psr-4": { "GuzzleHttp\\Promise\\": "src/" } @@ -984,7 +968,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.3" + "source": "https://github.com/guzzle/promises/tree/1.5.1" }, "funding": [ { @@ -1004,17 +988,17 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.7.0", - "version_normalized": "2.7.0.0", + "version": "1.9.0", + "version_normalized": "1.9.0.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" + "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", + "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", "shasum": "", "mirrors": [ { @@ -1024,33 +1008,32 @@ ] }, "require": { - "php": "^7.2.5 || ^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", - "ralouphie/getallheaders": "^3.0" + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" }, "provide": { - "psr/http-factory-implementation": "1.0", "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "http-interop/http-factory-tests": "0.9.0", - "phpunit/phpunit": "^8.5.39 || ^9.6.20" + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, - "time": "2024-07-18T11:15:46+00:00", + "time": "2022-06-20T21:43:03+00:00", "type": "library", "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false + "branch-alias": { + "dev-master": "1.9-dev" } }, "installation-source": "dist", "autoload": { + "files": [ + "src/functions_include.php" + ], "psr-4": { "GuzzleHttp\\Psr7\\": "src/" } @@ -1089,11 +1072,6 @@ "name": "Tobias Schultze", "email": "webmaster@tubo-world.de", "homepage": "https://github.com/Tobion" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" } ], "description": "PSR-7 message implementation that also provides common utility methods", @@ -1109,7 +1087,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.7.0" + "source": "https://github.com/guzzle/psr7/tree/1.9.0" }, "funding": [ { @@ -1324,17 +1302,17 @@ }, { "name": "myclabs/php-enum", - "version": "1.8.4", - "version_normalized": "1.8.4.0", + "version": "1.7.7", + "version_normalized": "1.7.7.0", "source": { "type": "git", "url": "https://github.com/myclabs/php-enum.git", - "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483" + "reference": "d178027d1e679832db9f38248fcc7200647dc2b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/php-enum/zipball/a867478eae49c9f59ece437ae7f9506bfaa27483", - "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/d178027d1e679832db9f38248fcc7200647dc2b7", + "reference": "d178027d1e679832db9f38248fcc7200647dc2b7", "shasum": "", "mirrors": [ { @@ -1345,23 +1323,20 @@ }, "require": { "ext-json": "*", - "php": "^7.3 || ^8.0" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^7", "squizlabs/php_codesniffer": "1.*", - "vimeo/psalm": "^4.6.2" + "vimeo/psalm": "^3.8" }, - "time": "2022-08-04T09:53:51+00:00", + "time": "2020-11-14T18:14:52+00:00", "type": "library", "installation-source": "dist", "autoload": { "psr-4": { "MyCLabs\\Enum\\": "src/" - }, - "classmap": [ - "stubs/Stringable.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1380,7 +1355,7 @@ ], "support": { "issues": "https://github.com/myclabs/php-enum/issues", - "source": "https://github.com/myclabs/php-enum/tree/1.8.4" + "source": "https://github.com/myclabs/php-enum/tree/1.7.7" }, "funding": [ { @@ -1466,144 +1441,19 @@ "abandoned": "phpoffice/phpspreadsheet", "install-path": "../phpoffice/phpexcel" }, - { - "name": "psr/http-client", - "version": "1.0.3", - "version_normalized": "1.0.3.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "time": "2023-09-23T14:17:50+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", - "keywords": [ - "http", - "http-client", - "psr", - "psr-18" - ], - "support": { - "source": "https://github.com/php-fig/http-client" - }, - "install-path": "../psr/http-client" - }, - { - "name": "psr/http-factory", - "version": "1.0.2", - "version_normalized": "1.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "time": "2023-04-10T20:10:41+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": "https://www.php-fig.org/" - } - ], - "description": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" - }, - "install-path": "../psr/http-factory" - }, { "name": "psr/http-message", - "version": "2.0", - "version_normalized": "2.0.0.0", + "version": "1.0.1", + "version_normalized": "1.0.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "", "mirrors": [ { @@ -1613,13 +1463,13 @@ ] }, "require": { - "php": "^7.2 || ^8.0" + "php": ">=5.3.0" }, - "time": "2023-04-04T09:54:51+00:00", + "time": "2016-08-06T14:39:51+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.0.x-dev" } }, "installation-source": "dist", @@ -1635,7 +1485,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -1649,69 +1499,10 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/2.0" + "source": "https://github.com/php-fig/http-message/tree/master" }, "install-path": "../psr/http-message" }, - { - "name": "psr/log", - "version": "3.0.1", - "version_normalized": "3.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "79dff0b268932c640297f5208d6298f71855c03e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/79dff0b268932c640297f5208d6298f71855c03e", - "reference": "79dff0b268932c640297f5208d6298f71855c03e", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=8.0.0" - }, - "time": "2024-08-21T13:31:24+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "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/3.0.1" - }, - "install-path": "../psr/log" - }, { "name": "ralouphie/getallheaders", "version": "3.0.3", @@ -1765,82 +1556,6 @@ }, "install-path": "../ralouphie/getallheaders" }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.5.1", - "version_normalized": "3.5.1.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=8.1" - }, - "time": "2024-09-25T14:20:29+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "function.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": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" - }, - "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" - } - ], - "install-path": "../symfony/deprecation-contracts" - }, { "name": "symfony/options-resolver", "version": "v2.8.52", @@ -1906,17 +1621,17 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.31.0", - "version_normalized": "1.31.0.0", + "version": "v1.26.0", + "version_normalized": "1.26.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", "shasum": "", "mirrors": [ { @@ -1926,7 +1641,7 @@ ] }, "require": { - "php": ">=7.2" + "php": ">=7.1" }, "provide": { "ext-ctype": "*" @@ -1934,12 +1649,15 @@ "suggest": { "ext-ctype": "For best performance" }, - "time": "2024-09-09T11:45:10+00:00", + "time": "2022-05-24T11:49:31+00:00", "type": "library", "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "installation-source": "dist", @@ -1974,7 +1692,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" }, "funding": [ { @@ -1992,6 +1710,280 @@ ], "install-path": "../symfony/polyfill-ctype" }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.26.0", + "version_normalized": "1.26.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "time": "2022-05-24T11:49:31+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.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" + } + ], + "install-path": "../symfony/polyfill-intl-idn" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.26.0", + "version_normalized": "1.26.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "time": "2022-05-24T11:49:31+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "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 intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.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" + } + ], + "install-path": "../symfony/polyfill-intl-normalizer" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.26.0", + "version_normalized": "1.26.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1" + }, + "time": "2022-05-24T11:49:31+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + } + }, + "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" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.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" + } + ], + "install-path": "../symfony/polyfill-php72" + }, { "name": "symfony/property-access", "version": "v2.8.52", @@ -2062,77 +2054,19 @@ ], "install-path": "../symfony/property-access" }, - { - "name": "textalk/websocket", - "version": "1.5.8", - "version_normalized": "1.5.8.0", - "source": { - "type": "git", - "url": "https://github.com/Textalk/websocket-php.git", - "reference": "d05dbaa97500176447ffb1f1800573f23085ab13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Textalk/websocket-php/zipball/d05dbaa97500176447ffb1f1800573f23085ab13", - "reference": "d05dbaa97500176447ffb1f1800573f23085ab13", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": "^7.2 | ^8.0", - "psr/log": "^1 | ^2 | ^3" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.0", - "phpunit/phpunit": "^8.0|^9.0", - "squizlabs/php_codesniffer": "^3.5" - }, - "time": "2022-04-26T06:28:24+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "WebSocket\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Fredrik Liljegren" - }, - { - "name": "Sören Jensen", - "email": "soren@abicart.se" - } - ], - "description": "WebSocket client and server", - "support": { - "issues": "https://github.com/Textalk/websocket-php/issues", - "source": "https://github.com/Textalk/websocket-php/tree/1.5.8" - }, - "install-path": "../textalk/websocket" - }, { "name": "topthink/framework", - "version": "v5.1.42", - "version_normalized": "5.1.42.0", + "version": "v5.1.41", + "version_normalized": "5.1.41.0", "source": { "type": "git", "url": "https://github.com/top-think/framework.git", - "reference": "ecf1a90d397d821ce2df58f7d47e798c17eba3ad" + "reference": "7137741a323a4a60cfca334507cd1812fac91bb2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/framework/zipball/ecf1a90d397d821ce2df58f7d47e798c17eba3ad", - "reference": "ecf1a90d397d821ce2df58f7d47e798c17eba3ad", + "url": "https://api.github.com/repos/top-think/framework/zipball/7137741a323a4a60cfca334507cd1812fac91bb2", + "reference": "7137741a323a4a60cfca334507cd1812fac91bb2", "shasum": "", "mirrors": [ { @@ -2154,7 +2088,7 @@ "sebastian/phpcpd": "2.*", "squizlabs/php_codesniffer": "2.*" }, - "time": "2022-10-25T15:04:49+00:00", + "time": "2021-01-11T02:51:29+00:00", "type": "think-framework", "installation-source": "dist", "notification-url": "https://packagist.org/downloads/", @@ -2180,65 +2114,10 @@ ], "support": { "issues": "https://github.com/top-think/framework/issues", - "source": "https://github.com/top-think/framework/tree/v5.1.42" + "source": "https://github.com/top-think/framework/tree/v5.1.41" }, "install-path": "../../thinkphp" }, - { - "name": "topthink/think-helper", - "version": "v3.1.10", - "version_normalized": "3.1.10.0", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-helper.git", - "reference": "ac66cc0859a12cd5d73258f50f338aadc95e9b46" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-helper/zipball/ac66cc0859a12cd5d73258f50f338aadc95e9b46", - "reference": "ac66cc0859a12cd5d73258f50f338aadc95e9b46", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=7.1.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "time": "2024-11-21T01:47:51+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "src/helper.php" - ], - "psr-4": { - "think\\": "src" - } - }, - "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.10" - }, - "install-path": "../topthink/think-helper" - }, { "name": "topthink/think-installer", "version": "v2.0.5", @@ -2293,65 +2172,6 @@ }, "install-path": "../topthink/think-installer" }, - { - "name": "topthink/think-queue", - "version": "v2.0.4", - "version_normalized": "2.0.4.0", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-queue.git", - "reference": "d9b8f38c7af8ad770257b0d7db711ce8b12a6969" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-queue/zipball/d9b8f38c7af8ad770257b0d7db711ce8b12a6969", - "reference": "d9b8f38c7af8ad770257b0d7db711ce8b12a6969", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "topthink/framework": "5.1.*", - "topthink/think-helper": ">=1.0.4", - "topthink/think-installer": "^2.0" - }, - "time": "2018-05-11T06:55:55+00:00", - "type": "think-extend", - "extra": { - "think-config": { - "queue": "src/config.php" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "src/common.php" - ], - "psr-4": { - "think\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "yunwuxin", - "email": "448901948@qq.com" - } - ], - "description": "The ThinkPHP5 Queue Package", - "support": { - "issues": "https://github.com/top-think/think-queue/issues", - "source": "https://github.com/top-think/think-queue/tree/2.0" - }, - "install-path": "../topthink/think-queue" - }, { "name": "topthink/think-worker", "version": "v2.0.12", diff --git a/Server/vendor/composer/installed.php b/Server/vendor/composer/installed.php index f9c4f089..6b3ff37b 100644 --- a/Server/vendor/composer/installed.php +++ b/Server/vendor/composer/installed.php @@ -1,241 +1,211 @@ array( - 'name' => 'topthink/think', - 'pretty_version' => 'dev-develop', - 'version' => 'dev-develop', - 'reference' => 'f0fa19f89f042e746b487a6d79e7019b657db2ce', + 'pretty_version' => 'dev-main', + 'version' => 'dev-main', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), + 'reference' => '42fe117535dd5ae2252b9cff30494eb21369cdd3', + 'name' => 'topthink/think', 'dev' => true, ), 'versions' => array( 'adbario/php-dot-notation' => array( - 'pretty_version' => '2.5.0', - 'version' => '2.5.0.0', - 'reference' => '081e2cca50c84bfeeea2e3ef9b2c8d206d80ccae', + 'pretty_version' => '2.3.0', + 'version' => '2.3.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../adbario/php-dot-notation', 'aliases' => array(), + 'reference' => '39ece8d385ce2f5e03718c693932d83ab0cb5972', 'dev_requirement' => false, ), 'alibabacloud/credentials' => array( - 'pretty_version' => '1.2.1', - 'version' => '1.2.1.0', - 'reference' => 'cd0f65127d010ce3be5ced13fa9b69218dcfc555', + 'pretty_version' => '1.1.4', + 'version' => '1.1.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../alibabacloud/credentials', 'aliases' => array(), + 'reference' => 'e79d4151ad8924c0cf79d4fe0ec151b8d7663a25', 'dev_requirement' => false, ), 'alibabacloud/darabonba-openapi' => array( - 'pretty_version' => '0.2.13', - 'version' => '0.2.13.0', - 'reference' => '0213396384e2c064eefd614f3dd53636a63f987f', + 'pretty_version' => '0.2.6', + 'version' => '0.2.6.0', 'type' => 'library', 'install_path' => __DIR__ . '/../alibabacloud/darabonba-openapi', 'aliases' => array(), + 'reference' => 'c64a2bafde3aaf8d11ba5aebfc08f59916b4c742', 'dev_requirement' => false, ), 'alibabacloud/dysmsapi-20170525' => array( 'pretty_version' => '2.0.16', 'version' => '2.0.16.0', - 'reference' => '43c4ba11cbc0fec26a373ce2c8f3572cfcad32b5', 'type' => 'library', 'install_path' => __DIR__ . '/../alibabacloud/dysmsapi-20170525', 'aliases' => array(), + 'reference' => '43c4ba11cbc0fec26a373ce2c8f3572cfcad32b5', 'dev_requirement' => false, ), 'alibabacloud/endpoint-util' => array( 'pretty_version' => '0.1.1', 'version' => '0.1.1.0', - 'reference' => 'f3fe88a25d8df4faa3b0ae14ff202a9cc094e6c5', 'type' => 'library', 'install_path' => __DIR__ . '/../alibabacloud/endpoint-util', 'aliases' => array(), + 'reference' => 'f3fe88a25d8df4faa3b0ae14ff202a9cc094e6c5', 'dev_requirement' => false, ), 'alibabacloud/gateway-spi' => array( 'pretty_version' => '1.0.0', 'version' => '1.0.0.0', - 'reference' => '7440f77750c329d8ab252db1d1d967314ccd1fcb', 'type' => 'library', 'install_path' => __DIR__ . '/../alibabacloud/gateway-spi', 'aliases' => array(), + 'reference' => '7440f77750c329d8ab252db1d1d967314ccd1fcb', 'dev_requirement' => false, ), 'alibabacloud/openapi-util' => array( - 'pretty_version' => '0.1.13', - 'version' => '0.1.13.0', - 'reference' => '870e59984f05e104aa303c85b8214e339ba0a0ac', + 'pretty_version' => '0.1.11', + 'version' => '0.1.11.0', 'type' => 'library', 'install_path' => __DIR__ . '/../alibabacloud/openapi-util', 'aliases' => array(), + 'reference' => '61ee137955a25c9f5f33170babb6071d4bccf12c', 'dev_requirement' => false, ), 'alibabacloud/tea' => array( - 'pretty_version' => '3.2.1', - 'version' => '3.2.1.0', - 'reference' => '1619cb96c158384f72b873e1f85de8b299c9c367', + 'pretty_version' => '3.1.24', + 'version' => '3.1.24.0', 'type' => 'library', 'install_path' => __DIR__ . '/../alibabacloud/tea', 'aliases' => array(), + 'reference' => 'bb33395f47db3847d1940d6eb8ba1e56cd0623cb', 'dev_requirement' => false, ), 'alibabacloud/tea-utils' => array( - 'pretty_version' => '0.2.21', - 'version' => '0.2.21.0', - 'reference' => '5039e45714c6456186d267f5d81a4b260a652495', + 'pretty_version' => '0.2.16', + 'version' => '0.2.16.0', 'type' => 'library', 'install_path' => __DIR__ . '/../alibabacloud/tea-utils', 'aliases' => array(), + 'reference' => 'ae10b306509a196e4af71803db710a0a05c54e60', 'dev_requirement' => false, ), 'alibabacloud/tea-xml' => array( - 'pretty_version' => '0.2.4', - 'version' => '0.2.4.0', - 'reference' => '3e0c000bf536224eebbac913c371bef174c0a16a', + 'pretty_version' => '0.2.3', + 'version' => '0.2.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../alibabacloud/tea-xml', 'aliases' => array(), + 'reference' => '4bd2303d71c968cb7ae4e487c5fa3023aed3ff3b', 'dev_requirement' => false, ), 'aliyuncs/oss-sdk-php' => array( - 'pretty_version' => 'v2.7.2', - 'version' => '2.7.2.0', - 'reference' => '483dd0b8bff5d47f0e4ffc99f6077a295c5ccbb5', + 'pretty_version' => 'v2.7.1', + 'version' => '2.7.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../aliyuncs/oss-sdk-php', 'aliases' => array(), + 'reference' => 'ce5d34dae9868237a32248788ea175c7e9da14b1', 'dev_requirement' => false, ), 'bacon/bacon-qr-code' => array( 'pretty_version' => '1.0.3', 'version' => '1.0.3.0', - 'reference' => '5a91b62b9d37cee635bbf8d553f4546057250bee', 'type' => 'library', 'install_path' => __DIR__ . '/../bacon/bacon-qr-code', 'aliases' => array(), + 'reference' => '5a91b62b9d37cee635bbf8d553f4546057250bee', 'dev_requirement' => false, ), 'endroid/qr-code' => array( 'pretty_version' => '2.5.1', 'version' => '2.5.1.0', - 'reference' => '6062677d3404e0ded40647b8f62ec55ff9722eb7', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../endroid/qr-code', 'aliases' => array(), + 'reference' => '6062677d3404e0ded40647b8f62ec55ff9722eb7', 'dev_requirement' => false, ), 'guzzlehttp/guzzle' => array( - 'pretty_version' => '7.9.2', - 'version' => '7.9.2.0', - 'reference' => 'd281ed313b989f213357e3be1a179f02196ac99b', + 'pretty_version' => '6.5.8', + 'version' => '6.5.8.0', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', 'aliases' => array(), + 'reference' => 'a52f0440530b54fa079ce76e8c5d196a42cad981', 'dev_requirement' => false, ), 'guzzlehttp/promises' => array( - 'pretty_version' => '2.0.3', - 'version' => '2.0.3.0', - 'reference' => '6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8', + 'pretty_version' => '1.5.1', + 'version' => '1.5.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/promises', 'aliases' => array(), + 'reference' => 'fe752aedc9fd8fcca3fe7ad05d419d32998a06da', 'dev_requirement' => false, ), 'guzzlehttp/psr7' => array( - 'pretty_version' => '2.7.0', - 'version' => '2.7.0.0', - 'reference' => 'a70f5c95fb43bc83f07c9c948baa0dc1829bf201', + 'pretty_version' => '1.9.0', + 'version' => '1.9.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/psr7', 'aliases' => array(), + 'reference' => 'e98e3e6d4f86621a9b75f623996e6bbdeb4b9318', 'dev_requirement' => false, ), 'hashids/hashids' => array( 'pretty_version' => '3.0.0', 'version' => '3.0.0.0', - 'reference' => 'b6c61142bfe36d43740a5419d11c351dddac0458', 'type' => 'library', 'install_path' => __DIR__ . '/../hashids/hashids', 'aliases' => array(), + 'reference' => 'b6c61142bfe36d43740a5419d11c351dddac0458', 'dev_requirement' => false, ), 'khanamiryan/qrcode-detector-decoder' => array( 'pretty_version' => '1', 'version' => '1.0.0.0', - 'reference' => '96d5f80680b04803c4f1b69d6e01735e876b80c7', 'type' => 'library', 'install_path' => __DIR__ . '/../khanamiryan/qrcode-detector-decoder', 'aliases' => array(), + 'reference' => '96d5f80680b04803c4f1b69d6e01735e876b80c7', 'dev_requirement' => false, ), 'lizhichao/one-sm' => array( 'pretty_version' => '1.10', 'version' => '1.10.0.0', - 'reference' => '687a012a44a5bfd4d9143a0234e1060543be455a', 'type' => 'library', 'install_path' => __DIR__ . '/../lizhichao/one-sm', 'aliases' => array(), + 'reference' => '687a012a44a5bfd4d9143a0234e1060543be455a', 'dev_requirement' => false, ), 'myclabs/php-enum' => array( - 'pretty_version' => '1.8.4', - 'version' => '1.8.4.0', - 'reference' => 'a867478eae49c9f59ece437ae7f9506bfaa27483', + 'pretty_version' => '1.7.7', + 'version' => '1.7.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../myclabs/php-enum', 'aliases' => array(), + 'reference' => 'd178027d1e679832db9f38248fcc7200647dc2b7', 'dev_requirement' => false, ), 'phpoffice/phpexcel' => array( 'pretty_version' => '1.8.2', 'version' => '1.8.2.0', - 'reference' => '1441011fb7ecdd8cc689878f54f8b58a6805f870', 'type' => 'library', 'install_path' => __DIR__ . '/../phpoffice/phpexcel', 'aliases' => array(), + 'reference' => '1441011fb7ecdd8cc689878f54f8b58a6805f870', 'dev_requirement' => false, ), - 'psr/http-client' => array( - 'pretty_version' => '1.0.3', - 'version' => '1.0.3.0', - 'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/http-client', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'psr/http-client-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0', - ), - ), - 'psr/http-factory' => array( - 'pretty_version' => '1.0.2', - 'version' => '1.0.2.0', - 'reference' => 'e616d01114759c4c489f93b099585439f795fe35', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/http-factory', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'psr/http-factory-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0', - ), - ), 'psr/http-message' => array( - 'pretty_version' => '2.0', - 'version' => '2.0.0.0', - 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71', + '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( @@ -244,139 +214,121 @@ 0 => '1.0', ), ), - 'psr/log' => array( - 'pretty_version' => '3.0.1', - 'version' => '3.0.1.0', - 'reference' => '79dff0b268932c640297f5208d6298f71855c03e', - 'type' => 'library', - 'install_path' => __DIR__ . '/../psr/log', - 'aliases' => array(), - 'dev_requirement' => false, - ), 'ralouphie/getallheaders' => array( 'pretty_version' => '3.0.3', 'version' => '3.0.3.0', - 'reference' => '120b605dfeb996808c31b6477290a714d356e822', 'type' => 'library', 'install_path' => __DIR__ . '/../ralouphie/getallheaders', 'aliases' => array(), - 'dev_requirement' => false, - ), - 'symfony/deprecation-contracts' => array( - 'pretty_version' => 'v3.5.1', - 'version' => '3.5.1.0', - 'reference' => '74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', - 'aliases' => array(), + 'reference' => '120b605dfeb996808c31b6477290a714d356e822', 'dev_requirement' => false, ), 'symfony/options-resolver' => array( 'pretty_version' => 'v2.8.52', 'version' => '2.8.52.0', - 'reference' => '7aaab725bb58f0e18aa12c61bdadd4793ab4c32b', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/options-resolver', 'aliases' => array(), + 'reference' => '7aaab725bb58f0e18aa12c61bdadd4793ab4c32b', 'dev_requirement' => false, ), 'symfony/polyfill-ctype' => array( - 'pretty_version' => 'v1.31.0', - 'version' => '1.31.0.0', - 'reference' => 'a3cc8b044a6ea513310cbd48ef7333b384945638', + 'pretty_version' => 'v1.26.0', + 'version' => '1.26.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 'aliases' => array(), + 'reference' => '6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4', + 'dev_requirement' => false, + ), + 'symfony/polyfill-intl-idn' => array( + 'pretty_version' => 'v1.26.0', + 'version' => '1.26.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn', + 'aliases' => array(), + 'reference' => '59a8d271f00dd0e4c2e518104cc7963f655a1aa8', + 'dev_requirement' => false, + ), + 'symfony/polyfill-intl-normalizer' => array( + 'pretty_version' => 'v1.26.0', + 'version' => '1.26.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', + 'aliases' => array(), + 'reference' => '219aa369ceff116e673852dce47c3a41794c14bd', + 'dev_requirement' => false, + ), + 'symfony/polyfill-php72' => array( + 'pretty_version' => 'v1.26.0', + 'version' => '1.26.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-php72', + 'aliases' => array(), + 'reference' => 'bf44a9fd41feaac72b074de600314a93e2ae78e2', 'dev_requirement' => false, ), 'symfony/property-access' => array( 'pretty_version' => 'v2.8.52', 'version' => '2.8.52.0', - 'reference' => 'c8f10191183be9bb0d5a1b8364d3891f1bde07b6', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/property-access', 'aliases' => array(), - 'dev_requirement' => false, - ), - 'textalk/websocket' => array( - 'pretty_version' => '1.5.8', - 'version' => '1.5.8.0', - 'reference' => 'd05dbaa97500176447ffb1f1800573f23085ab13', - 'type' => 'library', - 'install_path' => __DIR__ . '/../textalk/websocket', - 'aliases' => array(), + 'reference' => 'c8f10191183be9bb0d5a1b8364d3891f1bde07b6', 'dev_requirement' => false, ), 'topthink/framework' => array( - 'pretty_version' => 'v5.1.42', - 'version' => '5.1.42.0', - 'reference' => 'ecf1a90d397d821ce2df58f7d47e798c17eba3ad', + 'pretty_version' => 'v5.1.41', + 'version' => '5.1.41.0', 'type' => 'think-framework', 'install_path' => __DIR__ . '/../../thinkphp', 'aliases' => array(), + 'reference' => '7137741a323a4a60cfca334507cd1812fac91bb2', 'dev_requirement' => false, ), 'topthink/think' => array( - 'pretty_version' => 'dev-develop', - 'version' => 'dev-develop', - 'reference' => 'f0fa19f89f042e746b487a6d79e7019b657db2ce', + 'pretty_version' => 'dev-main', + 'version' => 'dev-main', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'dev_requirement' => false, - ), - 'topthink/think-helper' => array( - 'pretty_version' => 'v3.1.10', - 'version' => '3.1.10.0', - 'reference' => 'ac66cc0859a12cd5d73258f50f338aadc95e9b46', - 'type' => 'library', - 'install_path' => __DIR__ . '/../topthink/think-helper', - 'aliases' => array(), + 'reference' => '42fe117535dd5ae2252b9cff30494eb21369cdd3', 'dev_requirement' => false, ), 'topthink/think-installer' => array( 'pretty_version' => 'v2.0.5', 'version' => '2.0.5.0', - 'reference' => '38ba647706e35d6704b5d370c06f8a160b635f88', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../topthink/think-installer', 'aliases' => array(), - 'dev_requirement' => false, - ), - 'topthink/think-queue' => array( - 'pretty_version' => 'v2.0.4', - 'version' => '2.0.4.0', - 'reference' => 'd9b8f38c7af8ad770257b0d7db711ce8b12a6969', - 'type' => 'think-extend', - 'install_path' => __DIR__ . '/../topthink/think-queue', - 'aliases' => array(), + 'reference' => '38ba647706e35d6704b5d370c06f8a160b635f88', 'dev_requirement' => false, ), 'topthink/think-worker' => array( 'pretty_version' => 'v2.0.12', 'version' => '2.0.12.0', - 'reference' => '922d8c95e2f095e0da66d18b9e3fbbfd8de70a3f', 'type' => 'think-extend', 'install_path' => __DIR__ . '/../topthink/think-worker', 'aliases' => array(), + 'reference' => '922d8c95e2f095e0da66d18b9e3fbbfd8de70a3f', 'dev_requirement' => false, ), 'workerman/gateway-worker' => array( 'pretty_version' => 'v3.0.22', 'version' => '3.0.22.0', - 'reference' => 'a615036c482d11f68b693998575e804752ef9068', 'type' => 'library', 'install_path' => __DIR__ . '/../workerman/gateway-worker', 'aliases' => array(), + 'reference' => 'a615036c482d11f68b693998575e804752ef9068', 'dev_requirement' => false, ), 'workerman/workerman' => array( 'pretty_version' => 'v3.5.35', 'version' => '3.5.35.0', - 'reference' => '3cc0adae51ba36db38b11e7996c64250d356dbe7', 'type' => 'library', 'install_path' => __DIR__ . '/../workerman/workerman', 'aliases' => array(), + 'reference' => '3cc0adae51ba36db38b11e7996c64250d356dbe7', 'dev_requirement' => false, ), ), diff --git a/Server/vendor/composer/platform_check.php b/Server/vendor/composer/platform_check.php new file mode 100644 index 00000000..cd1bd2c5 --- /dev/null +++ b/Server/vendor/composer/platform_check.php @@ -0,0 +1,26 @@ += 70103)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.3". 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/Server/vendor/guzzlehttp/guzzle/.php_cs b/Server/vendor/guzzlehttp/guzzle/.php_cs new file mode 100644 index 00000000..2dd5036c --- /dev/null +++ b/Server/vendor/guzzlehttp/guzzle/.php_cs @@ -0,0 +1,23 @@ +setRiskyAllowed(true) + ->setRules([ + '@PSR2' => true, + 'array_syntax' => ['syntax' => 'short'], + 'declare_strict_types' => false, + 'concat_space' => ['spacing'=>'one'], + 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'], + 'ordered_imports' => true, + // 'phpdoc_align' => ['align'=>'vertical'], + // 'native_function_invocation' => true, + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->in(__DIR__.'/src') + ->in(__DIR__.'/tests') + ->name('*.php') + ) +; + +return $config; diff --git a/Server/vendor/guzzlehttp/guzzle/CHANGELOG.md b/Server/vendor/guzzlehttp/guzzle/CHANGELOG.md index e0b62165..b053017a 100644 --- a/Server/vendor/guzzlehttp/guzzle/CHANGELOG.md +++ b/Server/vendor/guzzlehttp/guzzle/CHANGELOG.md @@ -1,353 +1,58 @@ # Change Log -Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version. - - -## 7.9.2 - 2024-07-24 - -### Fixed - -- Adjusted handler selection to use cURL if its version is 7.21.2 or higher, rather than 7.34.0 - - -## 7.9.1 - 2024-07-19 - -### Fixed - -- Fix TLS 1.3 check for HTTP/2 requests - - -## 7.9.0 - 2024-07-18 - -### Changed - -- Improve protocol version checks to provide feedback around unsupported protocols -- Only select the cURL handler by default if 7.34.0 or higher is linked -- Improved `CurlMultiHandler` to avoid busy wait if possible -- Dropped support for EOL `guzzlehttp/psr7` v1 -- Improved URI user info redaction in errors - -## 7.8.2 - 2024-07-18 - -### Added - -- Support for PHP 8.4 - - -## 7.8.1 - 2023-12-03 - -### Changed - -- Updated links in docs to their canonical versions -- Replaced `call_user_func*` with native calls - - -## 7.8.0 - 2023-08-27 - -### Added - -- Support for PHP 8.3 -- Added automatic closing of handles on `CurlFactory` object destruction - - -## 7.7.1 - 2023-08-27 - -### Changed - -- Remove the need for `AllowDynamicProperties` in `CurlMultiHandler` - - -## 7.7.0 - 2023-05-21 - -### Added - -- Support `guzzlehttp/promises` v2 - - -## 7.6.1 - 2023-05-15 - -### Fixed - -- Fix `SetCookie::fromString` MaxAge deprecation warning and skip invalid MaxAge values - - -## 7.6.0 - 2023-05-14 - -### Added - -- Support for setting the minimum TLS version in a unified way -- Apply on request the version set in options parameters - - -## 7.5.2 - 2023-05-14 - -### Fixed - -- Fixed set cookie constructor validation -- Fixed handling of files with `'0'` body - -### Changed - -- Corrected docs and default connect timeout value to 300 seconds - - -## 7.5.1 - 2023-04-17 - -### Fixed - -- Fixed `NO_PROXY` settings so that setting the `proxy` option to `no` overrides the env variable - -### Changed - -- Adjusted `guzzlehttp/psr7` version constraint to `^1.9.1 || ^2.4.5` - - -## 7.5.0 - 2022-08-28 - -### Added - -- Support PHP 8.2 -- Add request to delay closure params - - -## 7.4.5 - 2022-06-20 - -### Fixed +## 6.5.8 - 2022-06-20 * Fix change in port should be considered a change in origin * Fix `CURLOPT_HTTPAUTH` option not cleared on change of origin - -## 7.4.4 - 2022-06-09 - -### Fixed +## 6.5.7 - 2022-06-09 * Fix failure to strip Authorization header on HTTP downgrade * Fix failure to strip the Cookie header on change in host or HTTP downgrade - -## 7.4.3 - 2022-05-25 - -### Fixed +## 6.5.6 - 2022-05-25 * Fix cross-domain cookie leakage +## 6.5.5 - 2020-06-16 -## 7.4.2 - 2022-03-20 +* Unpin version constraint for `symfony/polyfill-intl-idn` [#2678](https://github.com/guzzle/guzzle/pull/2678) -### Fixed +## 6.5.4 - 2020-05-25 -- Remove curl auth on cross-domain redirects to align with the Authorization HTTP header -- Reject non-HTTP schemes in StreamHandler -- Set a default ssl.peer_name context in StreamHandler to allow `force_ip_resolve` +* Fix various intl icu issues [#2626](https://github.com/guzzle/guzzle/pull/2626) +## 6.5.3 - 2020-04-18 -## 7.4.1 - 2021-12-06 - -### Changed - -- Replaced implicit URI to string coercion [#2946](https://github.com/guzzle/guzzle/pull/2946) -- Allow `symfony/deprecation-contracts` version 3 [#2961](https://github.com/guzzle/guzzle/pull/2961) - -### Fixed - -- Only close curl handle if it's done [#2950](https://github.com/guzzle/guzzle/pull/2950) - - -## 7.4.0 - 2021-10-18 - -### Added - -- Support PHP 8.1 [#2929](https://github.com/guzzle/guzzle/pull/2929), [#2939](https://github.com/guzzle/guzzle/pull/2939) -- Support `psr/log` version 2 and 3 [#2943](https://github.com/guzzle/guzzle/pull/2943) - -### Fixed - -- Make sure we always call `restore_error_handler()` [#2915](https://github.com/guzzle/guzzle/pull/2915) -- Fix progress parameter type compatibility between the cURL and stream handlers [#2936](https://github.com/guzzle/guzzle/pull/2936) -- Throw `InvalidArgumentException` when an incorrect `headers` array is provided [#2916](https://github.com/guzzle/guzzle/pull/2916), [#2942](https://github.com/guzzle/guzzle/pull/2942) - -### Changed - -- Be more strict with types [#2914](https://github.com/guzzle/guzzle/pull/2914), [#2917](https://github.com/guzzle/guzzle/pull/2917), [#2919](https://github.com/guzzle/guzzle/pull/2919), [#2945](https://github.com/guzzle/guzzle/pull/2945) - - -## 7.3.0 - 2021-03-23 - -### Added - -- Support for DER and P12 certificates [#2413](https://github.com/guzzle/guzzle/pull/2413) -- Support the cURL (http://) scheme for StreamHandler proxies [#2850](https://github.com/guzzle/guzzle/pull/2850) -- Support for `guzzlehttp/psr7:^2.0` [#2878](https://github.com/guzzle/guzzle/pull/2878) - -### Fixed - -- Handle exceptions on invalid header consistently between PHP versions and handlers [#2872](https://github.com/guzzle/guzzle/pull/2872) - - -## 7.2.0 - 2020-10-10 - -### Added - -- Support for PHP 8 [#2712](https://github.com/guzzle/guzzle/pull/2712), [#2715](https://github.com/guzzle/guzzle/pull/2715), [#2789](https://github.com/guzzle/guzzle/pull/2789) -- Support passing a body summarizer to the http errors middleware [#2795](https://github.com/guzzle/guzzle/pull/2795) - -### Fixed - -- Handle exceptions during response creation [#2591](https://github.com/guzzle/guzzle/pull/2591) -- Fix CURLOPT_ENCODING not to be overwritten [#2595](https://github.com/guzzle/guzzle/pull/2595) -- Make sure the Request always has a body object [#2804](https://github.com/guzzle/guzzle/pull/2804) - -### Changed - -- The `TooManyRedirectsException` has a response [#2660](https://github.com/guzzle/guzzle/pull/2660) -- Avoid "functions" from dependencies [#2712](https://github.com/guzzle/guzzle/pull/2712) - -### Deprecated - -- Using environment variable GUZZLE_CURL_SELECT_TIMEOUT [#2786](https://github.com/guzzle/guzzle/pull/2786) - - -## 7.1.1 - 2020-09-30 - -### Fixed - -- Incorrect EOF detection for response body streams on Windows. - -### Changed - -- We dont connect curl `sink` on HEAD requests. -- Removed some PHP 5 workarounds - - -## 7.1.0 - 2020-09-22 - -### Added - -- `GuzzleHttp\MessageFormatterInterface` - -### Fixed - -- Fixed issue that caused cookies with no value not to be stored. -- On redirects, we allow all safe methods like GET, HEAD and OPTIONS. -- Fixed logging on empty responses. -- Make sure MessageFormatter::format returns string - -### Deprecated - -- All functions in `GuzzleHttp` has been deprecated. Use static methods on `Utils` instead. -- `ClientInterface::getConfig()` -- `Client::getConfig()` -- `Client::__call()` -- `Utils::defaultCaBundle()` -- `CurlFactory::LOW_CURL_VERSION_NUMBER` - - -## 7.0.1 - 2020-06-27 - -* Fix multiply defined functions fatal error [#2699](https://github.com/guzzle/guzzle/pull/2699) - - -## 7.0.0 - 2020-06-27 - -No changes since 7.0.0-rc1. - - -## 7.0.0-rc1 - 2020-06-15 - -### Changed - -* Use error level for logging errors in Middleware [#2629](https://github.com/guzzle/guzzle/pull/2629) -* Disabled IDN support by default and require ext-intl to use it [#2675](https://github.com/guzzle/guzzle/pull/2675) - - -## 7.0.0-beta2 - 2020-05-25 - -### Added - -* Using `Utils` class instead of functions in the `GuzzleHttp` namespace. [#2546](https://github.com/guzzle/guzzle/pull/2546) -* `ClientInterface::MAJOR_VERSION` [#2583](https://github.com/guzzle/guzzle/pull/2583) - -### Changed - -* Avoid the `getenv` function when unsafe [#2531](https://github.com/guzzle/guzzle/pull/2531) -* Added real client methods [#2529](https://github.com/guzzle/guzzle/pull/2529) -* Avoid functions due to global install conflicts [#2546](https://github.com/guzzle/guzzle/pull/2546) * Use Symfony intl-idn polyfill [#2550](https://github.com/guzzle/guzzle/pull/2550) -* Adding methods for HTTP verbs like `Client::get()`, `Client::head()`, `Client::patch()` etc [#2529](https://github.com/guzzle/guzzle/pull/2529) -* `ConnectException` extends `TransferException` [#2541](https://github.com/guzzle/guzzle/pull/2541) -* Updated the default User Agent to "GuzzleHttp/7" [#2654](https://github.com/guzzle/guzzle/pull/2654) - -### Fixed - -* Various intl icu issues [#2626](https://github.com/guzzle/guzzle/pull/2626) - -### Removed - -* Pool option `pool_size` [#2528](https://github.com/guzzle/guzzle/pull/2528) - - -## 7.0.0-beta1 - 2019-12-30 - -The diff might look very big but 95% of Guzzle users will be able to upgrade without modification. -Please see [the upgrade document](UPGRADING.md) that describes all BC breaking changes. - -### Added - -* Implement PSR-18 and dropped PHP 5 support [#2421](https://github.com/guzzle/guzzle/pull/2421) [#2474](https://github.com/guzzle/guzzle/pull/2474) -* PHP 7 types [#2442](https://github.com/guzzle/guzzle/pull/2442) [#2449](https://github.com/guzzle/guzzle/pull/2449) [#2466](https://github.com/guzzle/guzzle/pull/2466) [#2497](https://github.com/guzzle/guzzle/pull/2497) [#2499](https://github.com/guzzle/guzzle/pull/2499) -* IDN support for redirects [2424](https://github.com/guzzle/guzzle/pull/2424) - -### Changed - -* Dont allow passing null as third argument to `BadResponseException::__construct()` [#2427](https://github.com/guzzle/guzzle/pull/2427) -* Use SAPI constant instead of method call [#2450](https://github.com/guzzle/guzzle/pull/2450) -* Use native function invocation [#2444](https://github.com/guzzle/guzzle/pull/2444) -* Better defaults for PHP installations with old ICU lib [2454](https://github.com/guzzle/guzzle/pull/2454) -* Added visibility to all constants [#2462](https://github.com/guzzle/guzzle/pull/2462) -* Dont allow passing `null` as URI to `Client::request()` and `Client::requestAsync()` [#2461](https://github.com/guzzle/guzzle/pull/2461) -* Widen the exception argument to throwable [#2495](https://github.com/guzzle/guzzle/pull/2495) - -### Fixed - -* Logging when Promise rejected with a string [#2311](https://github.com/guzzle/guzzle/pull/2311) - -### Removed - -* Class `SeekException` [#2162](https://github.com/guzzle/guzzle/pull/2162) -* `RequestException::getResponseBodySummary()` [#2425](https://github.com/guzzle/guzzle/pull/2425) -* `CookieJar::getCookieValue()` [#2433](https://github.com/guzzle/guzzle/pull/2433) -* `uri_template()` and `UriTemplate` [#2440](https://github.com/guzzle/guzzle/pull/2440) -* Request options `save_to` and `exceptions` [#2464](https://github.com/guzzle/guzzle/pull/2464) - +* Remove use of internal functions [#2548](https://github.com/guzzle/guzzle/pull/2548) ## 6.5.2 - 2019-12-23 * idn_to_ascii() fix for old PHP versions [#2489](https://github.com/guzzle/guzzle/pull/2489) - ## 6.5.1 - 2019-12-21 * Better defaults for PHP installations with old ICU lib [#2454](https://github.com/guzzle/guzzle/pull/2454) * IDN support for redirects [#2424](https://github.com/guzzle/guzzle/pull/2424) - ## 6.5.0 - 2019-12-07 * Improvement: Added support for reset internal queue in MockHandler. [#2143](https://github.com/guzzle/guzzle/pull/2143) * Improvement: Added support to pass arbitrary options to `curl_multi_init`. [#2287](https://github.com/guzzle/guzzle/pull/2287) * Fix: Gracefully handle passing `null` to the `header` option. [#2132](https://github.com/guzzle/guzzle/pull/2132) -* Fix: `RetryMiddleware` did not do exponential delay between retires due unit mismatch. [#2132](https://github.com/guzzle/guzzle/pull/2132) +* Fix: `RetryMiddleware` did not do exponential delay between retries due unit mismatch. [#2132](https://github.com/guzzle/guzzle/pull/2132) + Previously, `RetryMiddleware` would sleep for 1 millisecond, then 2 milliseconds, then 4 milliseconds. + **After this change, `RetryMiddleware` will sleep for 1 second, then 2 seconds, then 4 seconds.** + `Middleware::retry()` accepts a second callback parameter to override the default timeouts if needed. * Fix: Prevent undefined offset when using array for ssl_key options. [#2348](https://github.com/guzzle/guzzle/pull/2348) * Deprecated `ClientInterface::VERSION` - ## 6.4.1 - 2019-10-23 -* No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that +* No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that * Added `parent::__construct()` to `FileCookieJar` and `SessionCookieJar` - ## 6.4.0 - 2019-10-23 * Improvement: Improved error messages when using curl < 7.21.2 [#2108](https://github.com/guzzle/guzzle/pull/2108) @@ -360,7 +65,6 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Fix: Prevent concurrent writes to file when saving `CookieJar` [#2335](https://github.com/guzzle/guzzle/pull/2335) * Improvement: Update `MockHandler` so we can test transfer time [#2362](https://github.com/guzzle/guzzle/pull/2362) - ## 6.3.3 - 2018-04-22 * Fix: Default headers when decode_content is specified @@ -402,14 +106,13 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Bug fix: Fill `CURLOPT_CAPATH` and `CURLOPT_CAINFO` properly [#1684](https://github.com/guzzle/guzzle/pull/1684) * Improvement: Use `\GuzzleHttp\Promise\rejection_for` function instead of object init [#1827](https://github.com/guzzle/guzzle/pull/1827) -+ Minor code cleanups, documentation fixes and clarifications. ++ Minor code cleanups, documentation fixes and clarifications. ## 6.2.3 - 2017-02-28 * Fix deprecations with guzzle/psr7 version 1.4 - ## 6.2.2 - 2016-10-08 * Allow to pass nullable Response to delay callable @@ -417,7 +120,6 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Fix drain case where content-length is the literal string zero * Obfuscate in-URL credentials in exceptions - ## 6.2.1 - 2016-07-18 * Address HTTP_PROXY security vulnerability, CVE-2016-5385: @@ -428,7 +130,6 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c a server does not honor `Connection: close`. * Ignore URI fragment when sending requests. - ## 6.2.0 - 2016-03-21 * Feature: added `GuzzleHttp\json_encode` and `GuzzleHttp\json_decode`. @@ -448,7 +149,6 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Bug fix: provide an empty string to `http_build_query` for HHVM workaround. https://github.com/guzzle/guzzle/pull/1367 - ## 6.1.1 - 2015-11-22 * Bug fix: Proxy::wrapSync() now correctly proxies to the appropriate handler @@ -464,7 +164,6 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Bug fix: fixed regression where MockHandler was not using `sink`. https://github.com/guzzle/guzzle/pull/1292 - ## 6.1.0 - 2015-09-08 * Feature: Added the `on_stats` request option to provide access to transfer @@ -499,7 +198,6 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Bug fix: Adding a Content-Length to PHP stream wrapper requests if not set. https://github.com/guzzle/guzzle/pull/1189 - ## 6.0.2 - 2015-07-04 * Fixed a memory leak in the curl handlers in which references to callbacks @@ -517,7 +215,6 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Functions are now conditionally required using an additional level of indirection to help with global Composer installations. - ## 6.0.1 - 2015-05-27 * Fixed a bug with serializing the `query` request option where the `&` @@ -526,7 +223,6 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c use `form_params` or `multipart` instead. * Various doc fixes. - ## 6.0.0 - 2015-05-26 * See the UPGRADING.md document for more information. @@ -551,7 +247,6 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * `$maxHandles` has been removed from CurlMultiHandler. * `MultipartPostBody` is now part of the `guzzlehttp/psr7` package. - ## 5.3.0 - 2015-05-19 * Mock now supports `save_to` @@ -562,7 +257,6 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated. * URL scheme is now always lowercased. - ## 6.0.0-beta.1 * Requires PHP >= 5.5 @@ -615,7 +309,6 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * `GuzzleHttp\QueryParser` has been replaced with the `GuzzleHttp\Psr7\parse_query`. - ## 5.2.0 - 2015-01-27 * Added `AppliesHeadersInterface` to make applying headers to a request based @@ -626,7 +319,6 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c RingBridge. * Added a guard in the Pool class to not use recursion for request retries. - ## 5.1.0 - 2014-12-19 * Pool class no longer uses recursion when a request is intercepted. @@ -647,7 +339,6 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Exceptions thrown in the `end` event are now correctly wrapped with Guzzle specific exceptions if necessary. - ## 5.0.3 - 2014-11-03 This change updates query strings so that they are treated as un-encoded values @@ -662,7 +353,6 @@ string that should not be parsed or encoded (unless a call to getQuery() is subsequently made, forcing the query-string to be converted into a Query object). - ## 5.0.2 - 2014-10-30 * Added a trailing `\r\n` to multipart/form-data payloads. See @@ -682,9 +372,7 @@ object). * Note: This has been changed in 5.0.3 to now encode query string values by default unless the `rawString` argument is provided when setting the query string on a URL: Now allowing many more characters to be present in the - query string without being percent encoded. See - https://datatracker.ietf.org/doc/html/rfc3986#appendix-A - + query string without being percent encoded. See http://tools.ietf.org/html/rfc3986#appendix-A ## 5.0.1 - 2014-10-16 @@ -697,7 +385,6 @@ Bugfix release. * Fixed an issue where transfer statistics were not being populated in the RingBridge. https://github.com/guzzle/guzzle/issues/866 - ## 5.0.0 - 2014-10-12 Adding support for non-blocking responses and some minor API cleanup. @@ -727,7 +414,7 @@ interfaces. responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`, `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of - why I did this: https://ocramius.github.io/blog/fluent-interfaces-are-evil/. + why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/. This also makes the Guzzle message interfaces compatible with the current PSR-7 message proposal. * Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except @@ -779,7 +466,6 @@ interfaces. argument. They now accept an associative array of options, including the "size" key and "metadata" key which can be used to provide custom metadata. - ## 4.2.2 - 2014-09-08 * Fixed a memory leak in the CurlAdapter when reusing cURL handles. @@ -914,6 +600,8 @@ interfaces. ## 4.0.0 - 2014-03-29 +* For more information on the 4.0 transition, see: + http://mtdowling.com/blog/2014/03/15/guzzle-4-rc/ * For information on changes and upgrading, see: https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 * Added `GuzzleHttp\batch()` as a convenience function for sending requests in @@ -1222,7 +910,7 @@ interfaces. ## 3.4.0 - 2013-04-11 -* Bug fix: URLs are now resolved correctly based on https://datatracker.ietf.org/doc/html/rfc3986#section-5.2. #289 +* Bug fix: URLs are now resolved correctly based on http://tools.ietf.org/html/rfc3986#section-5.2. #289 * Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289 * Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263 * Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264. diff --git a/Server/vendor/guzzlehttp/guzzle/Dockerfile b/Server/vendor/guzzlehttp/guzzle/Dockerfile new file mode 100644 index 00000000..f6a09523 --- /dev/null +++ b/Server/vendor/guzzlehttp/guzzle/Dockerfile @@ -0,0 +1,18 @@ +FROM composer:latest as setup + +RUN mkdir /guzzle + +WORKDIR /guzzle + +RUN set -xe \ + && composer init --name=guzzlehttp/test --description="Simple project for testing Guzzle scripts" --author="Márk Sági-Kazár " --no-interaction \ + && composer require guzzlehttp/guzzle + + +FROM php:7.3 + +RUN mkdir /guzzle + +WORKDIR /guzzle + +COPY --from=setup /guzzle /guzzle diff --git a/Server/vendor/guzzlehttp/guzzle/README.md b/Server/vendor/guzzlehttp/guzzle/README.md index cdaebee3..bc98e1a1 100644 --- a/Server/vendor/guzzlehttp/guzzle/README.md +++ b/Server/vendor/guzzlehttp/guzzle/README.md @@ -3,7 +3,7 @@ # Guzzle, PHP HTTP client [![Latest Version](https://img.shields.io/github/release/guzzle/guzzle.svg?style=flat-square)](https://github.com/guzzle/guzzle/releases) -[![Build Status](https://img.shields.io/github/actions/workflow/status/guzzle/guzzle/ci.yml?label=ci%20build&style=flat-square)](https://github.com/guzzle/guzzle/actions?query=workflow%3ACI) +[![Build Status](https://img.shields.io/github/workflow/status/guzzle/guzzle/CI?label=ci%20build&style=flat-square)](https://github.com/guzzle/guzzle/actions?query=workflow%3ACI) [![Total Downloads](https://img.shields.io/packagist/dt/guzzlehttp/guzzle.svg?style=flat-square)](https://packagist.org/packages/guzzlehttp/guzzle) Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and @@ -15,7 +15,6 @@ trivial to integrate with web services. - Can send both synchronous and asynchronous requests using the same interface. - Uses PSR-7 interfaces for requests, responses, and streams. This allows you to utilize other PSR-7 compatible libraries with Guzzle. -- Supports PSR-18 allowing interoperability between other PSR-18 HTTP Clients. - Abstracts away the underlying HTTP transport, allowing you to write environment and transport agnostic code; i.e., no hard dependency on cURL, PHP streams, sockets, or non-blocking event loops. @@ -25,11 +24,11 @@ trivial to integrate with web services. $client = new \GuzzleHttp\Client(); $response = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle'); -echo $response->getStatusCode(); // 200 -echo $response->getHeaderLine('content-type'); // 'application/json; charset=utf8' -echo $response->getBody(); // '{"id": 1420053, "name": "guzzle", ...}' +echo $response->getStatusCode(); # 200 +echo $response->getHeaderLine('content-type'); # 'application/json; charset=utf8' +echo $response->getBody(); # '{"id": 1420053, "name": "guzzle", ...}' -// Send an asynchronous request. +# Send an asynchronous request. $request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org'); $promise = $client->sendAsync($request)->then(function ($response) { echo 'I completed! ' . $response->getBody(); @@ -53,20 +52,39 @@ We use GitHub issues only to discuss bugs and new features. For support please r The recommended way to install Guzzle is through [Composer](https://getcomposer.org/). +```bash +# Install Composer +curl -sS https://getcomposer.org/installer | php +``` + +Next, run the Composer command to install the latest stable version of Guzzle: + ```bash composer require guzzlehttp/guzzle ``` +After installing, you need to require Composer's autoloader: + +```php +require 'vendor/autoload.php'; +``` + +You can then later update Guzzle using composer: + + ```bash +composer update + ``` + ## Version Guidance -| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version | -|---------|---------------------|---------------------|--------------|---------------------|---------------------|-------|--------------| -| 3.x | EOL (2016-10-31) | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >=5.3.3,<7.0 | -| 4.x | EOL (2016-10-31) | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >=5.4,<7.0 | -| 5.x | EOL (2019-10-31) | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >=5.4,<7.4 | -| 6.x | EOL (2023-10-31) | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >=5.5,<8.0 | -| 7.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes | >=7.2.5,<8.5 | +| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version | +|---------|----------------|---------------------|--------------|---------------------|---------------------|-------|--------------| +| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >=5.3.3,<7.0 | +| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >=5.4,<7.0 | +| 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >=5.4,<7.4 | +| 6.x | Security fixes | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >=5.5,<8.0 | +| 7.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes | >=7.2.5,<8.2 | [guzzle-3-repo]: https://github.com/guzzle/guzzle3 [guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x @@ -77,18 +95,3 @@ composer require guzzlehttp/guzzle [guzzle-5-docs]: https://docs.guzzlephp.org/en/5.3/ [guzzle-6-docs]: https://docs.guzzlephp.org/en/6.5/ [guzzle-7-docs]: https://docs.guzzlephp.org/en/latest/ - - -## Security - -If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/guzzle/security/policy) for more information. - -## License - -Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information. - -## For Enterprise - -Available as part of the Tidelift Subscription - -The maintainers of Guzzle and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-guzzlehttp-guzzle?utm_source=packagist-guzzlehttp-guzzle&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/Server/vendor/guzzlehttp/guzzle/UPGRADING.md b/Server/vendor/guzzlehttp/guzzle/UPGRADING.md index 4efbb596..91d1dcc9 100644 --- a/Server/vendor/guzzlehttp/guzzle/UPGRADING.md +++ b/Server/vendor/guzzlehttp/guzzle/UPGRADING.md @@ -1,60 +1,10 @@ Guzzle Upgrade Guide ==================== -6.0 to 7.0 ----------- - -In order to take advantage of the new features of PHP, Guzzle dropped the support -of PHP 5. The minimum supported PHP version is now PHP 7.2. Type hints and return -types for functions and methods have been added wherever possible. - -Please make sure: -- You are calling a function or a method with the correct type. -- If you extend a class of Guzzle; update all signatures on methods you override. - -#### Other backwards compatibility breaking changes - -- Class `GuzzleHttp\UriTemplate` is removed. -- Class `GuzzleHttp\Exception\SeekException` is removed. -- Classes `GuzzleHttp\Exception\BadResponseException`, `GuzzleHttp\Exception\ClientException`, - `GuzzleHttp\Exception\ServerException` can no longer be initialized with an empty - Response as argument. -- Class `GuzzleHttp\Exception\ConnectException` now extends `GuzzleHttp\Exception\TransferException` - instead of `GuzzleHttp\Exception\RequestException`. -- Function `GuzzleHttp\Exception\ConnectException::getResponse()` is removed. -- Function `GuzzleHttp\Exception\ConnectException::hasResponse()` is removed. -- Constant `GuzzleHttp\ClientInterface::VERSION` is removed. Added `GuzzleHttp\ClientInterface::MAJOR_VERSION` instead. -- Function `GuzzleHttp\Exception\RequestException::getResponseBodySummary` is removed. - Use `\GuzzleHttp\Psr7\get_message_body_summary` as an alternative. -- Function `GuzzleHttp\Cookie\CookieJar::getCookieValue` is removed. -- Request option `exceptions` is removed. Please use `http_errors`. -- Request option `save_to` is removed. Please use `sink`. -- Pool option `pool_size` is removed. Please use `concurrency`. -- We now look for environment variables in the `$_SERVER` super global, due to thread safety issues with `getenv`. We continue to fallback to `getenv` in CLI environments, for maximum compatibility. -- The `get`, `head`, `put`, `post`, `patch`, `delete`, `getAsync`, `headAsync`, `putAsync`, `postAsync`, `patchAsync`, and `deleteAsync` methods are now implemented as genuine methods on `GuzzleHttp\Client`, with strong typing. The original `__call` implementation remains unchanged for now, for maximum backwards compatibility, but won't be invoked under normal operation. -- The `log` middleware will log the errors with level `error` instead of `notice` -- Support for international domain names (IDN) is now disabled by default, and enabling it requires installing ext-intl, linked against a modern version of the C library (ICU 4.6 or higher). - -#### Native functions calls - -All internal native functions calls of Guzzle are now prefixed with a slash. This -change makes it impossible for method overloading by other libraries or applications. -Example: - -```php -// Before: -curl_version(); - -// After: -\curl_version(); -``` - -For the full diff you can check [here](https://github.com/guzzle/guzzle/compare/6.5.4..master). - 5.0 to 6.0 ---------- -Guzzle now uses [PSR-7](https://www.php-fig.org/psr/psr-7/) for HTTP messages. +Guzzle now uses [PSR-7](http://www.php-fig.org/psr/psr-7/) for HTTP messages. Due to the fact that these messages are immutable, this prompted a refactoring of Guzzle to use a middleware based system rather than an event system. Any HTTP message interaction (e.g., `GuzzleHttp\Message\Request`) need to be @@ -189,11 +139,11 @@ $client = new GuzzleHttp\Client(['handler' => $handler]); ## POST Requests -This version added the [`form_params`](https://docs.guzzlephp.org/en/latest/request-options.html#form_params) +This version added the [`form_params`](http://guzzle.readthedocs.org/en/latest/request-options.html#form_params) and `multipart` request options. `form_params` is an associative array of strings or array of strings and is used to serialize an `application/x-www-form-urlencoded` POST request. The -[`multipart`](https://docs.guzzlephp.org/en/latest/request-options.html#multipart) +[`multipart`](http://guzzle.readthedocs.org/en/latest/request-options.html#multipart) option is now used to send a multipart/form-data POST request. `GuzzleHttp\Post\PostFile` has been removed. Use the `multipart` option to add @@ -209,7 +159,7 @@ The `base_url` option has been renamed to `base_uri`. ## Rewritten Adapter Layer -Guzzle now uses [RingPHP](https://ringphp.readthedocs.org/en/latest) to send +Guzzle now uses [RingPHP](http://ringphp.readthedocs.org/en/latest) to send HTTP requests. The `adapter` option in a `GuzzleHttp\Client` constructor is still supported, but it has now been renamed to `handler`. Instead of passing a `GuzzleHttp\Adapter\AdapterInterface`, you must now pass a PHP @@ -217,7 +167,7 @@ passing a `GuzzleHttp\Adapter\AdapterInterface`, you must now pass a PHP ## Removed Fluent Interfaces -[Fluent interfaces were removed](https://ocramius.github.io/blog/fluent-interfaces-are-evil/) +[Fluent interfaces were removed](http://ocramius.github.io/blog/fluent-interfaces-are-evil) from the following classes: - `GuzzleHttp\Collection` @@ -575,7 +525,7 @@ You can intercept a request and inject a response using the `intercept()` event of a `GuzzleHttp\Event\BeforeEvent`, `GuzzleHttp\Event\CompleteEvent`, and `GuzzleHttp\Event\ErrorEvent` event. -See: https://docs.guzzlephp.org/en/latest/events.html +See: http://docs.guzzlephp.org/en/latest/events.html ## Inflection @@ -668,9 +618,9 @@ in separate repositories: The service description layer of Guzzle has moved into two separate packages: -- https://github.com/guzzle/command Provides a high level abstraction over web +- http://github.com/guzzle/command Provides a high level abstraction over web services by representing web service operations using commands. -- https://github.com/guzzle/guzzle-services Provides an implementation of +- http://github.com/guzzle/guzzle-services Provides an implementation of guzzle/command that provides request serialization and response parsing using Guzzle service descriptions. @@ -870,7 +820,7 @@ HeaderInterface (e.g. toArray(), getAll(), etc.). 3.3 to 3.4 ---------- -Base URLs of a client now follow the rules of https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.2 when merging URLs. +Base URLs of a client now follow the rules of http://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs. 3.2 to 3.3 ---------- diff --git a/Server/vendor/guzzlehttp/guzzle/composer.json b/Server/vendor/guzzlehttp/guzzle/composer.json index cbede149..a57d78f6 100644 --- a/Server/vendor/guzzlehttp/guzzle/composer.json +++ b/Server/vendor/guzzlehttp/guzzle/composer.json @@ -1,5 +1,6 @@ { "name": "guzzlehttp/guzzle", + "type": "library", "description": "Guzzle is a PHP HTTP client library", "keywords": [ "framework", @@ -8,10 +9,9 @@ "web service", "curl", "client", - "HTTP client", - "PSR-7", - "PSR-18" + "HTTP client" ], + "homepage": "http://guzzlephp.org/", "license": "MIT", "authors": [ { @@ -50,69 +50,30 @@ "homepage": "https://github.com/Tobion" } ], - "repositories": [ - { - "type": "package", - "package": { - "name": "guzzle/client-integration-tests", - "version": "v3.0.2", - "dist": { - "url": "https://codeload.github.com/guzzle/client-integration-tests/zip/2c025848417c1135031fdf9c728ee53d0a7ceaee", - "type": "zip" - }, - "require": { - "php": "^7.2.5 || ^8.0", - "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.11", - "php-http/message": "^1.0 || ^2.0", - "guzzlehttp/psr7": "^1.7 || ^2.0", - "th3n3rd/cartesian-product": "^0.3" - }, - "autoload": { - "psr-4": { - "Http\\Client\\Tests\\": "src/" - } - }, - "bin": [ - "bin/http_test_server" - ] - } - } - ], "require": { - "php": "^7.2.5 || ^8.0", + "php": ">=5.5", "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.3", - "guzzlehttp/psr7": "^2.7.0", - "psr/http-client": "^1.0", - "symfony/deprecation-contracts": "^2.2 || ^3.0" - }, - "provide": { - "psr/http-client-implementation": "1.0" + "symfony/polyfill-intl-idn": "^1.17", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.9" }, "require-dev": { "ext-curl": "*", - "bamarni/composer-bin-plugin": "^1.8.2", - "guzzle/client-integration-tests": "3.0.2", - "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.39 || ^9.6.20", - "psr/log": "^1.1 || ^2.0 || ^3.0" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.1" }, "suggest": { - "ext-curl": "Required for CURL handler support", - "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, "config": { + "sort-packages": true, "allow-plugins": { "bamarni/composer-bin-plugin": true - }, - "preferred-install": "dist", - "sort-packages": true + } }, "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false + "branch-alias": { + "dev-master": "6.5-dev" } }, "autoload": { diff --git a/Server/vendor/guzzlehttp/guzzle/src/BodySummarizer.php b/Server/vendor/guzzlehttp/guzzle/src/BodySummarizer.php deleted file mode 100644 index 761506dd..00000000 --- a/Server/vendor/guzzlehttp/guzzle/src/BodySummarizer.php +++ /dev/null @@ -1,28 +0,0 @@ -truncateAt = $truncateAt; - } - - /** - * Returns a summarized message body. - */ - public function summarize(MessageInterface $message): ?string - { - return $this->truncateAt === null - ? Psr7\Message::bodySummary($message) - : Psr7\Message::bodySummary($message, $this->truncateAt); - } -} diff --git a/Server/vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php b/Server/vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php deleted file mode 100644 index 3e02e036..00000000 --- a/Server/vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php +++ /dev/null @@ -1,13 +0,0 @@ -configureDefaults($config); @@ -74,21 +79,19 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface * @param string $method * @param array $args * - * @return PromiseInterface|ResponseInterface - * - * @deprecated Client::__call will be removed in guzzlehttp/guzzle:8.0. + * @return Promise\PromiseInterface */ public function __call($method, $args) { - if (\count($args) < 1) { - throw new InvalidArgumentException('Magic request methods require a URI and optional options array'); + if (count($args) < 1) { + throw new \InvalidArgumentException('Magic request methods require a URI and optional options array'); } $uri = $args[0]; - $opts = $args[1] ?? []; + $opts = isset($args[1]) ? $args[1] : []; - return \substr($method, -5) === 'Async' - ? $this->requestAsync(\substr($method, 0, -5), $uri, $opts) + return substr($method, -5) === 'Async' + ? $this->requestAsync(substr($method, 0, -5), $uri, $opts) : $this->request($method, $uri, $opts); } @@ -97,8 +100,10 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface * * @param array $options Request options to apply to the given * request and to the transfer. See \GuzzleHttp\RequestOptions. + * + * @return Promise\PromiseInterface */ - public function sendAsync(RequestInterface $request, array $options = []): PromiseInterface + public function sendAsync(RequestInterface $request, array $options = []) { // Merge the base URI into the request URI if needed. $options = $this->prepareDefaults($options); @@ -115,26 +120,12 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface * @param array $options Request options to apply to the given * request and to the transfer. See \GuzzleHttp\RequestOptions. * + * @return ResponseInterface * @throws GuzzleException */ - public function send(RequestInterface $request, array $options = []): ResponseInterface + public function send(RequestInterface $request, array $options = []) { $options[RequestOptions::SYNCHRONOUS] = true; - - return $this->sendAsync($request, $options)->wait(); - } - - /** - * The HttpClient PSR (PSR-18) specify this method. - * - * {@inheritDoc} - */ - public function sendRequest(RequestInterface $request): ResponseInterface - { - $options[RequestOptions::SYNCHRONOUS] = true; - $options[RequestOptions::ALLOW_REDIRECTS] = false; - $options[RequestOptions::HTTP_ERRORS] = false; - return $this->sendAsync($request, $options)->wait(); } @@ -149,18 +140,20 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface * @param string $method HTTP method * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions. + * + * @return Promise\PromiseInterface */ - public function requestAsync(string $method, $uri = '', array $options = []): PromiseInterface + public function requestAsync($method, $uri = '', array $options = []) { $options = $this->prepareDefaults($options); // Remove request modifying parameter because it can be done up-front. - $headers = $options['headers'] ?? []; - $body = $options['body'] ?? null; - $version = $options['version'] ?? '1.1'; + $headers = isset($options['headers']) ? $options['headers'] : []; + $body = isset($options['body']) ? $options['body'] : null; + $version = isset($options['version']) ? $options['version'] : '1.1'; // Merge the URI into the base URI. - $uri = $this->buildUri(Psr7\Utils::uriFor($uri), $options); - if (\is_array($body)) { - throw $this->invalidBody(); + $uri = $this->buildUri($uri, $options); + if (is_array($body)) { + $this->invalidBody(); } $request = new Psr7\Request($method, $uri, $headers, $body, $version); // Remove the option so that they are not doubly-applied. @@ -180,12 +173,12 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions. * + * @return ResponseInterface * @throws GuzzleException */ - public function request(string $method, $uri = '', array $options = []): ResponseInterface + public function request($method, $uri = '', array $options = []) { $options[RequestOptions::SYNCHRONOUS] = true; - return $this->requestAsync($method, $uri, $options)->wait(); } @@ -199,24 +192,30 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface * @param string|null $option The config option to retrieve. * * @return mixed - * - * @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0. */ - public function getConfig(?string $option = null) + public function getConfig($option = null) { return $option === null ? $this->config - : ($this->config[$option] ?? null); + : (isset($this->config[$option]) ? $this->config[$option] : null); } - private function buildUri(UriInterface $uri, array $config): UriInterface + /** + * @param string|null $uri + * + * @return UriInterface + */ + private function buildUri($uri, array $config) { + // for BC we accept null which would otherwise fail in uri_for + $uri = Psr7\uri_for($uri === null ? '' : $uri); + if (isset($config['base_uri'])) { - $uri = Psr7\UriResolver::resolve(Psr7\Utils::uriFor($config['base_uri']), $uri); + $uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri); } if (isset($config['idn_conversion']) && ($config['idn_conversion'] !== false)) { - $idnOptions = ($config['idn_conversion'] === true) ? \IDNA_DEFAULT : $config['idn_conversion']; + $idnOptions = ($config['idn_conversion'] === true) ? IDNA_DEFAULT : $config['idn_conversion']; $uri = Utils::idnUriConvert($uri, $idnOptions); } @@ -225,16 +224,19 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface /** * Configures the default options for a client. + * + * @param array $config + * @return void */ - private function configureDefaults(array $config): void + private function configureDefaults(array $config) { $defaults = [ 'allow_redirects' => RedirectMiddleware::$defaultSettings, - 'http_errors' => true, - 'decode_content' => true, - 'verify' => true, - 'cookies' => false, - 'idn_conversion' => false, + 'http_errors' => true, + 'decode_content' => true, + 'verify' => true, + 'cookies' => false, + 'idn_conversion' => true, ]; // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set. @@ -242,17 +244,17 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface // We can only trust the HTTP_PROXY environment variable in a CLI // process due to the fact that PHP has no reliable mechanism to // get environment variables that start with "HTTP_". - if (\PHP_SAPI === 'cli' && ($proxy = Utils::getenv('HTTP_PROXY'))) { - $defaults['proxy']['http'] = $proxy; + if (php_sapi_name() === 'cli' && getenv('HTTP_PROXY')) { + $defaults['proxy']['http'] = getenv('HTTP_PROXY'); } - if ($proxy = Utils::getenv('HTTPS_PROXY')) { + if ($proxy = getenv('HTTPS_PROXY')) { $defaults['proxy']['https'] = $proxy; } - if ($noProxy = Utils::getenv('NO_PROXY')) { - $cleanedNoProxy = \str_replace(' ', '', $noProxy); - $defaults['proxy']['no'] = \explode(',', $cleanedNoProxy); + if ($noProxy = getenv('NO_PROXY')) { + $cleanedNoProxy = str_replace(' ', '', $noProxy); + $defaults['proxy']['no'] = explode(',', $cleanedNoProxy); } $this->config = $config + $defaults; @@ -263,15 +265,15 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface // Add the default user-agent header. if (!isset($this->config['headers'])) { - $this->config['headers'] = ['User-Agent' => Utils::defaultUserAgent()]; + $this->config['headers'] = ['User-Agent' => default_user_agent()]; } else { // Add the User-Agent header if one was not already set. - foreach (\array_keys($this->config['headers']) as $name) { - if (\strtolower($name) === 'user-agent') { + foreach (array_keys($this->config['headers']) as $name) { + if (strtolower($name) === 'user-agent') { return; } } - $this->config['headers']['User-Agent'] = Utils::defaultUserAgent(); + $this->config['headers']['User-Agent'] = default_user_agent(); } } @@ -279,8 +281,10 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface * Merges default options into the array. * * @param array $options Options to modify by reference + * + * @return array */ - private function prepareDefaults(array $options): array + private function prepareDefaults(array $options) { $defaults = $this->config; @@ -292,13 +296,13 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface // Special handling for headers is required as they are added as // conditional headers and as headers passed to a request ctor. - if (\array_key_exists('headers', $options)) { + if (array_key_exists('headers', $options)) { // Allows default headers to be unset. if ($options['headers'] === null) { $defaults['_conditional'] = []; unset($options['headers']); - } elseif (!\is_array($options['headers'])) { - throw new InvalidArgumentException('headers must be an array'); + } elseif (!is_array($options['headers'])) { + throw new \InvalidArgumentException('headers must be an array'); } } @@ -322,49 +326,65 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface * as-is without merging in default options. * * @param array $options See \GuzzleHttp\RequestOptions. + * + * @return Promise\PromiseInterface */ - private function transfer(RequestInterface $request, array $options): PromiseInterface + private function transfer(RequestInterface $request, array $options) { + // save_to -> sink + if (isset($options['save_to'])) { + $options['sink'] = $options['save_to']; + unset($options['save_to']); + } + + // exceptions -> http_errors + if (isset($options['exceptions'])) { + $options['http_errors'] = $options['exceptions']; + unset($options['exceptions']); + } + $request = $this->applyOptions($request, $options); /** @var HandlerStack $handler */ $handler = $options['handler']; try { - return P\Create::promiseFor($handler($request, $options)); + return Promise\promise_for($handler($request, $options)); } catch (\Exception $e) { - return P\Create::rejectionFor($e); + return Promise\rejection_for($e); } } /** * Applies the array of request options to a request. + * + * @param RequestInterface $request + * @param array $options + * + * @return RequestInterface */ - private function applyOptions(RequestInterface $request, array &$options): RequestInterface + private function applyOptions(RequestInterface $request, array &$options) { $modify = [ 'set_headers' => [], ]; if (isset($options['headers'])) { - if (array_keys($options['headers']) === range(0, count($options['headers']) - 1)) { - throw new InvalidArgumentException('The headers array must have header name as keys.'); - } $modify['set_headers'] = $options['headers']; unset($options['headers']); } if (isset($options['form_params'])) { if (isset($options['multipart'])) { - throw new InvalidArgumentException('You cannot use ' - .'form_params and multipart at the same time. Use the ' - .'form_params option if you want to send application/' - .'x-www-form-urlencoded requests, and the multipart ' - .'option to send multipart/form-data requests.'); + throw new \InvalidArgumentException('You cannot use ' + . 'form_params and multipart at the same time. Use the ' + . 'form_params option if you want to send application/' + . 'x-www-form-urlencoded requests, and the multipart ' + . 'option to send multipart/form-data requests.'); } - $options['body'] = \http_build_query($options['form_params'], '', '&'); + $options['body'] = http_build_query($options['form_params'], '', '&'); unset($options['form_params']); // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']); + $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']); $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded'; } @@ -374,10 +394,10 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface } if (isset($options['json'])) { - $options['body'] = Utils::jsonEncode($options['json']); + $options['body'] = \GuzzleHttp\json_encode($options['json']); unset($options['json']); // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']); + $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']); $options['_conditional']['Content-Type'] = 'application/json'; } @@ -385,47 +405,47 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface && $options['decode_content'] !== true ) { // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = Psr7\Utils::caselessRemove(['Accept-Encoding'], $options['_conditional']); + $options['_conditional'] = Psr7\_caseless_remove(['Accept-Encoding'], $options['_conditional']); $modify['set_headers']['Accept-Encoding'] = $options['decode_content']; } if (isset($options['body'])) { - if (\is_array($options['body'])) { - throw $this->invalidBody(); + if (is_array($options['body'])) { + $this->invalidBody(); } - $modify['body'] = Psr7\Utils::streamFor($options['body']); + $modify['body'] = Psr7\stream_for($options['body']); unset($options['body']); } - if (!empty($options['auth']) && \is_array($options['auth'])) { + if (!empty($options['auth']) && is_array($options['auth'])) { $value = $options['auth']; - $type = isset($value[2]) ? \strtolower($value[2]) : 'basic'; + $type = isset($value[2]) ? strtolower($value[2]) : 'basic'; switch ($type) { case 'basic': // Ensure that we don't have the header in different case and set the new value. - $modify['set_headers'] = Psr7\Utils::caselessRemove(['Authorization'], $modify['set_headers']); + $modify['set_headers'] = Psr7\_caseless_remove(['Authorization'], $modify['set_headers']); $modify['set_headers']['Authorization'] = 'Basic ' - .\base64_encode("$value[0]:$value[1]"); + . base64_encode("$value[0]:$value[1]"); break; case 'digest': // @todo: Do not rely on curl - $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_DIGEST; - $options['curl'][\CURLOPT_USERPWD] = "$value[0]:$value[1]"; + $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST; + $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]"; break; case 'ntlm': - $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_NTLM; - $options['curl'][\CURLOPT_USERPWD] = "$value[0]:$value[1]"; + $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_NTLM; + $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]"; break; } } if (isset($options['query'])) { $value = $options['query']; - if (\is_array($value)) { - $value = \http_build_query($value, '', '&', \PHP_QUERY_RFC3986); + if (is_array($value)) { + $value = http_build_query($value, null, '&', PHP_QUERY_RFC3986); } - if (!\is_string($value)) { - throw new InvalidArgumentException('query must be a string or array'); + if (!is_string($value)) { + throw new \InvalidArgumentException('query must be a string or array'); } $modify['query'] = $value; unset($options['query']); @@ -434,22 +454,18 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface // Ensure that sink is not an invalid value. if (isset($options['sink'])) { // TODO: Add more sink validation? - if (\is_bool($options['sink'])) { - throw new InvalidArgumentException('sink must not be a boolean'); + if (is_bool($options['sink'])) { + throw new \InvalidArgumentException('sink must not be a boolean'); } } - if (isset($options['version'])) { - $modify['version'] = $options['version']; - } - - $request = Psr7\Utils::modifyRequest($request, $modify); + $request = Psr7\modify_request($request, $modify); if ($request->getBody() instanceof Psr7\MultipartStream) { // Use a multipart/form-data POST if a Content-Type is not set. // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']); + $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']); $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary=' - .$request->getBody()->getBoundary(); + . $request->getBody()->getBoundary(); } // Merge in conditional headers if they are not present. @@ -461,7 +477,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface $modify['set_headers'][$k] = $v; } } - $request = Psr7\Utils::modifyRequest($request, $modify); + $request = Psr7\modify_request($request, $modify); // Don't pass this internal value along to middleware/handlers. unset($options['_conditional']); } @@ -470,14 +486,16 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface } /** - * Return an InvalidArgumentException with pre-set message. + * Throw Exception with pre-set message. + * @return void + * @throws \InvalidArgumentException Invalid body. */ - private function invalidBody(): InvalidArgumentException + private function invalidBody() { - return new InvalidArgumentException('Passing in the "body" request ' - .'option as an array to send a request is not supported. ' - .'Please use the "form_params" request option to send a ' - .'application/x-www-form-urlencoded request, or the "multipart" ' - .'request option to send a multipart/form-data request.'); + throw new \InvalidArgumentException('Passing in the "body" request ' + . 'option as an array to send a POST request has been deprecated. ' + . 'Please use the "form_params" request option to send a ' + . 'application/x-www-form-urlencoded request, or the "multipart" ' + . 'request option to send a multipart/form-data request.'); } } diff --git a/Server/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/Server/vendor/guzzlehttp/guzzle/src/ClientInterface.php index 6aaee61a..638b75dc 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/ClientInterface.php +++ b/Server/vendor/guzzlehttp/guzzle/src/ClientInterface.php @@ -1,5 +1,4 @@ request('GET', $uri, $options); - } - - /** - * Create and send an HTTP HEAD request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - * - * @throws GuzzleException - */ - public function head($uri, array $options = []): ResponseInterface - { - return $this->request('HEAD', $uri, $options); - } - - /** - * Create and send an HTTP PUT request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - * - * @throws GuzzleException - */ - public function put($uri, array $options = []): ResponseInterface - { - return $this->request('PUT', $uri, $options); - } - - /** - * Create and send an HTTP POST request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - * - * @throws GuzzleException - */ - public function post($uri, array $options = []): ResponseInterface - { - return $this->request('POST', $uri, $options); - } - - /** - * Create and send an HTTP PATCH request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - * - * @throws GuzzleException - */ - public function patch($uri, array $options = []): ResponseInterface - { - return $this->request('PATCH', $uri, $options); - } - - /** - * Create and send an HTTP DELETE request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - * - * @throws GuzzleException - */ - public function delete($uri, array $options = []): ResponseInterface - { - return $this->request('DELETE', $uri, $options); - } - - /** - * Create and send an asynchronous HTTP request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string $method HTTP method - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - abstract public function requestAsync(string $method, $uri, array $options = []): PromiseInterface; - - /** - * Create and send an asynchronous HTTP GET request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - public function getAsync($uri, array $options = []): PromiseInterface - { - return $this->requestAsync('GET', $uri, $options); - } - - /** - * Create and send an asynchronous HTTP HEAD request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - public function headAsync($uri, array $options = []): PromiseInterface - { - return $this->requestAsync('HEAD', $uri, $options); - } - - /** - * Create and send an asynchronous HTTP PUT request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - public function putAsync($uri, array $options = []): PromiseInterface - { - return $this->requestAsync('PUT', $uri, $options); - } - - /** - * Create and send an asynchronous HTTP POST request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - public function postAsync($uri, array $options = []): PromiseInterface - { - return $this->requestAsync('POST', $uri, $options); - } - - /** - * Create and send an asynchronous HTTP PATCH request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - public function patchAsync($uri, array $options = []): PromiseInterface - { - return $this->requestAsync('PATCH', $uri, $options); - } - - /** - * Create and send an asynchronous HTTP DELETE request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. - */ - public function deleteAsync($uri, array $options = []): PromiseInterface - { - return $this->requestAsync('DELETE', $uri, $options); - } -} diff --git a/Server/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php b/Server/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php index b616cf2e..394df3a7 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php +++ b/Server/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php @@ -1,5 +1,4 @@ strictMode = $strictMode; @@ -44,31 +39,44 @@ class CookieJar implements CookieJarInterface * * @param array $cookies Cookies to create the jar from * @param string $domain Domain to set the cookies to + * + * @return self */ - public static function fromArray(array $cookies, string $domain): self + public static function fromArray(array $cookies, $domain) { $cookieJar = new self(); foreach ($cookies as $name => $value) { $cookieJar->setCookie(new SetCookie([ - 'Domain' => $domain, - 'Name' => $name, - 'Value' => $value, - 'Discard' => true, + 'Domain' => $domain, + 'Name' => $name, + 'Value' => $value, + 'Discard' => true ])); } return $cookieJar; } + /** + * @deprecated + */ + public static function getCookieValue($value) + { + return $value; + } + /** * Evaluate if this cookie should be persisted to storage * that survives between requests. * - * @param SetCookie $cookie Being evaluated. - * @param bool $allowSessionCookies If we should persist session cookies + * @param SetCookie $cookie Being evaluated. + * @param bool $allowSessionCookies If we should persist session cookies + * @return bool */ - public static function shouldPersist(SetCookie $cookie, bool $allowSessionCookies = false): bool - { + public static function shouldPersist( + SetCookie $cookie, + $allowSessionCookies = false + ) { if ($cookie->getExpires() || $allowSessionCookies) { if (!$cookie->getDiscard()) { return true; @@ -82,13 +90,16 @@ class CookieJar implements CookieJarInterface * Finds and returns the cookie based on the name * * @param string $name cookie name to search for - * * @return SetCookie|null cookie that was found or null if not found */ - public function getCookieByName(string $name): ?SetCookie + public function getCookieByName($name) { + // don't allow a non string name + if ($name === null || !is_scalar($name)) { + return null; + } foreach ($this->cookies as $cookie) { - if ($cookie->getName() !== null && \strcasecmp($cookie->getName(), $name) === 0) { + if ($cookie->getName() !== null && strcasecmp($cookie->getName(), $name) === 0) { return $cookie; } } @@ -96,57 +107,56 @@ class CookieJar implements CookieJarInterface return null; } - public function toArray(): array + public function toArray() { - return \array_map(static function (SetCookie $cookie): array { + return array_map(function (SetCookie $cookie) { return $cookie->toArray(); }, $this->getIterator()->getArrayCopy()); } - public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void + public function clear($domain = null, $path = null, $name = null) { if (!$domain) { $this->cookies = []; - return; } elseif (!$path) { - $this->cookies = \array_filter( + $this->cookies = array_filter( $this->cookies, - static function (SetCookie $cookie) use ($domain): bool { + function (SetCookie $cookie) use ($domain) { return !$cookie->matchesDomain($domain); } ); } elseif (!$name) { - $this->cookies = \array_filter( + $this->cookies = array_filter( $this->cookies, - static function (SetCookie $cookie) use ($path, $domain): bool { - return !($cookie->matchesPath($path) - && $cookie->matchesDomain($domain)); + function (SetCookie $cookie) use ($path, $domain) { + return !($cookie->matchesPath($path) && + $cookie->matchesDomain($domain)); } ); } else { - $this->cookies = \array_filter( + $this->cookies = array_filter( $this->cookies, - static function (SetCookie $cookie) use ($path, $domain, $name) { - return !($cookie->getName() == $name - && $cookie->matchesPath($path) - && $cookie->matchesDomain($domain)); + function (SetCookie $cookie) use ($path, $domain, $name) { + return !($cookie->getName() == $name && + $cookie->matchesPath($path) && + $cookie->matchesDomain($domain)); } ); } } - public function clearSessionCookies(): void + public function clearSessionCookies() { - $this->cookies = \array_filter( + $this->cookies = array_filter( $this->cookies, - static function (SetCookie $cookie): bool { + function (SetCookie $cookie) { return !$cookie->getDiscard() && $cookie->getExpires(); } ); } - public function setCookie(SetCookie $cookie): bool + public function setCookie(SetCookie $cookie) { // If the name string is empty (but not 0), ignore the set-cookie // string entirely. @@ -159,20 +169,21 @@ class CookieJar implements CookieJarInterface $result = $cookie->validate(); if ($result !== true) { if ($this->strictMode) { - throw new \RuntimeException('Invalid cookie: '.$result); + throw new \RuntimeException('Invalid cookie: ' . $result); + } else { + $this->removeCookieIfEmpty($cookie); + return false; } - $this->removeCookieIfEmpty($cookie); - - return false; } // Resolve conflicts with previously set cookies foreach ($this->cookies as $i => $c) { + // Two cookies are identical, when their path, and domain are // identical. - if ($c->getPath() != $cookie->getPath() - || $c->getDomain() != $cookie->getDomain() - || $c->getName() != $cookie->getName() + if ($c->getPath() != $cookie->getPath() || + $c->getDomain() != $cookie->getDomain() || + $c->getName() != $cookie->getName() ) { continue; } @@ -206,28 +217,27 @@ class CookieJar implements CookieJarInterface return true; } - public function count(): int + public function count() { - return \count($this->cookies); + return count($this->cookies); } - /** - * @return \ArrayIterator - */ - public function getIterator(): \ArrayIterator + public function getIterator() { - return new \ArrayIterator(\array_values($this->cookies)); + return new \ArrayIterator(array_values($this->cookies)); } - public function extractCookies(RequestInterface $request, ResponseInterface $response): void - { + public function extractCookies( + RequestInterface $request, + ResponseInterface $response + ) { if ($cookieHeader = $response->getHeader('Set-Cookie')) { foreach ($cookieHeader as $cookie) { $sc = SetCookie::fromString($cookie); if (!$sc->getDomain()) { $sc->setDomain($request->getUri()->getHost()); } - if (0 !== \strpos($sc->getPath(), '/')) { + if (0 !== strpos($sc->getPath(), '/')) { $sc->setPath($this->getCookiePathFromRequest($request)); } if (!$sc->matchesDomain($request->getUri()->getHost())) { @@ -243,29 +253,31 @@ class CookieJar implements CookieJarInterface /** * Computes cookie path following RFC 6265 section 5.1.4 * - * @see https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.4 + * @link https://tools.ietf.org/html/rfc6265#section-5.1.4 + * + * @param RequestInterface $request + * @return string */ - private function getCookiePathFromRequest(RequestInterface $request): string + private function getCookiePathFromRequest(RequestInterface $request) { $uriPath = $request->getUri()->getPath(); - if ('' === $uriPath) { + if ('' === $uriPath) { return '/'; } - if (0 !== \strpos($uriPath, '/')) { + if (0 !== strpos($uriPath, '/')) { return '/'; } if ('/' === $uriPath) { return '/'; } - $lastSlashPos = \strrpos($uriPath, '/'); - if (0 === $lastSlashPos || false === $lastSlashPos) { + if (0 === $lastSlashPos = strrpos($uriPath, '/')) { return '/'; } - return \substr($uriPath, 0, $lastSlashPos); + return substr($uriPath, 0, $lastSlashPos); } - public function withCookieHeader(RequestInterface $request): RequestInterface + public function withCookieHeader(RequestInterface $request) { $values = []; $uri = $request->getUri(); @@ -274,26 +286,28 @@ class CookieJar implements CookieJarInterface $path = $uri->getPath() ?: '/'; foreach ($this->cookies as $cookie) { - if ($cookie->matchesPath($path) - && $cookie->matchesDomain($host) - && !$cookie->isExpired() - && (!$cookie->getSecure() || $scheme === 'https') + if ($cookie->matchesPath($path) && + $cookie->matchesDomain($host) && + !$cookie->isExpired() && + (!$cookie->getSecure() || $scheme === 'https') ) { - $values[] = $cookie->getName().'=' - .$cookie->getValue(); + $values[] = $cookie->getName() . '=' + . $cookie->getValue(); } } return $values - ? $request->withHeader('Cookie', \implode('; ', $values)) + ? $request->withHeader('Cookie', implode('; ', $values)) : $request; } /** * If a cookie already exists and the server asks to set it again with a * null value, the cookie must be deleted. + * + * @param SetCookie $cookie */ - private function removeCookieIfEmpty(SetCookie $cookie): void + private function removeCookieIfEmpty(SetCookie $cookie) { $cookieValue = $cookie->getValue(); if ($cookieValue === null || $cookieValue === '') { diff --git a/Server/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php b/Server/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php index 93ada58d..6ee11885 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php +++ b/Server/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php @@ -1,5 +1,4 @@ + * @link http://docs.python.org/2/library/cookielib.html Inspiration */ interface CookieJarInterface extends \Countable, \IteratorAggregate { @@ -29,7 +26,7 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate * * @return RequestInterface returns the modified request. */ - public function withCookieHeader(RequestInterface $request): RequestInterface; + public function withCookieHeader(RequestInterface $request); /** * Extract cookies from an HTTP response and store them in the CookieJar. @@ -37,7 +34,10 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate * @param RequestInterface $request Request that was sent * @param ResponseInterface $response Response that was received */ - public function extractCookies(RequestInterface $request, ResponseInterface $response): void; + public function extractCookies( + RequestInterface $request, + ResponseInterface $response + ); /** * Sets a cookie in the cookie jar. @@ -46,7 +46,7 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate * * @return bool Returns true on success or false on failure */ - public function setCookie(SetCookie $cookie): bool; + public function setCookie(SetCookie $cookie); /** * Remove cookies currently held in the cookie jar. @@ -61,8 +61,10 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate * @param string|null $domain Clears cookies matching a domain * @param string|null $path Clears cookies matching a domain and path * @param string|null $name Clears cookies matching a domain, path, and name + * + * @return CookieJarInterface */ - public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void; + public function clear($domain = null, $path = null, $name = null); /** * Discard all sessions cookies. @@ -71,10 +73,12 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate * field set to true. To be called when the user agent shuts down according * to RFC 2965. */ - public function clearSessionCookies(): void; + public function clearSessionCookies(); /** * Converts the cookie jar to an array. + * + * @return array */ - public function toArray(): array; + public function toArray(); } diff --git a/Server/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php b/Server/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php index 290236d5..3fb8600e 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php +++ b/Server/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php @@ -1,40 +1,33 @@ filename = $cookieFile; $this->storeSessionCookies = $storeSessionCookies; - if (\file_exists($cookieFile)) { + if (file_exists($cookieFile)) { $this->load($cookieFile); } } @@ -51,21 +44,20 @@ class FileCookieJar extends CookieJar * Saves the cookies to a file. * * @param string $filename File to save - * * @throws \RuntimeException if the file cannot be found or created */ - public function save(string $filename): void + public function save($filename) { $json = []; - /** @var SetCookie $cookie */ foreach ($this as $cookie) { + /** @var SetCookie $cookie */ if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { $json[] = $cookie->toArray(); } } - $jsonStr = Utils::jsonEncode($json); - if (false === \file_put_contents($filename, $jsonStr, \LOCK_EX)) { + $jsonStr = \GuzzleHttp\json_encode($json); + if (false === file_put_contents($filename, $jsonStr, LOCK_EX)) { throw new \RuntimeException("Unable to save file {$filename}"); } } @@ -76,25 +68,23 @@ class FileCookieJar extends CookieJar * Old cookies are kept unless overwritten by newly loaded ones. * * @param string $filename Cookie file to load. - * * @throws \RuntimeException if the file cannot be loaded. */ - public function load(string $filename): void + public function load($filename) { - $json = \file_get_contents($filename); + $json = file_get_contents($filename); if (false === $json) { throw new \RuntimeException("Unable to load file {$filename}"); - } - if ($json === '') { + } elseif ($json === '') { return; } - $data = Utils::jsonDecode($json, true); - if (\is_array($data)) { - foreach ($data as $cookie) { + $data = \GuzzleHttp\json_decode($json, true); + if (is_array($data)) { + foreach (json_decode($json, true) as $cookie) { $this->setCookie(new SetCookie($cookie)); } - } elseif (\is_scalar($data) && !empty($data)) { + } elseif (strlen($data)) { throw new \RuntimeException("Invalid cookie file: {$filename}"); } } diff --git a/Server/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php b/Server/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php index cb3e67c6..0224a244 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php +++ b/Server/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php @@ -1,5 +1,4 @@ sessionKey = $sessionKey; @@ -44,34 +39,34 @@ class SessionCookieJar extends CookieJar /** * Save cookies to the client session */ - public function save(): void + public function save() { $json = []; - /** @var SetCookie $cookie */ foreach ($this as $cookie) { + /** @var SetCookie $cookie */ if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { $json[] = $cookie->toArray(); } } - $_SESSION[$this->sessionKey] = \json_encode($json); + $_SESSION[$this->sessionKey] = json_encode($json); } /** * Load the contents of the client session into the data array */ - protected function load(): void + protected function load() { if (!isset($_SESSION[$this->sessionKey])) { return; } - $data = \json_decode($_SESSION[$this->sessionKey], true); - if (\is_array($data)) { + $data = json_decode($_SESSION[$this->sessionKey], true); + if (is_array($data)) { foreach ($data as $cookie) { $this->setCookie(new SetCookie($cookie)); } - } elseif (\strlen($data)) { - throw new \RuntimeException('Invalid cookie data'); + } elseif (strlen($data)) { + throw new \RuntimeException("Invalid cookie data"); } } } diff --git a/Server/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/Server/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php index c9806da8..55f6901a 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php +++ b/Server/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php @@ -1,5 +1,4 @@ null, - 'Value' => null, - 'Domain' => null, - 'Path' => '/', - 'Max-Age' => null, - 'Expires' => null, - 'Secure' => false, - 'Discard' => false, - 'HttpOnly' => false, + 'Name' => null, + 'Value' => null, + 'Domain' => null, + 'Path' => '/', + 'Max-Age' => null, + 'Expires' => null, + 'Secure' => false, + 'Discard' => false, + 'HttpOnly' => false ]; - /** - * @var array Cookie data - */ + /** @var array Cookie data */ private $data; /** - * Create a new SetCookie object from a string. + * Create a new SetCookie object from a string * * @param string $cookie Set-Cookie header string + * + * @return self */ - public static function fromString(string $cookie): self + public static function fromString($cookie) { // Create the default return array $data = self::$defaults; // Explode the cookie string using a series of semicolons - $pieces = \array_filter(\array_map('trim', \explode(';', $cookie))); + $pieces = array_filter(array_map('trim', explode(';', $cookie))); // The name of the cookie (first kvp) must exist and include an equal sign. - if (!isset($pieces[0]) || \strpos($pieces[0], '=') === false) { + if (empty($pieces[0]) || !strpos($pieces[0], '=')) { return new self($data); } // Add the cookie pieces into the parsed data array foreach ($pieces as $part) { - $cookieParts = \explode('=', $part, 2); - $key = \trim($cookieParts[0]); + $cookieParts = explode('=', $part, 2); + $key = trim($cookieParts[0]); $value = isset($cookieParts[1]) - ? \trim($cookieParts[1], " \n\r\t\0\x0B") + ? trim($cookieParts[1], " \n\r\t\0\x0B") : true; // Only check for non-cookies when cookies have been found - if (!isset($data['Name'])) { + if (empty($data['Name'])) { $data['Name'] = $key; $data['Value'] = $value; } else { - foreach (\array_keys(self::$defaults) as $search) { - if (!\strcasecmp($search, $key)) { - if ($search === 'Max-Age') { - if (is_numeric($value)) { - $data[$search] = (int) $value; - } - } else { - $data[$search] = $value; - } + foreach (array_keys(self::$defaults) as $search) { + if (!strcasecmp($search, $key)) { + $data[$search] = $value; continue 2; } } @@ -80,81 +71,39 @@ class SetCookie */ public function __construct(array $data = []) { - $this->data = self::$defaults; - - if (isset($data['Name'])) { - $this->setName($data['Name']); - } - - if (isset($data['Value'])) { - $this->setValue($data['Value']); - } - - if (isset($data['Domain'])) { - $this->setDomain($data['Domain']); - } - - if (isset($data['Path'])) { - $this->setPath($data['Path']); - } - - if (isset($data['Max-Age'])) { - $this->setMaxAge($data['Max-Age']); - } - - if (isset($data['Expires'])) { - $this->setExpires($data['Expires']); - } - - if (isset($data['Secure'])) { - $this->setSecure($data['Secure']); - } - - if (isset($data['Discard'])) { - $this->setDiscard($data['Discard']); - } - - if (isset($data['HttpOnly'])) { - $this->setHttpOnly($data['HttpOnly']); - } - - // Set the remaining values that don't have extra validation logic - foreach (array_diff(array_keys($data), array_keys(self::$defaults)) as $key) { - $this->data[$key] = $data[$key]; - } - + $this->data = array_replace(self::$defaults, $data); // Extract the Expires value and turn it into a UNIX timestamp if needed if (!$this->getExpires() && $this->getMaxAge()) { // Calculate the Expires date - $this->setExpires(\time() + $this->getMaxAge()); - } elseif (null !== ($expires = $this->getExpires()) && !\is_numeric($expires)) { - $this->setExpires($expires); + $this->setExpires(time() + $this->getMaxAge()); + } elseif ($this->getExpires() && !is_numeric($this->getExpires())) { + $this->setExpires($this->getExpires()); } } public function __toString() { - $str = $this->data['Name'].'='.($this->data['Value'] ?? '').'; '; + $str = $this->data['Name'] . '=' . $this->data['Value'] . '; '; foreach ($this->data as $k => $v) { if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) { if ($k === 'Expires') { - $str .= 'Expires='.\gmdate('D, d M Y H:i:s \G\M\T', $v).'; '; + $str .= 'Expires=' . gmdate('D, d M Y H:i:s \G\M\T', $v) . '; '; } else { - $str .= ($v === true ? $k : "{$k}={$v}").'; '; + $str .= ($v === true ? $k : "{$k}={$v}") . '; '; } } } - return \rtrim($str, '; '); + return rtrim($str, '; '); } - public function toArray(): array + public function toArray() { return $this->data; } /** - * Get the cookie name. + * Get the cookie name * * @return string */ @@ -164,23 +113,19 @@ class SetCookie } /** - * Set the cookie name. + * Set the cookie name * * @param string $name Cookie name */ - public function setName($name): void + public function setName($name) { - if (!is_string($name)) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->data['Name'] = (string) $name; + $this->data['Name'] = $name; } /** - * Get the cookie value. + * Get the cookie value * - * @return string|null + * @return string */ public function getValue() { @@ -188,21 +133,17 @@ class SetCookie } /** - * Set the cookie value. + * Set the cookie value * * @param string $value Cookie value */ - public function setValue($value): void + public function setValue($value) { - if (!is_string($value)) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->data['Value'] = (string) $value; + $this->data['Value'] = $value; } /** - * Get the domain. + * Get the domain * * @return string|null */ @@ -212,21 +153,17 @@ class SetCookie } /** - * Set the domain of the cookie. + * Set the domain of the cookie * - * @param string|null $domain + * @param string $domain */ - public function setDomain($domain): void + public function setDomain($domain) { - if (!is_string($domain) && null !== $domain) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->data['Domain'] = null === $domain ? null : (string) $domain; + $this->data['Domain'] = $domain; } /** - * Get the path. + * Get the path * * @return string */ @@ -236,47 +173,39 @@ class SetCookie } /** - * Set the path of the cookie. + * Set the path of the cookie * * @param string $path Path of the cookie */ - public function setPath($path): void + public function setPath($path) { - if (!is_string($path)) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->data['Path'] = (string) $path; + $this->data['Path'] = $path; } /** - * Maximum lifetime of the cookie in seconds. + * Maximum lifetime of the cookie in seconds * * @return int|null */ public function getMaxAge() { - return null === $this->data['Max-Age'] ? null : (int) $this->data['Max-Age']; + return $this->data['Max-Age']; } /** - * Set the max-age of the cookie. + * Set the max-age of the cookie * - * @param int|null $maxAge Max age of the cookie in seconds + * @param int $maxAge Max age of the cookie in seconds */ - public function setMaxAge($maxAge): void + public function setMaxAge($maxAge) { - if (!is_int($maxAge) && null !== $maxAge) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an int or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->data['Max-Age'] = $maxAge === null ? null : (int) $maxAge; + $this->data['Max-Age'] = $maxAge; } /** - * The UNIX timestamp when the cookie Expires. + * The UNIX timestamp when the cookie Expires * - * @return string|int|null + * @return mixed */ public function getExpires() { @@ -284,23 +213,21 @@ class SetCookie } /** - * Set the unix timestamp for which the cookie will expire. + * Set the unix timestamp for which the cookie will expire * - * @param int|string|null $timestamp Unix timestamp or any English textual datetime description. + * @param int $timestamp Unix timestamp */ - public function setExpires($timestamp): void + public function setExpires($timestamp) { - if (!is_int($timestamp) && !is_string($timestamp) && null !== $timestamp) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an int, string or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->data['Expires'] = null === $timestamp ? null : (\is_numeric($timestamp) ? (int) $timestamp : \strtotime((string) $timestamp)); + $this->data['Expires'] = is_numeric($timestamp) + ? (int) $timestamp + : strtotime($timestamp); } /** - * Get whether or not this is a secure cookie. + * Get whether or not this is a secure cookie * - * @return bool + * @return bool|null */ public function getSecure() { @@ -308,21 +235,17 @@ class SetCookie } /** - * Set whether or not the cookie is secure. + * Set whether or not the cookie is secure * * @param bool $secure Set to true or false if secure */ - public function setSecure($secure): void + public function setSecure($secure) { - if (!is_bool($secure)) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->data['Secure'] = (bool) $secure; + $this->data['Secure'] = $secure; } /** - * Get whether or not this is a session cookie. + * Get whether or not this is a session cookie * * @return bool|null */ @@ -332,21 +255,17 @@ class SetCookie } /** - * Set whether or not this is a session cookie. + * Set whether or not this is a session cookie * * @param bool $discard Set to true or false if this is a session cookie */ - public function setDiscard($discard): void + public function setDiscard($discard) { - if (!is_bool($discard)) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->data['Discard'] = (bool) $discard; + $this->data['Discard'] = $discard; } /** - * Get whether or not this is an HTTP only cookie. + * Get whether or not this is an HTTP only cookie * * @return bool */ @@ -356,17 +275,13 @@ class SetCookie } /** - * Set whether or not this is an HTTP only cookie. + * Set whether or not this is an HTTP only cookie * * @param bool $httpOnly Set to true or false if this is HTTP only */ - public function setHttpOnly($httpOnly): void + public function setHttpOnly($httpOnly) { - if (!is_bool($httpOnly)) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - - $this->data['HttpOnly'] = (bool) $httpOnly; + $this->data['HttpOnly'] = $httpOnly; } /** @@ -383,8 +298,10 @@ class SetCookie * path is a %x2F ("/") character. * * @param string $requestPath Path to check against + * + * @return bool */ - public function matchesPath(string $requestPath): bool + public function matchesPath($requestPath) { $cookiePath = $this->getPath(); @@ -394,25 +311,27 @@ class SetCookie } // Ensure that the cookie-path is a prefix of the request path. - if (0 !== \strpos($requestPath, $cookiePath)) { + if (0 !== strpos($requestPath, $cookiePath)) { return false; } // Match if the last character of the cookie-path is "/" - if (\substr($cookiePath, -1, 1) === '/') { + if (substr($cookiePath, -1, 1) === '/') { return true; } // Match if the first character not included in cookie path is "/" - return \substr($requestPath, \strlen($cookiePath), 1) === '/'; + return substr($requestPath, strlen($cookiePath), 1) === '/'; } /** - * Check if the cookie matches a domain value. + * Check if the cookie matches a domain value * * @param string $domain Domain to check against + * + * @return bool */ - public function matchesDomain(string $domain): bool + public function matchesDomain($domain) { $cookieDomain = $this->getDomain(); if (null === $cookieDomain) { @@ -420,10 +339,10 @@ class SetCookie } // Remove the leading '.' as per spec in RFC 6265. - // https://datatracker.ietf.org/doc/html/rfc6265#section-5.2.3 - $cookieDomain = \ltrim(\strtolower($cookieDomain), '.'); + // http://tools.ietf.org/html/rfc6265#section-5.2.3 + $cookieDomain = ltrim(strtolower($cookieDomain), '.'); - $domain = \strtolower($domain); + $domain = strtolower($domain); // Domain not set or exact match. if ('' === $cookieDomain || $domain === $cookieDomain) { @@ -431,55 +350,58 @@ class SetCookie } // Matching the subdomain according to RFC 6265. - // https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.3 - if (\filter_var($domain, \FILTER_VALIDATE_IP)) { + // http://tools.ietf.org/html/rfc6265#section-5.1.3 + if (filter_var($domain, FILTER_VALIDATE_IP)) { return false; } - return (bool) \preg_match('/\.'.\preg_quote($cookieDomain, '/').'$/', $domain); + return (bool) preg_match('/\.' . preg_quote($cookieDomain, '/') . '$/', $domain); } /** - * Check if the cookie is expired. + * Check if the cookie is expired + * + * @return bool */ - public function isExpired(): bool + public function isExpired() { - return $this->getExpires() !== null && \time() > $this->getExpires(); + return $this->getExpires() !== null && time() > $this->getExpires(); } /** - * Check if the cookie is valid according to RFC 6265. + * Check if the cookie is valid according to RFC 6265 * * @return bool|string Returns true if valid or an error message if invalid */ public function validate() { + // Names must not be empty, but can be 0 $name = $this->getName(); - if ($name === '') { + if (empty($name) && !is_numeric($name)) { return 'The cookie name must not be empty'; } // Check if any of the invalid characters are present in the cookie name - if (\preg_match( + if (preg_match( '/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/', $name )) { return 'Cookie name must not contain invalid characters: ASCII ' - .'Control characters (0-31;127), space, tab and the ' - .'following characters: ()<>@,;:\"/?={}'; + . 'Control characters (0-31;127), space, tab and the ' + . 'following characters: ()<>@,;:\"/?={}'; } - // Value must not be null. 0 and empty string are valid. Empty strings - // are technically against RFC 6265, but known to happen in the wild. + // Value must not be empty, but can be 0 $value = $this->getValue(); - if ($value === null) { + if (empty($value) && !is_numeric($value)) { return 'The cookie value must not be empty'; } - // Domains must not be empty, but can be 0. "0" is not a valid internet - // domain, but may be used as server name in a private network. + // Domains must not be empty, but can be 0 + // A "0" is not a valid internet domain, but may be used as server name + // in a private network. $domain = $this->getDomain(); - if ($domain === null || $domain === '') { + if (empty($domain) && !is_numeric($domain)) { return 'The cookie domain must not be empty'; } diff --git a/Server/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php b/Server/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php index ba67ad49..427d896f 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php +++ b/Server/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php @@ -1,5 +1,4 @@ request = $request; - $this->handlerContext = $handlerContext; + parent::__construct($message, $request, null, $previous, $handlerContext); } /** - * Get the request that caused the exception + * @return null */ - public function getRequest(): RequestInterface + public function getResponse() { - return $this->request; + return null; } /** - * Get contextual information about the error from the underlying handler. - * - * The contents of this array will vary depending on which handler you are - * using. It may also be just an empty array. Relying on this data will - * couple you to a specific handler, but can give more debug information - * when needed. + * @return bool */ - public function getHandlerContext(): array + public function hasResponse() { - return $this->handlerContext; + return false; } } diff --git a/Server/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php b/Server/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php index fa3ed699..27b2722b 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php +++ b/Server/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php @@ -1,9 +1,23 @@ getStatusCode() : 0; + $code = $response && !($response instanceof PromiseInterface) + ? $response->getStatusCode() + : 0; parent::__construct($message, $code, $previous); $this->request = $request; $this->response = $response; @@ -45,39 +39,46 @@ class RequestException extends TransferException implements RequestExceptionInte /** * Wrap non-RequestExceptions with a RequestException + * + * @param RequestInterface $request + * @param \Exception $e + * + * @return RequestException */ - public static function wrapException(RequestInterface $request, \Throwable $e): RequestException + public static function wrapException(RequestInterface $request, \Exception $e) { - return $e instanceof RequestException ? $e : new RequestException($e->getMessage(), $request, null, $e); + return $e instanceof RequestException + ? $e + : new RequestException($e->getMessage(), $request, null, $e); } /** * Factory method to create a new exception with a normalized error message * - * @param RequestInterface $request Request sent - * @param ResponseInterface $response Response received - * @param \Throwable|null $previous Previous exception - * @param array $handlerContext Optional handler context - * @param BodySummarizerInterface|null $bodySummarizer Optional body summarizer + * @param RequestInterface $request Request + * @param ResponseInterface $response Response received + * @param \Exception $previous Previous exception + * @param array $ctx Optional handler context. + * + * @return self */ public static function create( RequestInterface $request, - ?ResponseInterface $response = null, - ?\Throwable $previous = null, - array $handlerContext = [], - ?BodySummarizerInterface $bodySummarizer = null - ): self { + ResponseInterface $response = null, + \Exception $previous = null, + array $ctx = [] + ) { if (!$response) { return new self( 'Error completing request', $request, null, $previous, - $handlerContext + $ctx ); } - $level = (int) \floor($response->getStatusCode() / 100); + $level = (int) floor($response->getStatusCode() / 100); if ($level === 4) { $label = 'Client error'; $className = ClientException::class; @@ -89,48 +90,87 @@ class RequestException extends TransferException implements RequestExceptionInte $className = __CLASS__; } - $uri = \GuzzleHttp\Psr7\Utils::redactUserInfo($request->getUri()); + $uri = $request->getUri(); + $uri = static::obfuscateUri($uri); // Client Error: `GET /` resulted in a `404 Not Found` response: // ... (truncated) - $message = \sprintf( + $message = sprintf( '%s: `%s %s` resulted in a `%s %s` response', $label, $request->getMethod(), - $uri->__toString(), + $uri, $response->getStatusCode(), $response->getReasonPhrase() ); - $summary = ($bodySummarizer ?? new BodySummarizer())->summarize($response); + $summary = static::getResponseBodySummary($response); if ($summary !== null) { $message .= ":\n{$summary}\n"; } - return new $className($message, $request, $response, $previous, $handlerContext); + return new $className($message, $request, $response, $previous, $ctx); + } + + /** + * Get a short summary of the response + * + * Will return `null` if the response is not printable. + * + * @param ResponseInterface $response + * + * @return string|null + */ + public static function getResponseBodySummary(ResponseInterface $response) + { + return \GuzzleHttp\Psr7\get_message_body_summary($response); + } + + /** + * Obfuscates URI if there is a username and a password present + * + * @param UriInterface $uri + * + * @return UriInterface + */ + private static function obfuscateUri(UriInterface $uri) + { + $userInfo = $uri->getUserInfo(); + + if (false !== ($pos = strpos($userInfo, ':'))) { + return $uri->withUserInfo(substr($userInfo, 0, $pos), '***'); + } + + return $uri; } /** * Get the request that caused the exception + * + * @return RequestInterface */ - public function getRequest(): RequestInterface + public function getRequest() { return $this->request; } /** * Get the associated response + * + * @return ResponseInterface|null */ - public function getResponse(): ?ResponseInterface + public function getResponse() { return $this->response; } /** * Check if a response was received + * + * @return bool */ - public function hasResponse(): bool + public function hasResponse() { return $this->response !== null; } @@ -142,8 +182,10 @@ class RequestException extends TransferException implements RequestExceptionInte * using. It may also be just an empty array. Relying on this data will * couple you to a specific handler, but can give more debug information * when needed. + * + * @return array */ - public function getHandlerContext(): array + public function getHandlerContext() { return $this->handlerContext; } diff --git a/Server/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php b/Server/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php new file mode 100644 index 00000000..a77c2892 --- /dev/null +++ b/Server/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php @@ -0,0 +1,27 @@ +stream = $stream; + $msg = $msg ?: 'Could not seek the stream to position ' . $pos; + parent::__construct($msg); + } + + /** + * @return StreamInterface + */ + public function getStream() + { + return $this->stream; + } +} diff --git a/Server/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php b/Server/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php index 8055e067..127094c1 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php +++ b/Server/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php @@ -1,5 +1,4 @@ maxHandles = $maxHandles; } - public function create(RequestInterface $request, array $options): EasyHandle + public function create(RequestInterface $request, array $options) { - $protocolVersion = $request->getProtocolVersion(); - - if ('2' === $protocolVersion || '2.0' === $protocolVersion) { - if (!self::supportsHttp2()) { - throw new ConnectException('HTTP/2 is supported by the cURL handler, however libcurl is built without HTTP/2 support.', $request); - } - } elseif ('1.0' !== $protocolVersion && '1.1' !== $protocolVersion) { - throw new ConnectException(sprintf('HTTP/%s is not supported by the cURL handler.', $protocolVersion), $request); - } - if (isset($options['curl']['body_as_string'])) { $options['_body_as_string'] = $options['curl']['body_as_string']; unset($options['curl']['body_as_string']); } - $easy = new EasyHandle(); + $easy = new EasyHandle; $easy->request = $request; $easy->options = $options; $conf = $this->getDefaultConf($easy); @@ -73,69 +49,35 @@ class CurlFactory implements CurlFactoryInterface // Add handler options from the request configuration options if (isset($options['curl'])) { - $conf = \array_replace($conf, $options['curl']); + $conf = array_replace($conf, $options['curl']); } - $conf[\CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy); - $easy->handle = $this->handles ? \array_pop($this->handles) : \curl_init(); + $conf[CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy); + $easy->handle = $this->handles + ? array_pop($this->handles) + : curl_init(); curl_setopt_array($easy->handle, $conf); return $easy; } - private static function supportsHttp2(): bool - { - static $supportsHttp2 = null; - - if (null === $supportsHttp2) { - $supportsHttp2 = self::supportsTls12() - && defined('CURL_VERSION_HTTP2') - && (\CURL_VERSION_HTTP2 & \curl_version()['features']); - } - - return $supportsHttp2; - } - - private static function supportsTls12(): bool - { - static $supportsTls12 = null; - - if (null === $supportsTls12) { - $supportsTls12 = \CURL_SSLVERSION_TLSv1_2 & \curl_version()['features']; - } - - return $supportsTls12; - } - - private static function supportsTls13(): bool - { - static $supportsTls13 = null; - - if (null === $supportsTls13) { - $supportsTls13 = defined('CURL_SSLVERSION_TLSv1_3') - && (\CURL_SSLVERSION_TLSv1_3 & \curl_version()['features']); - } - - return $supportsTls13; - } - - public function release(EasyHandle $easy): void + public function release(EasyHandle $easy) { $resource = $easy->handle; unset($easy->handle); - if (\count($this->handles) >= $this->maxHandles) { - \curl_close($resource); + if (count($this->handles) >= $this->maxHandles) { + curl_close($resource); } else { // Remove all callback functions as they can hold onto references // and are not cleaned up by curl_reset. Using curl_setopt_array // does not work for some reason, so removing each one // individually. - \curl_setopt($resource, \CURLOPT_HEADERFUNCTION, null); - \curl_setopt($resource, \CURLOPT_READFUNCTION, null); - \curl_setopt($resource, \CURLOPT_WRITEFUNCTION, null); - \curl_setopt($resource, \CURLOPT_PROGRESSFUNCTION, null); - \curl_reset($resource); + curl_setopt($resource, CURLOPT_HEADERFUNCTION, null); + curl_setopt($resource, CURLOPT_READFUNCTION, null); + curl_setopt($resource, CURLOPT_WRITEFUNCTION, null); + curl_setopt($resource, CURLOPT_PROGRESSFUNCTION, null); + curl_reset($resource); $this->handles[] = $resource; } } @@ -144,11 +86,17 @@ class CurlFactory implements CurlFactoryInterface * Completes a cURL transaction, either returning a response promise or a * rejected promise. * - * @param callable(RequestInterface, array): PromiseInterface $handler - * @param CurlFactoryInterface $factory Dictates how the handle is released + * @param callable $handler + * @param EasyHandle $easy + * @param CurlFactoryInterface $factory Dictates how the handle is released + * + * @return \GuzzleHttp\Promise\PromiseInterface */ - public static function finish(callable $handler, EasyHandle $easy, CurlFactoryInterface $factory): PromiseInterface - { + public static function finish( + callable $handler, + EasyHandle $easy, + CurlFactoryInterface $factory + ) { if (isset($easy->options['on_stats'])) { self::invokeStats($easy); } @@ -169,10 +117,10 @@ class CurlFactory implements CurlFactoryInterface return new FulfilledPromise($easy->response); } - private static function invokeStats(EasyHandle $easy): void + private static function invokeStats(EasyHandle $easy) { - $curlStats = \curl_getinfo($easy->handle); - $curlStats['appconnect_time'] = \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME); + $curlStats = curl_getinfo($easy->handle); + $curlStats['appconnect_time'] = curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME); $stats = new TransferStats( $easy->request, $easy->response, @@ -180,68 +128,47 @@ class CurlFactory implements CurlFactoryInterface $easy->errno, $curlStats ); - ($easy->options['on_stats'])($stats); + call_user_func($easy->options['on_stats'], $stats); } - /** - * @param callable(RequestInterface, array): PromiseInterface $handler - */ - private static function finishError(callable $handler, EasyHandle $easy, CurlFactoryInterface $factory): PromiseInterface - { + private static function finishError( + callable $handler, + EasyHandle $easy, + CurlFactoryInterface $factory + ) { // Get error information and release the handle to the factory. $ctx = [ 'errno' => $easy->errno, - 'error' => \curl_error($easy->handle), - 'appconnect_time' => \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME), - ] + \curl_getinfo($easy->handle); - $ctx[self::CURL_VERSION_STR] = self::getCurlVersion(); + 'error' => curl_error($easy->handle), + 'appconnect_time' => curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME), + ] + curl_getinfo($easy->handle); + $ctx[self::CURL_VERSION_STR] = curl_version()['version']; $factory->release($easy); // Retry when nothing is present or when curl failed to rewind. - if (empty($easy->options['_err_message']) && (!$easy->errno || $easy->errno == 65)) { + if (empty($easy->options['_err_message']) + && (!$easy->errno || $easy->errno == 65) + ) { return self::retryFailedRewind($handler, $easy, $ctx); } return self::createRejection($easy, $ctx); } - private static function getCurlVersion(): string - { - static $curlVersion = null; - - if (null === $curlVersion) { - $curlVersion = \curl_version()['version']; - } - - return $curlVersion; - } - - private static function createRejection(EasyHandle $easy, array $ctx): PromiseInterface + private static function createRejection(EasyHandle $easy, array $ctx) { static $connectionErrors = [ - \CURLE_OPERATION_TIMEOUTED => true, - \CURLE_COULDNT_RESOLVE_HOST => true, - \CURLE_COULDNT_CONNECT => true, - \CURLE_SSL_CONNECT_ERROR => true, - \CURLE_GOT_NOTHING => true, + CURLE_OPERATION_TIMEOUTED => true, + CURLE_COULDNT_RESOLVE_HOST => true, + CURLE_COULDNT_CONNECT => true, + CURLE_SSL_CONNECT_ERROR => true, + CURLE_GOT_NOTHING => true, ]; - if ($easy->createResponseException) { - return P\Create::rejectionFor( - new RequestException( - 'An error was encountered while creating the response', - $easy->request, - $easy->response, - $easy->createResponseException, - $ctx - ) - ); - } - // If an exception was encountered during the onHeaders event, then // return a rejected promise that wraps that exception. if ($easy->onHeadersException) { - return P\Create::rejectionFor( + return \GuzzleHttp\Promise\rejection_for( new RequestException( 'An error was encountered during the on_headers event', $easy->request, @@ -251,23 +178,21 @@ class CurlFactory implements CurlFactoryInterface ) ); } - - $uri = $easy->request->getUri(); - - $sanitizedError = self::sanitizeCurlError($ctx['error'] ?? '', $uri); - - $message = \sprintf( - 'cURL error %s: %s (%s)', - $ctx['errno'], - $sanitizedError, - 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html' - ); - - if ('' !== $sanitizedError) { - $redactedUriString = \GuzzleHttp\Psr7\Utils::redactUserInfo($uri)->__toString(); - if ($redactedUriString !== '' && false === \strpos($sanitizedError, $redactedUriString)) { - $message .= \sprintf(' for %s', $redactedUriString); - } + if (version_compare($ctx[self::CURL_VERSION_STR], self::LOW_CURL_VERSION_NUMBER)) { + $message = sprintf( + 'cURL error %s: %s (%s)', + $ctx['errno'], + $ctx['error'], + 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html' + ); + } else { + $message = sprintf( + 'cURL error %s: %s (%s) for %s', + $ctx['errno'], + $ctx['error'], + 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html', + $easy->request->getUri() + ); } // Create a connection exception if it was a specific error code. @@ -275,87 +200,64 @@ class CurlFactory implements CurlFactoryInterface ? new ConnectException($message, $easy->request, null, $ctx) : new RequestException($message, $easy->request, $easy->response, null, $ctx); - return P\Create::rejectionFor($error); + return \GuzzleHttp\Promise\rejection_for($error); } - private static function sanitizeCurlError(string $error, UriInterface $uri): string - { - if ('' === $error) { - return $error; - } - - $baseUri = $uri->withQuery('')->withFragment(''); - $baseUriString = $baseUri->__toString(); - - if ('' === $baseUriString) { - return $error; - } - - $redactedUriString = \GuzzleHttp\Psr7\Utils::redactUserInfo($baseUri)->__toString(); - - return str_replace($baseUriString, $redactedUriString, $error); - } - - /** - * @return array - */ - private function getDefaultConf(EasyHandle $easy): array + private function getDefaultConf(EasyHandle $easy) { $conf = [ - '_headers' => $easy->request->getHeaders(), - \CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(), - \CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''), - \CURLOPT_RETURNTRANSFER => false, - \CURLOPT_HEADER => false, - \CURLOPT_CONNECTTIMEOUT => 300, + '_headers' => $easy->request->getHeaders(), + CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(), + CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''), + CURLOPT_RETURNTRANSFER => false, + CURLOPT_HEADER => false, + CURLOPT_CONNECTTIMEOUT => 150, ]; - if (\defined('CURLOPT_PROTOCOLS')) { - $conf[\CURLOPT_PROTOCOLS] = \CURLPROTO_HTTP | \CURLPROTO_HTTPS; + if (defined('CURLOPT_PROTOCOLS')) { + $conf[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS; } $version = $easy->request->getProtocolVersion(); - - if ('2' === $version || '2.0' === $version) { - $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0; - } elseif ('1.1' === $version) { - $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1; + if ($version == 1.1) { + $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_1; + } elseif ($version == 2.0) { + $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_2_0; } else { - $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_0; + $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0; } return $conf; } - private function applyMethod(EasyHandle $easy, array &$conf): void + private function applyMethod(EasyHandle $easy, array &$conf) { $body = $easy->request->getBody(); $size = $body->getSize(); if ($size === null || $size > 0) { $this->applyBody($easy->request, $easy->options, $conf); - return; } $method = $easy->request->getMethod(); if ($method === 'PUT' || $method === 'POST') { - // See https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.2 + // See http://tools.ietf.org/html/rfc7230#section-3.3.2 if (!$easy->request->hasHeader('Content-Length')) { - $conf[\CURLOPT_HTTPHEADER][] = 'Content-Length: 0'; + $conf[CURLOPT_HTTPHEADER][] = 'Content-Length: 0'; } } elseif ($method === 'HEAD') { - $conf[\CURLOPT_NOBODY] = true; + $conf[CURLOPT_NOBODY] = true; unset( - $conf[\CURLOPT_WRITEFUNCTION], - $conf[\CURLOPT_READFUNCTION], - $conf[\CURLOPT_FILE], - $conf[\CURLOPT_INFILE] + $conf[CURLOPT_WRITEFUNCTION], + $conf[CURLOPT_READFUNCTION], + $conf[CURLOPT_FILE], + $conf[CURLOPT_INFILE] ); } } - private function applyBody(RequestInterface $request, array $options, array &$conf): void + private function applyBody(RequestInterface $request, array $options, array &$conf) { $size = $request->hasHeader('Content-Length') ? (int) $request->getHeaderLine('Content-Length') @@ -363,38 +265,40 @@ class CurlFactory implements CurlFactoryInterface // Send the body as a string if the size is less than 1MB OR if the // [curl][body_as_string] request value is set. - if (($size !== null && $size < 1000000) || !empty($options['_body_as_string'])) { - $conf[\CURLOPT_POSTFIELDS] = (string) $request->getBody(); + if (($size !== null && $size < 1000000) || + !empty($options['_body_as_string']) + ) { + $conf[CURLOPT_POSTFIELDS] = (string) $request->getBody(); // Don't duplicate the Content-Length header $this->removeHeader('Content-Length', $conf); $this->removeHeader('Transfer-Encoding', $conf); } else { - $conf[\CURLOPT_UPLOAD] = true; + $conf[CURLOPT_UPLOAD] = true; if ($size !== null) { - $conf[\CURLOPT_INFILESIZE] = $size; + $conf[CURLOPT_INFILESIZE] = $size; $this->removeHeader('Content-Length', $conf); } $body = $request->getBody(); if ($body->isSeekable()) { $body->rewind(); } - $conf[\CURLOPT_READFUNCTION] = static function ($ch, $fd, $length) use ($body) { + $conf[CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use ($body) { return $body->read($length); }; } // If the Expect header is not present, prevent curl from adding it if (!$request->hasHeader('Expect')) { - $conf[\CURLOPT_HTTPHEADER][] = 'Expect:'; + $conf[CURLOPT_HTTPHEADER][] = 'Expect:'; } // cURL sometimes adds a content-type by default. Prevent this. if (!$request->hasHeader('Content-Type')) { - $conf[\CURLOPT_HTTPHEADER][] = 'Content-Type:'; + $conf[CURLOPT_HTTPHEADER][] = 'Content-Type:'; } } - private function applyHeaders(EasyHandle $easy, array &$conf): void + private function applyHeaders(EasyHandle $easy, array &$conf) { foreach ($conf['_headers'] as $name => $values) { foreach ($values as $value) { @@ -402,16 +306,16 @@ class CurlFactory implements CurlFactoryInterface if ($value === '') { // cURL requires a special format for empty headers. // See https://github.com/guzzle/guzzle/issues/1882 for more details. - $conf[\CURLOPT_HTTPHEADER][] = "$name;"; + $conf[CURLOPT_HTTPHEADER][] = "$name;"; } else { - $conf[\CURLOPT_HTTPHEADER][] = "$name: $value"; + $conf[CURLOPT_HTTPHEADER][] = "$name: $value"; } } } // Remove the Accept header if one was not set if (!$easy->request->hasHeader('Accept')) { - $conf[\CURLOPT_HTTPHEADER][] = 'Accept:'; + $conf[CURLOPT_HTTPHEADER][] = 'Accept:'; } } @@ -421,212 +325,174 @@ class CurlFactory implements CurlFactoryInterface * @param string $name Case-insensitive header to remove * @param array $options Array of options to modify */ - private function removeHeader(string $name, array &$options): void + private function removeHeader($name, array &$options) { - foreach (\array_keys($options['_headers']) as $key) { - if (!\strcasecmp($key, $name)) { + foreach (array_keys($options['_headers']) as $key) { + if (!strcasecmp($key, $name)) { unset($options['_headers'][$key]); - return; } } } - private function applyHandlerOptions(EasyHandle $easy, array &$conf): void + private function applyHandlerOptions(EasyHandle $easy, array &$conf) { $options = $easy->options; if (isset($options['verify'])) { if ($options['verify'] === false) { - unset($conf[\CURLOPT_CAINFO]); - $conf[\CURLOPT_SSL_VERIFYHOST] = 0; - $conf[\CURLOPT_SSL_VERIFYPEER] = false; + unset($conf[CURLOPT_CAINFO]); + $conf[CURLOPT_SSL_VERIFYHOST] = 0; + $conf[CURLOPT_SSL_VERIFYPEER] = false; } else { - $conf[\CURLOPT_SSL_VERIFYHOST] = 2; - $conf[\CURLOPT_SSL_VERIFYPEER] = true; - if (\is_string($options['verify'])) { + $conf[CURLOPT_SSL_VERIFYHOST] = 2; + $conf[CURLOPT_SSL_VERIFYPEER] = true; + if (is_string($options['verify'])) { // Throw an error if the file/folder/link path is not valid or doesn't exist. - if (!\file_exists($options['verify'])) { - throw new \InvalidArgumentException("SSL CA bundle not found: {$options['verify']}"); + if (!file_exists($options['verify'])) { + throw new \InvalidArgumentException( + "SSL CA bundle not found: {$options['verify']}" + ); } // If it's a directory or a link to a directory use CURLOPT_CAPATH. // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO. - if ( - \is_dir($options['verify']) - || ( - \is_link($options['verify']) === true - && ($verifyLink = \readlink($options['verify'])) !== false - && \is_dir($verifyLink) - ) - ) { - $conf[\CURLOPT_CAPATH] = $options['verify']; + if (is_dir($options['verify']) || + (is_link($options['verify']) && is_dir(readlink($options['verify'])))) { + $conf[CURLOPT_CAPATH] = $options['verify']; } else { - $conf[\CURLOPT_CAINFO] = $options['verify']; + $conf[CURLOPT_CAINFO] = $options['verify']; } } } } - if (!isset($options['curl'][\CURLOPT_ENCODING]) && !empty($options['decode_content'])) { + if (!empty($options['decode_content'])) { $accept = $easy->request->getHeaderLine('Accept-Encoding'); if ($accept) { - $conf[\CURLOPT_ENCODING] = $accept; + $conf[CURLOPT_ENCODING] = $accept; } else { - // The empty string enables all available decoders and implicitly - // sets a matching 'Accept-Encoding' header. - $conf[\CURLOPT_ENCODING] = ''; - // But as the user did not specify any encoding preference, - // let's leave it up to server by preventing curl from sending - // the header, which will be interpreted as 'Accept-Encoding: *'. - // https://www.rfc-editor.org/rfc/rfc9110#field.accept-encoding - $conf[\CURLOPT_HTTPHEADER][] = 'Accept-Encoding:'; + $conf[CURLOPT_ENCODING] = ''; + // Don't let curl send the header over the wire + $conf[CURLOPT_HTTPHEADER][] = 'Accept-Encoding:'; } } - if (!isset($options['sink'])) { - // Use a default temp stream if no sink was set. - $options['sink'] = \GuzzleHttp\Psr7\Utils::tryFopen('php://temp', 'w+'); - } - $sink = $options['sink']; - if (!\is_string($sink)) { - $sink = \GuzzleHttp\Psr7\Utils::streamFor($sink); - } elseif (!\is_dir(\dirname($sink))) { - // Ensure that the directory exists before failing in curl. - throw new \RuntimeException(\sprintf('Directory %s does not exist for sink value of %s', \dirname($sink), $sink)); + if (isset($options['sink'])) { + $sink = $options['sink']; + if (!is_string($sink)) { + $sink = \GuzzleHttp\Psr7\stream_for($sink); + } elseif (!is_dir(dirname($sink))) { + // Ensure that the directory exists before failing in curl. + throw new \RuntimeException(sprintf( + 'Directory %s does not exist for sink value of %s', + dirname($sink), + $sink + )); + } else { + $sink = new LazyOpenStream($sink, 'w+'); + } + $easy->sink = $sink; + $conf[CURLOPT_WRITEFUNCTION] = function ($ch, $write) use ($sink) { + return $sink->write($write); + }; } else { - $sink = new LazyOpenStream($sink, 'w+'); + // Use a default temp stream if no sink was set. + $conf[CURLOPT_FILE] = fopen('php://temp', 'w+'); + $easy->sink = Psr7\stream_for($conf[CURLOPT_FILE]); } - $easy->sink = $sink; - $conf[\CURLOPT_WRITEFUNCTION] = static function ($ch, $write) use ($sink): int { - return $sink->write($write); - }; - $timeoutRequiresNoSignal = false; if (isset($options['timeout'])) { $timeoutRequiresNoSignal |= $options['timeout'] < 1; - $conf[\CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000; + $conf[CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000; } // CURL default value is CURL_IPRESOLVE_WHATEVER if (isset($options['force_ip_resolve'])) { if ('v4' === $options['force_ip_resolve']) { - $conf[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V4; + $conf[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V4; } elseif ('v6' === $options['force_ip_resolve']) { - $conf[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V6; + $conf[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V6; } } if (isset($options['connect_timeout'])) { $timeoutRequiresNoSignal |= $options['connect_timeout'] < 1; - $conf[\CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000; + $conf[CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000; } - if ($timeoutRequiresNoSignal && \strtoupper(\substr(\PHP_OS, 0, 3)) !== 'WIN') { - $conf[\CURLOPT_NOSIGNAL] = true; + if ($timeoutRequiresNoSignal && strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') { + $conf[CURLOPT_NOSIGNAL] = true; } if (isset($options['proxy'])) { - if (!\is_array($options['proxy'])) { - $conf[\CURLOPT_PROXY] = $options['proxy']; + if (!is_array($options['proxy'])) { + $conf[CURLOPT_PROXY] = $options['proxy']; } else { $scheme = $easy->request->getUri()->getScheme(); if (isset($options['proxy'][$scheme])) { $host = $easy->request->getUri()->getHost(); - if (isset($options['proxy']['no']) && Utils::isHostInNoProxy($host, $options['proxy']['no'])) { - unset($conf[\CURLOPT_PROXY]); - } else { - $conf[\CURLOPT_PROXY] = $options['proxy'][$scheme]; + if (!isset($options['proxy']['no']) || + !\GuzzleHttp\is_host_in_noproxy($host, $options['proxy']['no']) + ) { + $conf[CURLOPT_PROXY] = $options['proxy'][$scheme]; } } } } - if (isset($options['crypto_method'])) { - $protocolVersion = $easy->request->getProtocolVersion(); - - // If HTTP/2, upgrade TLS 1.0 and 1.1 to 1.2 - if ('2' === $protocolVersion || '2.0' === $protocolVersion) { - if ( - \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method'] - || \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method'] - || \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method'] - ) { - $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2; - } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) { - if (!self::supportsTls13()) { - throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL'); - } - $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_3; - } else { - throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); - } - } elseif (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) { - $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_0; - } elseif (\STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method']) { - $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_1; - } elseif (\STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']) { - if (!self::supportsTls12()) { - throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.2 not supported by your version of cURL'); - } - $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2; - } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) { - if (!self::supportsTls13()) { - throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL'); - } - $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_3; - } else { - throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); - } - } - if (isset($options['cert'])) { $cert = $options['cert']; - if (\is_array($cert)) { - $conf[\CURLOPT_SSLCERTPASSWD] = $cert[1]; + if (is_array($cert)) { + $conf[CURLOPT_SSLCERTPASSWD] = $cert[1]; $cert = $cert[0]; } - if (!\file_exists($cert)) { - throw new \InvalidArgumentException("SSL certificate not found: {$cert}"); + if (!file_exists($cert)) { + throw new \InvalidArgumentException( + "SSL certificate not found: {$cert}" + ); } - // OpenSSL (versions 0.9.3 and later) also support "P12" for PKCS#12-encoded files. - // see https://curl.se/libcurl/c/CURLOPT_SSLCERTTYPE.html - $ext = pathinfo($cert, \PATHINFO_EXTENSION); - if (preg_match('#^(der|p12)$#i', $ext)) { - $conf[\CURLOPT_SSLCERTTYPE] = strtoupper($ext); - } - $conf[\CURLOPT_SSLCERT] = $cert; + $conf[CURLOPT_SSLCERT] = $cert; } if (isset($options['ssl_key'])) { - if (\is_array($options['ssl_key'])) { - if (\count($options['ssl_key']) === 2) { - [$sslKey, $conf[\CURLOPT_SSLKEYPASSWD]] = $options['ssl_key']; + if (is_array($options['ssl_key'])) { + if (count($options['ssl_key']) === 2) { + list($sslKey, $conf[CURLOPT_SSLKEYPASSWD]) = $options['ssl_key']; } else { - [$sslKey] = $options['ssl_key']; + list($sslKey) = $options['ssl_key']; } } - $sslKey = $sslKey ?? $options['ssl_key']; + $sslKey = isset($sslKey) ? $sslKey: $options['ssl_key']; - if (!\file_exists($sslKey)) { - throw new \InvalidArgumentException("SSL private key not found: {$sslKey}"); + if (!file_exists($sslKey)) { + throw new \InvalidArgumentException( + "SSL private key not found: {$sslKey}" + ); } - $conf[\CURLOPT_SSLKEY] = $sslKey; + $conf[CURLOPT_SSLKEY] = $sslKey; } if (isset($options['progress'])) { $progress = $options['progress']; - if (!\is_callable($progress)) { - throw new \InvalidArgumentException('progress client option must be callable'); + if (!is_callable($progress)) { + throw new \InvalidArgumentException( + 'progress client option must be callable' + ); } - $conf[\CURLOPT_NOPROGRESS] = false; - $conf[\CURLOPT_PROGRESSFUNCTION] = static function ($resource, int $downloadSize, int $downloaded, int $uploadSize, int $uploaded) use ($progress) { - $progress($downloadSize, $downloaded, $uploadSize, $uploaded); + $conf[CURLOPT_NOPROGRESS] = false; + $conf[CURLOPT_PROGRESSFUNCTION] = function () use ($progress) { + $args = func_get_args(); + // PHP 5.5 pushed the handle onto the start of the args + if (is_resource($args[0])) { + array_shift($args); + } + call_user_func_array($progress, $args); }; } if (!empty($options['debug'])) { - $conf[\CURLOPT_STDERR] = Utils::debugResource($options['debug']); - $conf[\CURLOPT_VERBOSE] = true; + $conf[CURLOPT_STDERR] = \GuzzleHttp\debug_resource($options['debug']); + $conf[CURLOPT_VERBOSE] = true; } } @@ -638,11 +504,12 @@ class CurlFactory implements CurlFactoryInterface * stream, and then encountered a "necessary data rewind wasn't possible" * error, causing the request to be sent through curl_multi_info_read() * without an error status. - * - * @param callable(RequestInterface, array): PromiseInterface $handler */ - private static function retryFailedRewind(callable $handler, EasyHandle $easy, array $ctx): PromiseInterface - { + private static function retryFailedRewind( + callable $handler, + EasyHandle $easy, + array $ctx + ) { try { // Only rewind if the body has been read from. $body = $easy->request->getBody(); @@ -651,10 +518,9 @@ class CurlFactory implements CurlFactoryInterface } } catch (\RuntimeException $e) { $ctx['error'] = 'The connection unexpectedly failed without ' - .'providing an error. The request would have been retried, ' - .'but attempting to rewind the request body failed. ' - .'Exception: '.$e; - + . 'providing an error. The request would have been retried, ' + . 'but attempting to rewind the request body failed. ' + . 'Exception: ' . $e; return self::createRejection($easy, $ctx); } @@ -663,47 +529,40 @@ class CurlFactory implements CurlFactoryInterface $easy->options['_curl_retries'] = 1; } elseif ($easy->options['_curl_retries'] == 2) { $ctx['error'] = 'The cURL request was retried 3 times ' - .'and did not succeed. The most likely reason for the failure ' - .'is that cURL was unable to rewind the body of the request ' - .'and subsequent retries resulted in the same error. Turn on ' - .'the debug option to see what went wrong. See ' - .'https://bugs.php.net/bug.php?id=47204 for more information.'; - + . 'and did not succeed. The most likely reason for the failure ' + . 'is that cURL was unable to rewind the body of the request ' + . 'and subsequent retries resulted in the same error. Turn on ' + . 'the debug option to see what went wrong. See ' + . 'https://bugs.php.net/bug.php?id=47204 for more information.'; return self::createRejection($easy, $ctx); } else { - ++$easy->options['_curl_retries']; + $easy->options['_curl_retries']++; } return $handler($easy->request, $easy->options); } - private function createHeaderFn(EasyHandle $easy): callable + private function createHeaderFn(EasyHandle $easy) { if (isset($easy->options['on_headers'])) { $onHeaders = $easy->options['on_headers']; - if (!\is_callable($onHeaders)) { + if (!is_callable($onHeaders)) { throw new \InvalidArgumentException('on_headers must be callable'); } } else { $onHeaders = null; } - return static function ($ch, $h) use ( + return function ($ch, $h) use ( $onHeaders, $easy, &$startingResponse ) { - $value = \trim($h); + $value = trim($h); if ($value === '') { $startingResponse = true; - try { - $easy->createResponse(); - } catch (\Exception $e) { - $easy->createResponseException = $e; - - return -1; - } + $easy->createResponse(); if ($onHeaders !== null) { try { $onHeaders($easy->response); @@ -711,7 +570,6 @@ class CurlFactory implements CurlFactoryInterface // Associate the exception with the handle and trigger // a curl header write error by returning 0. $easy->onHeadersException = $e; - return -1; } } @@ -721,16 +579,7 @@ class CurlFactory implements CurlFactoryInterface } else { $easy->headers[] = $value; } - - return \strlen($h); + return strlen($h); }; } - - public function __destruct() - { - foreach ($this->handles as $id => $handle) { - \curl_close($handle); - unset($this->handles[$id]); - } - } } diff --git a/Server/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php b/Server/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php index fe57ed5d..b0fc2368 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php +++ b/Server/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php @@ -1,5 +1,4 @@ factory = $options['handle_factory'] - ?? new CurlFactory(3); + $this->factory = isset($options['handle_factory']) + ? $options['handle_factory'] + : new CurlFactory(3); } - public function __invoke(RequestInterface $request, array $options): PromiseInterface + public function __invoke(RequestInterface $request, array $options) { if (isset($options['delay'])) { - \usleep($options['delay'] * 1000); + usleep($options['delay'] * 1000); } $easy = $this->factory->create($request, $options); - \curl_exec($easy->handle); - $easy->errno = \curl_errno($easy->handle); + curl_exec($easy->handle); + $easy->errno = curl_errno($easy->handle); return CurlFactory::finish($this, $easy, $this->factory); } diff --git a/Server/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/Server/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php index 73a6abe3..564c95f4 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php +++ b/Server/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php @@ -1,11 +1,8 @@ An array of delay times, indexed by handle id in `addRequest`. - * - * @see CurlMultiHandler::addRequest - */ private $delays = []; - - /** - * @var array An associative array of CURLMOPT_* options and corresponding values for curl_multi_setopt() - */ private $options = []; - /** @var resource|\CurlMultiHandle */ - private $_mh; - /** * This handler accepts the following options: * @@ -65,66 +33,52 @@ class CurlMultiHandler * out while selecting curl handles. Defaults to 1 second. * - options: An associative array of CURLMOPT_* options and * corresponding values for curl_multi_setopt() + * + * @param array $options */ public function __construct(array $options = []) { - $this->factory = $options['handle_factory'] ?? new CurlFactory(50); + $this->factory = isset($options['handle_factory']) + ? $options['handle_factory'] : new CurlFactory(50); if (isset($options['select_timeout'])) { $this->selectTimeout = $options['select_timeout']; - } elseif ($selectTimeout = Utils::getenv('GUZZLE_CURL_SELECT_TIMEOUT')) { - @trigger_error('Since guzzlehttp/guzzle 7.2.0: Using environment variable GUZZLE_CURL_SELECT_TIMEOUT is deprecated. Use option "select_timeout" instead.', \E_USER_DEPRECATED); - $this->selectTimeout = (int) $selectTimeout; + } elseif ($selectTimeout = getenv('GUZZLE_CURL_SELECT_TIMEOUT')) { + $this->selectTimeout = $selectTimeout; } else { $this->selectTimeout = 1; } - $this->options = $options['options'] ?? []; - - // unsetting the property forces the first access to go through - // __get(). - unset($this->_mh); + $this->options = isset($options['options']) ? $options['options'] : []; } - /** - * @param string $name - * - * @return resource|\CurlMultiHandle - * - * @throws \BadMethodCallException when another field as `_mh` will be gotten - * @throws \RuntimeException when curl can not initialize a multi handle - */ public function __get($name) { - if ($name !== '_mh') { - throw new \BadMethodCallException("Can not get other property as '_mh'."); + if ($name === '_mh') { + $this->_mh = curl_multi_init(); + + foreach ($this->options as $option => $value) { + // A warning is raised in case of a wrong option. + curl_multi_setopt($this->_mh, $option, $value); + } + + // Further calls to _mh will return the value directly, without entering the + // __get() method at all. + return $this->_mh; } - $multiHandle = \curl_multi_init(); - - if (false === $multiHandle) { - throw new \RuntimeException('Can not initialize curl multi handle.'); - } - - $this->_mh = $multiHandle; - - foreach ($this->options as $option => $value) { - // A warning is raised in case of a wrong option. - curl_multi_setopt($this->_mh, $option, $value); - } - - return $this->_mh; + throw new \BadMethodCallException(); } public function __destruct() { if (isset($this->_mh)) { - \curl_multi_close($this->_mh); + curl_multi_close($this->_mh); unset($this->_mh); } } - public function __invoke(RequestInterface $request, array $options): PromiseInterface + public function __invoke(RequestInterface $request, array $options) { $easy = $this->factory->create($request, $options); $id = (int) $easy->handle; @@ -144,7 +98,7 @@ class CurlMultiHandler /** * Ticks the curl event loop. */ - public function tick(): void + public function tick() { // Add any delayed handles if needed. if ($this->delays) { @@ -152,7 +106,7 @@ class CurlMultiHandler foreach ($this->delays as $id => $delay) { if ($currentTime >= $delay) { unset($this->delays[$id]); - \curl_multi_add_handle( + curl_multi_add_handle( $this->_mh, $this->handles[$id]['easy']->handle ); @@ -160,60 +114,45 @@ class CurlMultiHandler } } - // Run curl_multi_exec in the queue to enable other async tasks to run - P\Utils::queue()->add(Closure::fromCallable([$this, 'tickInQueue'])); - // Step through the task queue which may add additional requests. - P\Utils::queue()->run(); + P\queue()->run(); - if ($this->active && \curl_multi_select($this->_mh, $this->selectTimeout) === -1) { + if ($this->active && + curl_multi_select($this->_mh, $this->selectTimeout) === -1 + ) { // Perform a usleep if a select returns -1. // See: https://bugs.php.net/bug.php?id=61141 - \usleep(250); + usleep(250); } - while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) { - // Prevent busy looping for slow HTTP requests. - \curl_multi_select($this->_mh, $this->selectTimeout); - } + while (curl_multi_exec($this->_mh, $this->active) === CURLM_CALL_MULTI_PERFORM); $this->processMessages(); } - /** - * Runs \curl_multi_exec() inside the event loop, to prevent busy looping - */ - private function tickInQueue(): void - { - if (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) { - \curl_multi_select($this->_mh, 0); - P\Utils::queue()->add(Closure::fromCallable([$this, 'tickInQueue'])); - } - } - /** * Runs until all outstanding connections have completed. */ - public function execute(): void + public function execute() { - $queue = P\Utils::queue(); + $queue = P\queue(); while ($this->handles || !$queue->isEmpty()) { // If there are no transfers, then sleep for the next delay if (!$this->active && $this->delays) { - \usleep($this->timeToNext()); + usleep($this->timeToNext()); } $this->tick(); } } - private function addRequest(array $entry): void + private function addRequest(array $entry) { $easy = $entry['easy']; $id = (int) $easy->handle; $this->handles[$id] = $entry; if (empty($easy->options['delay'])) { - \curl_multi_add_handle($this->_mh, $easy->handle); + curl_multi_add_handle($this->_mh, $easy->handle); } else { $this->delays[$id] = Utils::currentTime() + ($easy->options['delay'] / 1000); } @@ -226,12 +165,8 @@ class CurlMultiHandler * * @return bool True on success, false on failure. */ - private function cancel($id): bool + private function cancel($id) { - if (!is_int($id)) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an integer to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - // Cannot cancel if it has been processed. if (!isset($this->handles[$id])) { return false; @@ -239,21 +174,17 @@ class CurlMultiHandler $handle = $this->handles[$id]['easy']->handle; unset($this->delays[$id], $this->handles[$id]); - \curl_multi_remove_handle($this->_mh, $handle); - \curl_close($handle); + curl_multi_remove_handle($this->_mh, $handle); + curl_close($handle); return true; } - private function processMessages(): void + private function processMessages() { - while ($done = \curl_multi_info_read($this->_mh)) { - if ($done['msg'] !== \CURLMSG_DONE) { - // if it's not done, then it would be premature to remove the handle. ref https://github.com/guzzle/guzzle/pull/2892#issuecomment-945150216 - continue; - } + while ($done = curl_multi_info_read($this->_mh)) { $id = (int) $done['handle']; - \curl_multi_remove_handle($this->_mh, $done['handle']); + curl_multi_remove_handle($this->_mh, $done['handle']); if (!isset($this->handles[$id])) { // Probably was cancelled. @@ -264,21 +195,25 @@ class CurlMultiHandler unset($this->handles[$id], $this->delays[$id]); $entry['easy']->errno = $done['result']; $entry['deferred']->resolve( - CurlFactory::finish($this, $entry['easy'], $this->factory) + CurlFactory::finish( + $this, + $entry['easy'], + $this->factory + ) ); } } - private function timeToNext(): int + private function timeToNext() { $currentTime = Utils::currentTime(); - $nextTime = \PHP_INT_MAX; + $nextTime = PHP_INT_MAX; foreach ($this->delays as $time) { if ($time < $nextTime) { $nextTime = $time; } } - return ((int) \max(0, $nextTime - $currentTime)) * 1000000; + return max(0, $nextTime - $currentTime) * 1000000; } } diff --git a/Server/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php b/Server/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php index 1bc39f4b..7754e911 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php +++ b/Server/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php @@ -1,9 +1,7 @@ headers); + if (empty($this->headers)) { + throw new \RuntimeException('No headers have been received'); + } - $normalizedKeys = Utils::normalizeHeaderKeys($headers); + // HTTP-version SP status-code SP reason-phrase + $startLine = explode(' ', array_shift($this->headers), 3); + $headers = \GuzzleHttp\headers_from_lines($this->headers); + $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers); - if (!empty($this->options['decode_content']) && isset($normalizedKeys['content-encoding'])) { - $headers['x-encoded-content-encoding'] = $headers[$normalizedKeys['content-encoding']]; + if (!empty($this->options['decode_content']) + && isset($normalizedKeys['content-encoding']) + ) { + $headers['x-encoded-content-encoding'] + = $headers[$normalizedKeys['content-encoding']]; unset($headers[$normalizedKeys['content-encoding']]); if (isset($normalizedKeys['content-length'])) { - $headers['x-encoded-content-length'] = $headers[$normalizedKeys['content-length']]; + $headers['x-encoded-content-length'] + = $headers[$normalizedKeys['content-length']]; $bodyLength = (int) $this->sink->getSize(); if ($bodyLength) { @@ -89,24 +74,19 @@ final class EasyHandle // Attach a response to the easy handle with the parsed headers. $this->response = new Response( - $status, + $startLine[1], $headers, $this->sink, - $ver, - $reason + substr($startLine[0], 5), + isset($startLine[2]) ? (string) $startLine[2] : null ); } - /** - * @param string $name - * - * @return void - * - * @throws \BadMethodCallException - */ public function __get($name) { - $msg = $name === 'handle' ? 'The EasyHandle has been released' : 'Invalid property: '.$name; + $msg = $name === 'handle' + ? 'The EasyHandle has been released' + : 'Invalid property: ' . $name; throw new \BadMethodCallException($msg); } } diff --git a/Server/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php b/Server/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php deleted file mode 100644 index 5554b8fa..00000000 --- a/Server/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php +++ /dev/null @@ -1,42 +0,0 @@ -|null $queue The parameters to be passed to the append function, as an indexed array. - * @param callable|null $onFulfilled Callback to invoke when the return value is fulfilled. - * @param callable|null $onRejected Callback to invoke when the return value is rejected. + * @param array $queue + * @param callable $onFulfilled Callback to invoke when the return value is fulfilled. + * @param callable $onRejected Callback to invoke when the return value is rejected. */ - public function __construct(?array $queue = null, ?callable $onFulfilled = null, ?callable $onRejected = null) - { + public function __construct( + array $queue = null, + callable $onFulfilled = null, + callable $onRejected = null + ) { $this->onFulfilled = $onFulfilled; $this->onRejected = $onRejected; if ($queue) { - // array_values included for BC - $this->append(...array_values($queue)); + call_user_func_array([$this, 'append'], $queue); } } - public function __invoke(RequestInterface $request, array $options): PromiseInterface + public function __invoke(RequestInterface $request, array $options) { if (!$this->queue) { throw new \OutOfBoundsException('Mock queue is empty'); } - if (isset($options['delay']) && \is_numeric($options['delay'])) { - \usleep((int) $options['delay'] * 1000); + if (isset($options['delay']) && is_numeric($options['delay'])) { + usleep($options['delay'] * 1000); } $this->lastRequest = $request; $this->lastOptions = $options; - $response = \array_shift($this->queue); + $response = array_shift($this->queue); if (isset($options['on_headers'])) { - if (!\is_callable($options['on_headers'])) { + if (!is_callable($options['on_headers'])) { throw new \InvalidArgumentException('on_headers must be callable'); } try { @@ -103,30 +86,29 @@ class MockHandler implements \Countable } } - if (\is_callable($response)) { - $response = $response($request, $options); + if (is_callable($response)) { + $response = call_user_func($response, $request, $options); } - $response = $response instanceof \Throwable - ? P\Create::rejectionFor($response) - : P\Create::promiseFor($response); + $response = $response instanceof \Exception + ? \GuzzleHttp\Promise\rejection_for($response) + : \GuzzleHttp\Promise\promise_for($response); return $response->then( - function (?ResponseInterface $value) use ($request, $options) { + function ($value) use ($request, $options) { $this->invokeStats($request, $options, $value); if ($this->onFulfilled) { - ($this->onFulfilled)($value); + call_user_func($this->onFulfilled, $value); } - - if ($value !== null && isset($options['sink'])) { + if (isset($options['sink'])) { $contents = (string) $value->getBody(); $sink = $options['sink']; - if (\is_resource($sink)) { - \fwrite($sink, $contents); - } elseif (\is_string($sink)) { - \file_put_contents($sink, $contents); - } elseif ($sink instanceof StreamInterface) { + if (is_resource($sink)) { + fwrite($sink, $contents); + } elseif (is_string($sink)) { + file_put_contents($sink, $contents); + } elseif ($sink instanceof \Psr\Http\Message\StreamInterface) { $sink->write($contents); } } @@ -136,10 +118,9 @@ class MockHandler implements \Countable function ($reason) use ($request, $options) { $this->invokeStats($request, $options, null, $reason); if ($this->onRejected) { - ($this->onRejected)($reason); + call_user_func($this->onRejected, $reason); } - - return P\Create::rejectionFor($reason); + return \GuzzleHttp\Promise\rejection_for($reason); } ); } @@ -147,66 +128,68 @@ class MockHandler implements \Countable /** * Adds one or more variadic requests, exceptions, callables, or promises * to the queue. - * - * @param mixed ...$values */ - public function append(...$values): void + public function append() { - foreach ($values as $value) { + foreach (func_get_args() as $value) { if ($value instanceof ResponseInterface - || $value instanceof \Throwable + || $value instanceof \Exception || $value instanceof PromiseInterface - || \is_callable($value) + || is_callable($value) ) { $this->queue[] = $value; } else { - throw new \TypeError('Expected a Response, Promise, Throwable or callable. Found '.Utils::describeType($value)); + throw new \InvalidArgumentException('Expected a response or ' + . 'exception. Found ' . \GuzzleHttp\describe_type($value)); } } } /** * Get the last received request. + * + * @return RequestInterface */ - public function getLastRequest(): ?RequestInterface + public function getLastRequest() { return $this->lastRequest; } /** * Get the last received request options. + * + * @return array */ - public function getLastOptions(): array + public function getLastOptions() { return $this->lastOptions; } /** * Returns the number of remaining items in the queue. + * + * @return int */ - public function count(): int + public function count() { - return \count($this->queue); + return count($this->queue); } - public function reset(): void + public function reset() { $this->queue = []; } - /** - * @param mixed $reason Promise or reason. - */ private function invokeStats( RequestInterface $request, array $options, - ?ResponseInterface $response = null, + ResponseInterface $response = null, $reason = null - ): void { + ) { if (isset($options['on_stats'])) { - $transferTime = $options['transfer_time'] ?? 0; + $transferTime = isset($options['transfer_time']) ? $options['transfer_time'] : 0; $stats = new TransferStats($request, $response, $transferTime, $reason); - ($options['on_stats'])($stats); + call_user_func($options['on_stats'], $stats); } } } diff --git a/Server/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php b/Server/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php index f045b526..f8b00be0 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php +++ b/Server/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php @@ -1,15 +1,11 @@ getProtocolVersion(); - - if ('1.0' !== $protocolVersion && '1.1' !== $protocolVersion) { - throw new ConnectException(sprintf('HTTP/%s is not supported by the stream handler.', $protocolVersion), $request); + usleep($options['delay'] * 1000); } $startTime = isset($options['on_stats']) ? Utils::currentTime() : null; @@ -70,80 +58,80 @@ class StreamHandler // Determine if the error was a networking error. $message = $e->getMessage(); // This list can probably get more comprehensive. - if (false !== \strpos($message, 'getaddrinfo') // DNS lookup failed - || false !== \strpos($message, 'Connection refused') - || false !== \strpos($message, "couldn't connect to host") // error on HHVM - || false !== \strpos($message, 'connection attempt failed') + if (strpos($message, 'getaddrinfo') // DNS lookup failed + || strpos($message, 'Connection refused') + || strpos($message, "couldn't connect to host") // error on HHVM + || strpos($message, "connection attempt failed") ) { $e = new ConnectException($e->getMessage(), $request, $e); - } else { - $e = RequestException::wrapException($request, $e); } + $e = RequestException::wrapException($request, $e); $this->invokeStats($options, $request, $startTime, null, $e); - return P\Create::rejectionFor($e); + return \GuzzleHttp\Promise\rejection_for($e); } } private function invokeStats( array $options, RequestInterface $request, - ?float $startTime, - ?ResponseInterface $response = null, - ?\Throwable $error = null - ): void { + $startTime, + ResponseInterface $response = null, + $error = null + ) { if (isset($options['on_stats'])) { - $stats = new TransferStats($request, $response, Utils::currentTime() - $startTime, $error, []); - ($options['on_stats'])($stats); + $stats = new TransferStats( + $request, + $response, + Utils::currentTime() - $startTime, + $error, + [] + ); + call_user_func($options['on_stats'], $stats); } } - /** - * @param resource $stream - */ - private function createResponse(RequestInterface $request, array $options, $stream, ?float $startTime): PromiseInterface - { + private function createResponse( + RequestInterface $request, + array $options, + $stream, + $startTime + ) { $hdrs = $this->lastHeaders; $this->lastHeaders = []; - - try { - [$ver, $status, $reason, $headers] = HeaderProcessor::parseHeaders($hdrs); - } catch (\Exception $e) { - return P\Create::rejectionFor( - new RequestException('An error was encountered while creating the response', $request, null, $e) - ); - } - - [$stream, $headers] = $this->checkDecode($options, $headers, $stream); - $stream = Psr7\Utils::streamFor($stream); + $parts = explode(' ', array_shift($hdrs), 3); + $ver = explode('/', $parts[0])[1]; + $status = $parts[1]; + $reason = isset($parts[2]) ? $parts[2] : null; + $headers = \GuzzleHttp\headers_from_lines($hdrs); + list($stream, $headers) = $this->checkDecode($options, $headers, $stream); + $stream = Psr7\stream_for($stream); $sink = $stream; - if (\strcasecmp('HEAD', $request->getMethod())) { + if (strcasecmp('HEAD', $request->getMethod())) { $sink = $this->createSink($stream, $options); } - try { - $response = new Psr7\Response($status, $headers, $sink, $ver, $reason); - } catch (\Exception $e) { - return P\Create::rejectionFor( - new RequestException('An error was encountered while creating the response', $request, null, $e) - ); - } + $response = new Psr7\Response($status, $headers, $sink, $ver, $reason); if (isset($options['on_headers'])) { try { $options['on_headers']($response); } catch (\Exception $e) { - return P\Create::rejectionFor( - new RequestException('An error was encountered during the on_headers event', $request, $response, $e) - ); + $msg = 'An error was encountered during the on_headers event'; + $ex = new RequestException($msg, $request, $response, $e); + return \GuzzleHttp\Promise\rejection_for($ex); } } // Do not drain when the request is a HEAD request because they have // no body. if ($sink !== $stream) { - $this->drain($stream, $sink, $response->getHeaderLine('Content-Length')); + $this->drain( + $stream, + $sink, + $response->getHeaderLine('Content-Length') + ); } $this->invokeStats($options, $request, $startTime, $response, null); @@ -151,37 +139,41 @@ class StreamHandler return new FulfilledPromise($response); } - private function createSink(StreamInterface $stream, array $options): StreamInterface + private function createSink(StreamInterface $stream, array $options) { if (!empty($options['stream'])) { return $stream; } - $sink = $options['sink'] ?? Psr7\Utils::tryFopen('php://temp', 'r+'); + $sink = isset($options['sink']) + ? $options['sink'] + : fopen('php://temp', 'r+'); - return \is_string($sink) ? new Psr7\LazyOpenStream($sink, 'w+') : Psr7\Utils::streamFor($sink); + return is_string($sink) + ? new Psr7\LazyOpenStream($sink, 'w+') + : Psr7\stream_for($sink); } - /** - * @param resource $stream - */ - private function checkDecode(array $options, array $headers, $stream): array + private function checkDecode(array $options, array $headers, $stream) { // Automatically decode responses when instructed. if (!empty($options['decode_content'])) { - $normalizedKeys = Utils::normalizeHeaderKeys($headers); + $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers); if (isset($normalizedKeys['content-encoding'])) { $encoding = $headers[$normalizedKeys['content-encoding']]; if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') { - $stream = new Psr7\InflateStream(Psr7\Utils::streamFor($stream)); - $headers['x-encoded-content-encoding'] = $headers[$normalizedKeys['content-encoding']]; - + $stream = new Psr7\InflateStream( + Psr7\stream_for($stream) + ); + $headers['x-encoded-content-encoding'] + = $headers[$normalizedKeys['content-encoding']]; // Remove content-encoding header unset($headers[$normalizedKeys['content-encoding']]); - // Fix content-length header if (isset($normalizedKeys['content-length'])) { - $headers['x-encoded-content-length'] = $headers[$normalizedKeys['content-length']]; + $headers['x-encoded-content-length'] + = $headers[$normalizedKeys['content-length']]; + $length = (int) $stream->getSize(); if ($length === 0) { unset($headers[$normalizedKeys['content-length']]); @@ -199,21 +191,27 @@ class StreamHandler /** * Drains the source stream into the "sink" client option. * - * @param string $contentLength Header specifying the amount of - * data to read. + * @param StreamInterface $source + * @param StreamInterface $sink + * @param string $contentLength Header specifying the amount of + * data to read. * + * @return StreamInterface * @throws \RuntimeException when the sink option is invalid. */ - private function drain(StreamInterface $source, StreamInterface $sink, string $contentLength): StreamInterface - { + private function drain( + StreamInterface $source, + StreamInterface $sink, + $contentLength + ) { // If a content-length header is provided, then stop reading once // that number of bytes has been read. This can prevent infinitely // reading from a stream when dealing with servers that do not honor // Connection: Close headers. - Psr7\Utils::copyToStream( + Psr7\copy_to_stream( $source, $sink, - (\strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1 + (strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1 ); $sink->seek(0); @@ -228,58 +226,46 @@ class StreamHandler * @param callable $callback Callable that returns stream resource * * @return resource - * * @throws \RuntimeException on error */ private function createResource(callable $callback) { - $errors = []; - \set_error_handler(static function ($_, $msg, $file, $line) use (&$errors): bool { + $errors = null; + set_error_handler(function ($_, $msg, $file, $line) use (&$errors) { $errors[] = [ 'message' => $msg, - 'file' => $file, - 'line' => $line, + 'file' => $file, + 'line' => $line ]; - return true; }); - try { - $resource = $callback(); - } finally { - \restore_error_handler(); - } + $resource = $callback(); + restore_error_handler(); if (!$resource) { $message = 'Error creating resource: '; foreach ($errors as $err) { foreach ($err as $key => $value) { - $message .= "[$key] $value".\PHP_EOL; + $message .= "[$key] $value" . PHP_EOL; } } - throw new \RuntimeException(\trim($message)); + throw new \RuntimeException(trim($message)); } return $resource; } - /** - * @return resource - */ private function createStream(RequestInterface $request, array $options) { static $methods; if (!$methods) { - $methods = \array_flip(\get_class_methods(__CLASS__)); - } - - if (!\in_array($request->getUri()->getScheme(), ['http', 'https'])) { - throw new RequestException(\sprintf("The scheme '%s' is not supported.", $request->getUri()->getScheme()), $request); + $methods = array_flip(get_class_methods(__CLASS__)); } // HTTP/1.1 streams using the PHP stream wrapper require a // Connection: close header - if ($request->getProtocolVersion() === '1.1' + if ($request->getProtocolVersion() == '1.1' && !$request->hasHeader('Connection') ) { $request = $request->withHeader('Connection', 'close'); @@ -293,7 +279,7 @@ class StreamHandler $params = []; $context = $this->getDefaultContext($request); - if (isset($options['on_headers']) && !\is_callable($options['on_headers'])) { + if (isset($options['on_headers']) && !is_callable($options['on_headers'])) { throw new \InvalidArgumentException('on_headers must be callable'); } @@ -307,39 +293,42 @@ class StreamHandler } if (isset($options['stream_context'])) { - if (!\is_array($options['stream_context'])) { + if (!is_array($options['stream_context'])) { throw new \InvalidArgumentException('stream_context must be an array'); } - $context = \array_replace_recursive($context, $options['stream_context']); + $context = array_replace_recursive( + $context, + $options['stream_context'] + ); } // Microsoft NTLM authentication only supported with curl handler - if (isset($options['auth'][2]) && 'ntlm' === $options['auth'][2]) { + if (isset($options['auth']) + && is_array($options['auth']) + && isset($options['auth'][2]) + && 'ntlm' == $options['auth'][2] + ) { throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler'); } $uri = $this->resolveHost($request, $options); - $contextResource = $this->createResource( - static function () use ($context, $params) { - return \stream_context_create($context, $params); + $context = $this->createResource( + function () use ($context, $params) { + return stream_context_create($context, $params); } ); return $this->createResource( - function () use ($uri, &$http_response_header, $contextResource, $context, $options, $request) { - $resource = @\fopen((string) $uri, 'r', false, $contextResource); - $this->lastHeaders = $http_response_header ?? []; - - if (false === $resource) { - throw new ConnectException(sprintf('Connection refused for URI %s', $uri), $request, null, $context); - } + function () use ($uri, &$http_response_header, $context, $options) { + $resource = fopen((string) $uri, 'r', null, $context); + $this->lastHeaders = $http_response_header; if (isset($options['read_timeout'])) { $readTimeout = $options['read_timeout']; $sec = (int) $readTimeout; $usec = ($readTimeout - $sec) * 100000; - \stream_set_timeout($resource, $sec, $usec); + stream_set_timeout($resource, $sec, $usec); } return $resource; @@ -347,33 +336,42 @@ class StreamHandler ); } - private function resolveHost(RequestInterface $request, array $options): UriInterface + private function resolveHost(RequestInterface $request, array $options) { $uri = $request->getUri(); - if (isset($options['force_ip_resolve']) && !\filter_var($uri->getHost(), \FILTER_VALIDATE_IP)) { + if (isset($options['force_ip_resolve']) && !filter_var($uri->getHost(), FILTER_VALIDATE_IP)) { if ('v4' === $options['force_ip_resolve']) { - $records = \dns_get_record($uri->getHost(), \DNS_A); - if (false === $records || !isset($records[0]['ip'])) { - throw new ConnectException(\sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request); + $records = dns_get_record($uri->getHost(), DNS_A); + if (!isset($records[0]['ip'])) { + throw new ConnectException( + sprintf( + "Could not resolve IPv4 address for host '%s'", + $uri->getHost() + ), + $request + ); } - - return $uri->withHost($records[0]['ip']); - } - if ('v6' === $options['force_ip_resolve']) { - $records = \dns_get_record($uri->getHost(), \DNS_AAAA); - if (false === $records || !isset($records[0]['ipv6'])) { - throw new ConnectException(\sprintf("Could not resolve IPv6 address for host '%s'", $uri->getHost()), $request); + $uri = $uri->withHost($records[0]['ip']); + } elseif ('v6' === $options['force_ip_resolve']) { + $records = dns_get_record($uri->getHost(), DNS_AAAA); + if (!isset($records[0]['ipv6'])) { + throw new ConnectException( + sprintf( + "Could not resolve IPv6 address for host '%s'", + $uri->getHost() + ), + $request + ); } - - return $uri->withHost('['.$records[0]['ipv6'].']'); + $uri = $uri->withHost('[' . $records[0]['ipv6'] . ']'); } } return $uri; } - private function getDefaultContext(RequestInterface $request): array + private function getDefaultContext(RequestInterface $request) { $headers = ''; foreach ($request->getHeaders() as $name => $value) { @@ -384,20 +382,17 @@ class StreamHandler $context = [ 'http' => [ - 'method' => $request->getMethod(), - 'header' => $headers, + 'method' => $request->getMethod(), + 'header' => $headers, 'protocol_version' => $request->getProtocolVersion(), - 'ignore_errors' => true, - 'follow_location' => 0, - ], - 'ssl' => [ - 'peer_name' => $request->getUri()->getHost(), + 'ignore_errors' => true, + 'follow_location' => 0, ], ]; $body = (string) $request->getBody(); - if ('' !== $body) { + if (!empty($body)) { $context['http']['content'] = $body; // Prevent the HTTP handler from adding a Content-Type header. if (!$request->hasHeader('Content-Type')) { @@ -405,119 +400,55 @@ class StreamHandler } } - $context['http']['header'] = \rtrim($context['http']['header']); + $context['http']['header'] = rtrim($context['http']['header']); return $context; } - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_proxy(RequestInterface $request, array &$options, $value, array &$params): void + private function add_proxy(RequestInterface $request, &$options, $value, &$params) { - $uri = null; - - if (!\is_array($value)) { - $uri = $value; + if (!is_array($value)) { + $options['http']['proxy'] = $value; } else { $scheme = $request->getUri()->getScheme(); if (isset($value[$scheme])) { - if (!isset($value['no']) || !Utils::isHostInNoProxy($request->getUri()->getHost(), $value['no'])) { - $uri = $value[$scheme]; + if (!isset($value['no']) + || !\GuzzleHttp\is_host_in_noproxy( + $request->getUri()->getHost(), + $value['no'] + ) + ) { + $options['http']['proxy'] = $value[$scheme]; } } } - - if (!$uri) { - return; - } - - $parsed = $this->parse_proxy($uri); - $options['http']['proxy'] = $parsed['proxy']; - - if ($parsed['auth']) { - if (!isset($options['http']['header'])) { - $options['http']['header'] = []; - } - $options['http']['header'] .= "\r\nProxy-Authorization: {$parsed['auth']}"; - } } - /** - * Parses the given proxy URL to make it compatible with the format PHP's stream context expects. - */ - private function parse_proxy(string $url): array - { - $parsed = \parse_url($url); - - if ($parsed !== false && isset($parsed['scheme']) && $parsed['scheme'] === 'http') { - if (isset($parsed['host']) && isset($parsed['port'])) { - $auth = null; - if (isset($parsed['user']) && isset($parsed['pass'])) { - $auth = \base64_encode("{$parsed['user']}:{$parsed['pass']}"); - } - - return [ - 'proxy' => "tcp://{$parsed['host']}:{$parsed['port']}", - 'auth' => $auth ? "Basic {$auth}" : null, - ]; - } - } - - // Return proxy as-is. - return [ - 'proxy' => $url, - 'auth' => null, - ]; - } - - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_timeout(RequestInterface $request, array &$options, $value, array &$params): void + private function add_timeout(RequestInterface $request, &$options, $value, &$params) { if ($value > 0) { $options['http']['timeout'] = $value; } } - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_crypto_method(RequestInterface $request, array &$options, $value, array &$params): void + private function add_verify(RequestInterface $request, &$options, $value, &$params) { - if ( - $value === \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT - || $value === \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT - || $value === \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT - || (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && $value === \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT) - ) { - $options['http']['crypto_method'] = $value; - - return; - } - - throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); - } - - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_verify(RequestInterface $request, array &$options, $value, array &$params): void - { - if ($value === false) { - $options['ssl']['verify_peer'] = false; - $options['ssl']['verify_peer_name'] = false; - - return; - } - - if (\is_string($value)) { + if ($value === true) { + // PHP 5.6 or greater will find the system cert by default. When + // < 5.6, use the Guzzle bundled cacert. + if (PHP_VERSION_ID < 50600) { + $options['ssl']['cafile'] = \GuzzleHttp\default_ca_bundle(); + } + } elseif (is_string($value)) { $options['ssl']['cafile'] = $value; - if (!\file_exists($value)) { + if (!file_exists($value)) { throw new \RuntimeException("SSL CA bundle not found: $value"); } - } elseif ($value !== true) { + } elseif ($value === false) { + $options['ssl']['verify_peer'] = false; + $options['ssl']['verify_peer_name'] = false; + return; + } else { throw new \InvalidArgumentException('Invalid verify request option'); } @@ -526,95 +457,88 @@ class StreamHandler $options['ssl']['allow_self_signed'] = false; } - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_cert(RequestInterface $request, array &$options, $value, array &$params): void + private function add_cert(RequestInterface $request, &$options, $value, &$params) { - if (\is_array($value)) { + if (is_array($value)) { $options['ssl']['passphrase'] = $value[1]; $value = $value[0]; } - if (!\file_exists($value)) { + if (!file_exists($value)) { throw new \RuntimeException("SSL certificate not found: {$value}"); } $options['ssl']['local_cert'] = $value; } - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_progress(RequestInterface $request, array &$options, $value, array &$params): void + private function add_progress(RequestInterface $request, &$options, $value, &$params) { - self::addNotification( + $this->addNotification( $params, - static function ($code, $a, $b, $c, $transferred, $total) use ($value) { - if ($code == \STREAM_NOTIFY_PROGRESS) { - // The upload progress cannot be determined. Use 0 for cURL compatibility: - // https://curl.se/libcurl/c/CURLOPT_PROGRESSFUNCTION.html - $value($total, $transferred, 0, 0); + function ($code, $a, $b, $c, $transferred, $total) use ($value) { + if ($code == STREAM_NOTIFY_PROGRESS) { + $value($total, $transferred, null, null); } } ); } - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_debug(RequestInterface $request, array &$options, $value, array &$params): void + private function add_debug(RequestInterface $request, &$options, $value, &$params) { if ($value === false) { return; } static $map = [ - \STREAM_NOTIFY_CONNECT => 'CONNECT', - \STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED', - \STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT', - \STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS', - \STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS', - \STREAM_NOTIFY_REDIRECTED => 'REDIRECTED', - \STREAM_NOTIFY_PROGRESS => 'PROGRESS', - \STREAM_NOTIFY_FAILURE => 'FAILURE', - \STREAM_NOTIFY_COMPLETED => 'COMPLETED', - \STREAM_NOTIFY_RESOLVE => 'RESOLVE', + STREAM_NOTIFY_CONNECT => 'CONNECT', + STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED', + STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT', + STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS', + STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS', + STREAM_NOTIFY_REDIRECTED => 'REDIRECTED', + STREAM_NOTIFY_PROGRESS => 'PROGRESS', + STREAM_NOTIFY_FAILURE => 'FAILURE', + STREAM_NOTIFY_COMPLETED => 'COMPLETED', + STREAM_NOTIFY_RESOLVE => 'RESOLVE', ]; - static $args = ['severity', 'message', 'message_code', 'bytes_transferred', 'bytes_max']; + static $args = ['severity', 'message', 'message_code', + 'bytes_transferred', 'bytes_max']; - $value = Utils::debugResource($value); - $ident = $request->getMethod().' '.$request->getUri()->withFragment(''); - self::addNotification( + $value = \GuzzleHttp\debug_resource($value); + $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment(''); + $this->addNotification( $params, - static function (int $code, ...$passed) use ($ident, $value, $map, $args): void { - \fprintf($value, '<%s> [%s] ', $ident, $map[$code]); - foreach (\array_filter($passed) as $i => $v) { - \fwrite($value, $args[$i].': "'.$v.'" '); + function () use ($ident, $value, $map, $args) { + $passed = func_get_args(); + $code = array_shift($passed); + fprintf($value, '<%s> [%s] ', $ident, $map[$code]); + foreach (array_filter($passed) as $i => $v) { + fwrite($value, $args[$i] . ': "' . $v . '" '); } - \fwrite($value, "\n"); + fwrite($value, "\n"); } ); } - private static function addNotification(array &$params, callable $notify): void + private function addNotification(array &$params, callable $notify) { // Wrap the existing function if needed. if (!isset($params['notification'])) { $params['notification'] = $notify; } else { - $params['notification'] = self::callArray([ + $params['notification'] = $this->callArray([ $params['notification'], - $notify, + $notify ]); } } - private static function callArray(array $functions): callable + private function callArray(array $functions) { - return static function (...$args) use ($functions) { + return function () use ($functions) { + $args = func_get_args(); foreach ($functions as $fn) { - $fn(...$args); + call_user_func_array($fn, $args); } }; } diff --git a/Server/vendor/guzzlehttp/guzzle/src/HandlerStack.php b/Server/vendor/guzzlehttp/guzzle/src/HandlerStack.php index 03f9a18f..6a49cc06 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/HandlerStack.php +++ b/Server/vendor/guzzlehttp/guzzle/src/HandlerStack.php @@ -1,5 +1,4 @@ push(Middleware::httpErrors(), 'http_errors'); $stack->push(Middleware::redirect(), 'allow_redirects'); $stack->push(Middleware::cookies(), 'cookies'); @@ -56,9 +49,9 @@ class HandlerStack } /** - * @param (callable(RequestInterface, array): PromiseInterface)|null $handler Underlying HTTP handler. + * @param callable $handler Underlying HTTP handler. */ - public function __construct(?callable $handler = null) + public function __construct(callable $handler = null) { $this->handler = $handler; } @@ -66,6 +59,9 @@ class HandlerStack /** * Invokes the handler stack as a composed handler * + * @param RequestInterface $request + * @param array $options + * * @return ResponseInterface|PromiseInterface */ public function __invoke(RequestInterface $request, array $options) @@ -84,21 +80,20 @@ class HandlerStack { $depth = 0; $stack = []; - - if ($this->handler !== null) { - $stack[] = '0) Handler: '.$this->debugCallable($this->handler); + if ($this->handler) { + $stack[] = "0) Handler: " . $this->debugCallable($this->handler); } $result = ''; - foreach (\array_reverse($this->stack) as $tuple) { - ++$depth; + foreach (array_reverse($this->stack) as $tuple) { + $depth++; $str = "{$depth}) Name: '{$tuple[1]}', "; - $str .= 'Function: '.$this->debugCallable($tuple[0]); + $str .= "Function: " . $this->debugCallable($tuple[0]); $result = "> {$str}\n{$result}"; $stack[] = $str; } - foreach (\array_keys($stack) as $k) { + foreach (array_keys($stack) as $k) { $result .= "< {$stack[$k]}\n"; } @@ -108,10 +103,10 @@ class HandlerStack /** * Set the HTTP handler that actually returns a promise. * - * @param callable(RequestInterface, array): PromiseInterface $handler Accepts a request and array of options and - * returns a Promise. + * @param callable $handler Accepts a request and array of options and + * returns a Promise. */ - public function setHandler(callable $handler): void + public function setHandler(callable $handler) { $this->handler = $handler; $this->cached = null; @@ -119,31 +114,33 @@ class HandlerStack /** * Returns true if the builder has a handler. + * + * @return bool */ - public function hasHandler(): bool + public function hasHandler() { - return $this->handler !== null; + return (bool) $this->handler; } /** * Unshift a middleware to the bottom of the stack. * - * @param callable(callable): callable $middleware Middleware function - * @param string $name Name to register for this middleware. + * @param callable $middleware Middleware function + * @param string $name Name to register for this middleware. */ - public function unshift(callable $middleware, ?string $name = null): void + public function unshift(callable $middleware, $name = null) { - \array_unshift($this->stack, [$middleware, $name]); + array_unshift($this->stack, [$middleware, $name]); $this->cached = null; } /** * Push a middleware to the top of the stack. * - * @param callable(callable): callable $middleware Middleware function - * @param string $name Name to register for this middleware. + * @param callable $middleware Middleware function + * @param string $name Name to register for this middleware. */ - public function push(callable $middleware, string $name = ''): void + public function push(callable $middleware, $name = '') { $this->stack[] = [$middleware, $name]; $this->cached = null; @@ -152,11 +149,11 @@ class HandlerStack /** * Add a middleware before another middleware by name. * - * @param string $findName Middleware to find - * @param callable(callable): callable $middleware Middleware function - * @param string $withName Name to register for this middleware. + * @param string $findName Middleware to find + * @param callable $middleware Middleware function + * @param string $withName Name to register for this middleware. */ - public function before(string $findName, callable $middleware, string $withName = ''): void + public function before($findName, callable $middleware, $withName = '') { $this->splice($findName, $withName, $middleware, true); } @@ -164,11 +161,11 @@ class HandlerStack /** * Add a middleware after another middleware by name. * - * @param string $findName Middleware to find - * @param callable(callable): callable $middleware Middleware function - * @param string $withName Name to register for this middleware. + * @param string $findName Middleware to find + * @param callable $middleware Middleware function + * @param string $withName Name to register for this middleware. */ - public function after(string $findName, callable $middleware, string $withName = ''): void + public function after($findName, callable $middleware, $withName = '') { $this->splice($findName, $withName, $middleware, false); } @@ -178,17 +175,13 @@ class HandlerStack * * @param callable|string $remove Middleware to remove by instance or name. */ - public function remove($remove): void + public function remove($remove) { - if (!is_string($remove) && !is_callable($remove)) { - trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a callable or string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); - } - $this->cached = null; - $idx = \is_callable($remove) ? 0 : 1; - $this->stack = \array_values(\array_filter( + $idx = is_callable($remove) ? 0 : 1; + $this->stack = array_values(array_filter( $this->stack, - static function ($tuple) use ($idx, $remove) { + function ($tuple) use ($idx, $remove) { return $tuple[$idx] !== $remove; } )); @@ -197,17 +190,16 @@ class HandlerStack /** * Compose the middleware and handler into a single callable function. * - * @return callable(RequestInterface, array): PromiseInterface + * @return callable */ - public function resolve(): callable + public function resolve() { - if ($this->cached === null) { - if (($prev = $this->handler) === null) { + if (!$this->cached) { + if (!($prev = $this->handler)) { throw new \LogicException('No handler has been specified'); } - foreach (\array_reverse($this->stack) as $fn) { - /** @var callable(RequestInterface, array): PromiseInterface $prev */ + foreach (array_reverse($this->stack) as $fn) { $prev = $fn[0]($prev); } @@ -217,7 +209,11 @@ class HandlerStack return $this->cached; } - private function findByName(string $name): int + /** + * @param string $name + * @return int + */ + private function findByName($name) { foreach ($this->stack as $k => $v) { if ($v[1] === $name) { @@ -230,8 +226,13 @@ class HandlerStack /** * Splices a function into the middleware list at a specific position. + * + * @param string $findName + * @param string $withName + * @param callable $middleware + * @param bool $before */ - private function splice(string $findName, string $withName, callable $middleware, bool $before): void + private function splice($findName, $withName, callable $middleware, $before) { $this->cached = null; $idx = $this->findByName($findName); @@ -239,37 +240,38 @@ class HandlerStack if ($before) { if ($idx === 0) { - \array_unshift($this->stack, $tuple); + array_unshift($this->stack, $tuple); } else { $replacement = [$tuple, $this->stack[$idx]]; - \array_splice($this->stack, $idx, 1, $replacement); + array_splice($this->stack, $idx, 1, $replacement); } - } elseif ($idx === \count($this->stack) - 1) { + } elseif ($idx === count($this->stack) - 1) { $this->stack[] = $tuple; } else { $replacement = [$this->stack[$idx], $tuple]; - \array_splice($this->stack, $idx, 1, $replacement); + array_splice($this->stack, $idx, 1, $replacement); } } /** * Provides a debug string for a given callable. * - * @param callable|string $fn Function to write as a string. + * @param array|callable $fn Function to write as a string. + * + * @return string */ - private function debugCallable($fn): string + private function debugCallable($fn) { - if (\is_string($fn)) { + if (is_string($fn)) { return "callable({$fn})"; } - if (\is_array($fn)) { - return \is_string($fn[0]) + if (is_array($fn)) { + return is_string($fn[0]) ? "callable({$fn[0]}::{$fn[1]})" - : "callable(['".\get_class($fn[0])."', '{$fn[1]}'])"; + : "callable(['" . get_class($fn[0]) . "', '{$fn[1]}'])"; } - /** @var object $fn */ - return 'callable('.\spl_object_hash($fn).')'; + return 'callable(' . spl_object_hash($fn) . ')'; } } diff --git a/Server/vendor/guzzlehttp/guzzle/src/MessageFormatter.php b/Server/vendor/guzzlehttp/guzzle/src/MessageFormatter.php index 9b77eee8..dc36bb52 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/MessageFormatter.php +++ b/Server/vendor/guzzlehttp/guzzle/src/MessageFormatter.php @@ -1,5 +1,4 @@ >>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}"; - public const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}'; + const CLF = "{hostname} {req_header_User-Agent} - [{date_common_log}] \"{method} {target} HTTP/{version}\" {code} {res_header_Content-Length}"; + const DEBUG = ">>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}"; + const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}'; - /** - * @var string Template used to format log messages - */ + /** @var string Template used to format log messages */ private $template; /** * @param string $template Log message template */ - public function __construct(?string $template = self::CLF) + public function __construct($template = self::CLF) { $this->template = $template ?: self::CLF; } @@ -64,16 +57,20 @@ class MessageFormatter implements MessageFormatterInterface /** * Returns a formatted message string. * - * @param RequestInterface $request Request that was sent - * @param ResponseInterface|null $response Response that was received - * @param \Throwable|null $error Exception that was received + * @param RequestInterface $request Request that was sent + * @param ResponseInterface $response Response that was received + * @param \Exception $error Exception that was received + * + * @return string */ - public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string - { + public function format( + RequestInterface $request, + ResponseInterface $response = null, + \Exception $error = null + ) { $cache = []; - /** @var string */ - return \preg_replace_callback( + return preg_replace_callback( '/{\s*([A-Za-z_\-\.0-9]+)\s*}/', function (array $matches) use ($request, $response, $error, &$cache) { if (isset($cache[$matches[1]])) { @@ -83,51 +80,39 @@ class MessageFormatter implements MessageFormatterInterface $result = ''; switch ($matches[1]) { case 'request': - $result = Psr7\Message::toString($request); + $result = Psr7\str($request); break; case 'response': - $result = $response ? Psr7\Message::toString($response) : ''; + $result = $response ? Psr7\str($response) : ''; break; case 'req_headers': - $result = \trim($request->getMethod() - .' '.$request->getRequestTarget()) - .' HTTP/'.$request->getProtocolVersion()."\r\n" - .$this->headers($request); + $result = trim($request->getMethod() + . ' ' . $request->getRequestTarget()) + . ' HTTP/' . $request->getProtocolVersion() . "\r\n" + . $this->headers($request); break; case 'res_headers': $result = $response ? - \sprintf( + sprintf( 'HTTP/%s %d %s', $response->getProtocolVersion(), $response->getStatusCode(), $response->getReasonPhrase() - )."\r\n".$this->headers($response) + ) . "\r\n" . $this->headers($response) : 'NULL'; break; case 'req_body': - $result = $request->getBody()->__toString(); + $result = $request->getBody(); break; case 'res_body': - if (!$response instanceof ResponseInterface) { - $result = 'NULL'; - break; - } - - $body = $response->getBody(); - - if (!$body->isSeekable()) { - $result = 'RESPONSE_NOT_LOGGEABLE'; - break; - } - - $result = $response->getBody()->__toString(); + $result = $response ? $response->getBody() : 'NULL'; break; case 'ts': case 'date_iso_8601': - $result = \gmdate('c'); + $result = gmdate('c'); break; case 'date_common_log': - $result = \date('d/M/Y:H:i:s O'); + $result = date('d/M/Y:H:i:s O'); break; case 'method': $result = $request->getMethod(); @@ -137,7 +122,7 @@ class MessageFormatter implements MessageFormatterInterface break; case 'uri': case 'url': - $result = $request->getUri()->__toString(); + $result = $request->getUri(); break; case 'target': $result = $request->getRequestTarget(); @@ -154,7 +139,7 @@ class MessageFormatter implements MessageFormatterInterface $result = $request->getHeaderLine('Host'); break; case 'hostname': - $result = \gethostname(); + $result = gethostname(); break; case 'code': $result = $response ? $response->getStatusCode() : 'NULL'; @@ -167,17 +152,16 @@ class MessageFormatter implements MessageFormatterInterface break; default: // handle prefixed dynamic headers - if (\strpos($matches[1], 'req_header_') === 0) { - $result = $request->getHeaderLine(\substr($matches[1], 11)); - } elseif (\strpos($matches[1], 'res_header_') === 0) { + if (strpos($matches[1], 'req_header_') === 0) { + $result = $request->getHeaderLine(substr($matches[1], 11)); + } elseif (strpos($matches[1], 'res_header_') === 0) { $result = $response - ? $response->getHeaderLine(\substr($matches[1], 11)) + ? $response->getHeaderLine(substr($matches[1], 11)) : 'NULL'; } } $cache[$matches[1]] = $result; - return $result; }, $this->template @@ -186,14 +170,16 @@ class MessageFormatter implements MessageFormatterInterface /** * Get headers from message as string + * + * @return string */ - private function headers(MessageInterface $message): string + private function headers(MessageInterface $message) { $result = ''; foreach ($message->getHeaders() as $name => $values) { - $result .= $name.': '.\implode(', ', $values)."\r\n"; + $result .= $name . ': ' . implode(', ', $values) . "\r\n"; } - return \trim($result); + return trim($result); } } diff --git a/Server/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php b/Server/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php deleted file mode 100644 index a39ac248..00000000 --- a/Server/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php +++ /dev/null @@ -1,18 +0,0 @@ -withCookieHeader($request); - return $handler($request, $options) ->then( - static function (ResponseInterface $response) use ($cookieJar, $request): ResponseInterface { + function ($response) use ($cookieJar, $request) { $cookieJar->extractCookies($request, $response); - return $response; } ); @@ -49,27 +45,24 @@ final class Middleware /** * Middleware that throws exceptions for 4xx or 5xx responses when the - * "http_errors" request option is set to true. + * "http_error" request option is set to true. * - * @param BodySummarizerInterface|null $bodySummarizer The body summarizer to use in exception messages. - * - * @return callable(callable): callable Returns a function that accepts the next handler. + * @return callable Returns a function that accepts the next handler. */ - public static function httpErrors(?BodySummarizerInterface $bodySummarizer = null): callable + public static function httpErrors() { - return static function (callable $handler) use ($bodySummarizer): callable { - return static function ($request, array $options) use ($handler, $bodySummarizer) { + return function (callable $handler) { + return function ($request, array $options) use ($handler) { if (empty($options['http_errors'])) { return $handler($request, $options); } - return $handler($request, $options)->then( - static function (ResponseInterface $response) use ($request, $bodySummarizer) { + function (ResponseInterface $response) use ($request) { $code = $response->getStatusCode(); if ($code < 400) { return $response; } - throw RequestException::create($request, $response, null, [], $bodySummarizer); + throw RequestException::create($request, $response); } ); }; @@ -79,40 +72,37 @@ final class Middleware /** * Middleware that pushes history data to an ArrayAccess container. * - * @param array|\ArrayAccess $container Container to hold the history (by reference). - * - * @return callable(callable): callable Returns a function that accepts the next handler. + * @param array|\ArrayAccess $container Container to hold the history (by reference). * + * @return callable Returns a function that accepts the next handler. * @throws \InvalidArgumentException if container is not an array or ArrayAccess. */ - public static function history(&$container): callable + public static function history(&$container) { - if (!\is_array($container) && !$container instanceof \ArrayAccess) { + if (!is_array($container) && !$container instanceof \ArrayAccess) { throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess'); } - return static function (callable $handler) use (&$container): callable { - return static function (RequestInterface $request, array $options) use ($handler, &$container) { + return function (callable $handler) use (&$container) { + return function ($request, array $options) use ($handler, &$container) { return $handler($request, $options)->then( - static function ($value) use ($request, &$container, $options) { + function ($value) use ($request, &$container, $options) { $container[] = [ - 'request' => $request, + 'request' => $request, 'response' => $value, - 'error' => null, - 'options' => $options, + 'error' => null, + 'options' => $options ]; - return $value; }, - static function ($reason) use ($request, &$container, $options) { + function ($reason) use ($request, &$container, $options) { $container[] = [ - 'request' => $request, + 'request' => $request, 'response' => null, - 'error' => $reason, - 'options' => $options, + 'error' => $reason, + 'options' => $options ]; - - return P\Create::rejectionFor($reason); + return \GuzzleHttp\Promise\rejection_for($reason); } ); }; @@ -132,10 +122,10 @@ final class Middleware * * @return callable Returns a function that accepts the next handler. */ - public static function tap(?callable $before = null, ?callable $after = null): callable + public static function tap(callable $before = null, callable $after = null) { - return static function (callable $handler) use ($before, $after): callable { - return static function (RequestInterface $request, array $options) use ($handler, $before, $after) { + return function (callable $handler) use ($before, $after) { + return function ($request, array $options) use ($handler, $before, $after) { if ($before) { $before($request, $options); } @@ -143,7 +133,6 @@ final class Middleware if ($after) { $after($request, $options, $response); } - return $response; }; }; @@ -154,9 +143,9 @@ final class Middleware * * @return callable Returns a function that accepts the next handler. */ - public static function redirect(): callable + public static function redirect() { - return static function (callable $handler): RedirectMiddleware { + return function (callable $handler) { return new RedirectMiddleware($handler); }; } @@ -176,9 +165,9 @@ final class Middleware * * @return callable Returns a function that accepts the next handler. */ - public static function retry(callable $decider, ?callable $delay = null): callable + public static function retry(callable $decider, callable $delay = null) { - return static function (callable $handler) use ($decider, $delay): RetryMiddleware { + return function (callable $handler) use ($decider, $delay) { return new RetryMiddleware($decider, $handler, $delay); }; } @@ -187,36 +176,29 @@ final class Middleware * Middleware that logs requests, responses, and errors using a message * formatter. * - * @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests. - * - * @param LoggerInterface $logger Logs messages. - * @param MessageFormatterInterface|MessageFormatter $formatter Formatter used to create message strings. - * @param string $logLevel Level at which to log requests. + * @param LoggerInterface $logger Logs messages. + * @param MessageFormatter $formatter Formatter used to create message strings. + * @param string $logLevel Level at which to log requests. * * @return callable Returns a function that accepts the next handler. */ - public static function log(LoggerInterface $logger, $formatter, string $logLevel = 'info'): callable + public static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = 'info' /* \Psr\Log\LogLevel::INFO */) { - // To be compatible with Guzzle 7.1.x we need to allow users to pass a MessageFormatter - if (!$formatter instanceof MessageFormatter && !$formatter instanceof MessageFormatterInterface) { - throw new \LogicException(sprintf('Argument 2 to %s::log() must be of type %s', self::class, MessageFormatterInterface::class)); - } - - return static function (callable $handler) use ($logger, $formatter, $logLevel): callable { - return static function (RequestInterface $request, array $options = []) use ($handler, $logger, $formatter, $logLevel) { + return function (callable $handler) use ($logger, $formatter, $logLevel) { + return function ($request, array $options) use ($handler, $logger, $formatter, $logLevel) { return $handler($request, $options)->then( - static function ($response) use ($logger, $request, $formatter, $logLevel): ResponseInterface { + function ($response) use ($logger, $request, $formatter, $logLevel) { $message = $formatter->format($request, $response); $logger->log($logLevel, $message); - return $response; }, - static function ($reason) use ($logger, $request, $formatter): PromiseInterface { - $response = $reason instanceof RequestException ? $reason->getResponse() : null; - $message = $formatter->format($request, $response, P\Create::exceptionFor($reason)); - $logger->error($message); - - return P\Create::rejectionFor($reason); + function ($reason) use ($logger, $request, $formatter) { + $response = $reason instanceof RequestException + ? $reason->getResponse() + : null; + $message = $formatter->format($request, $response, $reason); + $logger->notice($message); + return \GuzzleHttp\Promise\rejection_for($reason); } ); }; @@ -226,10 +208,12 @@ final class Middleware /** * This middleware adds a default content-type if possible, a default * content-length or transfer-encoding header, and the expect header. + * + * @return callable */ - public static function prepareBody(): callable + public static function prepareBody() { - return static function (callable $handler): PrepareBodyMiddleware { + return function (callable $handler) { return new PrepareBodyMiddleware($handler); }; } @@ -240,11 +224,12 @@ final class Middleware * * @param callable $fn Function that accepts a RequestInterface and returns * a RequestInterface. + * @return callable */ - public static function mapRequest(callable $fn): callable + public static function mapRequest(callable $fn) { - return static function (callable $handler) use ($fn): callable { - return static function (RequestInterface $request, array $options) use ($handler, $fn) { + return function (callable $handler) use ($fn) { + return function ($request, array $options) use ($handler, $fn) { return $handler($fn($request), $options); }; }; @@ -256,11 +241,12 @@ final class Middleware * * @param callable $fn Function that accepts a ResponseInterface and * returns a ResponseInterface. + * @return callable */ - public static function mapResponse(callable $fn): callable + public static function mapResponse(callable $fn) { - return static function (callable $handler) use ($fn): callable { - return static function (RequestInterface $request, array $options) use ($handler, $fn) { + return function (callable $handler) use ($fn) { + return function ($request, array $options) use ($handler, $fn) { return $handler($request, $options)->then($fn); }; }; diff --git a/Server/vendor/guzzlehttp/guzzle/src/Pool.php b/Server/vendor/guzzlehttp/guzzle/src/Pool.php index 6277c61f..5838db4f 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/Pool.php +++ b/Server/vendor/guzzlehttp/guzzle/src/Pool.php @@ -1,8 +1,6 @@ $rfn) { if ($rfn instanceof RequestInterface) { yield $key => $client->sendAsync($rfn, $opts); - } elseif (\is_callable($rfn)) { + } elseif (is_callable($rfn)) { yield $key => $rfn($opts); } else { - throw new \InvalidArgumentException('Each value yielded by the iterator must be a Psr7\Http\Message\RequestInterface or a callable that returns a promise that fulfills with a Psr7\Message\Http\ResponseInterface object.'); + throw new \InvalidArgumentException('Each value yielded by ' + . 'the iterator must be a Psr7\Http\Message\RequestInterface ' + . 'or a callable that returns a promise that fulfills ' + . 'with a Psr7\Message\Http\ResponseInterface object.'); } } }; @@ -69,8 +72,10 @@ class Pool implements PromisorInterface /** * Get promise + * + * @return PromiseInterface */ - public function promise(): PromiseInterface + public function promise() { return $this->each->promise(); } @@ -86,37 +91,41 @@ class Pool implements PromisorInterface * @param ClientInterface $client Client used to send the requests * @param array|\Iterator $requests Requests to send concurrently. * @param array $options Passes through the options available in - * {@see \GuzzleHttp\Pool::__construct} + * {@see GuzzleHttp\Pool::__construct} * * @return array Returns an array containing the response or an exception * in the same order that the requests were sent. - * * @throws \InvalidArgumentException if the event format is incorrect. */ - public static function batch(ClientInterface $client, $requests, array $options = []): array - { + public static function batch( + ClientInterface $client, + $requests, + array $options = [] + ) { $res = []; self::cmpCallback($options, 'fulfilled', $res); self::cmpCallback($options, 'rejected', $res); $pool = new static($client, $requests, $options); $pool->promise()->wait(); - \ksort($res); + ksort($res); return $res; } /** * Execute callback(s) + * + * @return void */ - private static function cmpCallback(array &$options, string $name, array &$results): void + private static function cmpCallback(array &$options, $name, array &$results) { if (!isset($options[$name])) { - $options[$name] = static function ($v, $k) use (&$results) { + $options[$name] = function ($v, $k) use (&$results) { $results[$k] = $v; }; } else { $currentFn = $options[$name]; - $options[$name] = static function ($v, $k) use (&$results, $currentFn) { + $options[$name] = function ($v, $k) use (&$results, $currentFn) { $currentFn($v, $k); $results[$k] = $v; }; diff --git a/Server/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php b/Server/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php index 7dde6c5f..568a1e90 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php +++ b/Server/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php @@ -1,32 +1,34 @@ nextHandler = $nextHandler; } - public function __invoke(RequestInterface $request, array $options): PromiseInterface + /** + * @param RequestInterface $request + * @param array $options + * + * @return PromiseInterface + */ + public function __invoke(RequestInterface $request, array $options) { $fn = $this->nextHandler; @@ -40,7 +42,7 @@ class PrepareBodyMiddleware // Add a default content-type if possible. if (!$request->hasHeader('Content-Type')) { if ($uri = $request->getBody()->getMetadata('uri')) { - if (is_string($uri) && $type = Psr7\MimeType::fromFilename($uri)) { + if ($type = Psr7\mimetype_from_filename($uri)) { $modify['set_headers']['Content-Type'] = $type; } } @@ -61,30 +63,34 @@ class PrepareBodyMiddleware // Add the expect header if needed. $this->addExpectHeader($request, $options, $modify); - return $fn(Psr7\Utils::modifyRequest($request, $modify), $options); + return $fn(Psr7\modify_request($request, $modify), $options); } /** * Add expect header + * + * @return void */ - private function addExpectHeader(RequestInterface $request, array $options, array &$modify): void - { + private function addExpectHeader( + RequestInterface $request, + array $options, + array &$modify + ) { // Determine if the Expect header should be used if ($request->hasHeader('Expect')) { return; } - $expect = $options['expect'] ?? null; + $expect = isset($options['expect']) ? $options['expect'] : null; - // Return if disabled or using HTTP/1.0 - if ($expect === false || $request->getProtocolVersion() === '1.0') { + // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0 + if ($expect === false || $request->getProtocolVersion() < 1.1) { return; } // The expect header is unconditionally enabled if ($expect === true) { $modify['set_headers']['Expect'] = '100-Continue'; - return; } diff --git a/Server/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php b/Server/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php index 7aa21a62..008a29b8 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php +++ b/Server/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php @@ -1,10 +1,10 @@ 5, - 'protocols' => ['http', 'https'], - 'strict' => false, - 'referer' => false, + 'max' => 5, + 'protocols' => ['http', 'https'], + 'strict' => false, + 'referer' => false, 'track_redirects' => false, ]; - /** - * @var callable(RequestInterface, array): PromiseInterface - */ + /** @var callable */ private $nextHandler; /** - * @param callable(RequestInterface, array): PromiseInterface $nextHandler Next handler to invoke. + * @param callable $nextHandler Next handler to invoke. */ public function __construct(callable $nextHandler) { $this->nextHandler = $nextHandler; } - public function __invoke(RequestInterface $request, array $options): PromiseInterface + /** + * @param RequestInterface $request + * @param array $options + * + * @return PromiseInterface + */ + public function __invoke(RequestInterface $request, array $options) { $fn = $this->nextHandler; @@ -57,7 +56,7 @@ class RedirectMiddleware if ($options['allow_redirects'] === true) { $options['allow_redirects'] = self::$defaultSettings; - } elseif (!\is_array($options['allow_redirects'])) { + } elseif (!is_array($options['allow_redirects'])) { throw new \InvalidArgumentException('allow_redirects must be true, false, or array'); } else { // Merge the default settings with the provided settings @@ -75,17 +74,24 @@ class RedirectMiddleware } /** + * @param RequestInterface $request + * @param array $options + * @param ResponseInterface $response + * * @return ResponseInterface|PromiseInterface */ - public function checkRedirect(RequestInterface $request, array $options, ResponseInterface $response) - { - if (\strpos((string) $response->getStatusCode(), '3') !== 0 + public function checkRedirect( + RequestInterface $request, + array $options, + ResponseInterface $response + ) { + if (substr($response->getStatusCode(), 0, 1) != '3' || !$response->hasHeader('Location') ) { return $response; } - $this->guardMax($request, $response, $options); + $this->guardMax($request, $options); $nextRequest = $this->modifyRequest($request, $options, $response); // If authorization is handled by curl, unset it if URI is cross-origin. @@ -97,13 +103,15 @@ class RedirectMiddleware } if (isset($options['allow_redirects']['on_redirect'])) { - ($options['allow_redirects']['on_redirect'])( + call_user_func( + $options['allow_redirects']['on_redirect'], $request, $response, $nextRequest->getUri() ); } + /** @var PromiseInterface|ResponseInterface $promise */ $promise = $this($nextRequest, $options); // Add headers to be able to track history of redirects. @@ -120,19 +128,20 @@ class RedirectMiddleware /** * Enable tracking on promise. + * + * @return PromiseInterface */ - private function withTracking(PromiseInterface $promise, string $uri, int $statusCode): PromiseInterface + private function withTracking(PromiseInterface $promise, $uri, $statusCode) { return $promise->then( - static function (ResponseInterface $response) use ($uri, $statusCode) { + function (ResponseInterface $response) use ($uri, $statusCode) { // Note that we are pushing to the front of the list as this // would be an earlier response than what is currently present // in the history header. $historyHeader = $response->getHeader(self::HISTORY_HEADER); $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER); - \array_unshift($historyHeader, $uri); - \array_unshift($statusHeader, (string) $statusCode); - + array_unshift($historyHeader, $uri); + array_unshift($statusHeader, $statusCode); return $response->withHeader(self::HISTORY_HEADER, $historyHeader) ->withHeader(self::STATUS_HISTORY_HEADER, $statusHeader); } @@ -142,22 +151,38 @@ class RedirectMiddleware /** * Check for too many redirects. * + * @return void + * * @throws TooManyRedirectsException Too many redirects. */ - private function guardMax(RequestInterface $request, ResponseInterface $response, array &$options): void + private function guardMax(RequestInterface $request, array &$options) { - $current = $options['__redirect_count'] - ?? 0; + $current = isset($options['__redirect_count']) + ? $options['__redirect_count'] + : 0; $options['__redirect_count'] = $current + 1; $max = $options['allow_redirects']['max']; if ($options['__redirect_count'] > $max) { - throw new TooManyRedirectsException("Will not follow more than {$max} redirects", $request, $response); + throw new TooManyRedirectsException( + "Will not follow more than {$max} redirects", + $request + ); } } - public function modifyRequest(RequestInterface $request, array $options, ResponseInterface $response): RequestInterface - { + /** + * @param RequestInterface $request + * @param array $options + * @param ResponseInterface $response + * + * @return RequestInterface + */ + public function modifyRequest( + RequestInterface $request, + array $options, + ResponseInterface $response + ) { // Request modifications to apply. $modify = []; $protocols = $options['allow_redirects']['protocols']; @@ -166,24 +191,21 @@ class RedirectMiddleware // not forcing RFC compliance, but rather emulating what all browsers // would do. $statusCode = $response->getStatusCode(); - if ($statusCode == 303 - || ($statusCode <= 302 && !$options['allow_redirects']['strict']) + if ($statusCode == 303 || + ($statusCode <= 302 && !$options['allow_redirects']['strict']) ) { - $safeMethods = ['GET', 'HEAD', 'OPTIONS']; - $requestMethod = $request->getMethod(); - - $modify['method'] = in_array($requestMethod, $safeMethods) ? $requestMethod : 'GET'; + $modify['method'] = 'GET'; $modify['body'] = ''; } $uri = self::redirectUri($request, $response, $protocols); if (isset($options['idn_conversion']) && ($options['idn_conversion'] !== false)) { - $idnOptions = ($options['idn_conversion'] === true) ? \IDNA_DEFAULT : $options['idn_conversion']; + $idnOptions = ($options['idn_conversion'] === true) ? IDNA_DEFAULT : $options['idn_conversion']; $uri = Utils::idnUriConvert($uri, $idnOptions); } $modify['uri'] = $uri; - Psr7\Message::rewindBody($request); + Psr7\rewind_body($request); // Add the Referer header if it is told to do so and only // add the header if we are not redirecting from https to http. @@ -202,25 +224,39 @@ class RedirectMiddleware $modify['remove_headers'][] = 'Cookie'; } - return Psr7\Utils::modifyRequest($request, $modify); + return Psr7\modify_request($request, $modify); } /** * Set the appropriate URL on the request based on the location header. + * + * @param RequestInterface $request + * @param ResponseInterface $response + * @param array $protocols + * + * @return UriInterface */ private static function redirectUri( RequestInterface $request, ResponseInterface $response, array $protocols - ): UriInterface { + ) { $location = Psr7\UriResolver::resolve( $request->getUri(), new Psr7\Uri($response->getHeaderLine('Location')) ); // Ensure that the redirect URI is allowed based on the protocols. - if (!\in_array($location->getScheme(), $protocols)) { - throw new BadResponseException(\sprintf('Redirect URI, %s, does not use one of the allowed redirect protocols: %s', $location, \implode(', ', $protocols)), $request, $response); + if (!in_array($location->getScheme(), $protocols)) { + throw new BadResponseException( + sprintf( + 'Redirect URI, %s, does not use one of the allowed redirect protocols: %s', + $location, + implode(', ', $protocols) + ), + $request, + $response + ); } return $location; diff --git a/Server/vendor/guzzlehttp/guzzle/src/RequestOptions.php b/Server/vendor/guzzlehttp/guzzle/src/RequestOptions.php index 84a3500e..355f658f 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/RequestOptions.php +++ b/Server/vendor/guzzlehttp/guzzle/src/RequestOptions.php @@ -1,11 +1,12 @@ decider = $decider; $this->nextHandler = $nextHandler; - $this->delay = $delay ?: __CLASS__.'::exponentialDelay'; + $this->delay = $delay ?: __CLASS__ . '::exponentialDelay'; } /** * Default exponential backoff delay function. * + * @param int $retries + * * @return int milliseconds. */ - public static function exponentialDelay(int $retries): int + public static function exponentialDelay($retries) { - return (int) 2 ** ($retries - 1) * 1000; + return (int) pow(2, $retries - 1) * 1000; } - public function __invoke(RequestInterface $request, array $options): PromiseInterface + /** + * @param RequestInterface $request + * @param array $options + * + * @return PromiseInterface + */ + public function __invoke(RequestInterface $request, array $options) { if (!isset($options['retries'])) { $options['retries'] = 0; } $fn = $this->nextHandler; - return $fn($request, $options) ->then( $this->onFulfilled($request, $options), @@ -74,45 +76,52 @@ class RetryMiddleware /** * Execute fulfilled closure + * + * @return mixed */ - private function onFulfilled(RequestInterface $request, array $options): callable + private function onFulfilled(RequestInterface $req, array $options) { - return function ($value) use ($request, $options) { - if (!($this->decider)( + return function ($value) use ($req, $options) { + if (!call_user_func( + $this->decider, $options['retries'], - $request, + $req, $value, null )) { return $value; } - - return $this->doRetry($request, $options, $value); + return $this->doRetry($req, $options, $value); }; } /** * Execute rejected closure + * + * @return callable */ - private function onRejected(RequestInterface $req, array $options): callable + private function onRejected(RequestInterface $req, array $options) { return function ($reason) use ($req, $options) { - if (!($this->decider)( + if (!call_user_func( + $this->decider, $options['retries'], $req, null, $reason )) { - return P\Create::rejectionFor($reason); + return \GuzzleHttp\Promise\rejection_for($reason); } - return $this->doRetry($req, $options); }; } - private function doRetry(RequestInterface $request, array $options, ?ResponseInterface $response = null): PromiseInterface + /** + * @return self + */ + private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null) { - $options['delay'] = ($this->delay)(++$options['retries'], $response, $request); + $options['delay'] = call_user_func($this->delay, ++$options['retries'], $response); return $this($request, $options); } diff --git a/Server/vendor/guzzlehttp/guzzle/src/TransferStats.php b/Server/vendor/guzzlehttp/guzzle/src/TransferStats.php index 93fa334c..87fb3c00 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/TransferStats.php +++ b/Server/vendor/guzzlehttp/guzzle/src/TransferStats.php @@ -1,5 +1,4 @@ request = $request; $this->response = $response; @@ -58,23 +38,30 @@ final class TransferStats $this->handlerStats = $handlerStats; } - public function getRequest(): RequestInterface + /** + * @return RequestInterface + */ + public function getRequest() { return $this->request; } /** * Returns the response that was received (if any). + * + * @return ResponseInterface|null */ - public function getResponse(): ?ResponseInterface + public function getResponse() { return $this->response; } /** * Returns true if a response was received. + * + * @return bool */ - public function hasResponse(): bool + public function hasResponse() { return $this->response !== null; } @@ -95,8 +82,10 @@ final class TransferStats /** * Get the effective URI the request was sent to. + * + * @return UriInterface */ - public function getEffectiveUri(): UriInterface + public function getEffectiveUri() { return $this->request->getUri(); } @@ -106,15 +95,17 @@ final class TransferStats * * @return float|null Time in seconds. */ - public function getTransferTime(): ?float + public function getTransferTime() { return $this->transferTime; } /** * Gets an array of all of the handler specific transfer data. + * + * @return array */ - public function getHandlerStats(): array + public function getHandlerStats() { return $this->handlerStats; } @@ -126,8 +117,10 @@ final class TransferStats * * @return mixed|null */ - public function getHandlerStat(string $stat) + public function getHandlerStat($stat) { - return $this->handlerStats[$stat] ?? null; + return isset($this->handlerStats[$stat]) + ? $this->handlerStats[$stat] + : null; } } diff --git a/Server/vendor/guzzlehttp/guzzle/src/UriTemplate.php b/Server/vendor/guzzlehttp/guzzle/src/UriTemplate.php new file mode 100644 index 00000000..96dcfd09 --- /dev/null +++ b/Server/vendor/guzzlehttp/guzzle/src/UriTemplate.php @@ -0,0 +1,237 @@ + ['prefix' => '', 'joiner' => ',', 'query' => false], + '+' => ['prefix' => '', 'joiner' => ',', 'query' => false], + '#' => ['prefix' => '#', 'joiner' => ',', 'query' => false], + '.' => ['prefix' => '.', 'joiner' => '.', 'query' => false], + '/' => ['prefix' => '/', 'joiner' => '/', 'query' => false], + ';' => ['prefix' => ';', 'joiner' => ';', 'query' => true], + '?' => ['prefix' => '?', 'joiner' => '&', 'query' => true], + '&' => ['prefix' => '&', 'joiner' => '&', 'query' => true] + ]; + + /** @var array Delimiters */ + private static $delims = [':', '/', '?', '#', '[', ']', '@', '!', '$', + '&', '\'', '(', ')', '*', '+', ',', ';', '=']; + + /** @var array Percent encoded delimiters */ + private static $delimsPct = ['%3A', '%2F', '%3F', '%23', '%5B', '%5D', + '%40', '%21', '%24', '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C', + '%3B', '%3D']; + + public function expand($template, array $variables) + { + if (false === strpos($template, '{')) { + return $template; + } + + $this->template = $template; + $this->variables = $variables; + + return preg_replace_callback( + '/\{([^\}]+)\}/', + [$this, 'expandMatch'], + $this->template + ); + } + + /** + * Parse an expression into parts + * + * @param string $expression Expression to parse + * + * @return array Returns an associative array of parts + */ + private function parseExpression($expression) + { + $result = []; + + if (isset(self::$operatorHash[$expression[0]])) { + $result['operator'] = $expression[0]; + $expression = substr($expression, 1); + } else { + $result['operator'] = ''; + } + + foreach (explode(',', $expression) as $value) { + $value = trim($value); + $varspec = []; + if ($colonPos = strpos($value, ':')) { + $varspec['value'] = substr($value, 0, $colonPos); + $varspec['modifier'] = ':'; + $varspec['position'] = (int) substr($value, $colonPos + 1); + } elseif (substr($value, -1) === '*') { + $varspec['modifier'] = '*'; + $varspec['value'] = substr($value, 0, -1); + } else { + $varspec['value'] = (string) $value; + $varspec['modifier'] = ''; + } + $result['values'][] = $varspec; + } + + return $result; + } + + /** + * Process an expansion + * + * @param array $matches Matches met in the preg_replace_callback + * + * @return string Returns the replacement string + */ + private function expandMatch(array $matches) + { + static $rfc1738to3986 = ['+' => '%20', '%7e' => '~']; + + $replacements = []; + $parsed = self::parseExpression($matches[1]); + $prefix = self::$operatorHash[$parsed['operator']]['prefix']; + $joiner = self::$operatorHash[$parsed['operator']]['joiner']; + $useQuery = self::$operatorHash[$parsed['operator']]['query']; + + foreach ($parsed['values'] as $value) { + if (!isset($this->variables[$value['value']])) { + continue; + } + + $variable = $this->variables[$value['value']]; + $actuallyUseQuery = $useQuery; + $expanded = ''; + + if (is_array($variable)) { + $isAssoc = $this->isAssoc($variable); + $kvp = []; + foreach ($variable as $key => $var) { + if ($isAssoc) { + $key = rawurlencode($key); + $isNestedArray = is_array($var); + } else { + $isNestedArray = false; + } + + if (!$isNestedArray) { + $var = rawurlencode($var); + if ($parsed['operator'] === '+' || + $parsed['operator'] === '#' + ) { + $var = $this->decodeReserved($var); + } + } + + if ($value['modifier'] === '*') { + if ($isAssoc) { + if ($isNestedArray) { + // Nested arrays must allow for deeply nested + // structures. + $var = strtr( + http_build_query([$key => $var]), + $rfc1738to3986 + ); + } else { + $var = $key . '=' . $var; + } + } elseif ($key > 0 && $actuallyUseQuery) { + $var = $value['value'] . '=' . $var; + } + } + + $kvp[$key] = $var; + } + + if (empty($variable)) { + $actuallyUseQuery = false; + } elseif ($value['modifier'] === '*') { + $expanded = implode($joiner, $kvp); + if ($isAssoc) { + // Don't prepend the value name when using the explode + // modifier with an associative array. + $actuallyUseQuery = false; + } + } else { + if ($isAssoc) { + // When an associative array is encountered and the + // explode modifier is not set, then the result must be + // a comma separated list of keys followed by their + // respective values. + foreach ($kvp as $k => &$v) { + $v = $k . ',' . $v; + } + } + $expanded = implode(',', $kvp); + } + } else { + if ($value['modifier'] === ':') { + $variable = substr($variable, 0, $value['position']); + } + $expanded = rawurlencode($variable); + if ($parsed['operator'] === '+' || $parsed['operator'] === '#') { + $expanded = $this->decodeReserved($expanded); + } + } + + if ($actuallyUseQuery) { + if (!$expanded && $joiner !== '&') { + $expanded = $value['value']; + } else { + $expanded = $value['value'] . '=' . $expanded; + } + } + + $replacements[] = $expanded; + } + + $ret = implode($joiner, $replacements); + if ($ret && $prefix) { + return $prefix . $ret; + } + + return $ret; + } + + /** + * Determines if an array is associative. + * + * This makes the assumption that input arrays are sequences or hashes. + * This assumption is a tradeoff for accuracy in favor of speed, but it + * should work in almost every case where input is supplied for a URI + * template. + * + * @param array $array Array to check + * + * @return bool + */ + private function isAssoc(array $array) + { + return $array && array_keys($array)[0] !== 0; + } + + /** + * Removes percent encoding on reserved characters (used with + and # + * modifiers). + * + * @param string $string String to fix + * + * @return string + */ + private function decodeReserved($string) + { + return str_replace(self::$delimsPct, self::$delims, $string); + } +} diff --git a/Server/vendor/guzzlehttp/guzzle/src/Utils.php b/Server/vendor/guzzlehttp/guzzle/src/Utils.php index df529270..c698acbf 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/Utils.php +++ b/Server/vendor/guzzlehttp/guzzle/src/Utils.php @@ -1,333 +1,41 @@ = 0) { - if (\function_exists('curl_multi_exec') && \function_exists('curl_exec')) { - $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler()); - } elseif (\function_exists('curl_exec')) { - $handler = new CurlHandler(); - } elseif (\function_exists('curl_multi_exec')) { - $handler = new CurlMultiHandler(); - } - } - - if (\ini_get('allow_url_fopen')) { - $handler = $handler - ? Proxy::wrapStreaming($handler, new StreamHandler()) - : new StreamHandler(); - } elseif (!$handler) { - throw new \RuntimeException('GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler.'); - } - - return $handler; - } - - /** - * Get the default User-Agent string to use with Guzzle. - */ - public static function defaultUserAgent(): string - { - return sprintf('GuzzleHttp/%d', ClientInterface::MAJOR_VERSION); - } - - /** - * Returns the default cacert bundle for the current system. - * - * First, the openssl.cafile and curl.cainfo php.ini settings are checked. - * If those settings are not configured, then the common locations for - * bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X - * and Windows are checked. If any of these file locations are found on - * disk, they will be utilized. - * - * Note: the result of this function is cached for subsequent calls. - * - * @throws \RuntimeException if no bundle can be found. - * - * @deprecated Utils::defaultCaBundle will be removed in guzzlehttp/guzzle:8.0. This method is not needed in PHP 5.6+. - */ - public static function defaultCaBundle(): string - { - static $cached = null; - static $cafiles = [ - // Red Hat, CentOS, Fedora (provided by the ca-certificates package) - '/etc/pki/tls/certs/ca-bundle.crt', - // Ubuntu, Debian (provided by the ca-certificates package) - '/etc/ssl/certs/ca-certificates.crt', - // FreeBSD (provided by the ca_root_nss package) - '/usr/local/share/certs/ca-root-nss.crt', - // SLES 12 (provided by the ca-certificates package) - '/var/lib/ca-certificates/ca-bundle.pem', - // OS X provided by homebrew (using the default path) - '/usr/local/etc/openssl/cert.pem', - // Google app engine - '/etc/ca-certificates.crt', - // Windows? - 'C:\\windows\\system32\\curl-ca-bundle.crt', - 'C:\\windows\\curl-ca-bundle.crt', - ]; - - if ($cached) { - return $cached; - } - - if ($ca = \ini_get('openssl.cafile')) { - return $cached = $ca; - } - - if ($ca = \ini_get('curl.cainfo')) { - return $cached = $ca; - } - - foreach ($cafiles as $filename) { - if (\file_exists($filename)) { - return $cached = $filename; - } - } - - throw new \RuntimeException( - <<< EOT -No system CA bundle could be found in any of the the common system locations. -PHP versions earlier than 5.6 are not properly configured to use the system's -CA bundle by default. In order to verify peer certificates, you will need to -supply the path on disk to a certificate bundle to the 'verify' request -option: https://docs.guzzlephp.org/en/latest/request-options.html#verify. If -you do not need a specific certificate bundle, then Mozilla provides a commonly -used CA bundle which can be downloaded here (provided by the maintainer of -cURL): https://curl.haxx.se/ca/cacert.pem. Once you have a CA bundle available -on disk, you can set the 'openssl.cafile' PHP ini setting to point to the path -to the file, allowing you to omit the 'verify' request option. See -https://curl.haxx.se/docs/sslcerts.html for more information. -EOT - ); - } - - /** - * Creates an associative array of lowercase header names to the actual - * header casing. - */ - public static function normalizeHeaderKeys(array $headers): array - { - $result = []; - foreach (\array_keys($headers) as $key) { - $result[\strtolower($key)] = $key; - } - - return $result; - } - - /** - * Returns true if the provided host matches any of the no proxy areas. - * - * This method will strip a port from the host if it is present. Each pattern - * can be matched with an exact match (e.g., "foo.com" == "foo.com") or a - * partial match: (e.g., "foo.com" == "baz.foo.com" and ".foo.com" == - * "baz.foo.com", but ".foo.com" != "foo.com"). - * - * Areas are matched in the following cases: - * 1. "*" (without quotes) always matches any hosts. - * 2. An exact match. - * 3. The area starts with "." and the area is the last part of the host. e.g. - * '.mit.edu' will match any host that ends with '.mit.edu'. - * - * @param string $host Host to check against the patterns. - * @param string[] $noProxyArray An array of host patterns. - * - * @throws InvalidArgumentException - */ - public static function isHostInNoProxy(string $host, array $noProxyArray): bool - { - if (\strlen($host) === 0) { - throw new InvalidArgumentException('Empty host provided'); - } - - // Strip port if present. - [$host] = \explode(':', $host, 2); - - foreach ($noProxyArray as $area) { - // Always match on wildcards. - if ($area === '*') { - return true; - } - - if (empty($area)) { - // Don't match on empty values. - continue; - } - - if ($area === $host) { - // Exact matches. - return true; - } - // Special match if the area when prefixed with ".". Remove any - // existing leading "." and add a new leading ".". - $area = '.'.\ltrim($area, '.'); - if (\substr($host, -\strlen($area)) === $area) { - return true; - } - } - - return false; - } - - /** - * Wrapper for json_decode that throws when an error occurs. - * - * @param string $json JSON data to parse - * @param bool $assoc When true, returned objects will be converted - * into associative arrays. - * @param int $depth User specified recursion depth. - * @param int $options Bitmask of JSON decode options. - * - * @return object|array|string|int|float|bool|null - * - * @throws InvalidArgumentException if the JSON cannot be decoded. - * - * @see https://www.php.net/manual/en/function.json-decode.php - */ - public static function jsonDecode(string $json, bool $assoc = false, int $depth = 512, int $options = 0) - { - $data = \json_decode($json, $assoc, $depth, $options); - if (\JSON_ERROR_NONE !== \json_last_error()) { - throw new InvalidArgumentException('json_decode error: '.\json_last_error_msg()); - } - - return $data; - } - - /** - * Wrapper for JSON encoding that throws when an error occurs. - * - * @param mixed $value The value being encoded - * @param int $options JSON encode option bitmask - * @param int $depth Set the maximum depth. Must be greater than zero. - * - * @throws InvalidArgumentException if the JSON cannot be encoded. - * - * @see https://www.php.net/manual/en/function.json-encode.php - */ - public static function jsonEncode($value, int $options = 0, int $depth = 512): string - { - $json = \json_encode($value, $options, $depth); - if (\JSON_ERROR_NONE !== \json_last_error()) { - throw new InvalidArgumentException('json_encode error: '.\json_last_error_msg()); - } - - /** @var string */ - return $json; - } - /** * Wrapper for the hrtime() or microtime() functions * (depending on the PHP version, one of the two is used) * - * @return float UNIX timestamp + * @return float|mixed UNIX timestamp * * @internal */ - public static function currentTime(): float + public static function currentTime() { - return (float) \function_exists('hrtime') ? \hrtime(true) / 1e9 : \microtime(true); + return function_exists('hrtime') ? hrtime(true) / 1e9 : microtime(true); } /** + * @param int $options + * + * @return UriInterface * @throws InvalidArgumentException * * @internal */ - public static function idnUriConvert(UriInterface $uri, int $options = 0): UriInterface + public static function idnUriConvert(UriInterface $uri, $options = 0) { if ($uri->getHost()) { $asciiHost = self::idnToAsci($uri->getHost(), $options, $info); if ($asciiHost === false) { - $errorBitSet = $info['errors'] ?? 0; + $errorBitSet = isset($info['errors']) ? $info['errors'] : 0; - $errorConstants = array_filter(array_keys(get_defined_constants()), static function (string $name): bool { + $errorConstants = array_filter(array_keys(get_defined_constants()), function ($name) { return substr($name, 0, 11) === 'IDNA_ERROR_'; }); @@ -340,14 +48,15 @@ EOT $errorMessage = 'IDN conversion failed'; if ($errors) { - $errorMessage .= ' (errors: '.implode(', ', $errors).')'; + $errorMessage .= ' (errors: ' . implode(', ', $errors) . ')'; } throw new InvalidArgumentException($errorMessage); - } - if ($uri->getHost() !== $asciiHost) { - // Replace URI only if the ASCII version is different - $uri = $uri->withHost($asciiHost); + } else { + if ($uri->getHost() !== $asciiHost) { + // Replace URI only if the ASCII version is different + $uri = $uri->withHost($asciiHost); + } } } @@ -355,30 +64,29 @@ EOT } /** - * @internal - */ - public static function getenv(string $name): ?string - { - if (isset($_SERVER[$name])) { - return (string) $_SERVER[$name]; - } - - if (\PHP_SAPI === 'cli' && ($value = \getenv($name)) !== false && $value !== null) { - return (string) $value; - } - - return null; - } - - /** + * @param string $domain + * @param int $options + * @param array $info + * * @return string|false */ - private static function idnToAsci(string $domain, int $options, ?array &$info = []) + private static function idnToAsci($domain, $options, &$info = []) { - if (\function_exists('idn_to_ascii') && \defined('INTL_IDNA_VARIANT_UTS46')) { - return \idn_to_ascii($domain, $options, \INTL_IDNA_VARIANT_UTS46, $info); + if (\preg_match('%^[ -~]+$%', $domain) === 1) { + return $domain; } - throw new \Error('ext-idn or symfony/polyfill-intl-idn not loaded or too old'); + if (\extension_loaded('intl') && defined('INTL_IDNA_VARIANT_UTS46')) { + return \idn_to_ascii($domain, $options, INTL_IDNA_VARIANT_UTS46, $info); + } + + /* + * The Idn class is marked as @internal. Verify that class and method exists. + */ + if (method_exists(Idn::class, 'idn_to_ascii')) { + return Idn::idn_to_ascii($domain, $options, Idn::INTL_IDNA_VARIANT_UTS46, $info); + } + + throw new \RuntimeException('ext-intl or symfony/polyfill-intl-idn not loaded or too old'); } } diff --git a/Server/vendor/guzzlehttp/guzzle/src/functions.php b/Server/vendor/guzzlehttp/guzzle/src/functions.php index 5edc66ab..c2afd8c7 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/functions.php +++ b/Server/vendor/guzzlehttp/guzzle/src/functions.php @@ -1,34 +1,77 @@ expand($template, $variables); +} + /** * Debug function used to describe the provided value type and class. * - * @param mixed $input Any type of variable to describe the type of. This - * parameter misses a typehint because of that. + * @param mixed $input * * @return string Returns a string containing the type of the variable and * if a class is provided, the class name. - * - * @deprecated describe_type will be removed in guzzlehttp/guzzle:8.0. Use Utils::describeType instead. */ -function describe_type($input): string +function describe_type($input) { - return Utils::describeType($input); + switch (gettype($input)) { + case 'object': + return 'object(' . get_class($input) . ')'; + case 'array': + return 'array(' . count($input) . ')'; + default: + ob_start(); + var_dump($input); + // normalize float vs double + return str_replace('double(', 'float(', rtrim(ob_get_clean())); + } } /** * Parses an array of header lines into an associative array of headers. * * @param iterable $lines Header lines array of strings in the following - * format: "Name: Value" - * - * @deprecated headers_from_lines will be removed in guzzlehttp/guzzle:8.0. Use Utils::headersFromLines instead. + * format: "Name: Value" + * @return array */ -function headers_from_lines(iterable $lines): array +function headers_from_lines($lines) { - return Utils::headersFromLines($lines); + $headers = []; + + foreach ($lines as $line) { + $parts = explode(':', $line, 2); + $headers[trim($parts[0])][] = isset($parts[1]) + ? trim($parts[1]) + : null; + } + + return $headers; } /** @@ -37,12 +80,16 @@ function headers_from_lines(iterable $lines): array * @param mixed $value Optional value * * @return resource - * - * @deprecated debug_resource will be removed in guzzlehttp/guzzle:8.0. Use Utils::debugResource instead. */ function debug_resource($value = null) { - return Utils::debugResource($value); + if (is_resource($value)) { + return $value; + } elseif (defined('STDOUT')) { + return STDOUT; + } + + return fopen('php://output', 'w'); } /** @@ -50,25 +97,50 @@ function debug_resource($value = null) * * The returned handler is not wrapped by any default middlewares. * - * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system. - * + * @return callable Returns the best handler for the given system. * @throws \RuntimeException if no viable Handler is available. - * - * @deprecated choose_handler will be removed in guzzlehttp/guzzle:8.0. Use Utils::chooseHandler instead. */ -function choose_handler(): callable +function choose_handler() { - return Utils::chooseHandler(); + $handler = null; + if (function_exists('curl_multi_exec') && function_exists('curl_exec')) { + $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler()); + } elseif (function_exists('curl_exec')) { + $handler = new CurlHandler(); + } elseif (function_exists('curl_multi_exec')) { + $handler = new CurlMultiHandler(); + } + + if (ini_get('allow_url_fopen')) { + $handler = $handler + ? Proxy::wrapStreaming($handler, new StreamHandler()) + : new StreamHandler(); + } elseif (!$handler) { + throw new \RuntimeException('GuzzleHttp requires cURL, the ' + . 'allow_url_fopen ini setting, or a custom HTTP handler.'); + } + + return $handler; } /** - * Get the default User-Agent string to use with Guzzle. + * Get the default User-Agent string to use with Guzzle * - * @deprecated default_user_agent will be removed in guzzlehttp/guzzle:8.0. Use Utils::defaultUserAgent instead. + * @return string */ -function default_user_agent(): string +function default_user_agent() { - return Utils::defaultUserAgent(); + static $defaultAgent = ''; + + if (!$defaultAgent) { + $defaultAgent = 'GuzzleHttp/' . Client::VERSION; + if (extension_loaded('curl') && function_exists('curl_version')) { + $defaultAgent .= ' curl/' . \curl_version()['version']; + } + $defaultAgent .= ' PHP/' . PHP_VERSION; + } + + return $defaultAgent; } /** @@ -82,24 +154,82 @@ function default_user_agent(): string * * Note: the result of this function is cached for subsequent calls. * + * @return string * @throws \RuntimeException if no bundle can be found. - * - * @deprecated default_ca_bundle will be removed in guzzlehttp/guzzle:8.0. This function is not needed in PHP 5.6+. */ -function default_ca_bundle(): string +function default_ca_bundle() { - return Utils::defaultCaBundle(); + static $cached = null; + static $cafiles = [ + // Red Hat, CentOS, Fedora (provided by the ca-certificates package) + '/etc/pki/tls/certs/ca-bundle.crt', + // Ubuntu, Debian (provided by the ca-certificates package) + '/etc/ssl/certs/ca-certificates.crt', + // FreeBSD (provided by the ca_root_nss package) + '/usr/local/share/certs/ca-root-nss.crt', + // SLES 12 (provided by the ca-certificates package) + '/var/lib/ca-certificates/ca-bundle.pem', + // OS X provided by homebrew (using the default path) + '/usr/local/etc/openssl/cert.pem', + // Google app engine + '/etc/ca-certificates.crt', + // Windows? + 'C:\\windows\\system32\\curl-ca-bundle.crt', + 'C:\\windows\\curl-ca-bundle.crt', + ]; + + if ($cached) { + return $cached; + } + + if ($ca = ini_get('openssl.cafile')) { + return $cached = $ca; + } + + if ($ca = ini_get('curl.cainfo')) { + return $cached = $ca; + } + + foreach ($cafiles as $filename) { + if (file_exists($filename)) { + return $cached = $filename; + } + } + + throw new \RuntimeException( + <<< EOT +No system CA bundle could be found in any of the the common system locations. +PHP versions earlier than 5.6 are not properly configured to use the system's +CA bundle by default. In order to verify peer certificates, you will need to +supply the path on disk to a certificate bundle to the 'verify' request +option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not +need a specific certificate bundle, then Mozilla provides a commonly used CA +bundle which can be downloaded here (provided by the maintainer of cURL): +https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt. Once +you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP +ini setting to point to the path to the file, allowing you to omit the 'verify' +request option. See http://curl.haxx.se/docs/sslcerts.html for more +information. +EOT + ); } /** * Creates an associative array of lowercase header names to the actual * header casing. * - * @deprecated normalize_header_keys will be removed in guzzlehttp/guzzle:8.0. Use Utils::normalizeHeaderKeys instead. + * @param array $headers + * + * @return array */ -function normalize_header_keys(array $headers): array +function normalize_header_keys(array $headers) { - return Utils::normalizeHeaderKeys($headers); + $result = []; + foreach (array_keys($headers) as $key) { + $result[strtolower($key)] = $key; + } + + return $result; } /** @@ -116,52 +246,89 @@ function normalize_header_keys(array $headers): array * 3. The area starts with "." and the area is the last part of the host. e.g. * '.mit.edu' will match any host that ends with '.mit.edu'. * - * @param string $host Host to check against the patterns. - * @param string[] $noProxyArray An array of host patterns. + * @param string $host Host to check against the patterns. + * @param array $noProxyArray An array of host patterns. * - * @throws Exception\InvalidArgumentException - * - * @deprecated is_host_in_noproxy will be removed in guzzlehttp/guzzle:8.0. Use Utils::isHostInNoProxy instead. + * @return bool */ -function is_host_in_noproxy(string $host, array $noProxyArray): bool +function is_host_in_noproxy($host, array $noProxyArray) { - return Utils::isHostInNoProxy($host, $noProxyArray); + if (strlen($host) === 0) { + throw new \InvalidArgumentException('Empty host provided'); + } + + // Strip port if present. + if (strpos($host, ':')) { + $host = explode($host, ':', 2)[0]; + } + + foreach ($noProxyArray as $area) { + // Always match on wildcards. + if ($area === '*') { + return true; + } elseif (empty($area)) { + // Don't match on empty values. + continue; + } elseif ($area === $host) { + // Exact matches. + return true; + } else { + // Special match if the area when prefixed with ".". Remove any + // existing leading "." and add a new leading ".". + $area = '.' . ltrim($area, '.'); + if (substr($host, -(strlen($area))) === $area) { + return true; + } + } + } + + return false; } /** * Wrapper for json_decode that throws when an error occurs. * * @param string $json JSON data to parse - * @param bool $assoc When true, returned objects will be converted + * @param bool $assoc When true, returned objects will be converted * into associative arrays. * @param int $depth User specified recursion depth. * @param int $options Bitmask of JSON decode options. * - * @return object|array|string|int|float|bool|null - * + * @return mixed * @throws Exception\InvalidArgumentException if the JSON cannot be decoded. - * - * @see https://www.php.net/manual/en/function.json-decode.php - * @deprecated json_decode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonDecode instead. + * @link http://www.php.net/manual/en/function.json-decode.php */ -function json_decode(string $json, bool $assoc = false, int $depth = 512, int $options = 0) +function json_decode($json, $assoc = false, $depth = 512, $options = 0) { - return Utils::jsonDecode($json, $assoc, $depth, $options); + $data = \json_decode($json, $assoc, $depth, $options); + if (JSON_ERROR_NONE !== json_last_error()) { + throw new Exception\InvalidArgumentException( + 'json_decode error: ' . json_last_error_msg() + ); + } + + return $data; } /** * Wrapper for JSON encoding that throws when an error occurs. * * @param mixed $value The value being encoded - * @param int $options JSON encode option bitmask - * @param int $depth Set the maximum depth. Must be greater than zero. + * @param int $options JSON encode option bitmask + * @param int $depth Set the maximum depth. Must be greater than zero. * + * @return string * @throws Exception\InvalidArgumentException if the JSON cannot be encoded. - * - * @see https://www.php.net/manual/en/function.json-encode.php - * @deprecated json_encode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonEncode instead. + * @link http://www.php.net/manual/en/function.json-encode.php */ -function json_encode($value, int $options = 0, int $depth = 512): string +function json_encode($value, $options = 0, $depth = 512) { - return Utils::jsonEncode($value, $options, $depth); + $json = \json_encode($value, $options, $depth); + if (JSON_ERROR_NONE !== json_last_error()) { + throw new Exception\InvalidArgumentException( + 'json_encode error: ' . json_last_error_msg() + ); + } + + return $json; } diff --git a/Server/vendor/guzzlehttp/guzzle/src/functions_include.php b/Server/vendor/guzzlehttp/guzzle/src/functions_include.php index 394f9534..a93393ac 100644 --- a/Server/vendor/guzzlehttp/guzzle/src/functions_include.php +++ b/Server/vendor/guzzlehttp/guzzle/src/functions_include.php @@ -1,6 +1,6 @@ =5.5,<8.3 | -| 2.x | Latest | >=7.2.5,<8.5 | - - -## Quick Start +# Quick start A *promise* represents the eventual result of an asynchronous operation. The primary way of interacting with a promise is through its `then` method, which registers callbacks to receive either a promise's eventual value or the reason why the promise cannot be fulfilled. -### Callbacks + +## Callbacks Callbacks are registered with the `then` method by providing an optional `$onFulfilled` followed by an optional `$onRejected` function. @@ -74,11 +60,12 @@ $promise->then( ``` *Resolving* a promise means that you either fulfill a promise with a *value* or -reject a promise with a *reason*. Resolving a promise triggers callbacks -registered with the promise's `then` method. These callbacks are triggered +reject a promise with a *reason*. Resolving a promises triggers callbacks +registered with the promises's `then` method. These callbacks are triggered only once and in the order in which they were added. -### Resolving a Promise + +## Resolving a promise Promises are fulfilled using the `resolve($value)` method. Resolving a promise with any value other than a `GuzzleHttp\Promise\RejectedPromise` will trigger @@ -105,7 +92,8 @@ $promise $promise->resolve('reader.'); ``` -### Promise Forwarding + +## Promise forwarding Promises can be chained one after the other. Each then in the chain is a new promise. The return value of a promise is what's forwarded to the next @@ -135,7 +123,7 @@ $promise->resolve('A'); $nextPromise->resolve('B'); ``` -### Promise Rejection +## Promise rejection When a promise is rejected, the `$onRejected` callbacks are invoked with the rejection reason. @@ -152,7 +140,7 @@ $promise->reject('Error!'); // Outputs "Error!" ``` -### Rejection Forwarding +## Rejection forwarding If an exception is thrown in an `$onRejected` callback, subsequent `$onRejected` callbacks are invoked with the thrown exception as the reason. @@ -207,8 +195,7 @@ $promise $promise->reject('Error!'); ``` - -## Synchronous Wait +# Synchronous wait You can synchronously force promises to complete using a promise's `wait` method. When creating a promise, you can provide a wait function that is used @@ -260,7 +247,8 @@ $promise->wait(); > PHP Fatal error: Uncaught exception 'GuzzleHttp\Promise\RejectionException' with message 'The promise was rejected with value: foo' -### Unwrapping a Promise + +## Unwrapping a promise When synchronously waiting on a promise, you are joining the state of the promise into the current state of execution (i.e., return the value of the @@ -287,7 +275,7 @@ wait function will be the value delivered to promise B. **Note**: when you do not unwrap the promise, no value is returned. -## Cancellation +# Cancellation You can cancel a promise that has not yet been fulfilled using the `cancel()` method of a promise. When creating a promise you can provide an optional @@ -295,9 +283,10 @@ cancel function that when invoked cancels the action of computing a resolution of the promise. -## API +# API -### Promise + +## Promise When creating a promise object, you can provide an optional `$waitFn` and `$cancelFn`. `$waitFn` is a function that is invoked with no arguments and is @@ -360,7 +349,7 @@ A promise has the following methods: Rejects the promise with the given `$reason`. -### FulfilledPromise +## FulfilledPromise A fulfilled promise can be created to represent a promise that has been fulfilled. @@ -377,7 +366,7 @@ $promise->then(function ($value) { ``` -### RejectedPromise +## RejectedPromise A rejected promise can be created to represent a promise that has been rejected. @@ -394,7 +383,7 @@ $promise->then(null, function ($reason) { ``` -## Promise Interoperability +# Promise interop This library works with foreign promises that have a `then` method. This means you can use Guzzle promises with [React promises](https://github.com/reactphp/promise) @@ -420,7 +409,7 @@ a foreign promise. You will need to wrap a third-party promise with a Guzzle promise in order to utilize wait and cancel functions with foreign promises. -### Event Loop Integration +## Event Loop Integration In order to keep the stack size constant, Guzzle promises are resolved asynchronously using a task queue. When waiting on promises synchronously, the @@ -445,10 +434,13 @@ $loop = React\EventLoop\Factory::create(); $loop->addPeriodicTimer(0, [$queue, 'run']); ``` +*TODO*: Perhaps adding a `futureTick()` on each tick would be faster? -## Implementation Notes -### Promise Resolution and Chaining is Handled Iteratively +# Implementation notes + + +## Promise resolution and chaining is handled iteratively By shuffling pending handlers from one owner to another, promises are resolved iteratively, allowing for "infinite" then chaining. @@ -484,7 +476,8 @@ all of its pending handlers to the new promise. When the new promise is eventually resolved, all of the pending handlers are delivered the forwarded value. -### A Promise is the Deferred + +## A promise is the deferred. Some promise libraries implement promises using a deferred object to represent a computation and a promise object to represent the delivery of the result of @@ -512,10 +505,7 @@ $promise->resolve('foo'); ## Upgrading from Function API -A static API was first introduced in 1.4.0, in order to mitigate problems with -functions conflicting between global and local copies of the package. The -function API was removed in 2.0.0. A migration table has been provided here for -your convenience: +A static API was first introduced in 1.4.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API will be removed in 2.0.0. A migration table has been provided here for your convenience: | Original Function | Replacement Method | |----------------|----------------| @@ -546,12 +536,10 @@ your convenience: If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/promises/security/policy) for more information. - ## License Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information. - ## For Enterprise Available as part of the Tidelift Subscription diff --git a/Server/vendor/guzzlehttp/promises/composer.json b/Server/vendor/guzzlehttp/promises/composer.json index f64ed771..c959fb32 100644 --- a/Server/vendor/guzzlehttp/promises/composer.json +++ b/Server/vendor/guzzlehttp/promises/composer.json @@ -26,32 +26,32 @@ } ], "require": { - "php": "^7.2.5 || ^8.0" + "php": ">=5.5" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.39 || ^9.6.20" + "symfony/phpunit-bridge": "^4.4 || ^5.1" }, "autoload": { "psr-4": { "GuzzleHttp\\Promise\\": "src/" - } + }, + "files": ["src/functions_include.php"] }, "autoload-dev": { "psr-4": { "GuzzleHttp\\Promise\\Tests\\": "tests/" } }, + "scripts": { + "test": "vendor/bin/simple-phpunit", + "test-ci": "vendor/bin/simple-phpunit --coverage-text" + }, "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false + "branch-alias": { + "dev-master": "1.5-dev" } }, "config": { - "allow-plugins": { - "bamarni/composer-bin-plugin": true - }, "preferred-install": "dist", "sort-packages": true } diff --git a/Server/vendor/guzzlehttp/promises/src/AggregateException.php b/Server/vendor/guzzlehttp/promises/src/AggregateException.php index 40ffdbcf..d2b5712b 100644 --- a/Server/vendor/guzzlehttp/promises/src/AggregateException.php +++ b/Server/vendor/guzzlehttp/promises/src/AggregateException.php @@ -1,7 +1,5 @@ generator = $generatorFn(); - $this->result = new Promise(function (): void { + $this->result = new Promise(function () { while (isset($this->currentPromise)) { $this->currentPromise->wait(); } }); try { $this->nextCoroutine($this->generator->current()); + } catch (\Exception $exception) { + $this->result->reject($exception); } catch (Throwable $throwable) { $this->result->reject($throwable); } @@ -77,51 +78,53 @@ final class Coroutine implements PromiseInterface /** * Create a new coroutine. + * + * @return self */ - public static function of(callable $generatorFn): self + public static function of(callable $generatorFn) { return new self($generatorFn); } public function then( - ?callable $onFulfilled = null, - ?callable $onRejected = null - ): PromiseInterface { + callable $onFulfilled = null, + callable $onRejected = null + ) { return $this->result->then($onFulfilled, $onRejected); } - public function otherwise(callable $onRejected): PromiseInterface + public function otherwise(callable $onRejected) { return $this->result->otherwise($onRejected); } - public function wait(bool $unwrap = true) + public function wait($unwrap = true) { return $this->result->wait($unwrap); } - public function getState(): string + public function getState() { return $this->result->getState(); } - public function resolve($value): void + public function resolve($value) { $this->result->resolve($value); } - public function reject($reason): void + public function reject($reason) { $this->result->reject($reason); } - public function cancel(): void + public function cancel() { $this->currentPromise->cancel(); $this->result->cancel(); } - private function nextCoroutine($yielded): void + private function nextCoroutine($yielded) { $this->currentPromise = Create::promiseFor($yielded) ->then([$this, '_handleSuccess'], [$this, '_handleFailure']); @@ -130,7 +133,7 @@ final class Coroutine implements PromiseInterface /** * @internal */ - public function _handleSuccess($value): void + public function _handleSuccess($value) { unset($this->currentPromise); try { @@ -140,6 +143,8 @@ final class Coroutine implements PromiseInterface } else { $this->result->resolve($value); } + } catch (Exception $exception) { + $this->result->reject($exception); } catch (Throwable $throwable) { $this->result->reject($throwable); } @@ -148,13 +153,15 @@ final class Coroutine implements PromiseInterface /** * @internal */ - public function _handleFailure($reason): void + public function _handleFailure($reason) { unset($this->currentPromise); try { $nextYield = $this->generator->throw(Create::exceptionFor($reason)); // The throw was caught, so keep iterating on the coroutine $this->nextCoroutine($nextYield); + } catch (Exception $exception) { + $this->result->reject($exception); } catch (Throwable $throwable) { $this->result->reject($throwable); } diff --git a/Server/vendor/guzzlehttp/promises/src/Create.php b/Server/vendor/guzzlehttp/promises/src/Create.php index 9d3fc4a1..8d038e9c 100644 --- a/Server/vendor/guzzlehttp/promises/src/Create.php +++ b/Server/vendor/guzzlehttp/promises/src/Create.php @@ -1,7 +1,5 @@ then([$promise, 'resolve'], [$promise, 'reject']); - return $promise; } @@ -35,8 +34,10 @@ final class Create * If the provided reason is a promise, then it is returned as-is. * * @param mixed $reason Promise or reason. + * + * @return PromiseInterface */ - public static function rejectionFor($reason): PromiseInterface + public static function rejectionFor($reason) { if ($reason instanceof PromiseInterface) { return $reason; @@ -49,10 +50,12 @@ final class Create * Create an exception for a rejected promise value. * * @param mixed $reason + * + * @return \Exception|\Throwable */ - public static function exceptionFor($reason): \Throwable + public static function exceptionFor($reason) { - if ($reason instanceof \Throwable) { + if ($reason instanceof \Exception || $reason instanceof \Throwable) { return $reason; } @@ -63,8 +66,10 @@ final class Create * Returns an iterator for the given value. * * @param mixed $value + * + * @return \Iterator */ - public static function iterFor($value): \Iterator + public static function iterFor($value) { if ($value instanceof \Iterator) { return $value; diff --git a/Server/vendor/guzzlehttp/promises/src/Each.php b/Server/vendor/guzzlehttp/promises/src/Each.php index dd72c831..1dda3549 100644 --- a/Server/vendor/guzzlehttp/promises/src/Each.php +++ b/Server/vendor/guzzlehttp/promises/src/Each.php @@ -1,7 +1,5 @@ $onFulfilled, - 'rejected' => $onRejected, + 'rejected' => $onRejected ]))->promise(); } @@ -42,17 +44,21 @@ final class Each * * @param mixed $iterable * @param int|callable $concurrency + * @param callable $onFulfilled + * @param callable $onRejected + * + * @return PromiseInterface */ public static function ofLimit( $iterable, $concurrency, - ?callable $onFulfilled = null, - ?callable $onRejected = null - ): PromiseInterface { + callable $onFulfilled = null, + callable $onRejected = null + ) { return (new EachPromise($iterable, [ - 'fulfilled' => $onFulfilled, - 'rejected' => $onRejected, - 'concurrency' => $concurrency, + 'fulfilled' => $onFulfilled, + 'rejected' => $onRejected, + 'concurrency' => $concurrency ]))->promise(); } @@ -63,17 +69,20 @@ final class Each * * @param mixed $iterable * @param int|callable $concurrency + * @param callable $onFulfilled + * + * @return PromiseInterface */ public static function ofLimitAll( $iterable, $concurrency, - ?callable $onFulfilled = null - ): PromiseInterface { - return self::ofLimit( + callable $onFulfilled = null + ) { + return each_limit( $iterable, $concurrency, $onFulfilled, - function ($reason, $idx, PromiseInterface $aggregate): void { + function ($reason, $idx, PromiseInterface $aggregate) { $aggregate->reject($reason); } ); diff --git a/Server/vendor/guzzlehttp/promises/src/EachPromise.php b/Server/vendor/guzzlehttp/promises/src/EachPromise.php index e1238981..38ecb59b 100644 --- a/Server/vendor/guzzlehttp/promises/src/EachPromise.php +++ b/Server/vendor/guzzlehttp/promises/src/EachPromise.php @@ -1,14 +1,10 @@ aggregate) { return $this->aggregate; @@ -85,19 +81,30 @@ class EachPromise implements PromisorInterface $this->iterable->rewind(); $this->refillPending(); } catch (\Throwable $e) { + /** + * @psalm-suppress NullReference + * @phpstan-ignore-next-line + */ + $this->aggregate->reject($e); + } catch (\Exception $e) { + /** + * @psalm-suppress NullReference + * @phpstan-ignore-next-line + */ $this->aggregate->reject($e); } /** * @psalm-suppress NullableReturnStatement + * @phpstan-ignore-next-line */ return $this->aggregate; } - private function createPromise(): void + private function createPromise() { $this->mutex = false; - $this->aggregate = new Promise(function (): void { + $this->aggregate = new Promise(function () { if ($this->checkIfFinished()) { return; } @@ -114,7 +121,7 @@ class EachPromise implements PromisorInterface }); // Clear the references when the promise is resolved. - $clearFn = function (): void { + $clearFn = function () { $this->iterable = $this->concurrency = $this->pending = null; $this->onFulfilled = $this->onRejected = null; $this->nextPendingIndex = 0; @@ -123,19 +130,17 @@ class EachPromise implements PromisorInterface $this->aggregate->then($clearFn, $clearFn); } - private function refillPending(): void + private function refillPending() { if (!$this->concurrency) { // Add all pending promises. - while ($this->addPending() && $this->advanceIterator()) { - } - + while ($this->addPending() && $this->advanceIterator()); return; } // Add only up to N pending promises. $concurrency = is_callable($this->concurrency) - ? ($this->concurrency)(count($this->pending)) + ? call_user_func($this->concurrency, count($this->pending)) : $this->concurrency; $concurrency = max($concurrency - count($this->pending), 0); // Concurrency may be set to 0 to disallow new promises. @@ -150,11 +155,10 @@ class EachPromise implements PromisorInterface // next value to yield until promise callbacks are called. while (--$concurrency && $this->advanceIterator() - && $this->addPending()) { - } + && $this->addPending()); } - private function addPending(): bool + private function addPending() { if (!$this->iterable || !$this->iterable->valid()) { return false; @@ -168,9 +172,10 @@ class EachPromise implements PromisorInterface $idx = $this->nextPendingIndex++; $this->pending[$idx] = $promise->then( - function ($value) use ($idx, $key): void { + function ($value) use ($idx, $key) { if ($this->onFulfilled) { - ($this->onFulfilled)( + call_user_func( + $this->onFulfilled, $value, $key, $this->aggregate @@ -178,9 +183,10 @@ class EachPromise implements PromisorInterface } $this->step($idx); }, - function ($reason) use ($idx, $key): void { + function ($reason) use ($idx, $key) { if ($this->onRejected) { - ($this->onRejected)( + call_user_func( + $this->onRejected, $reason, $key, $this->aggregate @@ -193,7 +199,7 @@ class EachPromise implements PromisorInterface return true; } - private function advanceIterator(): bool + private function advanceIterator() { // Place a lock on the iterator so that we ensure to not recurse, // preventing fatal generator errors. @@ -206,17 +212,19 @@ class EachPromise implements PromisorInterface try { $this->iterable->next(); $this->mutex = false; - return true; } catch (\Throwable $e) { $this->aggregate->reject($e); $this->mutex = false; - + return false; + } catch (\Exception $e) { + $this->aggregate->reject($e); + $this->mutex = false; return false; } } - private function step(int $idx): void + private function step($idx) { // If the promise was already resolved, then ignore this step. if (Is::settled($this->aggregate)) { @@ -234,12 +242,11 @@ class EachPromise implements PromisorInterface } } - private function checkIfFinished(): bool + private function checkIfFinished() { if (!$this->pending && !$this->iterable->valid()) { // Resolve the promise if there's nothing left to do. $this->aggregate->resolve(null); - return true; } diff --git a/Server/vendor/guzzlehttp/promises/src/FulfilledPromise.php b/Server/vendor/guzzlehttp/promises/src/FulfilledPromise.php index 727ec315..98f72a62 100644 --- a/Server/vendor/guzzlehttp/promises/src/FulfilledPromise.php +++ b/Server/vendor/guzzlehttp/promises/src/FulfilledPromise.php @@ -1,7 +1,5 @@ value; - $queue->add(static function () use ($p, $value, $onFulfilled): void { + $queue->add(static function () use ($p, $value, $onFulfilled) { if (Is::pending($p)) { try { $p->resolve($onFulfilled($value)); } catch (\Throwable $e) { $p->reject($e); + } catch (\Exception $e) { + $p->reject($e); } } }); @@ -55,34 +50,34 @@ class FulfilledPromise implements PromiseInterface return $p; } - public function otherwise(callable $onRejected): PromiseInterface + public function otherwise(callable $onRejected) { return $this->then(null, $onRejected); } - public function wait(bool $unwrap = true) + public function wait($unwrap = true, $defaultDelivery = null) { return $unwrap ? $this->value : null; } - public function getState(): string + public function getState() { return self::FULFILLED; } - public function resolve($value): void + public function resolve($value) { if ($value !== $this->value) { - throw new \LogicException('Cannot resolve a fulfilled promise'); + throw new \LogicException("Cannot resolve a fulfilled promise"); } } - public function reject($reason): void + public function reject($reason) { - throw new \LogicException('Cannot reject a fulfilled promise'); + throw new \LogicException("Cannot reject a fulfilled promise"); } - public function cancel(): void + public function cancel() { // pass } diff --git a/Server/vendor/guzzlehttp/promises/src/Is.php b/Server/vendor/guzzlehttp/promises/src/Is.php index f3f05038..c3ed8d01 100644 --- a/Server/vendor/guzzlehttp/promises/src/Is.php +++ b/Server/vendor/guzzlehttp/promises/src/Is.php @@ -1,39 +1,45 @@ getState() === PromiseInterface::PENDING; } /** * Returns true if a promise is fulfilled or rejected. + * + * @return bool */ - public static function settled(PromiseInterface $promise): bool + public static function settled(PromiseInterface $promise) { return $promise->getState() !== PromiseInterface::PENDING; } /** * Returns true if a promise is fulfilled. + * + * @return bool */ - public static function fulfilled(PromiseInterface $promise): bool + public static function fulfilled(PromiseInterface $promise) { return $promise->getState() === PromiseInterface::FULFILLED; } /** * Returns true if a promise is rejected. + * + * @return bool */ - public static function rejected(PromiseInterface $promise): bool + public static function rejected(PromiseInterface $promise) { return $promise->getState() === PromiseInterface::REJECTED; } diff --git a/Server/vendor/guzzlehttp/promises/src/Promise.php b/Server/vendor/guzzlehttp/promises/src/Promise.php index c0c5be2c..75939057 100644 --- a/Server/vendor/guzzlehttp/promises/src/Promise.php +++ b/Server/vendor/guzzlehttp/promises/src/Promise.php @@ -1,15 +1,11 @@ waitFn = $waitFn; $this->cancelFn = $cancelFn; } public function then( - ?callable $onFulfilled = null, - ?callable $onRejected = null - ): PromiseInterface { + callable $onFulfilled = null, + callable $onRejected = null + ) { if ($this->state === self::PENDING) { $p = new Promise(null, [$this, 'cancel']); $this->handlers[] = [$p, $onFulfilled, $onRejected]; $p->waitList = $this->waitList; $p->waitList[] = $this; - return $p; } // Return a fulfilled promise and immediately invoke any callbacks. if ($this->state === self::FULFILLED) { $promise = Create::promiseFor($this->result); - return $onFulfilled ? $promise->then($onFulfilled) : $promise; } // It's either cancelled or rejected, so return a rejected promise // and immediately invoke any callbacks. $rejection = Create::rejectionFor($this->result); - return $onRejected ? $rejection->then(null, $onRejected) : $rejection; } - public function otherwise(callable $onRejected): PromiseInterface + public function otherwise(callable $onRejected) { return $this->then(null, $onRejected); } - public function wait(bool $unwrap = true) + public function wait($unwrap = true) { $this->waitIfPending(); @@ -80,12 +73,12 @@ class Promise implements PromiseInterface } } - public function getState(): string + public function getState() { return $this->state; } - public function cancel(): void + public function cancel() { if ($this->state !== self::PENDING) { return; @@ -100,6 +93,8 @@ class Promise implements PromiseInterface $fn(); } catch (\Throwable $e) { $this->reject($e); + } catch (\Exception $e) { + $this->reject($e); } } @@ -110,17 +105,17 @@ class Promise implements PromiseInterface } } - public function resolve($value): void + public function resolve($value) { $this->settle(self::FULFILLED, $value); } - public function reject($reason): void + public function reject($reason) { $this->settle(self::REJECTED, $reason); } - private function settle(string $state, $value): void + private function settle($state, $value) { if ($this->state !== self::PENDING) { // Ignore calls with the same resolution. @@ -153,7 +148,7 @@ class Promise implements PromiseInterface if (!is_object($value) || !method_exists($value, 'then')) { $id = $state === self::FULFILLED ? 1 : 2; // It's a success, so resolve the handlers in the queue. - Utils::queue()->add(static function () use ($id, $value, $handlers): void { + Utils::queue()->add(static function () use ($id, $value, $handlers) { foreach ($handlers as $handler) { self::callHandler($id, $value, $handler); } @@ -164,12 +159,12 @@ class Promise implements PromiseInterface } else { // Resolve the handlers when the forwarded promise is resolved. $value->then( - static function ($value) use ($handlers): void { + static function ($value) use ($handlers) { foreach ($handlers as $handler) { self::callHandler(1, $value, $handler); } }, - static function ($reason) use ($handlers): void { + static function ($reason) use ($handlers) { foreach ($handlers as $handler) { self::callHandler(2, $reason, $handler); } @@ -185,7 +180,7 @@ class Promise implements PromiseInterface * @param mixed $value Value to pass to the callback. * @param array $handler Array of handler data (promise and callbacks). */ - private static function callHandler(int $index, $value, array $handler): void + private static function callHandler($index, $value, array $handler) { /** @var PromiseInterface $promise */ $promise = $handler[0]; @@ -216,10 +211,12 @@ class Promise implements PromiseInterface } } catch (\Throwable $reason) { $promise->reject($reason); + } catch (\Exception $reason) { + $promise->reject($reason); } } - private function waitIfPending(): void + private function waitIfPending() { if ($this->state !== self::PENDING) { return; @@ -230,9 +227,9 @@ class Promise implements PromiseInterface } else { // If there's no wait function, then reject the promise. $this->reject('Cannot wait on a promise that has ' - .'no internal wait function. You must provide a wait ' - .'function when constructing the promise to be able to ' - .'wait on a promise.'); + . 'no internal wait function. You must provide a wait ' + . 'function when constructing the promise to be able to ' + . 'wait on a promise.'); } Utils::queue()->run(); @@ -243,13 +240,13 @@ class Promise implements PromiseInterface } } - private function invokeWaitFn(): void + private function invokeWaitFn() { try { $wfn = $this->waitFn; $this->waitFn = null; $wfn(true); - } catch (\Throwable $reason) { + } catch (\Exception $reason) { if ($this->state === self::PENDING) { // The promise has not been resolved yet, so reject the promise // with the exception. @@ -262,7 +259,7 @@ class Promise implements PromiseInterface } } - private function invokeWaitList(): void + private function invokeWaitList() { $waitList = $this->waitList; $this->waitList = null; diff --git a/Server/vendor/guzzlehttp/promises/src/PromiseInterface.php b/Server/vendor/guzzlehttp/promises/src/PromiseInterface.php index c11721e4..e5983314 100644 --- a/Server/vendor/guzzlehttp/promises/src/PromiseInterface.php +++ b/Server/vendor/guzzlehttp/promises/src/PromiseInterface.php @@ -1,7 +1,5 @@ reason; $p = new Promise([$queue, 'run']); - $queue->add(static function () use ($p, $reason, $onRejected): void { + $queue->add(static function () use ($p, $reason, $onRejected) { if (Is::pending($p)) { try { // Return a resolved promise if onRejected does not throw. @@ -50,6 +43,9 @@ class RejectedPromise implements PromiseInterface } catch (\Throwable $e) { // onRejected threw, so return a rejected promise. $p->reject($e); + } catch (\Exception $e) { + // onRejected threw, so return a rejected promise. + $p->reject($e); } } }); @@ -57,12 +53,12 @@ class RejectedPromise implements PromiseInterface return $p; } - public function otherwise(callable $onRejected): PromiseInterface + public function otherwise(callable $onRejected) { return $this->then(null, $onRejected); } - public function wait(bool $unwrap = true) + public function wait($unwrap = true, $defaultDelivery = null) { if ($unwrap) { throw Create::exceptionFor($this->reason); @@ -71,24 +67,24 @@ class RejectedPromise implements PromiseInterface return null; } - public function getState(): string + public function getState() { return self::REJECTED; } - public function resolve($value): void + public function resolve($value) { - throw new \LogicException('Cannot resolve a rejected promise'); + throw new \LogicException("Cannot resolve a rejected promise"); } - public function reject($reason): void + public function reject($reason) { if ($reason !== $this->reason) { - throw new \LogicException('Cannot reject a rejected promise'); + throw new \LogicException("Cannot reject a rejected promise"); } } - public function cancel(): void + public function cancel() { // pass } diff --git a/Server/vendor/guzzlehttp/promises/src/RejectionException.php b/Server/vendor/guzzlehttp/promises/src/RejectionException.php index 47dca862..e2f13770 100644 --- a/Server/vendor/guzzlehttp/promises/src/RejectionException.php +++ b/Server/vendor/guzzlehttp/promises/src/RejectionException.php @@ -1,7 +1,5 @@ reason = $reason; $message = 'The promise was rejected'; if ($description) { - $message .= ' with reason: '.$description; + $message .= ' with reason: ' . $description; } elseif (is_string($reason) || (is_object($reason) && method_exists($reason, '__toString')) ) { - $message .= ' with reason: '.$this->reason; + $message .= ' with reason: ' . $this->reason; } elseif ($reason instanceof \JsonSerializable) { - $message .= ' with reason: '.json_encode($this->reason, JSON_PRETTY_PRINT); + $message .= ' with reason: ' + . json_encode($this->reason, JSON_PRETTY_PRINT); } parent::__construct($message); diff --git a/Server/vendor/guzzlehttp/promises/src/TaskQueue.php b/Server/vendor/guzzlehttp/promises/src/TaskQueue.php index 503e0b2d..f0fba2c5 100644 --- a/Server/vendor/guzzlehttp/promises/src/TaskQueue.php +++ b/Server/vendor/guzzlehttp/promises/src/TaskQueue.php @@ -1,7 +1,5 @@ run(); - * - * @final */ class TaskQueue implements TaskQueueInterface { private $enableShutdown = true; private $queue = []; - public function __construct(bool $withShutdown = true) + public function __construct($withShutdown = true) { if ($withShutdown) { - register_shutdown_function(function (): void { + register_shutdown_function(function () { if ($this->enableShutdown) { // Only run the tasks if an E_ERROR didn't occur. $err = error_get_last(); @@ -35,17 +31,17 @@ class TaskQueue implements TaskQueueInterface } } - public function isEmpty(): bool + public function isEmpty() { return !$this->queue; } - public function add(callable $task): void + public function add(callable $task) { $this->queue[] = $task; } - public function run(): void + public function run() { while ($task = array_shift($this->queue)) { /** @var callable $task */ @@ -64,7 +60,7 @@ class TaskQueue implements TaskQueueInterface * * Note: This shutdown will occur before any destructors are triggered. */ - public function disableShutdown(): void + public function disableShutdown() { $this->enableShutdown = false; } diff --git a/Server/vendor/guzzlehttp/promises/src/TaskQueueInterface.php b/Server/vendor/guzzlehttp/promises/src/TaskQueueInterface.php index 34c561a4..723d4d54 100644 --- a/Server/vendor/guzzlehttp/promises/src/TaskQueueInterface.php +++ b/Server/vendor/guzzlehttp/promises/src/TaskQueueInterface.php @@ -1,24 +1,24 @@ * - * @param TaskQueueInterface|null $assign Optionally specify a new queue instance. + * @param TaskQueueInterface $assign Optionally specify a new queue instance. + * + * @return TaskQueueInterface */ - public static function queue(?TaskQueueInterface $assign = null): TaskQueueInterface + public static function queue(TaskQueueInterface $assign = null) { static $queue; @@ -39,18 +39,22 @@ final class Utils * returns a promise that is fulfilled or rejected with the result. * * @param callable $task Task function to run. + * + * @return PromiseInterface */ - public static function task(callable $task): PromiseInterface + public static function task(callable $task) { $queue = self::queue(); $promise = new Promise([$queue, 'run']); - $queue->add(function () use ($task, $promise): void { + $queue->add(function () use ($task, $promise) { try { if (Is::pending($promise)) { $promise->resolve($task()); } } catch (\Throwable $e) { $promise->reject($e); + } catch (\Exception $e) { + $promise->reject($e); } }); @@ -68,18 +72,22 @@ final class Utils * key mapping to the rejection reason of the promise. * * @param PromiseInterface $promise Promise or value. + * + * @return array */ - public static function inspect(PromiseInterface $promise): array + public static function inspect(PromiseInterface $promise) { try { return [ 'state' => PromiseInterface::FULFILLED, - 'value' => $promise->wait(), + 'value' => $promise->wait() ]; } catch (RejectionException $e) { return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()]; } catch (\Throwable $e) { return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; + } catch (\Exception $e) { + return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; } } @@ -92,12 +100,14 @@ final class Utils * @see inspect for the inspection state array format. * * @param PromiseInterface[] $promises Traversable of promises to wait upon. + * + * @return array */ - public static function inspectAll($promises): array + public static function inspectAll($promises) { $results = []; foreach ($promises as $key => $promise) { - $results[$key] = self::inspect($promise); + $results[$key] = inspect($promise); } return $results; @@ -112,9 +122,12 @@ final class Utils * * @param iterable $promises Iterable of PromiseInterface objects to wait on. * - * @throws \Throwable on error + * @return array + * + * @throws \Exception on error + * @throws \Throwable on error in PHP >=7 */ - public static function unwrap($promises): array + public static function unwrap($promises) { $results = []; foreach ($promises as $key => $promise) { @@ -134,21 +147,22 @@ final class Utils * * @param mixed $promises Promises or values. * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution. + * + * @return PromiseInterface */ - public static function all($promises, bool $recursive = false): PromiseInterface + public static function all($promises, $recursive = false) { $results = []; $promise = Each::of( $promises, - function ($value, $idx) use (&$results): void { + function ($value, $idx) use (&$results) { $results[$idx] = $value; }, - function ($reason, $idx, Promise $aggregate): void { + function ($reason, $idx, Promise $aggregate) { $aggregate->reject($reason); } )->then(function () use (&$results) { ksort($results); - return $results; }); @@ -159,7 +173,6 @@ final class Utils return self::all($promises, $recursive); } } - return $results; }); } @@ -180,15 +193,17 @@ final class Utils * * @param int $count Total number of promises. * @param mixed $promises Promises or values. + * + * @return PromiseInterface */ - public static function some(int $count, $promises): PromiseInterface + public static function some($count, $promises) { $results = []; $rejections = []; return Each::of( $promises, - function ($value, $idx, PromiseInterface $p) use (&$results, $count): void { + function ($value, $idx, PromiseInterface $p) use (&$results, $count) { if (Is::settled($p)) { return; } @@ -197,7 +212,7 @@ final class Utils $p->resolve(null); } }, - function ($reason) use (&$rejections): void { + function ($reason) use (&$rejections) { $rejections[] = $reason; } )->then( @@ -209,7 +224,6 @@ final class Utils ); } ksort($results); - return array_values($results); } ); @@ -220,8 +234,10 @@ final class Utils * fulfillment value is not an array of 1 but the value directly. * * @param mixed $promises Promises or values. + * + * @return PromiseInterface */ - public static function any($promises): PromiseInterface + public static function any($promises) { return self::some(1, $promises)->then(function ($values) { return $values[0]; @@ -237,22 +253,23 @@ final class Utils * @see inspect for the inspection state array format. * * @param mixed $promises Promises or values. + * + * @return PromiseInterface */ - public static function settle($promises): PromiseInterface + public static function settle($promises) { $results = []; return Each::of( $promises, - function ($value, $idx) use (&$results): void { + function ($value, $idx) use (&$results) { $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value]; }, - function ($reason, $idx) use (&$results): void { + function ($reason, $idx) use (&$results) { $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason]; } )->then(function () use (&$results) { ksort($results); - return $results; }); } diff --git a/Server/vendor/guzzlehttp/promises/src/functions.php b/Server/vendor/guzzlehttp/promises/src/functions.php new file mode 100644 index 00000000..c03d39d0 --- /dev/null +++ b/Server/vendor/guzzlehttp/promises/src/functions.php @@ -0,0 +1,363 @@ + + * while ($eventLoop->isRunning()) { + * GuzzleHttp\Promise\queue()->run(); + * } + * + * + * @param TaskQueueInterface $assign Optionally specify a new queue instance. + * + * @return TaskQueueInterface + * + * @deprecated queue will be removed in guzzlehttp/promises:2.0. Use Utils::queue instead. + */ +function queue(TaskQueueInterface $assign = null) +{ + return Utils::queue($assign); +} + +/** + * Adds a function to run in the task queue when it is next `run()` and returns + * a promise that is fulfilled or rejected with the result. + * + * @param callable $task Task function to run. + * + * @return PromiseInterface + * + * @deprecated task will be removed in guzzlehttp/promises:2.0. Use Utils::task instead. + */ +function task(callable $task) +{ + return Utils::task($task); +} + +/** + * Creates a promise for a value if the value is not a promise. + * + * @param mixed $value Promise or value. + * + * @return PromiseInterface + * + * @deprecated promise_for will be removed in guzzlehttp/promises:2.0. Use Create::promiseFor instead. + */ +function promise_for($value) +{ + return Create::promiseFor($value); +} + +/** + * Creates a rejected promise for a reason if the reason is not a promise. If + * the provided reason is a promise, then it is returned as-is. + * + * @param mixed $reason Promise or reason. + * + * @return PromiseInterface + * + * @deprecated rejection_for will be removed in guzzlehttp/promises:2.0. Use Create::rejectionFor instead. + */ +function rejection_for($reason) +{ + return Create::rejectionFor($reason); +} + +/** + * Create an exception for a rejected promise value. + * + * @param mixed $reason + * + * @return \Exception|\Throwable + * + * @deprecated exception_for will be removed in guzzlehttp/promises:2.0. Use Create::exceptionFor instead. + */ +function exception_for($reason) +{ + return Create::exceptionFor($reason); +} + +/** + * Returns an iterator for the given value. + * + * @param mixed $value + * + * @return \Iterator + * + * @deprecated iter_for will be removed in guzzlehttp/promises:2.0. Use Create::iterFor instead. + */ +function iter_for($value) +{ + return Create::iterFor($value); +} + +/** + * Synchronously waits on a promise to resolve and returns an inspection state + * array. + * + * Returns a state associative array containing a "state" key mapping to a + * valid promise state. If the state of the promise is "fulfilled", the array + * will contain a "value" key mapping to the fulfilled value of the promise. If + * the promise is rejected, the array will contain a "reason" key mapping to + * the rejection reason of the promise. + * + * @param PromiseInterface $promise Promise or value. + * + * @return array + * + * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspect instead. + */ +function inspect(PromiseInterface $promise) +{ + return Utils::inspect($promise); +} + +/** + * Waits on all of the provided promises, but does not unwrap rejected promises + * as thrown exception. + * + * Returns an array of inspection state arrays. + * + * @see inspect for the inspection state array format. + * + * @param PromiseInterface[] $promises Traversable of promises to wait upon. + * + * @return array + * + * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspectAll instead. + */ +function inspect_all($promises) +{ + return Utils::inspectAll($promises); +} + +/** + * Waits on all of the provided promises and returns the fulfilled values. + * + * Returns an array that contains the value of each promise (in the same order + * the promises were provided). An exception is thrown if any of the promises + * are rejected. + * + * @param iterable $promises Iterable of PromiseInterface objects to wait on. + * + * @return array + * + * @throws \Exception on error + * @throws \Throwable on error in PHP >=7 + * + * @deprecated unwrap will be removed in guzzlehttp/promises:2.0. Use Utils::unwrap instead. + */ +function unwrap($promises) +{ + return Utils::unwrap($promises); +} + +/** + * Given an array of promises, return a promise that is fulfilled when all the + * items in the array are fulfilled. + * + * The promise's fulfillment value is an array with fulfillment values at + * respective positions to the original array. If any promise in the array + * rejects, the returned promise is rejected with the rejection reason. + * + * @param mixed $promises Promises or values. + * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution. + * + * @return PromiseInterface + * + * @deprecated all will be removed in guzzlehttp/promises:2.0. Use Utils::all instead. + */ +function all($promises, $recursive = false) +{ + return Utils::all($promises, $recursive); +} + +/** + * Initiate a competitive race between multiple promises or values (values will + * become immediately fulfilled promises). + * + * When count amount of promises have been fulfilled, the returned promise is + * fulfilled with an array that contains the fulfillment values of the winners + * in order of resolution. + * + * This promise is rejected with a {@see AggregateException} if the number of + * fulfilled promises is less than the desired $count. + * + * @param int $count Total number of promises. + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + * + * @deprecated some will be removed in guzzlehttp/promises:2.0. Use Utils::some instead. + */ +function some($count, $promises) +{ + return Utils::some($count, $promises); +} + +/** + * Like some(), with 1 as count. However, if the promise fulfills, the + * fulfillment value is not an array of 1 but the value directly. + * + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + * + * @deprecated any will be removed in guzzlehttp/promises:2.0. Use Utils::any instead. + */ +function any($promises) +{ + return Utils::any($promises); +} + +/** + * Returns a promise that is fulfilled when all of the provided promises have + * been fulfilled or rejected. + * + * The returned promise is fulfilled with an array of inspection state arrays. + * + * @see inspect for the inspection state array format. + * + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + * + * @deprecated settle will be removed in guzzlehttp/promises:2.0. Use Utils::settle instead. + */ +function settle($promises) +{ + return Utils::settle($promises); +} + +/** + * Given an iterator that yields promises or values, returns a promise that is + * fulfilled with a null value when the iterator has been consumed or the + * aggregate promise has been fulfilled or rejected. + * + * $onFulfilled is a function that accepts the fulfilled value, iterator index, + * and the aggregate promise. The callback can invoke any necessary side + * effects and choose to resolve or reject the aggregate if needed. + * + * $onRejected is a function that accepts the rejection reason, iterator index, + * and the aggregate promise. The callback can invoke any necessary side + * effects and choose to resolve or reject the aggregate if needed. + * + * @param mixed $iterable Iterator or array to iterate over. + * @param callable $onFulfilled + * @param callable $onRejected + * + * @return PromiseInterface + * + * @deprecated each will be removed in guzzlehttp/promises:2.0. Use Each::of instead. + */ +function each( + $iterable, + callable $onFulfilled = null, + callable $onRejected = null +) { + return Each::of($iterable, $onFulfilled, $onRejected); +} + +/** + * Like each, but only allows a certain number of outstanding promises at any + * given time. + * + * $concurrency may be an integer or a function that accepts the number of + * pending promises and returns a numeric concurrency limit value to allow for + * dynamic a concurrency size. + * + * @param mixed $iterable + * @param int|callable $concurrency + * @param callable $onFulfilled + * @param callable $onRejected + * + * @return PromiseInterface + * + * @deprecated each_limit will be removed in guzzlehttp/promises:2.0. Use Each::ofLimit instead. + */ +function each_limit( + $iterable, + $concurrency, + callable $onFulfilled = null, + callable $onRejected = null +) { + return Each::ofLimit($iterable, $concurrency, $onFulfilled, $onRejected); +} + +/** + * Like each_limit, but ensures that no promise in the given $iterable argument + * is rejected. If any promise is rejected, then the aggregate promise is + * rejected with the encountered rejection. + * + * @param mixed $iterable + * @param int|callable $concurrency + * @param callable $onFulfilled + * + * @return PromiseInterface + * + * @deprecated each_limit_all will be removed in guzzlehttp/promises:2.0. Use Each::ofLimitAll instead. + */ +function each_limit_all( + $iterable, + $concurrency, + callable $onFulfilled = null +) { + return Each::ofLimitAll($iterable, $concurrency, $onFulfilled); +} + +/** + * Returns true if a promise is fulfilled. + * + * @return bool + * + * @deprecated is_fulfilled will be removed in guzzlehttp/promises:2.0. Use Is::fulfilled instead. + */ +function is_fulfilled(PromiseInterface $promise) +{ + return Is::fulfilled($promise); +} + +/** + * Returns true if a promise is rejected. + * + * @return bool + * + * @deprecated is_rejected will be removed in guzzlehttp/promises:2.0. Use Is::rejected instead. + */ +function is_rejected(PromiseInterface $promise) +{ + return Is::rejected($promise); +} + +/** + * Returns true if a promise is fulfilled or rejected. + * + * @return bool + * + * @deprecated is_settled will be removed in guzzlehttp/promises:2.0. Use Is::settled instead. + */ +function is_settled(PromiseInterface $promise) +{ + return Is::settled($promise); +} + +/** + * Create a new coroutine. + * + * @see Coroutine + * + * @return PromiseInterface + * + * @deprecated coroutine will be removed in guzzlehttp/promises:2.0. Use Coroutine::of instead. + */ +function coroutine(callable $generatorFn) +{ + return Coroutine::of($generatorFn); +} diff --git a/Server/vendor/guzzlehttp/promises/src/functions_include.php b/Server/vendor/guzzlehttp/promises/src/functions_include.php new file mode 100644 index 00000000..34cd1710 --- /dev/null +++ b/Server/vendor/guzzlehttp/promises/src/functions_include.php @@ -0,0 +1,6 @@ + + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed after 2 weeks if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false diff --git a/Server/vendor/guzzlehttp/psr7/.github/workflows/ci.yml b/Server/vendor/guzzlehttp/psr7/.github/workflows/ci.yml new file mode 100644 index 00000000..eda7dceb --- /dev/null +++ b/Server/vendor/guzzlehttp/psr7/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI + +on: + pull_request: + +jobs: + build: + name: Build + runs-on: ubuntu-latest + strategy: + max-parallel: 10 + matrix: + php: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1'] + + steps: + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: 'none' + extensions: mbstring + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Mimic PHP 8.0 + run: composer config platform.php 8.0.999 + if: matrix.php > 8 + + - name: Install dependencies + run: composer update --no-interaction --no-progress + + - name: Run tests + run: make test diff --git a/Server/vendor/guzzlehttp/psr7/.github/workflows/integration.yml b/Server/vendor/guzzlehttp/psr7/.github/workflows/integration.yml new file mode 100644 index 00000000..3c31f9ef --- /dev/null +++ b/Server/vendor/guzzlehttp/psr7/.github/workflows/integration.yml @@ -0,0 +1,37 @@ +name: Integration + +on: + pull_request: + +jobs: + + build: + name: Test + runs-on: ubuntu-latest + strategy: + max-parallel: 10 + matrix: + php: ['7.2', '7.3', '7.4', '8.0'] + + steps: + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Download dependencies + uses: ramsey/composer-install@v1 + with: + composer-options: --no-interaction --optimize-autoloader + + - name: Start server + run: php -S 127.0.0.1:10002 tests/Integration/server.php & + + - name: Run tests + env: + TEST_SERVER: 127.0.0.1:10002 + run: ./vendor/bin/phpunit --testsuite Integration diff --git a/Server/vendor/guzzlehttp/psr7/.github/workflows/static.yml b/Server/vendor/guzzlehttp/psr7/.github/workflows/static.yml new file mode 100644 index 00000000..ab4d68ba --- /dev/null +++ b/Server/vendor/guzzlehttp/psr7/.github/workflows/static.yml @@ -0,0 +1,29 @@ +name: Static analysis + +on: + pull_request: + +jobs: + php-cs-fixer: + name: PHP-CS-Fixer + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + coverage: none + extensions: mbstring + + - name: Download dependencies + run: composer update --no-interaction --no-progress + + - name: Download PHP CS Fixer + run: composer require "friendsofphp/php-cs-fixer:2.18.4" + + - name: Execute PHP CS Fixer + run: vendor/bin/php-cs-fixer fix --diff-format udiff --dry-run diff --git a/Server/vendor/guzzlehttp/psr7/.php_cs.dist b/Server/vendor/guzzlehttp/psr7/.php_cs.dist new file mode 100644 index 00000000..e4f0bd53 --- /dev/null +++ b/Server/vendor/guzzlehttp/psr7/.php_cs.dist @@ -0,0 +1,56 @@ +setRiskyAllowed(true) + ->setRules([ + '@PSR2' => true, + 'array_syntax' => ['syntax' => 'short'], + 'concat_space' => ['spacing' => 'one'], + 'declare_strict_types' => false, + 'final_static_access' => true, + 'fully_qualified_strict_types' => true, + 'header_comment' => false, + 'is_null' => ['use_yoda_style' => true], + 'list_syntax' => ['syntax' => 'long'], + 'lowercase_cast' => true, + 'magic_method_casing' => true, + 'modernize_types_casting' => true, + 'multiline_comment_opening_closing' => true, + 'no_alias_functions' => true, + 'no_alternative_syntax' => true, + 'no_blank_lines_after_phpdoc' => true, + 'no_empty_comment' => true, + 'no_empty_phpdoc' => true, + 'no_empty_statement' => true, + 'no_extra_blank_lines' => true, + 'no_leading_import_slash' => true, + 'no_trailing_comma_in_singleline_array' => true, + 'no_unset_cast' => true, + 'no_unused_imports' => true, + 'no_whitespace_in_blank_line' => true, + 'ordered_imports' => true, + 'php_unit_ordered_covers' => true, + 'php_unit_test_annotation' => ['style' => 'prefix'], + 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'], + 'phpdoc_align' => ['align' => 'vertical'], + 'phpdoc_no_useless_inheritdoc' => true, + 'phpdoc_scalar' => true, + 'phpdoc_separation' => true, + 'phpdoc_single_line_var_spacing' => true, + 'phpdoc_trim' => true, + 'phpdoc_trim_consecutive_blank_line_separation' => true, + 'phpdoc_types' => true, + 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], + 'phpdoc_var_without_name' => true, + 'single_trait_insert_per_statement' => true, + 'standardize_not_equals' => true, + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->in(__DIR__.'/src') + ->in(__DIR__.'/tests') + ->name('*.php') + ) +; + +return $config; diff --git a/Server/vendor/guzzlehttp/psr7/CHANGELOG.md b/Server/vendor/guzzlehttp/psr7/CHANGELOG.md index 75aabfb9..b4fdf3c6 100644 --- a/Server/vendor/guzzlehttp/psr7/CHANGELOG.md +++ b/Server/vendor/guzzlehttp/psr7/CHANGELOG.md @@ -1,191 +1,44 @@ # Change Log + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## 2.7.0 - 2024-07-18 + +## Unreleased + +## 1.9.0 - 2022-06-20 ### Added -- Add `Utils::redactUserInfo()` method -- Add ability to encode bools as ints in `Query::build` - -## 2.6.3 - 2024-07-18 - -### Fixed - -- Make `StreamWrapper::stream_stat()` return `false` if inner stream's size is `null` - -### Changed - -- PHP 8.4 support - -## 2.6.2 - 2023-12-03 - -### Fixed - -- Fixed another issue with the fact that PHP transforms numeric strings in array keys to ints - -### Changed - -- Updated links in docs to their canonical versions -- Replaced `call_user_func*` with native calls - -## 2.6.1 - 2023-08-27 - -### Fixed - -- Properly handle the fact that PHP transforms numeric strings in array keys to ints - -## 2.6.0 - 2023-08-03 - -### Changed - -- Updated the mime type map to add some new entries, fix a couple of invalid entries, and remove an invalid entry -- Fallback to `application/octet-stream` if we are unable to guess the content type for a multipart file upload - -## 2.5.1 - 2023-08-03 - -### Fixed - -- Corrected mime type for `.acc` files to `audio/aac` - -### Changed - -- PHP 8.3 support - -## 2.5.0 - 2023-04-17 - -### Changed - -- Adjusted `psr/http-message` version constraint to `^1.1 || ^2.0` - -## 2.4.5 - 2023-04-17 - -### Fixed - -- Prevent possible warnings on unset variables in `ServerRequest::normalizeNestedFileSpec` -- Fixed `Message::bodySummary` when `preg_match` fails -- Fixed header validation issue - -## 2.4.4 - 2023-03-09 - -### Changed - -- Removed the need for `AllowDynamicProperties` in `LazyOpenStream` - -## 2.4.3 - 2022-10-26 - -### Changed - -- Replaced `sha1(uniqid())` by `bin2hex(random_bytes(20))` - -## 2.4.2 - 2022-10-25 - -### Fixed - -- Fixed erroneous behaviour when combining host and relative path - -## 2.4.1 - 2022-08-28 - -### Fixed - -- Rewind body before reading in `Message::bodySummary` - -## 2.4.0 - 2022-06-20 - -### Added - -- Added provisional PHP 8.2 support - Added `UriComparator::isCrossOrigin` method -## 2.3.0 - 2022-06-09 - -### Fixed - -- Added `Header::splitList` method -- Added `Utils::tryGetContents` method -- Improved `Stream::getContents` method -- Updated mimetype mappings - -## 2.2.2 - 2022-06-08 - -### Fixed - -- Fix `Message::parseRequestUri` for numeric headers -- Re-wrap exceptions thrown in `fread` into runtime exceptions -- Throw an exception when multipart options is misformatted - -## 2.2.1 - 2022-03-20 +## 1.8.5 - 2022-03-20 ### Fixed - Correct header value validation -## 2.2.0 - 2022-03-20 - -### Added - -- A more compressive list of mime types -- Add JsonSerializable to Uri -- Missing return types - -### Fixed - -- Bug MultipartStream no `uri` metadata -- Bug MultipartStream with filename for `data://` streams -- Fixed new line handling in MultipartStream -- Reduced RAM usage when copying streams -- Updated parsing in `Header::normalize()` - -## 2.1.1 - 2022-03-20 +## 1.8.4 - 2022-03-20 ### Fixed - Validate header values properly -## 2.1.0 - 2021-10-06 - -### Changed - -- Attempting to create a `Uri` object from a malformed URI will no longer throw a generic - `InvalidArgumentException`, but rather a `MalformedUriException`, which inherits from the former - for backwards compatibility. Callers relying on the exception being thrown to detect invalid - URIs should catch the new exception. +## 1.8.3 - 2021-10-05 ### Fixed - Return `null` in caching stream size if remote size is `null` -## 2.0.0 - 2021-06-30 - -Identical to the RC release. - -## 2.0.0@RC-1 - 2021-04-29 +## 1.8.2 - 2021-04-26 ### Fixed - Handle possibly unset `url` in `stream_get_meta_data` -## 2.0.0@beta-1 - 2021-03-21 - -### Added - -- PSR-17 factories -- Made classes final -- PHP7 type hints - -### Changed - -- When building a query string, booleans are represented as 1 and 0. - -### Removed - -- PHP < 7.2 support -- All functions in the `GuzzleHttp\Psr7` namespace - ## 1.8.1 - 2021-03-21 ### Fixed diff --git a/Server/vendor/guzzlehttp/psr7/README.md b/Server/vendor/guzzlehttp/psr7/README.md index 2e9bb0b9..64776cb6 100644 --- a/Server/vendor/guzzlehttp/psr7/README.md +++ b/Server/vendor/guzzlehttp/psr7/README.md @@ -4,30 +4,16 @@ This repository contains a full [PSR-7](https://www.php-fig.org/psr/psr-7/) message implementation, several stream decorators, and some helpful functionality like query string parsing. -![CI](https://github.com/guzzle/psr7/workflows/CI/badge.svg) -![Static analysis](https://github.com/guzzle/psr7/workflows/Static%20analysis/badge.svg) + +[![Build Status](https://travis-ci.org/guzzle/psr7.svg?branch=master)](https://travis-ci.org/guzzle/psr7) -## Features +# Stream implementation This package comes with a number of stream implementations and stream decorators. -## Installation - -```shell -composer require guzzlehttp/psr7 -``` - -## Version Guidance - -| Version | Status | PHP Version | -|---------|---------------------|--------------| -| 1.x | EOL (2024-06-30) | >=5.4,<8.2 | -| 2.x | Latest | >=7.2.5,<8.5 | - - ## AppendStream `GuzzleHttp\Psr7\AppendStream` @@ -144,9 +130,10 @@ $fnStream->rewind(); `GuzzleHttp\Psr7\InflateStream` -Uses PHP's zlib.inflate filter to inflate zlib (HTTP deflate, RFC1950) or gzipped (RFC1952) content. +Uses PHP's zlib.inflate filter to inflate deflate or gzipped content. -This stream decorator converts the provided stream to a PHP stream resource, +This stream decorator skips the first 10 bytes of the given stream to remove +the gzip header, converts the provided stream to a PHP stream resource, then appends the zlib.inflate filter. The stream is then converted back to a Guzzle stream resource to be used as a Guzzle stream. @@ -259,8 +246,6 @@ class EofCallbackStream implements StreamInterface private $callback; - private $stream; - public function __construct(StreamInterface $stream, callable $cb) { $this->stream = $stream; @@ -273,7 +258,7 @@ class EofCallbackStream implements StreamInterface // Invoke the callback when EOF is hit. if ($this->eof()) { - ($this->callback)(); + call_user_func($this->callback); } return $result; @@ -396,28 +381,10 @@ of the header. When a parameter does not contain a value, but just contains a key, this function will inject a key with a '' string value. -## `GuzzleHttp\Psr7\Header::splitList` - -`public static function splitList(string|string[] $header): string[]` - -Splits a HTTP header defined to contain a comma-separated list into -each individual value: - -``` -$knownEtags = Header::splitList($request->getHeader('if-none-match')); -``` - -Example headers include `accept`, `cache-control` and `if-none-match`. - - -## `GuzzleHttp\Psr7\Header::normalize` (deprecated) +## `GuzzleHttp\Psr7\Header::normalize` `public static function normalize(string|array $header): array` -`Header::normalize()` is deprecated in favor of [`Header::splitList()`](README.md#guzzlehttppsr7headersplitlist) -which performs the same operation with a cleaned up API and improved -documentation. - Converts an array of header values that may contain comma separated headers into an array of headers with no comma separated values. @@ -436,7 +403,7 @@ will be parsed into `['foo[a]' => '1', 'foo[b]' => '2'])`. ## `GuzzleHttp\Psr7\Query::build` -`public static function build(array $params, int|false $encoding = PHP_QUERY_RFC3986, bool $treatBoolsAsInts = true): string` +`public static function build(array $params, int|false $encoding = PHP_QUERY_RFC3986): string` Build a query string from an array of key value pairs. @@ -498,18 +465,11 @@ a message. ## `GuzzleHttp\Psr7\Utils::readLine` -`public static function readLine(StreamInterface $stream, ?int $maxLength = null): string` +`public static function readLine(StreamInterface $stream, int $maxLength = null): string` Read a line from the stream up to the maximum allowed buffer length. -## `GuzzleHttp\Psr7\Utils::redactUserInfo` - -`public static function redactUserInfo(UriInterface $uri): UriInterface` - -Redact the password in the user info part of a URI. - - ## `GuzzleHttp\Psr7\Utils::streamFor` `public static function streamFor(resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource = '', array $options = []): StreamInterface` @@ -568,17 +528,6 @@ When fopen fails, PHP normally raises a warning. This function adds an error handler that checks for errors and throws an exception instead. -## `GuzzleHttp\Psr7\Utils::tryGetContents` - -`public static function tryGetContents(resource $stream): string` - -Safely gets the contents of a given stream. - -When stream_get_contents fails, PHP normally raises a warning. This -function adds an error handler that checks for errors and throws an -exception instead. - - ## `GuzzleHttp\Psr7\Utils::uriFor` `public static function uriFor(string|UriInterface $uri): UriInterface` @@ -606,7 +555,7 @@ Maps a file extensions to a mimetype. ## Upgrading from Function API -The static API was first introduced in 1.7.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API was removed in 2.0.0. A migration table has been provided here for your convenience: +The static API was first introduced in 1.7.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API will be removed in 2.0.0. A migration table has been provided here for your convenience: | Original Function | Replacement Method | |----------------|----------------| @@ -644,7 +593,7 @@ this library also provides additional functionality when working with URIs as st An instance of `Psr\Http\Message\UriInterface` can either be an absolute URI or a relative reference. An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI, the base URI. Relative references can be divided into several forms according to -[RFC 3986 Section 4.2](https://datatracker.ietf.org/doc/html/rfc3986#section-4.2): +[RFC 3986 Section 4.2](https://tools.ietf.org/html/rfc3986#section-4.2): - network-path references, e.g. `//example.com/path` - absolute-path references, e.g. `/path` @@ -681,7 +630,7 @@ termed a relative-path reference. ### `GuzzleHttp\Psr7\Uri::isSameDocumentReference` -`public static function isSameDocumentReference(UriInterface $uri, ?UriInterface $base = null): bool` +`public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool` Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its fragment component, identical to the base URI. When no base URI is given, only an empty URI reference @@ -703,8 +652,8 @@ or the standard port. This method can be used independently of the implementatio `public static function composeComponents($scheme, $authority, $path, $query, $fragment): string` Composes a URI reference string from its various components according to -[RFC 3986 Section 5.3](https://datatracker.ietf.org/doc/html/rfc3986#section-5.3). Usually this method does not need -to be called manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`. +[RFC 3986 Section 5.3](https://tools.ietf.org/html/rfc3986#section-5.3). Usually this method does not need to be called +manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`. ### `GuzzleHttp\Psr7\Uri::fromParts` @@ -748,8 +697,8 @@ Determines if a modified URL should be considered cross-origin with respect to a ## Reference Resolution `GuzzleHttp\Psr7\UriResolver` provides methods to resolve a URI reference in the context of a base URI according -to [RFC 3986 Section 5](https://datatracker.ietf.org/doc/html/rfc3986#section-5). This is for example also what web -browsers do when resolving a link in a website based on the current request URI. +to [RFC 3986 Section 5](https://tools.ietf.org/html/rfc3986#section-5). This is for example also what web browsers +do when resolving a link in a website based on the current request URI. ### `GuzzleHttp\Psr7\UriResolver::resolve` @@ -762,7 +711,7 @@ Converts the relative URI into a new URI that is resolved against the base URI. `public static function removeDotSegments(string $path): string` Removes dot segments from a path and returns the new path according to -[RFC 3986 Section 5.2.4](https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4). +[RFC 3986 Section 5.2.4](https://tools.ietf.org/html/rfc3986#section-5.2.4). ### `GuzzleHttp\Psr7\UriResolver::relativize` @@ -788,7 +737,7 @@ echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // pr ## Normalization and Comparison `GuzzleHttp\Psr7\UriNormalizer` provides methods to normalize and compare URIs according to -[RFC 3986 Section 6](https://datatracker.ietf.org/doc/html/rfc3986#section-6). +[RFC 3986 Section 6](https://tools.ietf.org/html/rfc3986#section-6). ### `GuzzleHttp\Psr7\UriNormalizer::normalize` @@ -870,6 +819,14 @@ This of course assumes they will be resolved against the same base URI. If this equivalence or difference of relative references does not mean anything. +## Version Guidance + +| Version | Status | PHP Version | +|---------|----------------|------------------| +| 1.x | Security fixes | >=5.4,<8.1 | +| 2.x | Latest | ^7.2.5 \|\| ^8.0 | + + ## Security If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/psr7/security/policy) for more information. diff --git a/Server/vendor/guzzlehttp/psr7/composer.json b/Server/vendor/guzzlehttp/psr7/composer.json index 28d15f57..0e36920d 100644 --- a/Server/vendor/guzzlehttp/psr7/composer.json +++ b/Server/vendor/guzzlehttp/psr7/composer.json @@ -1,16 +1,7 @@ { "name": "guzzlehttp/psr7", "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "request", - "response", - "message", - "stream", - "http", - "uri", - "url", - "psr-7" - ], + "keywords": ["request", "response", "message", "stream", "http", "uri", "url", "psr-7"], "license": "MIT", "authors": [ { @@ -42,27 +33,19 @@ "name": "Tobias Schultze", "email": "webmaster@tubo-world.de", "homepage": "https://github.com/Tobion" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" } ], "require": { - "php": "^7.2.5 || ^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", - "ralouphie/getallheaders": "^3.0" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "http-interop/http-factory-tests": "0.9.0", - "phpunit/phpunit": "^8.5.39 || ^9.6.20" + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10", + "ext-zlib": "*" + }, + "provide": { + "psr/http-message-implementation": "1.0" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -70,7 +53,8 @@ "autoload": { "psr-4": { "GuzzleHttp\\Psr7\\": "src/" - } + }, + "files": ["src/functions_include.php"] }, "autoload-dev": { "psr-4": { @@ -78,16 +62,15 @@ } }, "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false + "branch-alias": { + "dev-master": "1.9-dev" } }, "config": { + "preferred-install": "dist", + "sort-packages": true, "allow-plugins": { "bamarni/composer-bin-plugin": true - }, - "preferred-install": "dist", - "sort-packages": true + } } } diff --git a/Server/vendor/guzzlehttp/psr7/src/AppendStream.php b/Server/vendor/guzzlehttp/psr7/src/AppendStream.php index ee8f3788..fa9153d7 100644 --- a/Server/vendor/guzzlehttp/psr7/src/AppendStream.php +++ b/Server/vendor/guzzlehttp/psr7/src/AppendStream.php @@ -1,7 +1,5 @@ rewind(); - return $this->getContents(); - } catch (\Throwable $e) { - if (\PHP_VERSION_ID >= 70400) { - throw $e; - } - trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); - + } catch (\Exception $e) { return ''; } } @@ -59,7 +48,7 @@ final class AppendStream implements StreamInterface * * @throws \InvalidArgumentException if the stream is not readable */ - public function addStream(StreamInterface $stream): void + public function addStream(StreamInterface $stream) { if (!$stream->isReadable()) { throw new \InvalidArgumentException('Each stream must be readable'); @@ -73,15 +62,17 @@ final class AppendStream implements StreamInterface $this->streams[] = $stream; } - public function getContents(): string + public function getContents() { return Utils::copyToString($this); } /** * Closes each attached stream. + * + * {@inheritdoc} */ - public function close(): void + public function close() { $this->pos = $this->current = 0; $this->seekable = true; @@ -97,6 +88,8 @@ final class AppendStream implements StreamInterface * Detaches each attached stream. * * Returns null as it's not clear which underlying stream resource to return. + * + * {@inheritdoc} */ public function detach() { @@ -112,7 +105,7 @@ final class AppendStream implements StreamInterface return null; } - public function tell(): int + public function tell() { return $this->pos; } @@ -122,8 +115,10 @@ final class AppendStream implements StreamInterface * * If any of the streams do not return a valid number, then the size of the * append stream cannot be determined and null is returned. + * + * {@inheritdoc} */ - public function getSize(): ?int + public function getSize() { $size = 0; @@ -138,22 +133,24 @@ final class AppendStream implements StreamInterface return $size; } - public function eof(): bool + public function eof() { - return !$this->streams - || ($this->current >= count($this->streams) - 1 - && $this->streams[$this->current]->eof()); + return !$this->streams || + ($this->current >= count($this->streams) - 1 && + $this->streams[$this->current]->eof()); } - public function rewind(): void + public function rewind() { $this->seek(0); } /** * Attempts to seek to the given position. Only supports SEEK_SET. + * + * {@inheritdoc} */ - public function seek($offset, $whence = SEEK_SET): void + public function seek($offset, $whence = SEEK_SET) { if (!$this->seekable) { throw new \RuntimeException('This AppendStream is not seekable'); @@ -169,7 +166,7 @@ final class AppendStream implements StreamInterface $stream->rewind(); } catch (\Exception $e) { throw new \RuntimeException('Unable to seek stream ' - .$i.' of the AppendStream', 0, $e); + . $i . ' of the AppendStream', 0, $e); } } @@ -184,8 +181,10 @@ final class AppendStream implements StreamInterface /** * Reads from all of the appended streams until the length is met or EOF. + * + * {@inheritdoc} */ - public function read($length): string + public function read($length) { $buffer = ''; $total = count($this->streams) - 1; @@ -193,18 +192,20 @@ final class AppendStream implements StreamInterface $progressToNext = false; while ($remaining > 0) { + // Progress to the next stream if needed. if ($progressToNext || $this->streams[$this->current]->eof()) { $progressToNext = false; if ($this->current === $total) { break; } - ++$this->current; + $this->current++; } $result = $this->streams[$this->current]->read($remaining); - if ($result === '') { + // Using a loose comparison here to match on '', false, and null + if ($result == null) { $progressToNext = true; continue; } @@ -218,29 +219,26 @@ final class AppendStream implements StreamInterface return $buffer; } - public function isReadable(): bool + public function isReadable() { return true; } - public function isWritable(): bool + public function isWritable() { return false; } - public function isSeekable(): bool + public function isSeekable() { return $this->seekable; } - public function write($string): int + public function write($string) { throw new \RuntimeException('Cannot write to an AppendStream'); } - /** - * @return mixed - */ public function getMetadata($key = null) { return $key ? null : []; diff --git a/Server/vendor/guzzlehttp/psr7/src/BufferStream.php b/Server/vendor/guzzlehttp/psr7/src/BufferStream.php index 2b0eb77b..783859c1 100644 --- a/Server/vendor/guzzlehttp/psr7/src/BufferStream.php +++ b/Server/vendor/guzzlehttp/psr7/src/BufferStream.php @@ -1,7 +1,5 @@ hwm = $hwm; } - public function __toString(): string + public function __toString() { return $this->getContents(); } - public function getContents(): string + public function getContents() { $buffer = $this->buffer; $this->buffer = ''; @@ -47,7 +44,7 @@ final class BufferStream implements StreamInterface return $buffer; } - public function close(): void + public function close() { $this->buffer = ''; } @@ -59,42 +56,42 @@ final class BufferStream implements StreamInterface return null; } - public function getSize(): ?int + public function getSize() { return strlen($this->buffer); } - public function isReadable(): bool + public function isReadable() { return true; } - public function isWritable(): bool + public function isWritable() { return true; } - public function isSeekable(): bool + public function isSeekable() { return false; } - public function rewind(): void + public function rewind() { $this->seek(0); } - public function seek($offset, $whence = SEEK_SET): void + public function seek($offset, $whence = SEEK_SET) { throw new \RuntimeException('Cannot seek a BufferStream'); } - public function eof(): bool + public function eof() { return strlen($this->buffer) === 0; } - public function tell(): int + public function tell() { throw new \RuntimeException('Cannot determine the position of a BufferStream'); } @@ -102,7 +99,7 @@ final class BufferStream implements StreamInterface /** * Reads data from the buffer. */ - public function read($length): string + public function read($length) { $currentLength = strlen($this->buffer); @@ -122,23 +119,21 @@ final class BufferStream implements StreamInterface /** * Writes data to the buffer. */ - public function write($string): int + public function write($string) { $this->buffer .= $string; + // TODO: What should happen here? if (strlen($this->buffer) >= $this->hwm) { - return 0; + return false; } return strlen($string); } - /** - * @return mixed - */ public function getMetadata($key = null) { - if ($key === 'hwm') { + if ($key == 'hwm') { return $this->hwm; } diff --git a/Server/vendor/guzzlehttp/psr7/src/CachingStream.php b/Server/vendor/guzzlehttp/psr7/src/CachingStream.php index 7e4554d5..febade9f 100644 --- a/Server/vendor/guzzlehttp/psr7/src/CachingStream.php +++ b/Server/vendor/guzzlehttp/psr7/src/CachingStream.php @@ -1,7 +1,5 @@ remoteStream = $stream; $this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+')); } - public function getSize(): ?int + public function getSize() { $remoteSize = $this->remoteStream->getSize(); @@ -50,18 +45,18 @@ final class CachingStream implements StreamInterface return max($this->stream->getSize(), $remoteSize); } - public function rewind(): void + public function rewind() { $this->seek(0); } - public function seek($offset, $whence = SEEK_SET): void + public function seek($offset, $whence = SEEK_SET) { - if ($whence === SEEK_SET) { + if ($whence == SEEK_SET) { $byte = $offset; - } elseif ($whence === SEEK_CUR) { + } elseif ($whence == SEEK_CUR) { $byte = $offset + $this->tell(); - } elseif ($whence === SEEK_END) { + } elseif ($whence == SEEK_END) { $size = $this->remoteStream->getSize(); if ($size === null) { $size = $this->cacheEntireStream(); @@ -86,7 +81,7 @@ final class CachingStream implements StreamInterface } } - public function read($length): string + public function read($length) { // Perform a regular read on any previously read data from the buffer $data = $this->stream->read($length); @@ -115,7 +110,7 @@ final class CachingStream implements StreamInterface return $data; } - public function write($string): int + public function write($string) { // When appending to the end of the currently read stream, you'll want // to skip bytes from being read from the remote stream to emulate @@ -129,7 +124,7 @@ final class CachingStream implements StreamInterface return $this->stream->write($string); } - public function eof(): bool + public function eof() { return $this->stream->eof() && $this->remoteStream->eof(); } @@ -137,13 +132,12 @@ final class CachingStream implements StreamInterface /** * Close both the remote stream and buffer stream */ - public function close(): void + public function close() { - $this->remoteStream->close(); - $this->stream->close(); + $this->remoteStream->close() && $this->stream->close(); } - private function cacheEntireStream(): int + private function cacheEntireStream() { $target = new FnStream(['write' => 'strlen']); Utils::copyToStream($this, $target); diff --git a/Server/vendor/guzzlehttp/psr7/src/DroppingStream.php b/Server/vendor/guzzlehttp/psr7/src/DroppingStream.php index 6e3d209d..9f7420c4 100644 --- a/Server/vendor/guzzlehttp/psr7/src/DroppingStream.php +++ b/Server/vendor/guzzlehttp/psr7/src/DroppingStream.php @@ -1,7 +1,5 @@ stream = $stream; $this->maxLength = $maxLength; } - public function write($string): int + public function write($string) { $diff = $this->maxLength - $this->stream->getSize(); diff --git a/Server/vendor/guzzlehttp/psr7/src/Exception/MalformedUriException.php b/Server/vendor/guzzlehttp/psr7/src/Exception/MalformedUriException.php deleted file mode 100644 index 3a084779..00000000 --- a/Server/vendor/guzzlehttp/psr7/src/Exception/MalformedUriException.php +++ /dev/null @@ -1,14 +0,0 @@ - */ + /** @var array */ private $methods; + /** @var array Methods that must be implemented in the given array */ + private static $slots = ['__toString', 'close', 'detach', 'rewind', + 'getSize', 'tell', 'eof', 'isSeekable', 'seek', 'isWritable', 'write', + 'isReadable', 'read', 'getContents', 'getMetadata']; + /** - * @param array $methods Hash of method name to a callable. + * @param array $methods Hash of method name to a callable. */ public function __construct(array $methods) { @@ -33,7 +31,7 @@ final class FnStream implements StreamInterface // Create the functions on the class foreach ($methods as $name => $fn) { - $this->{'_fn_'.$name} = $fn; + $this->{'_fn_' . $name} = $fn; } } @@ -42,10 +40,10 @@ final class FnStream implements StreamInterface * * @throws \BadMethodCallException */ - public function __get(string $name): void + public function __get($name) { throw new \BadMethodCallException(str_replace('_fn_', '', $name) - .'() is not implemented in the FnStream'); + . '() is not implemented in the FnStream'); } /** @@ -54,7 +52,7 @@ final class FnStream implements StreamInterface public function __destruct() { if (isset($this->_fn_close)) { - ($this->_fn_close)(); + call_user_func($this->_fn_close); } } @@ -63,7 +61,7 @@ final class FnStream implements StreamInterface * * @throws \LogicException */ - public function __wakeup(): void + public function __wakeup() { throw new \LogicException('FnStream should never be unserialized'); } @@ -72,8 +70,8 @@ final class FnStream implements StreamInterface * Adds custom functionality to an underlying stream by intercepting * specific method calls. * - * @param StreamInterface $stream Stream to decorate - * @param array $methods Hash of method name to a closure + * @param StreamInterface $stream Stream to decorate + * @param array $methods Hash of method name to a closure * * @return FnStream */ @@ -81,100 +79,85 @@ final class FnStream implements StreamInterface { // If any of the required methods were not provided, then simply // proxy to the decorated stream. - foreach (array_diff(self::SLOTS, array_keys($methods)) as $diff) { - /** @var callable $callable */ - $callable = [$stream, $diff]; - $methods[$diff] = $callable; + foreach (array_diff(self::$slots, array_keys($methods)) as $diff) { + $methods[$diff] = [$stream, $diff]; } return new self($methods); } - public function __toString(): string + public function __toString() { - try { - /** @var string */ - return ($this->_fn___toString)(); - } catch (\Throwable $e) { - if (\PHP_VERSION_ID >= 70400) { - throw $e; - } - trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); - - return ''; - } + return call_user_func($this->_fn___toString); } - public function close(): void + public function close() { - ($this->_fn_close)(); + return call_user_func($this->_fn_close); } public function detach() { - return ($this->_fn_detach)(); + return call_user_func($this->_fn_detach); } - public function getSize(): ?int + public function getSize() { - return ($this->_fn_getSize)(); + return call_user_func($this->_fn_getSize); } - public function tell(): int + public function tell() { - return ($this->_fn_tell)(); + return call_user_func($this->_fn_tell); } - public function eof(): bool + public function eof() { - return ($this->_fn_eof)(); + return call_user_func($this->_fn_eof); } - public function isSeekable(): bool + public function isSeekable() { - return ($this->_fn_isSeekable)(); + return call_user_func($this->_fn_isSeekable); } - public function rewind(): void + public function rewind() { - ($this->_fn_rewind)(); + call_user_func($this->_fn_rewind); } - public function seek($offset, $whence = SEEK_SET): void + public function seek($offset, $whence = SEEK_SET) { - ($this->_fn_seek)($offset, $whence); + call_user_func($this->_fn_seek, $offset, $whence); } - public function isWritable(): bool + public function isWritable() { - return ($this->_fn_isWritable)(); + return call_user_func($this->_fn_isWritable); } - public function write($string): int + public function write($string) { - return ($this->_fn_write)($string); + return call_user_func($this->_fn_write, $string); } - public function isReadable(): bool + public function isReadable() { - return ($this->_fn_isReadable)(); + return call_user_func($this->_fn_isReadable); } - public function read($length): string + public function read($length) { - return ($this->_fn_read)($length); + return call_user_func($this->_fn_read, $length); } - public function getContents(): string + public function getContents() { - return ($this->_fn_getContents)(); + return call_user_func($this->_fn_getContents); } - /** - * @return mixed - */ public function getMetadata($key = null) { - return ($this->_fn_getMetadata)($key); + return call_user_func($this->_fn_getMetadata, $key); } } diff --git a/Server/vendor/guzzlehttp/psr7/src/Header.php b/Server/vendor/guzzlehttp/psr7/src/Header.php index bbce8b03..865d7421 100644 --- a/Server/vendor/guzzlehttp/psr7/src/Header.php +++ b/Server/vendor/guzzlehttp/psr7/src/Header.php @@ -1,7 +1,5 @@ ]+>|[^=]+/', $kvp, $matches)) { - $m = $matches[0]; - if (isset($m[1])) { - $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed); - } else { - $part[] = trim($m[0], $trimmed); - } + foreach (self::normalize($header) as $val) { + $part = []; + foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) { + if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) { + $m = $matches[0]; + if (isset($m[1])) { + $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed); + } else { + $part[] = trim($m[0], $trimmed); } } - if ($part) { - $params[] = $part; - } + } + if ($part) { + $params[] = $part; } } @@ -47,85 +45,24 @@ final class Header * * @param string|array $header Header to normalize. * - * @deprecated Use self::splitList() instead. + * @return array Returns the normalized header field values. */ - public static function normalize($header): array + public static function normalize($header) { - $result = []; - foreach ((array) $header as $value) { - foreach (self::splitList($value) as $parsed) { - $result[] = $parsed; - } - } - - return $result; - } - - /** - * Splits a HTTP header defined to contain a comma-separated list into - * each individual value. Empty values will be removed. - * - * Example headers include 'accept', 'cache-control' and 'if-none-match'. - * - * This method must not be used to parse headers that are not defined as - * a list, such as 'user-agent' or 'set-cookie'. - * - * @param string|string[] $values Header value as returned by MessageInterface::getHeader() - * - * @return string[] - */ - public static function splitList($values): array - { - if (!\is_array($values)) { - $values = [$values]; + if (!is_array($header)) { + return array_map('trim', explode(',', $header)); } $result = []; - foreach ($values as $value) { - if (!\is_string($value)) { - throw new \TypeError('$header must either be a string or an array containing strings.'); - } - - $v = ''; - $isQuoted = false; - $isEscaped = false; - for ($i = 0, $max = \strlen($value); $i < $max; ++$i) { - if ($isEscaped) { - $v .= $value[$i]; - $isEscaped = false; - + foreach ($header as $value) { + foreach ((array) $value as $v) { + if (strpos($v, ',') === false) { + $result[] = $v; continue; } - - if (!$isQuoted && $value[$i] === ',') { - $v = \trim($v); - if ($v !== '') { - $result[] = $v; - } - - $v = ''; - continue; + foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) { + $result[] = trim($vv); } - - if ($isQuoted && $value[$i] === '\\') { - $isEscaped = true; - $v .= $value[$i]; - - continue; - } - if ($value[$i] === '"') { - $isQuoted = !$isQuoted; - $v .= $value[$i]; - - continue; - } - - $v .= $value[$i]; - } - - $v = \trim($v); - if ($v !== '') { - $result[] = $v; } } diff --git a/Server/vendor/guzzlehttp/psr7/src/HttpFactory.php b/Server/vendor/guzzlehttp/psr7/src/HttpFactory.php deleted file mode 100644 index 3ef15103..00000000 --- a/Server/vendor/guzzlehttp/psr7/src/HttpFactory.php +++ /dev/null @@ -1,94 +0,0 @@ -getSize(); - } - - return new UploadedFile($stream, $size, $error, $clientFilename, $clientMediaType); - } - - public function createStream(string $content = ''): StreamInterface - { - return Utils::streamFor($content); - } - - public function createStreamFromFile(string $file, string $mode = 'r'): StreamInterface - { - try { - $resource = Utils::tryFopen($file, $mode); - } catch (\RuntimeException $e) { - if ('' === $mode || false === \in_array($mode[0], ['r', 'w', 'a', 'x', 'c'], true)) { - throw new \InvalidArgumentException(sprintf('Invalid file opening mode "%s"', $mode), 0, $e); - } - - throw $e; - } - - return Utils::streamFor($resource); - } - - public function createStreamFromResource($resource): StreamInterface - { - return Utils::streamFor($resource); - } - - public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface - { - if (empty($method)) { - if (!empty($serverParams['REQUEST_METHOD'])) { - $method = $serverParams['REQUEST_METHOD']; - } else { - throw new \InvalidArgumentException('Cannot determine HTTP method'); - } - } - - return new ServerRequest($method, $uri, [], null, '1.1', $serverParams); - } - - public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface - { - return new Response($code, [], null, '1.1', $reasonPhrase); - } - - public function createRequest(string $method, $uri): RequestInterface - { - return new Request($method, $uri); - } - - public function createUri(string $uri = ''): UriInterface - { - return new Uri($uri); - } -} diff --git a/Server/vendor/guzzlehttp/psr7/src/InflateStream.php b/Server/vendor/guzzlehttp/psr7/src/InflateStream.php index e674c9ab..0cbd2cce 100644 --- a/Server/vendor/guzzlehttp/psr7/src/InflateStream.php +++ b/Server/vendor/guzzlehttp/psr7/src/InflateStream.php @@ -1,37 +1,56 @@ read(10); + $filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header); + // Skip the header, that is 10 + length of filename + 1 (nil) bytes + $stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength); $resource = StreamWrapper::getResource($stream); - // Specify window=15+32, so zlib will use header detection to both gzip (with header) and zlib data - // See https://www.zlib.net/manual.html#Advanced definition of inflateInit2 - // "Add 32 to windowBits to enable zlib and gzip decoding with automatic header detection" - // Default window size is 15. - stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ, ['window' => 15 + 32]); + stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ); $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource)); } + + /** + * @param StreamInterface $stream + * @param $header + * + * @return int + */ + private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header) + { + $filename_header_length = 0; + + if (substr(bin2hex($header), 6, 2) === '08') { + // we have a filename, read until nil + $filename_header_length = 1; + while ($stream->read(1) !== chr(0)) { + $filename_header_length++; + } + } + + return $filename_header_length; + } } diff --git a/Server/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/Server/vendor/guzzlehttp/psr7/src/LazyOpenStream.php index f6c84904..911e127d 100644 --- a/Server/vendor/guzzlehttp/psr7/src/LazyOpenStream.php +++ b/Server/vendor/guzzlehttp/psr7/src/LazyOpenStream.php @@ -1,7 +1,5 @@ filename = $filename; $this->mode = $mode; - - // unsetting the property forces the first access to go through - // __get(). - unset($this->stream); } /** * Creates the underlying stream lazily when required. + * + * @return StreamInterface */ - protected function createStream(): StreamInterface + protected function createStream() { return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode)); } diff --git a/Server/vendor/guzzlehttp/psr7/src/LimitStream.php b/Server/vendor/guzzlehttp/psr7/src/LimitStream.php index fb223255..1173ec40 100644 --- a/Server/vendor/guzzlehttp/psr7/src/LimitStream.php +++ b/Server/vendor/guzzlehttp/psr7/src/LimitStream.php @@ -1,15 +1,15 @@ stream = $stream; $this->setLimit($limit); $this->setOffset($offset); } - public function eof(): bool + public function eof() { // Always return true if the underlying stream is EOF if ($this->stream->eof()) { @@ -47,7 +44,7 @@ final class LimitStream implements StreamInterface } // No limit and the underlying stream is not at EOF - if ($this->limit === -1) { + if ($this->limit == -1) { return false; } @@ -56,12 +53,13 @@ final class LimitStream implements StreamInterface /** * Returns the size of the limited subset of data + * {@inheritdoc} */ - public function getSize(): ?int + public function getSize() { if (null === ($length = $this->stream->getSize())) { return null; - } elseif ($this->limit === -1) { + } elseif ($this->limit == -1) { return $length - $this->offset; } else { return min($this->limit, $length - $this->offset); @@ -70,8 +68,9 @@ final class LimitStream implements StreamInterface /** * Allow for a bounded seek on the read limited stream + * {@inheritdoc} */ - public function seek($offset, $whence = SEEK_SET): void + public function seek($offset, $whence = SEEK_SET) { if ($whence !== SEEK_SET || $offset < 0) { throw new \RuntimeException(sprintf( @@ -94,8 +93,9 @@ final class LimitStream implements StreamInterface /** * Give a relative tell() + * {@inheritdoc} */ - public function tell(): int + public function tell() { return $this->stream->tell() - $this->offset; } @@ -107,7 +107,7 @@ final class LimitStream implements StreamInterface * * @throws \RuntimeException if the stream cannot be seeked. */ - public function setOffset(int $offset): void + public function setOffset($offset) { $current = $this->stream->tell(); @@ -132,14 +132,14 @@ final class LimitStream implements StreamInterface * @param int $limit Number of bytes to allow to be read from the stream. * Use -1 for no limit. */ - public function setLimit(int $limit): void + public function setLimit($limit) { $this->limit = $limit; } - public function read($length): string + public function read($length) { - if ($this->limit === -1) { + if ($this->limit == -1) { return $this->stream->read($length); } diff --git a/Server/vendor/guzzlehttp/psr7/src/Message.php b/Server/vendor/guzzlehttp/psr7/src/Message.php index 5561a513..516d1cb8 100644 --- a/Server/vendor/guzzlehttp/psr7/src/Message.php +++ b/Server/vendor/guzzlehttp/psr7/src/Message.php @@ -1,7 +1,5 @@ getMethod().' ' - .$message->getRequestTarget()) - .' HTTP/'.$message->getProtocolVersion(); + $msg = trim($message->getMethod() . ' ' + . $message->getRequestTarget()) + . ' HTTP/' . $message->getProtocolVersion(); if (!$message->hasHeader('host')) { - $msg .= "\r\nHost: ".$message->getUri()->getHost(); + $msg .= "\r\nHost: " . $message->getUri()->getHost(); } } elseif ($message instanceof ResponseInterface) { - $msg = 'HTTP/'.$message->getProtocolVersion().' ' - .$message->getStatusCode().' ' - .$message->getReasonPhrase(); + $msg = 'HTTP/' . $message->getProtocolVersion() . ' ' + . $message->getStatusCode() . ' ' + . $message->getReasonPhrase(); } else { throw new \InvalidArgumentException('Unknown message type'); } foreach ($message->getHeaders() as $name => $values) { - if (is_string($name) && strtolower($name) === 'set-cookie') { + if (strtolower($name) === 'set-cookie') { foreach ($values as $value) { - $msg .= "\r\n{$name}: ".$value; + $msg .= "\r\n{$name}: " . $value; } } else { - $msg .= "\r\n{$name}: ".implode(', ', $values); + $msg .= "\r\n{$name}: " . implode(', ', $values); } } - return "{$msg}\r\n\r\n".$message->getBody(); + return "{$msg}\r\n\r\n" . $message->getBody(); } /** @@ -52,8 +52,10 @@ final class Message * * @param MessageInterface $message The message to get the body summary * @param int $truncateAt The maximum allowed size of the summary + * + * @return string|null */ - public static function bodySummary(MessageInterface $message, int $truncateAt = 120): ?string + public static function bodySummary(MessageInterface $message, $truncateAt = 120) { $body = $message->getBody(); @@ -67,7 +69,6 @@ final class Message return null; } - $body->rewind(); $summary = $body->read($truncateAt); $body->rewind(); @@ -77,7 +78,7 @@ final class Message // Matches any printable character, including unicode characters: // letters, marks, numbers, punctuation, spacing, and separators. - if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary) !== 0) { + if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary)) { return null; } @@ -94,7 +95,7 @@ final class Message * * @throws \RuntimeException */ - public static function rewindBody(MessageInterface $message): void + public static function rewindBody(MessageInterface $message) { $body = $message->getBody(); @@ -111,8 +112,10 @@ final class Message * array values, and a "body" key containing the body of the message. * * @param string $message HTTP request or response to parse. + * + * @return array */ - public static function parseMessage(string $message): array + public static function parseMessage($message) { if (!$message) { throw new \InvalidArgumentException('Invalid message'); @@ -126,7 +129,7 @@ final class Message throw new \InvalidArgumentException('Invalid message: Missing header delimiter'); } - [$rawHeaders, $body] = $messageParts; + list($rawHeaders, $body) = $messageParts; $rawHeaders .= "\r\n"; // Put back the delimiter we split previously $headerParts = preg_split("/\r?\n/", $rawHeaders, 2); @@ -134,7 +137,7 @@ final class Message throw new \InvalidArgumentException('Invalid message: Missing status line'); } - [$startLine, $rawHeaders] = $headerParts; + list($startLine, $rawHeaders) = $headerParts; if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') { // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0 @@ -146,7 +149,7 @@ final class Message // If these aren't the same, then one line didn't match and there's an invalid header. if ($count !== substr_count($rawHeaders, "\n")) { - // Folding is deprecated, see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4 + // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4 if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) { throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding'); } @@ -172,13 +175,12 @@ final class Message * * @param string $path Path from the start-line * @param array $headers Array of headers (each value an array). + * + * @return string */ - public static function parseRequestUri(string $path, array $headers): string + public static function parseRequestUri($path, array $headers) { $hostKey = array_filter(array_keys($headers), function ($k) { - // Numeric array keys are converted to int by PHP. - $k = (string) $k; - return strtolower($k) === 'host'; }); @@ -190,15 +192,17 @@ final class Message $host = $headers[reset($hostKey)][0]; $scheme = substr($host, -4) === ':443' ? 'https' : 'http'; - return $scheme.'://'.$host.'/'.ltrim($path, '/'); + return $scheme . '://' . $host . '/' . ltrim($path, '/'); } /** * Parses a request message string into a request object. * * @param string $message Request message string. + * + * @return Request */ - public static function parseRequest(string $message): RequestInterface + public static function parseRequest($message) { $data = self::parseMessage($message); $matches = []; @@ -223,15 +227,17 @@ final class Message * Parses a response message string into a response object. * * @param string $message Response message string. + * + * @return Response */ - public static function parseResponse(string $message): ResponseInterface + public static function parseResponse($message) { $data = self::parseMessage($message); - // According to https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2 - // the space between status-code and reason-phrase is required. But - // browsers accept responses without space and reason as well. + // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space + // between status-code and reason-phrase is required. But browsers accept + // responses without space and reason as well. if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { - throw new \InvalidArgumentException('Invalid response string: '.$data['start-line']); + throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']); } $parts = explode(' ', $data['start-line'], 3); @@ -240,7 +246,7 @@ final class Message $data['headers'], $data['body'], explode('/', $parts[0])[1], - $parts[2] ?? null + isset($parts[2]) ? $parts[2] : null ); } } diff --git a/Server/vendor/guzzlehttp/psr7/src/MessageTrait.php b/Server/vendor/guzzlehttp/psr7/src/MessageTrait.php index 65dbc4ba..0ac8663d 100644 --- a/Server/vendor/guzzlehttp/psr7/src/MessageTrait.php +++ b/Server/vendor/guzzlehttp/psr7/src/MessageTrait.php @@ -1,10 +1,7 @@ array of values */ + /** @var array Map of all registered headers, as original name => array of values */ private $headers = []; - /** @var string[] Map of lowercase header name => original name at registration */ - private $headerNames = []; + /** @var array Map of lowercase header name => original name at registration */ + private $headerNames = []; /** @var string */ private $protocol = '1.1'; @@ -24,12 +21,12 @@ trait MessageTrait /** @var StreamInterface|null */ private $stream; - public function getProtocolVersion(): string + public function getProtocolVersion() { return $this->protocol; } - public function withProtocolVersion($version): MessageInterface + public function withProtocolVersion($version) { if ($this->protocol === $version) { return $this; @@ -37,21 +34,20 @@ trait MessageTrait $new = clone $this; $new->protocol = $version; - return $new; } - public function getHeaders(): array + public function getHeaders() { return $this->headers; } - public function hasHeader($header): bool + public function hasHeader($header) { return isset($this->headerNames[strtolower($header)]); } - public function getHeader($header): array + public function getHeader($header) { $header = strtolower($header); @@ -64,12 +60,12 @@ trait MessageTrait return $this->headers[$header]; } - public function getHeaderLine($header): string + public function getHeaderLine($header) { return implode(', ', $this->getHeader($header)); } - public function withHeader($header, $value): MessageInterface + public function withHeader($header, $value) { $this->assertHeader($header); $value = $this->normalizeHeaderValue($value); @@ -85,7 +81,7 @@ trait MessageTrait return $new; } - public function withAddedHeader($header, $value): MessageInterface + public function withAddedHeader($header, $value) { $this->assertHeader($header); $value = $this->normalizeHeaderValue($value); @@ -103,7 +99,7 @@ trait MessageTrait return $new; } - public function withoutHeader($header): MessageInterface + public function withoutHeader($header) { $normalized = strtolower($header); @@ -119,7 +115,7 @@ trait MessageTrait return $new; } - public function getBody(): StreamInterface + public function getBody() { if (!$this->stream) { $this->stream = Utils::streamFor(''); @@ -128,7 +124,7 @@ trait MessageTrait return $this->stream; } - public function withBody(StreamInterface $body): MessageInterface + public function withBody(StreamInterface $body) { if ($body === $this->stream) { return $this; @@ -136,20 +132,18 @@ trait MessageTrait $new = clone $this; $new->stream = $body; - return $new; } - /** - * @param (string|string[])[] $headers - */ - private function setHeaders(array $headers): void + private function setHeaders(array $headers) { $this->headerNames = $this->headers = []; foreach ($headers as $header => $value) { - // Numeric array keys are converted to int by PHP. - $header = (string) $header; - + if (is_int($header)) { + // Numeric array keys are converted to int by PHP but having a header name '123' is not forbidden by the spec + // and also allowed in withHeader(). So we need to cast it to string again for the following assertion to pass. + $header = (string) $header; + } $this->assertHeader($header); $value = $this->normalizeHeaderValue($value); $normalized = strtolower($header); @@ -168,7 +162,7 @@ trait MessageTrait * * @return string[] */ - private function normalizeHeaderValue($value): array + private function normalizeHeaderValue($value) { if (!is_array($value)) { return $this->trimAndValidateHeaderValues([$value]); @@ -193,9 +187,9 @@ trait MessageTrait * * @return string[] Trimmed header values * - * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4 + * @see https://tools.ietf.org/html/rfc7230#section-3.2.4 */ - private function trimAndValidateHeaderValues(array $values): array + private function trimAndValidateHeaderValues(array $values) { return array_map(function ($value) { if (!is_scalar($value) && null !== $value) { @@ -213,11 +207,13 @@ trait MessageTrait } /** - * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2 + * @see https://tools.ietf.org/html/rfc7230#section-3.2 * * @param mixed $header + * + * @return void */ - private function assertHeader($header): void + private function assertHeader($header) { if (!is_string($header)) { throw new \InvalidArgumentException(sprintf( @@ -226,15 +222,26 @@ trait MessageTrait )); } - if (!preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) { + if ($header === '') { + throw new \InvalidArgumentException('Header name can not be empty.'); + } + + if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/', $header)) { throw new \InvalidArgumentException( - sprintf('"%s" is not valid header name.', $header) + sprintf( + '"%s" is not valid header name', + $header + ) ); } } /** - * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2 + * @param string $value + * + * @return void + * + * @see https://tools.ietf.org/html/rfc7230#section-3.2 * * field-value = *( field-content / obs-fold ) * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] @@ -243,7 +250,7 @@ trait MessageTrait * obs-text = %x80-FF * obs-fold = CRLF 1*( SP / HTAB ) */ - private function assertValue(string $value): void + private function assertValue($value) { // The regular expression intentionally does not support the obs-fold production, because as // per RFC 7230#3.2.4: @@ -256,10 +263,8 @@ trait MessageTrait // Clients must not send a request with line folding and a server sending folded headers is // likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting // folding is not likely to break any legitimate use case. - if (!preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/D', $value)) { - throw new \InvalidArgumentException( - sprintf('"%s" is not valid header value.', $value) - ); + if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/', $value)) { + throw new \InvalidArgumentException(sprintf('"%s" is not valid header value', $value)); } } } diff --git a/Server/vendor/guzzlehttp/psr7/src/MimeType.php b/Server/vendor/guzzlehttp/psr7/src/MimeType.php index b131bdbe..205c7b1f 100644 --- a/Server/vendor/guzzlehttp/psr7/src/MimeType.php +++ b/Server/vendor/guzzlehttp/psr7/src/MimeType.php @@ -1,1248 +1,17 @@ 'application/vnd.1000minds.decision-model+xml', - '3dml' => 'text/vnd.in3d.3dml', - '3ds' => 'image/x-3ds', - '3g2' => 'video/3gpp2', - '3gp' => 'video/3gp', - '3gpp' => 'video/3gpp', - '3mf' => 'model/3mf', - '7z' => 'application/x-7z-compressed', - '7zip' => 'application/x-7z-compressed', - '123' => 'application/vnd.lotus-1-2-3', - 'aab' => 'application/x-authorware-bin', - 'aac' => 'audio/aac', - 'aam' => 'application/x-authorware-map', - 'aas' => 'application/x-authorware-seg', - 'abw' => 'application/x-abiword', - 'ac' => 'application/vnd.nokia.n-gage.ac+xml', - 'ac3' => 'audio/ac3', - 'acc' => 'application/vnd.americandynamics.acc', - 'ace' => 'application/x-ace-compressed', - 'acu' => 'application/vnd.acucobol', - 'acutc' => 'application/vnd.acucorp', - 'adp' => 'audio/adpcm', - 'adts' => 'audio/aac', - 'aep' => 'application/vnd.audiograph', - 'afm' => 'application/x-font-type1', - 'afp' => 'application/vnd.ibm.modcap', - 'age' => 'application/vnd.age', - 'ahead' => 'application/vnd.ahead.space', - 'ai' => 'application/pdf', - 'aif' => 'audio/x-aiff', - 'aifc' => 'audio/x-aiff', - 'aiff' => 'audio/x-aiff', - 'air' => 'application/vnd.adobe.air-application-installer-package+zip', - 'ait' => 'application/vnd.dvb.ait', - 'ami' => 'application/vnd.amiga.ami', - 'aml' => 'application/automationml-aml+xml', - 'amlx' => 'application/automationml-amlx+zip', - 'amr' => 'audio/amr', - 'apk' => 'application/vnd.android.package-archive', - 'apng' => 'image/apng', - 'appcache' => 'text/cache-manifest', - 'appinstaller' => 'application/appinstaller', - 'application' => 'application/x-ms-application', - 'appx' => 'application/appx', - 'appxbundle' => 'application/appxbundle', - 'apr' => 'application/vnd.lotus-approach', - 'arc' => 'application/x-freearc', - 'arj' => 'application/x-arj', - 'asc' => 'application/pgp-signature', - 'asf' => 'video/x-ms-asf', - 'asm' => 'text/x-asm', - 'aso' => 'application/vnd.accpac.simply.aso', - 'asx' => 'video/x-ms-asf', - 'atc' => 'application/vnd.acucorp', - 'atom' => 'application/atom+xml', - 'atomcat' => 'application/atomcat+xml', - 'atomdeleted' => 'application/atomdeleted+xml', - 'atomsvc' => 'application/atomsvc+xml', - 'atx' => 'application/vnd.antix.game-component', - 'au' => 'audio/x-au', - 'avci' => 'image/avci', - 'avcs' => 'image/avcs', - 'avi' => 'video/x-msvideo', - 'avif' => 'image/avif', - 'aw' => 'application/applixware', - 'azf' => 'application/vnd.airzip.filesecure.azf', - 'azs' => 'application/vnd.airzip.filesecure.azs', - 'azv' => 'image/vnd.airzip.accelerator.azv', - 'azw' => 'application/vnd.amazon.ebook', - 'b16' => 'image/vnd.pco.b16', - 'bat' => 'application/x-msdownload', - 'bcpio' => 'application/x-bcpio', - 'bdf' => 'application/x-font-bdf', - 'bdm' => 'application/vnd.syncml.dm+wbxml', - 'bdoc' => 'application/x-bdoc', - 'bed' => 'application/vnd.realvnc.bed', - 'bh2' => 'application/vnd.fujitsu.oasysprs', - 'bin' => 'application/octet-stream', - 'blb' => 'application/x-blorb', - 'blorb' => 'application/x-blorb', - 'bmi' => 'application/vnd.bmi', - 'bmml' => 'application/vnd.balsamiq.bmml+xml', - 'bmp' => 'image/bmp', - 'book' => 'application/vnd.framemaker', - 'box' => 'application/vnd.previewsystems.box', - 'boz' => 'application/x-bzip2', - 'bpk' => 'application/octet-stream', - 'bpmn' => 'application/octet-stream', - 'bsp' => 'model/vnd.valve.source.compiled-map', - 'btf' => 'image/prs.btif', - 'btif' => 'image/prs.btif', - 'buffer' => 'application/octet-stream', - 'bz' => 'application/x-bzip', - 'bz2' => 'application/x-bzip2', - 'c' => 'text/x-c', - 'c4d' => 'application/vnd.clonk.c4group', - 'c4f' => 'application/vnd.clonk.c4group', - 'c4g' => 'application/vnd.clonk.c4group', - 'c4p' => 'application/vnd.clonk.c4group', - 'c4u' => 'application/vnd.clonk.c4group', - 'c11amc' => 'application/vnd.cluetrust.cartomobile-config', - 'c11amz' => 'application/vnd.cluetrust.cartomobile-config-pkg', - 'cab' => 'application/vnd.ms-cab-compressed', - 'caf' => 'audio/x-caf', - 'cap' => 'application/vnd.tcpdump.pcap', - 'car' => 'application/vnd.curl.car', - 'cat' => 'application/vnd.ms-pki.seccat', - 'cb7' => 'application/x-cbr', - 'cba' => 'application/x-cbr', - 'cbr' => 'application/x-cbr', - 'cbt' => 'application/x-cbr', - 'cbz' => 'application/x-cbr', - 'cc' => 'text/x-c', - 'cco' => 'application/x-cocoa', - 'cct' => 'application/x-director', - 'ccxml' => 'application/ccxml+xml', - 'cdbcmsg' => 'application/vnd.contact.cmsg', - 'cdf' => 'application/x-netcdf', - 'cdfx' => 'application/cdfx+xml', - 'cdkey' => 'application/vnd.mediastation.cdkey', - 'cdmia' => 'application/cdmi-capability', - 'cdmic' => 'application/cdmi-container', - 'cdmid' => 'application/cdmi-domain', - 'cdmio' => 'application/cdmi-object', - 'cdmiq' => 'application/cdmi-queue', - 'cdr' => 'application/cdr', - 'cdx' => 'chemical/x-cdx', - 'cdxml' => 'application/vnd.chemdraw+xml', - 'cdy' => 'application/vnd.cinderella', - 'cer' => 'application/pkix-cert', - 'cfs' => 'application/x-cfs-compressed', - 'cgm' => 'image/cgm', - 'chat' => 'application/x-chat', - 'chm' => 'application/vnd.ms-htmlhelp', - 'chrt' => 'application/vnd.kde.kchart', - 'cif' => 'chemical/x-cif', - 'cii' => 'application/vnd.anser-web-certificate-issue-initiation', - 'cil' => 'application/vnd.ms-artgalry', - 'cjs' => 'application/node', - 'cla' => 'application/vnd.claymore', - 'class' => 'application/octet-stream', - 'cld' => 'model/vnd.cld', - 'clkk' => 'application/vnd.crick.clicker.keyboard', - 'clkp' => 'application/vnd.crick.clicker.palette', - 'clkt' => 'application/vnd.crick.clicker.template', - 'clkw' => 'application/vnd.crick.clicker.wordbank', - 'clkx' => 'application/vnd.crick.clicker', - 'clp' => 'application/x-msclip', - 'cmc' => 'application/vnd.cosmocaller', - 'cmdf' => 'chemical/x-cmdf', - 'cml' => 'chemical/x-cml', - 'cmp' => 'application/vnd.yellowriver-custom-menu', - 'cmx' => 'image/x-cmx', - 'cod' => 'application/vnd.rim.cod', - 'coffee' => 'text/coffeescript', - 'com' => 'application/x-msdownload', - 'conf' => 'text/plain', - 'cpio' => 'application/x-cpio', - 'cpl' => 'application/cpl+xml', - 'cpp' => 'text/x-c', - 'cpt' => 'application/mac-compactpro', - 'crd' => 'application/x-mscardfile', - 'crl' => 'application/pkix-crl', - 'crt' => 'application/x-x509-ca-cert', - 'crx' => 'application/x-chrome-extension', - 'cryptonote' => 'application/vnd.rig.cryptonote', - 'csh' => 'application/x-csh', - 'csl' => 'application/vnd.citationstyles.style+xml', - 'csml' => 'chemical/x-csml', - 'csp' => 'application/vnd.commonspace', - 'csr' => 'application/octet-stream', - 'css' => 'text/css', - 'cst' => 'application/x-director', - 'csv' => 'text/csv', - 'cu' => 'application/cu-seeme', - 'curl' => 'text/vnd.curl', - 'cwl' => 'application/cwl', - 'cww' => 'application/prs.cww', - 'cxt' => 'application/x-director', - 'cxx' => 'text/x-c', - 'dae' => 'model/vnd.collada+xml', - 'daf' => 'application/vnd.mobius.daf', - 'dart' => 'application/vnd.dart', - 'dataless' => 'application/vnd.fdsn.seed', - 'davmount' => 'application/davmount+xml', - 'dbf' => 'application/vnd.dbf', - 'dbk' => 'application/docbook+xml', - 'dcr' => 'application/x-director', - 'dcurl' => 'text/vnd.curl.dcurl', - 'dd2' => 'application/vnd.oma.dd2+xml', - 'ddd' => 'application/vnd.fujixerox.ddd', - 'ddf' => 'application/vnd.syncml.dmddf+xml', - 'dds' => 'image/vnd.ms-dds', - 'deb' => 'application/x-debian-package', - 'def' => 'text/plain', - 'deploy' => 'application/octet-stream', - 'der' => 'application/x-x509-ca-cert', - 'dfac' => 'application/vnd.dreamfactory', - 'dgc' => 'application/x-dgc-compressed', - 'dib' => 'image/bmp', - 'dic' => 'text/x-c', - 'dir' => 'application/x-director', - 'dis' => 'application/vnd.mobius.dis', - 'disposition-notification' => 'message/disposition-notification', - 'dist' => 'application/octet-stream', - 'distz' => 'application/octet-stream', - 'djv' => 'image/vnd.djvu', - 'djvu' => 'image/vnd.djvu', - 'dll' => 'application/octet-stream', - 'dmg' => 'application/x-apple-diskimage', - 'dmn' => 'application/octet-stream', - 'dmp' => 'application/vnd.tcpdump.pcap', - 'dms' => 'application/octet-stream', - 'dna' => 'application/vnd.dna', - 'doc' => 'application/msword', - 'docm' => 'application/vnd.ms-word.template.macroEnabled.12', - 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'dot' => 'application/msword', - 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12', - 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', - 'dp' => 'application/vnd.osgi.dp', - 'dpg' => 'application/vnd.dpgraph', - 'dpx' => 'image/dpx', - 'dra' => 'audio/vnd.dra', - 'drle' => 'image/dicom-rle', - 'dsc' => 'text/prs.lines.tag', - 'dssc' => 'application/dssc+der', - 'dtb' => 'application/x-dtbook+xml', - 'dtd' => 'application/xml-dtd', - 'dts' => 'audio/vnd.dts', - 'dtshd' => 'audio/vnd.dts.hd', - 'dump' => 'application/octet-stream', - 'dvb' => 'video/vnd.dvb.file', - 'dvi' => 'application/x-dvi', - 'dwd' => 'application/atsc-dwd+xml', - 'dwf' => 'model/vnd.dwf', - 'dwg' => 'image/vnd.dwg', - 'dxf' => 'image/vnd.dxf', - 'dxp' => 'application/vnd.spotfire.dxp', - 'dxr' => 'application/x-director', - 'ear' => 'application/java-archive', - 'ecelp4800' => 'audio/vnd.nuera.ecelp4800', - 'ecelp7470' => 'audio/vnd.nuera.ecelp7470', - 'ecelp9600' => 'audio/vnd.nuera.ecelp9600', - 'ecma' => 'application/ecmascript', - 'edm' => 'application/vnd.novadigm.edm', - 'edx' => 'application/vnd.novadigm.edx', - 'efif' => 'application/vnd.picsel', - 'ei6' => 'application/vnd.pg.osasli', - 'elc' => 'application/octet-stream', - 'emf' => 'image/emf', - 'eml' => 'message/rfc822', - 'emma' => 'application/emma+xml', - 'emotionml' => 'application/emotionml+xml', - 'emz' => 'application/x-msmetafile', - 'eol' => 'audio/vnd.digital-winds', - 'eot' => 'application/vnd.ms-fontobject', - 'eps' => 'application/postscript', - 'epub' => 'application/epub+zip', - 'es3' => 'application/vnd.eszigno3+xml', - 'esa' => 'application/vnd.osgi.subsystem', - 'esf' => 'application/vnd.epson.esf', - 'et3' => 'application/vnd.eszigno3+xml', - 'etx' => 'text/x-setext', - 'eva' => 'application/x-eva', - 'evy' => 'application/x-envoy', - 'exe' => 'application/octet-stream', - 'exi' => 'application/exi', - 'exp' => 'application/express', - 'exr' => 'image/aces', - 'ext' => 'application/vnd.novadigm.ext', - 'ez' => 'application/andrew-inset', - 'ez2' => 'application/vnd.ezpix-album', - 'ez3' => 'application/vnd.ezpix-package', - 'f' => 'text/x-fortran', - 'f4v' => 'video/mp4', - 'f77' => 'text/x-fortran', - 'f90' => 'text/x-fortran', - 'fbs' => 'image/vnd.fastbidsheet', - 'fcdt' => 'application/vnd.adobe.formscentral.fcdt', - 'fcs' => 'application/vnd.isac.fcs', - 'fdf' => 'application/vnd.fdf', - 'fdt' => 'application/fdt+xml', - 'fe_launch' => 'application/vnd.denovo.fcselayout-link', - 'fg5' => 'application/vnd.fujitsu.oasysgp', - 'fgd' => 'application/x-director', - 'fh' => 'image/x-freehand', - 'fh4' => 'image/x-freehand', - 'fh5' => 'image/x-freehand', - 'fh7' => 'image/x-freehand', - 'fhc' => 'image/x-freehand', - 'fig' => 'application/x-xfig', - 'fits' => 'image/fits', - 'flac' => 'audio/x-flac', - 'fli' => 'video/x-fli', - 'flo' => 'application/vnd.micrografx.flo', - 'flv' => 'video/x-flv', - 'flw' => 'application/vnd.kde.kivio', - 'flx' => 'text/vnd.fmi.flexstor', - 'fly' => 'text/vnd.fly', - 'fm' => 'application/vnd.framemaker', - 'fnc' => 'application/vnd.frogans.fnc', - 'fo' => 'application/vnd.software602.filler.form+xml', - 'for' => 'text/x-fortran', - 'fpx' => 'image/vnd.fpx', - 'frame' => 'application/vnd.framemaker', - 'fsc' => 'application/vnd.fsc.weblaunch', - 'fst' => 'image/vnd.fst', - 'ftc' => 'application/vnd.fluxtime.clip', - 'fti' => 'application/vnd.anser-web-funds-transfer-initiation', - 'fvt' => 'video/vnd.fvt', - 'fxp' => 'application/vnd.adobe.fxp', - 'fxpl' => 'application/vnd.adobe.fxp', - 'fzs' => 'application/vnd.fuzzysheet', - 'g2w' => 'application/vnd.geoplan', - 'g3' => 'image/g3fax', - 'g3w' => 'application/vnd.geospace', - 'gac' => 'application/vnd.groove-account', - 'gam' => 'application/x-tads', - 'gbr' => 'application/rpki-ghostbusters', - 'gca' => 'application/x-gca-compressed', - 'gdl' => 'model/vnd.gdl', - 'gdoc' => 'application/vnd.google-apps.document', - 'ged' => 'text/vnd.familysearch.gedcom', - 'geo' => 'application/vnd.dynageo', - 'geojson' => 'application/geo+json', - 'gex' => 'application/vnd.geometry-explorer', - 'ggb' => 'application/vnd.geogebra.file', - 'ggt' => 'application/vnd.geogebra.tool', - 'ghf' => 'application/vnd.groove-help', - 'gif' => 'image/gif', - 'gim' => 'application/vnd.groove-identity-message', - 'glb' => 'model/gltf-binary', - 'gltf' => 'model/gltf+json', - 'gml' => 'application/gml+xml', - 'gmx' => 'application/vnd.gmx', - 'gnumeric' => 'application/x-gnumeric', - 'gpg' => 'application/gpg-keys', - 'gph' => 'application/vnd.flographit', - 'gpx' => 'application/gpx+xml', - 'gqf' => 'application/vnd.grafeq', - 'gqs' => 'application/vnd.grafeq', - 'gram' => 'application/srgs', - 'gramps' => 'application/x-gramps-xml', - 'gre' => 'application/vnd.geometry-explorer', - 'grv' => 'application/vnd.groove-injector', - 'grxml' => 'application/srgs+xml', - 'gsf' => 'application/x-font-ghostscript', - 'gsheet' => 'application/vnd.google-apps.spreadsheet', - 'gslides' => 'application/vnd.google-apps.presentation', - 'gtar' => 'application/x-gtar', - 'gtm' => 'application/vnd.groove-tool-message', - 'gtw' => 'model/vnd.gtw', - 'gv' => 'text/vnd.graphviz', - 'gxf' => 'application/gxf', - 'gxt' => 'application/vnd.geonext', - 'gz' => 'application/gzip', - 'gzip' => 'application/gzip', - 'h' => 'text/x-c', - 'h261' => 'video/h261', - 'h263' => 'video/h263', - 'h264' => 'video/h264', - 'hal' => 'application/vnd.hal+xml', - 'hbci' => 'application/vnd.hbci', - 'hbs' => 'text/x-handlebars-template', - 'hdd' => 'application/x-virtualbox-hdd', - 'hdf' => 'application/x-hdf', - 'heic' => 'image/heic', - 'heics' => 'image/heic-sequence', - 'heif' => 'image/heif', - 'heifs' => 'image/heif-sequence', - 'hej2' => 'image/hej2k', - 'held' => 'application/atsc-held+xml', - 'hh' => 'text/x-c', - 'hjson' => 'application/hjson', - 'hlp' => 'application/winhlp', - 'hpgl' => 'application/vnd.hp-hpgl', - 'hpid' => 'application/vnd.hp-hpid', - 'hps' => 'application/vnd.hp-hps', - 'hqx' => 'application/mac-binhex40', - 'hsj2' => 'image/hsj2', - 'htc' => 'text/x-component', - 'htke' => 'application/vnd.kenameaapp', - 'htm' => 'text/html', - 'html' => 'text/html', - 'hvd' => 'application/vnd.yamaha.hv-dic', - 'hvp' => 'application/vnd.yamaha.hv-voice', - 'hvs' => 'application/vnd.yamaha.hv-script', - 'i2g' => 'application/vnd.intergeo', - 'icc' => 'application/vnd.iccprofile', - 'ice' => 'x-conference/x-cooltalk', - 'icm' => 'application/vnd.iccprofile', - 'ico' => 'image/x-icon', - 'ics' => 'text/calendar', - 'ief' => 'image/ief', - 'ifb' => 'text/calendar', - 'ifm' => 'application/vnd.shana.informed.formdata', - 'iges' => 'model/iges', - 'igl' => 'application/vnd.igloader', - 'igm' => 'application/vnd.insors.igm', - 'igs' => 'model/iges', - 'igx' => 'application/vnd.micrografx.igx', - 'iif' => 'application/vnd.shana.informed.interchange', - 'img' => 'application/octet-stream', - 'imp' => 'application/vnd.accpac.simply.imp', - 'ims' => 'application/vnd.ms-ims', - 'in' => 'text/plain', - 'ini' => 'text/plain', - 'ink' => 'application/inkml+xml', - 'inkml' => 'application/inkml+xml', - 'install' => 'application/x-install-instructions', - 'iota' => 'application/vnd.astraea-software.iota', - 'ipfix' => 'application/ipfix', - 'ipk' => 'application/vnd.shana.informed.package', - 'irm' => 'application/vnd.ibm.rights-management', - 'irp' => 'application/vnd.irepository.package+xml', - 'iso' => 'application/x-iso9660-image', - 'itp' => 'application/vnd.shana.informed.formtemplate', - 'its' => 'application/its+xml', - 'ivp' => 'application/vnd.immervision-ivp', - 'ivu' => 'application/vnd.immervision-ivu', - 'jad' => 'text/vnd.sun.j2me.app-descriptor', - 'jade' => 'text/jade', - 'jam' => 'application/vnd.jam', - 'jar' => 'application/java-archive', - 'jardiff' => 'application/x-java-archive-diff', - 'java' => 'text/x-java-source', - 'jhc' => 'image/jphc', - 'jisp' => 'application/vnd.jisp', - 'jls' => 'image/jls', - 'jlt' => 'application/vnd.hp-jlyt', - 'jng' => 'image/x-jng', - 'jnlp' => 'application/x-java-jnlp-file', - 'joda' => 'application/vnd.joost.joda-archive', - 'jp2' => 'image/jp2', - 'jpe' => 'image/jpeg', - 'jpeg' => 'image/jpeg', - 'jpf' => 'image/jpx', - 'jpg' => 'image/jpeg', - 'jpg2' => 'image/jp2', - 'jpgm' => 'video/jpm', - 'jpgv' => 'video/jpeg', - 'jph' => 'image/jph', - 'jpm' => 'video/jpm', - 'jpx' => 'image/jpx', - 'js' => 'application/javascript', - 'json' => 'application/json', - 'json5' => 'application/json5', - 'jsonld' => 'application/ld+json', - 'jsonml' => 'application/jsonml+json', - 'jsx' => 'text/jsx', - 'jt' => 'model/jt', - 'jxr' => 'image/jxr', - 'jxra' => 'image/jxra', - 'jxrs' => 'image/jxrs', - 'jxs' => 'image/jxs', - 'jxsc' => 'image/jxsc', - 'jxsi' => 'image/jxsi', - 'jxss' => 'image/jxss', - 'kar' => 'audio/midi', - 'karbon' => 'application/vnd.kde.karbon', - 'kdb' => 'application/octet-stream', - 'kdbx' => 'application/x-keepass2', - 'key' => 'application/x-iwork-keynote-sffkey', - 'kfo' => 'application/vnd.kde.kformula', - 'kia' => 'application/vnd.kidspiration', - 'kml' => 'application/vnd.google-earth.kml+xml', - 'kmz' => 'application/vnd.google-earth.kmz', - 'kne' => 'application/vnd.kinar', - 'knp' => 'application/vnd.kinar', - 'kon' => 'application/vnd.kde.kontour', - 'kpr' => 'application/vnd.kde.kpresenter', - 'kpt' => 'application/vnd.kde.kpresenter', - 'kpxx' => 'application/vnd.ds-keypoint', - 'ksp' => 'application/vnd.kde.kspread', - 'ktr' => 'application/vnd.kahootz', - 'ktx' => 'image/ktx', - 'ktx2' => 'image/ktx2', - 'ktz' => 'application/vnd.kahootz', - 'kwd' => 'application/vnd.kde.kword', - 'kwt' => 'application/vnd.kde.kword', - 'lasxml' => 'application/vnd.las.las+xml', - 'latex' => 'application/x-latex', - 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop', - 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml', - 'les' => 'application/vnd.hhe.lesson-player', - 'less' => 'text/less', - 'lgr' => 'application/lgr+xml', - 'lha' => 'application/octet-stream', - 'link66' => 'application/vnd.route66.link66+xml', - 'list' => 'text/plain', - 'list3820' => 'application/vnd.ibm.modcap', - 'listafp' => 'application/vnd.ibm.modcap', - 'litcoffee' => 'text/coffeescript', - 'lnk' => 'application/x-ms-shortcut', - 'log' => 'text/plain', - 'lostxml' => 'application/lost+xml', - 'lrf' => 'application/octet-stream', - 'lrm' => 'application/vnd.ms-lrm', - 'ltf' => 'application/vnd.frogans.ltf', - 'lua' => 'text/x-lua', - 'luac' => 'application/x-lua-bytecode', - 'lvp' => 'audio/vnd.lucent.voice', - 'lwp' => 'application/vnd.lotus-wordpro', - 'lzh' => 'application/octet-stream', - 'm1v' => 'video/mpeg', - 'm2a' => 'audio/mpeg', - 'm2v' => 'video/mpeg', - 'm3a' => 'audio/mpeg', - 'm3u' => 'text/plain', - 'm3u8' => 'application/vnd.apple.mpegurl', - 'm4a' => 'audio/x-m4a', - 'm4p' => 'application/mp4', - 'm4s' => 'video/iso.segment', - 'm4u' => 'application/vnd.mpegurl', - 'm4v' => 'video/x-m4v', - 'm13' => 'application/x-msmediaview', - 'm14' => 'application/x-msmediaview', - 'm21' => 'application/mp21', - 'ma' => 'application/mathematica', - 'mads' => 'application/mads+xml', - 'maei' => 'application/mmt-aei+xml', - 'mag' => 'application/vnd.ecowin.chart', - 'maker' => 'application/vnd.framemaker', - 'man' => 'text/troff', - 'manifest' => 'text/cache-manifest', - 'map' => 'application/json', - 'mar' => 'application/octet-stream', - 'markdown' => 'text/markdown', - 'mathml' => 'application/mathml+xml', - 'mb' => 'application/mathematica', - 'mbk' => 'application/vnd.mobius.mbk', - 'mbox' => 'application/mbox', - 'mc1' => 'application/vnd.medcalcdata', - 'mcd' => 'application/vnd.mcd', - 'mcurl' => 'text/vnd.curl.mcurl', - 'md' => 'text/markdown', - 'mdb' => 'application/x-msaccess', - 'mdi' => 'image/vnd.ms-modi', - 'mdx' => 'text/mdx', - 'me' => 'text/troff', - 'mesh' => 'model/mesh', - 'meta4' => 'application/metalink4+xml', - 'metalink' => 'application/metalink+xml', - 'mets' => 'application/mets+xml', - 'mfm' => 'application/vnd.mfmp', - 'mft' => 'application/rpki-manifest', - 'mgp' => 'application/vnd.osgeo.mapguide.package', - 'mgz' => 'application/vnd.proteus.magazine', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mie' => 'application/x-mie', - 'mif' => 'application/vnd.mif', - 'mime' => 'message/rfc822', - 'mj2' => 'video/mj2', - 'mjp2' => 'video/mj2', - 'mjs' => 'text/javascript', - 'mk3d' => 'video/x-matroska', - 'mka' => 'audio/x-matroska', - 'mkd' => 'text/x-markdown', - 'mks' => 'video/x-matroska', - 'mkv' => 'video/x-matroska', - 'mlp' => 'application/vnd.dolby.mlp', - 'mmd' => 'application/vnd.chipnuts.karaoke-mmd', - 'mmf' => 'application/vnd.smaf', - 'mml' => 'text/mathml', - 'mmr' => 'image/vnd.fujixerox.edmics-mmr', - 'mng' => 'video/x-mng', - 'mny' => 'application/x-msmoney', - 'mobi' => 'application/x-mobipocket-ebook', - 'mods' => 'application/mods+xml', - 'mov' => 'video/quicktime', - 'movie' => 'video/x-sgi-movie', - 'mp2' => 'audio/mpeg', - 'mp2a' => 'audio/mpeg', - 'mp3' => 'audio/mpeg', - 'mp4' => 'video/mp4', - 'mp4a' => 'audio/mp4', - 'mp4s' => 'application/mp4', - 'mp4v' => 'video/mp4', - 'mp21' => 'application/mp21', - 'mpc' => 'application/vnd.mophun.certificate', - 'mpd' => 'application/dash+xml', - 'mpe' => 'video/mpeg', - 'mpeg' => 'video/mpeg', - 'mpf' => 'application/media-policy-dataset+xml', - 'mpg' => 'video/mpeg', - 'mpg4' => 'video/mp4', - 'mpga' => 'audio/mpeg', - 'mpkg' => 'application/vnd.apple.installer+xml', - 'mpm' => 'application/vnd.blueice.multipass', - 'mpn' => 'application/vnd.mophun.application', - 'mpp' => 'application/vnd.ms-project', - 'mpt' => 'application/vnd.ms-project', - 'mpy' => 'application/vnd.ibm.minipay', - 'mqy' => 'application/vnd.mobius.mqy', - 'mrc' => 'application/marc', - 'mrcx' => 'application/marcxml+xml', - 'ms' => 'text/troff', - 'mscml' => 'application/mediaservercontrol+xml', - 'mseed' => 'application/vnd.fdsn.mseed', - 'mseq' => 'application/vnd.mseq', - 'msf' => 'application/vnd.epson.msf', - 'msg' => 'application/vnd.ms-outlook', - 'msh' => 'model/mesh', - 'msi' => 'application/x-msdownload', - 'msix' => 'application/msix', - 'msixbundle' => 'application/msixbundle', - 'msl' => 'application/vnd.mobius.msl', - 'msm' => 'application/octet-stream', - 'msp' => 'application/octet-stream', - 'msty' => 'application/vnd.muvee.style', - 'mtl' => 'model/mtl', - 'mts' => 'model/vnd.mts', - 'mus' => 'application/vnd.musician', - 'musd' => 'application/mmt-usd+xml', - 'musicxml' => 'application/vnd.recordare.musicxml+xml', - 'mvb' => 'application/x-msmediaview', - 'mvt' => 'application/vnd.mapbox-vector-tile', - 'mwf' => 'application/vnd.mfer', - 'mxf' => 'application/mxf', - 'mxl' => 'application/vnd.recordare.musicxml', - 'mxmf' => 'audio/mobile-xmf', - 'mxml' => 'application/xv+xml', - 'mxs' => 'application/vnd.triscape.mxs', - 'mxu' => 'video/vnd.mpegurl', - 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install', - 'n3' => 'text/n3', - 'nb' => 'application/mathematica', - 'nbp' => 'application/vnd.wolfram.player', - 'nc' => 'application/x-netcdf', - 'ncx' => 'application/x-dtbncx+xml', - 'nfo' => 'text/x-nfo', - 'ngdat' => 'application/vnd.nokia.n-gage.data', - 'nitf' => 'application/vnd.nitf', - 'nlu' => 'application/vnd.neurolanguage.nlu', - 'nml' => 'application/vnd.enliven', - 'nnd' => 'application/vnd.noblenet-directory', - 'nns' => 'application/vnd.noblenet-sealer', - 'nnw' => 'application/vnd.noblenet-web', - 'npx' => 'image/vnd.net-fpx', - 'nq' => 'application/n-quads', - 'nsc' => 'application/x-conference', - 'nsf' => 'application/vnd.lotus-notes', - 'nt' => 'application/n-triples', - 'ntf' => 'application/vnd.nitf', - 'numbers' => 'application/x-iwork-numbers-sffnumbers', - 'nzb' => 'application/x-nzb', - 'oa2' => 'application/vnd.fujitsu.oasys2', - 'oa3' => 'application/vnd.fujitsu.oasys3', - 'oas' => 'application/vnd.fujitsu.oasys', - 'obd' => 'application/x-msbinder', - 'obgx' => 'application/vnd.openblox.game+xml', - 'obj' => 'model/obj', - 'oda' => 'application/oda', - 'odb' => 'application/vnd.oasis.opendocument.database', - 'odc' => 'application/vnd.oasis.opendocument.chart', - 'odf' => 'application/vnd.oasis.opendocument.formula', - 'odft' => 'application/vnd.oasis.opendocument.formula-template', - 'odg' => 'application/vnd.oasis.opendocument.graphics', - 'odi' => 'application/vnd.oasis.opendocument.image', - 'odm' => 'application/vnd.oasis.opendocument.text-master', - 'odp' => 'application/vnd.oasis.opendocument.presentation', - 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', - 'odt' => 'application/vnd.oasis.opendocument.text', - 'oga' => 'audio/ogg', - 'ogex' => 'model/vnd.opengex', - 'ogg' => 'audio/ogg', - 'ogv' => 'video/ogg', - 'ogx' => 'application/ogg', - 'omdoc' => 'application/omdoc+xml', - 'onepkg' => 'application/onenote', - 'onetmp' => 'application/onenote', - 'onetoc' => 'application/onenote', - 'onetoc2' => 'application/onenote', - 'opf' => 'application/oebps-package+xml', - 'opml' => 'text/x-opml', - 'oprc' => 'application/vnd.palm', - 'opus' => 'audio/ogg', - 'org' => 'text/x-org', - 'osf' => 'application/vnd.yamaha.openscoreformat', - 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml', - 'osm' => 'application/vnd.openstreetmap.data+xml', - 'otc' => 'application/vnd.oasis.opendocument.chart-template', - 'otf' => 'font/otf', - 'otg' => 'application/vnd.oasis.opendocument.graphics-template', - 'oth' => 'application/vnd.oasis.opendocument.text-web', - 'oti' => 'application/vnd.oasis.opendocument.image-template', - 'otp' => 'application/vnd.oasis.opendocument.presentation-template', - 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', - 'ott' => 'application/vnd.oasis.opendocument.text-template', - 'ova' => 'application/x-virtualbox-ova', - 'ovf' => 'application/x-virtualbox-ovf', - 'owl' => 'application/rdf+xml', - 'oxps' => 'application/oxps', - 'oxt' => 'application/vnd.openofficeorg.extension', - 'p' => 'text/x-pascal', - 'p7a' => 'application/x-pkcs7-signature', - 'p7b' => 'application/x-pkcs7-certificates', - 'p7c' => 'application/pkcs7-mime', - 'p7m' => 'application/pkcs7-mime', - 'p7r' => 'application/x-pkcs7-certreqresp', - 'p7s' => 'application/pkcs7-signature', - 'p8' => 'application/pkcs8', - 'p10' => 'application/x-pkcs10', - 'p12' => 'application/x-pkcs12', - 'pac' => 'application/x-ns-proxy-autoconfig', - 'pages' => 'application/x-iwork-pages-sffpages', - 'pas' => 'text/x-pascal', - 'paw' => 'application/vnd.pawaafile', - 'pbd' => 'application/vnd.powerbuilder6', - 'pbm' => 'image/x-portable-bitmap', - 'pcap' => 'application/vnd.tcpdump.pcap', - 'pcf' => 'application/x-font-pcf', - 'pcl' => 'application/vnd.hp-pcl', - 'pclxl' => 'application/vnd.hp-pclxl', - 'pct' => 'image/x-pict', - 'pcurl' => 'application/vnd.curl.pcurl', - 'pcx' => 'image/x-pcx', - 'pdb' => 'application/x-pilot', - 'pde' => 'text/x-processing', - 'pdf' => 'application/pdf', - 'pem' => 'application/x-x509-user-cert', - 'pfa' => 'application/x-font-type1', - 'pfb' => 'application/x-font-type1', - 'pfm' => 'application/x-font-type1', - 'pfr' => 'application/font-tdpfr', - 'pfx' => 'application/x-pkcs12', - 'pgm' => 'image/x-portable-graymap', - 'pgn' => 'application/x-chess-pgn', - 'pgp' => 'application/pgp', - 'phar' => 'application/octet-stream', - 'php' => 'application/x-httpd-php', - 'php3' => 'application/x-httpd-php', - 'php4' => 'application/x-httpd-php', - 'phps' => 'application/x-httpd-php-source', - 'phtml' => 'application/x-httpd-php', - 'pic' => 'image/x-pict', - 'pkg' => 'application/octet-stream', - 'pki' => 'application/pkixcmp', - 'pkipath' => 'application/pkix-pkipath', - 'pkpass' => 'application/vnd.apple.pkpass', - 'pl' => 'application/x-perl', - 'plb' => 'application/vnd.3gpp.pic-bw-large', - 'plc' => 'application/vnd.mobius.plc', - 'plf' => 'application/vnd.pocketlearn', - 'pls' => 'application/pls+xml', - 'pm' => 'application/x-perl', - 'pml' => 'application/vnd.ctc-posml', - 'png' => 'image/png', - 'pnm' => 'image/x-portable-anymap', - 'portpkg' => 'application/vnd.macports.portpkg', - 'pot' => 'application/vnd.ms-powerpoint', - 'potm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', - 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', - 'ppa' => 'application/vnd.ms-powerpoint', - 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12', - 'ppd' => 'application/vnd.cups-ppd', - 'ppm' => 'image/x-portable-pixmap', - 'pps' => 'application/vnd.ms-powerpoint', - 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12', - 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', - 'ppt' => 'application/powerpoint', - 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', - 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'pqa' => 'application/vnd.palm', - 'prc' => 'model/prc', - 'pre' => 'application/vnd.lotus-freelance', - 'prf' => 'application/pics-rules', - 'provx' => 'application/provenance+xml', - 'ps' => 'application/postscript', - 'psb' => 'application/vnd.3gpp.pic-bw-small', - 'psd' => 'application/x-photoshop', - 'psf' => 'application/x-font-linux-psf', - 'pskcxml' => 'application/pskc+xml', - 'pti' => 'image/prs.pti', - 'ptid' => 'application/vnd.pvi.ptid1', - 'pub' => 'application/x-mspublisher', - 'pvb' => 'application/vnd.3gpp.pic-bw-var', - 'pwn' => 'application/vnd.3m.post-it-notes', - 'pya' => 'audio/vnd.ms-playready.media.pya', - 'pyo' => 'model/vnd.pytha.pyox', - 'pyox' => 'model/vnd.pytha.pyox', - 'pyv' => 'video/vnd.ms-playready.media.pyv', - 'qam' => 'application/vnd.epson.quickanime', - 'qbo' => 'application/vnd.intu.qbo', - 'qfx' => 'application/vnd.intu.qfx', - 'qps' => 'application/vnd.publishare-delta-tree', - 'qt' => 'video/quicktime', - 'qwd' => 'application/vnd.quark.quarkxpress', - 'qwt' => 'application/vnd.quark.quarkxpress', - 'qxb' => 'application/vnd.quark.quarkxpress', - 'qxd' => 'application/vnd.quark.quarkxpress', - 'qxl' => 'application/vnd.quark.quarkxpress', - 'qxt' => 'application/vnd.quark.quarkxpress', - 'ra' => 'audio/x-realaudio', - 'ram' => 'audio/x-pn-realaudio', - 'raml' => 'application/raml+yaml', - 'rapd' => 'application/route-apd+xml', - 'rar' => 'application/x-rar', - 'ras' => 'image/x-cmu-raster', - 'rcprofile' => 'application/vnd.ipunplugged.rcprofile', - 'rdf' => 'application/rdf+xml', - 'rdz' => 'application/vnd.data-vision.rdz', - 'relo' => 'application/p2p-overlay+xml', - 'rep' => 'application/vnd.businessobjects', - 'res' => 'application/x-dtbresource+xml', - 'rgb' => 'image/x-rgb', - 'rif' => 'application/reginfo+xml', - 'rip' => 'audio/vnd.rip', - 'ris' => 'application/x-research-info-systems', - 'rl' => 'application/resource-lists+xml', - 'rlc' => 'image/vnd.fujixerox.edmics-rlc', - 'rld' => 'application/resource-lists-diff+xml', - 'rm' => 'audio/x-pn-realaudio', - 'rmi' => 'audio/midi', - 'rmp' => 'audio/x-pn-realaudio-plugin', - 'rms' => 'application/vnd.jcp.javame.midlet-rms', - 'rmvb' => 'application/vnd.rn-realmedia-vbr', - 'rnc' => 'application/relax-ng-compact-syntax', - 'rng' => 'application/xml', - 'roa' => 'application/rpki-roa', - 'roff' => 'text/troff', - 'rp9' => 'application/vnd.cloanto.rp9', - 'rpm' => 'audio/x-pn-realaudio-plugin', - 'rpss' => 'application/vnd.nokia.radio-presets', - 'rpst' => 'application/vnd.nokia.radio-preset', - 'rq' => 'application/sparql-query', - 'rs' => 'application/rls-services+xml', - 'rsa' => 'application/x-pkcs7', - 'rsat' => 'application/atsc-rsat+xml', - 'rsd' => 'application/rsd+xml', - 'rsheet' => 'application/urc-ressheet+xml', - 'rss' => 'application/rss+xml', - 'rtf' => 'text/rtf', - 'rtx' => 'text/richtext', - 'run' => 'application/x-makeself', - 'rusd' => 'application/route-usd+xml', - 'rv' => 'video/vnd.rn-realvideo', - 's' => 'text/x-asm', - 's3m' => 'audio/s3m', - 'saf' => 'application/vnd.yamaha.smaf-audio', - 'sass' => 'text/x-sass', - 'sbml' => 'application/sbml+xml', - 'sc' => 'application/vnd.ibm.secure-container', - 'scd' => 'application/x-msschedule', - 'scm' => 'application/vnd.lotus-screencam', - 'scq' => 'application/scvp-cv-request', - 'scs' => 'application/scvp-cv-response', - 'scss' => 'text/x-scss', - 'scurl' => 'text/vnd.curl.scurl', - 'sda' => 'application/vnd.stardivision.draw', - 'sdc' => 'application/vnd.stardivision.calc', - 'sdd' => 'application/vnd.stardivision.impress', - 'sdkd' => 'application/vnd.solent.sdkm+xml', - 'sdkm' => 'application/vnd.solent.sdkm+xml', - 'sdp' => 'application/sdp', - 'sdw' => 'application/vnd.stardivision.writer', - 'sea' => 'application/octet-stream', - 'see' => 'application/vnd.seemail', - 'seed' => 'application/vnd.fdsn.seed', - 'sema' => 'application/vnd.sema', - 'semd' => 'application/vnd.semd', - 'semf' => 'application/vnd.semf', - 'senmlx' => 'application/senml+xml', - 'sensmlx' => 'application/sensml+xml', - 'ser' => 'application/java-serialized-object', - 'setpay' => 'application/set-payment-initiation', - 'setreg' => 'application/set-registration-initiation', - 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data', - 'sfs' => 'application/vnd.spotfire.sfs', - 'sfv' => 'text/x-sfv', - 'sgi' => 'image/sgi', - 'sgl' => 'application/vnd.stardivision.writer-global', - 'sgm' => 'text/sgml', - 'sgml' => 'text/sgml', - 'sh' => 'application/x-sh', - 'shar' => 'application/x-shar', - 'shex' => 'text/shex', - 'shf' => 'application/shf+xml', - 'shtml' => 'text/html', - 'sid' => 'image/x-mrsid-image', - 'sieve' => 'application/sieve', - 'sig' => 'application/pgp-signature', - 'sil' => 'audio/silk', - 'silo' => 'model/mesh', - 'sis' => 'application/vnd.symbian.install', - 'sisx' => 'application/vnd.symbian.install', - 'sit' => 'application/x-stuffit', - 'sitx' => 'application/x-stuffitx', - 'siv' => 'application/sieve', - 'skd' => 'application/vnd.koan', - 'skm' => 'application/vnd.koan', - 'skp' => 'application/vnd.koan', - 'skt' => 'application/vnd.koan', - 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12', - 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', - 'slim' => 'text/slim', - 'slm' => 'text/slim', - 'sls' => 'application/route-s-tsid+xml', - 'slt' => 'application/vnd.epson.salt', - 'sm' => 'application/vnd.stepmania.stepchart', - 'smf' => 'application/vnd.stardivision.math', - 'smi' => 'application/smil', - 'smil' => 'application/smil', - 'smv' => 'video/x-smv', - 'smzip' => 'application/vnd.stepmania.package', - 'snd' => 'audio/basic', - 'snf' => 'application/x-font-snf', - 'so' => 'application/octet-stream', - 'spc' => 'application/x-pkcs7-certificates', - 'spdx' => 'text/spdx', - 'spf' => 'application/vnd.yamaha.smaf-phrase', - 'spl' => 'application/x-futuresplash', - 'spot' => 'text/vnd.in3d.spot', - 'spp' => 'application/scvp-vp-response', - 'spq' => 'application/scvp-vp-request', - 'spx' => 'audio/ogg', - 'sql' => 'application/x-sql', - 'src' => 'application/x-wais-source', - 'srt' => 'application/x-subrip', - 'sru' => 'application/sru+xml', - 'srx' => 'application/sparql-results+xml', - 'ssdl' => 'application/ssdl+xml', - 'sse' => 'application/vnd.kodak-descriptor', - 'ssf' => 'application/vnd.epson.ssf', - 'ssml' => 'application/ssml+xml', - 'sst' => 'application/octet-stream', - 'st' => 'application/vnd.sailingtracker.track', - 'stc' => 'application/vnd.sun.xml.calc.template', - 'std' => 'application/vnd.sun.xml.draw.template', - 'step' => 'application/STEP', - 'stf' => 'application/vnd.wt.stf', - 'sti' => 'application/vnd.sun.xml.impress.template', - 'stk' => 'application/hyperstudio', - 'stl' => 'model/stl', - 'stp' => 'application/STEP', - 'stpx' => 'model/step+xml', - 'stpxz' => 'model/step-xml+zip', - 'stpz' => 'model/step+zip', - 'str' => 'application/vnd.pg.format', - 'stw' => 'application/vnd.sun.xml.writer.template', - 'styl' => 'text/stylus', - 'stylus' => 'text/stylus', - 'sub' => 'text/vnd.dvb.subtitle', - 'sus' => 'application/vnd.sus-calendar', - 'susp' => 'application/vnd.sus-calendar', - 'sv4cpio' => 'application/x-sv4cpio', - 'sv4crc' => 'application/x-sv4crc', - 'svc' => 'application/vnd.dvb.service', - 'svd' => 'application/vnd.svd', - 'svg' => 'image/svg+xml', - 'svgz' => 'image/svg+xml', - 'swa' => 'application/x-director', - 'swf' => 'application/x-shockwave-flash', - 'swi' => 'application/vnd.aristanetworks.swi', - 'swidtag' => 'application/swid+xml', - 'sxc' => 'application/vnd.sun.xml.calc', - 'sxd' => 'application/vnd.sun.xml.draw', - 'sxg' => 'application/vnd.sun.xml.writer.global', - 'sxi' => 'application/vnd.sun.xml.impress', - 'sxm' => 'application/vnd.sun.xml.math', - 'sxw' => 'application/vnd.sun.xml.writer', - 't' => 'text/troff', - 't3' => 'application/x-t3vm-image', - 't38' => 'image/t38', - 'taglet' => 'application/vnd.mynfc', - 'tao' => 'application/vnd.tao.intent-module-archive', - 'tap' => 'image/vnd.tencent.tap', - 'tar' => 'application/x-tar', - 'tcap' => 'application/vnd.3gpp2.tcap', - 'tcl' => 'application/x-tcl', - 'td' => 'application/urc-targetdesc+xml', - 'teacher' => 'application/vnd.smart.teacher', - 'tei' => 'application/tei+xml', - 'teicorpus' => 'application/tei+xml', - 'tex' => 'application/x-tex', - 'texi' => 'application/x-texinfo', - 'texinfo' => 'application/x-texinfo', - 'text' => 'text/plain', - 'tfi' => 'application/thraud+xml', - 'tfm' => 'application/x-tex-tfm', - 'tfx' => 'image/tiff-fx', - 'tga' => 'image/x-tga', - 'tgz' => 'application/x-tar', - 'thmx' => 'application/vnd.ms-officetheme', - 'tif' => 'image/tiff', - 'tiff' => 'image/tiff', - 'tk' => 'application/x-tcl', - 'tmo' => 'application/vnd.tmobile-livetv', - 'toml' => 'application/toml', - 'torrent' => 'application/x-bittorrent', - 'tpl' => 'application/vnd.groove-tool-template', - 'tpt' => 'application/vnd.trid.tpt', - 'tr' => 'text/troff', - 'tra' => 'application/vnd.trueapp', - 'trig' => 'application/trig', - 'trm' => 'application/x-msterminal', - 'ts' => 'video/mp2t', - 'tsd' => 'application/timestamped-data', - 'tsv' => 'text/tab-separated-values', - 'ttc' => 'font/collection', - 'ttf' => 'font/ttf', - 'ttl' => 'text/turtle', - 'ttml' => 'application/ttml+xml', - 'twd' => 'application/vnd.simtech-mindmapper', - 'twds' => 'application/vnd.simtech-mindmapper', - 'txd' => 'application/vnd.genomatix.tuxedo', - 'txf' => 'application/vnd.mobius.txf', - 'txt' => 'text/plain', - 'u3d' => 'model/u3d', - 'u8dsn' => 'message/global-delivery-status', - 'u8hdr' => 'message/global-headers', - 'u8mdn' => 'message/global-disposition-notification', - 'u8msg' => 'message/global', - 'u32' => 'application/x-authorware-bin', - 'ubj' => 'application/ubjson', - 'udeb' => 'application/x-debian-package', - 'ufd' => 'application/vnd.ufdl', - 'ufdl' => 'application/vnd.ufdl', - 'ulx' => 'application/x-glulx', - 'umj' => 'application/vnd.umajin', - 'unityweb' => 'application/vnd.unity', - 'uo' => 'application/vnd.uoml+xml', - 'uoml' => 'application/vnd.uoml+xml', - 'uri' => 'text/uri-list', - 'uris' => 'text/uri-list', - 'urls' => 'text/uri-list', - 'usda' => 'model/vnd.usda', - 'usdz' => 'model/vnd.usdz+zip', - 'ustar' => 'application/x-ustar', - 'utz' => 'application/vnd.uiq.theme', - 'uu' => 'text/x-uuencode', - 'uva' => 'audio/vnd.dece.audio', - 'uvd' => 'application/vnd.dece.data', - 'uvf' => 'application/vnd.dece.data', - 'uvg' => 'image/vnd.dece.graphic', - 'uvh' => 'video/vnd.dece.hd', - 'uvi' => 'image/vnd.dece.graphic', - 'uvm' => 'video/vnd.dece.mobile', - 'uvp' => 'video/vnd.dece.pd', - 'uvs' => 'video/vnd.dece.sd', - 'uvt' => 'application/vnd.dece.ttml+xml', - 'uvu' => 'video/vnd.uvvu.mp4', - 'uvv' => 'video/vnd.dece.video', - 'uvva' => 'audio/vnd.dece.audio', - 'uvvd' => 'application/vnd.dece.data', - 'uvvf' => 'application/vnd.dece.data', - 'uvvg' => 'image/vnd.dece.graphic', - 'uvvh' => 'video/vnd.dece.hd', - 'uvvi' => 'image/vnd.dece.graphic', - 'uvvm' => 'video/vnd.dece.mobile', - 'uvvp' => 'video/vnd.dece.pd', - 'uvvs' => 'video/vnd.dece.sd', - 'uvvt' => 'application/vnd.dece.ttml+xml', - 'uvvu' => 'video/vnd.uvvu.mp4', - 'uvvv' => 'video/vnd.dece.video', - 'uvvx' => 'application/vnd.dece.unspecified', - 'uvvz' => 'application/vnd.dece.zip', - 'uvx' => 'application/vnd.dece.unspecified', - 'uvz' => 'application/vnd.dece.zip', - 'vbox' => 'application/x-virtualbox-vbox', - 'vbox-extpack' => 'application/x-virtualbox-vbox-extpack', - 'vcard' => 'text/vcard', - 'vcd' => 'application/x-cdlink', - 'vcf' => 'text/x-vcard', - 'vcg' => 'application/vnd.groove-vcard', - 'vcs' => 'text/x-vcalendar', - 'vcx' => 'application/vnd.vcx', - 'vdi' => 'application/x-virtualbox-vdi', - 'vds' => 'model/vnd.sap.vds', - 'vhd' => 'application/x-virtualbox-vhd', - 'vis' => 'application/vnd.visionary', - 'viv' => 'video/vnd.vivo', - 'vlc' => 'application/videolan', - 'vmdk' => 'application/x-virtualbox-vmdk', - 'vob' => 'video/x-ms-vob', - 'vor' => 'application/vnd.stardivision.writer', - 'vox' => 'application/x-authorware-bin', - 'vrml' => 'model/vrml', - 'vsd' => 'application/vnd.visio', - 'vsf' => 'application/vnd.vsf', - 'vss' => 'application/vnd.visio', - 'vst' => 'application/vnd.visio', - 'vsw' => 'application/vnd.visio', - 'vtf' => 'image/vnd.valve.source.texture', - 'vtt' => 'text/vtt', - 'vtu' => 'model/vnd.vtu', - 'vxml' => 'application/voicexml+xml', - 'w3d' => 'application/x-director', - 'wad' => 'application/x-doom', - 'wadl' => 'application/vnd.sun.wadl+xml', - 'war' => 'application/java-archive', - 'wasm' => 'application/wasm', - 'wav' => 'audio/x-wav', - 'wax' => 'audio/x-ms-wax', - 'wbmp' => 'image/vnd.wap.wbmp', - 'wbs' => 'application/vnd.criticaltools.wbs+xml', - 'wbxml' => 'application/wbxml', - 'wcm' => 'application/vnd.ms-works', - 'wdb' => 'application/vnd.ms-works', - 'wdp' => 'image/vnd.ms-photo', - 'weba' => 'audio/webm', - 'webapp' => 'application/x-web-app-manifest+json', - 'webm' => 'video/webm', - 'webmanifest' => 'application/manifest+json', - 'webp' => 'image/webp', - 'wg' => 'application/vnd.pmi.widget', - 'wgsl' => 'text/wgsl', - 'wgt' => 'application/widget', - 'wif' => 'application/watcherinfo+xml', - 'wks' => 'application/vnd.ms-works', - 'wm' => 'video/x-ms-wm', - 'wma' => 'audio/x-ms-wma', - 'wmd' => 'application/x-ms-wmd', - 'wmf' => 'image/wmf', - 'wml' => 'text/vnd.wap.wml', - 'wmlc' => 'application/wmlc', - 'wmls' => 'text/vnd.wap.wmlscript', - 'wmlsc' => 'application/vnd.wap.wmlscriptc', - 'wmv' => 'video/x-ms-wmv', - 'wmx' => 'video/x-ms-wmx', - 'wmz' => 'application/x-msmetafile', - 'woff' => 'font/woff', - 'woff2' => 'font/woff2', - 'word' => 'application/msword', - 'wpd' => 'application/vnd.wordperfect', - 'wpl' => 'application/vnd.ms-wpl', - 'wps' => 'application/vnd.ms-works', - 'wqd' => 'application/vnd.wqd', - 'wri' => 'application/x-mswrite', - 'wrl' => 'model/vrml', - 'wsc' => 'message/vnd.wfa.wsc', - 'wsdl' => 'application/wsdl+xml', - 'wspolicy' => 'application/wspolicy+xml', - 'wtb' => 'application/vnd.webturbo', - 'wvx' => 'video/x-ms-wvx', - 'x3d' => 'model/x3d+xml', - 'x3db' => 'model/x3d+fastinfoset', - 'x3dbz' => 'model/x3d+binary', - 'x3dv' => 'model/x3d-vrml', - 'x3dvz' => 'model/x3d+vrml', - 'x3dz' => 'model/x3d+xml', - 'x32' => 'application/x-authorware-bin', - 'x_b' => 'model/vnd.parasolid.transmit.binary', - 'x_t' => 'model/vnd.parasolid.transmit.text', - 'xaml' => 'application/xaml+xml', - 'xap' => 'application/x-silverlight-app', - 'xar' => 'application/vnd.xara', - 'xav' => 'application/xcap-att+xml', - 'xbap' => 'application/x-ms-xbap', - 'xbd' => 'application/vnd.fujixerox.docuworks.binder', - 'xbm' => 'image/x-xbitmap', - 'xca' => 'application/xcap-caps+xml', - 'xcs' => 'application/calendar+xml', - 'xdf' => 'application/xcap-diff+xml', - 'xdm' => 'application/vnd.syncml.dm+xml', - 'xdp' => 'application/vnd.adobe.xdp+xml', - 'xdssc' => 'application/dssc+xml', - 'xdw' => 'application/vnd.fujixerox.docuworks', - 'xel' => 'application/xcap-el+xml', - 'xenc' => 'application/xenc+xml', - 'xer' => 'application/patch-ops-error+xml', - 'xfdf' => 'application/xfdf', - 'xfdl' => 'application/vnd.xfdl', - 'xht' => 'application/xhtml+xml', - 'xhtm' => 'application/vnd.pwg-xhtml-print+xml', - 'xhtml' => 'application/xhtml+xml', - 'xhvml' => 'application/xv+xml', - 'xif' => 'image/vnd.xiff', - 'xl' => 'application/excel', - 'xla' => 'application/vnd.ms-excel', - 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', - 'xlc' => 'application/vnd.ms-excel', - 'xlf' => 'application/xliff+xml', - 'xlm' => 'application/vnd.ms-excel', - 'xls' => 'application/vnd.ms-excel', - 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', - 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12', - 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'xlt' => 'application/vnd.ms-excel', - 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12', - 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', - 'xlw' => 'application/vnd.ms-excel', - 'xm' => 'audio/xm', - 'xml' => 'application/xml', - 'xns' => 'application/xcap-ns+xml', - 'xo' => 'application/vnd.olpc-sugar', - 'xop' => 'application/xop+xml', - 'xpi' => 'application/x-xpinstall', - 'xpl' => 'application/xproc+xml', - 'xpm' => 'image/x-xpixmap', - 'xpr' => 'application/vnd.is-xpr', - 'xps' => 'application/vnd.ms-xpsdocument', - 'xpw' => 'application/vnd.intercon.formnet', - 'xpx' => 'application/vnd.intercon.formnet', - 'xsd' => 'application/xml', - 'xsf' => 'application/prs.xsf+xml', - 'xsl' => 'application/xml', - 'xslt' => 'application/xslt+xml', - 'xsm' => 'application/vnd.syncml+xml', - 'xspf' => 'application/xspf+xml', - 'xul' => 'application/vnd.mozilla.xul+xml', - 'xvm' => 'application/xv+xml', - 'xvml' => 'application/xv+xml', - 'xwd' => 'image/x-xwindowdump', - 'xyz' => 'chemical/x-xyz', - 'xz' => 'application/x-xz', - 'yaml' => 'text/yaml', - 'yang' => 'application/yang', - 'yin' => 'application/yin+xml', - 'yml' => 'text/yaml', - 'ymp' => 'text/x-suse-ymp', - 'z' => 'application/x-compress', - 'z1' => 'application/x-zmachine', - 'z2' => 'application/x-zmachine', - 'z3' => 'application/x-zmachine', - 'z4' => 'application/x-zmachine', - 'z5' => 'application/x-zmachine', - 'z6' => 'application/x-zmachine', - 'z7' => 'application/x-zmachine', - 'z8' => 'application/x-zmachine', - 'zaz' => 'application/vnd.zzazz.deck+xml', - 'zip' => 'application/zip', - 'zir' => 'application/vnd.zul', - 'zirz' => 'application/vnd.zul', - 'zmm' => 'application/vnd.handheld-entertainment+xml', - 'zsh' => 'text/x-scriptzsh', - ]; - /** * Determines the mimetype of a file by looking at its extension. * - * @see https://raw.githubusercontent.com/jshttp/mime-db/master/db.json + * @param string $filename + * + * @return string|null */ - public static function fromFilename(string $filename): ?string + public static function fromFilename($filename) { return self::fromExtension(pathinfo($filename, PATHINFO_EXTENSION)); } @@ -1250,10 +19,122 @@ final class MimeType /** * Maps a file extensions to a mimetype. * - * @see https://raw.githubusercontent.com/jshttp/mime-db/master/db.json + * @param string $extension string The file extension. + * + * @return string|null + * + * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types */ - public static function fromExtension(string $extension): ?string + public static function fromExtension($extension) { - return self::MIME_TYPES[strtolower($extension)] ?? null; + static $mimetypes = [ + '3gp' => 'video/3gpp', + '7z' => 'application/x-7z-compressed', + 'aac' => 'audio/x-aac', + 'ai' => 'application/postscript', + 'aif' => 'audio/x-aiff', + 'asc' => 'text/plain', + 'asf' => 'video/x-ms-asf', + 'atom' => 'application/atom+xml', + 'avi' => 'video/x-msvideo', + 'bmp' => 'image/bmp', + 'bz2' => 'application/x-bzip2', + 'cer' => 'application/pkix-cert', + 'crl' => 'application/pkix-crl', + 'crt' => 'application/x-x509-ca-cert', + 'css' => 'text/css', + 'csv' => 'text/csv', + 'cu' => 'application/cu-seeme', + 'deb' => 'application/x-debian-package', + 'doc' => 'application/msword', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dvi' => 'application/x-dvi', + 'eot' => 'application/vnd.ms-fontobject', + 'eps' => 'application/postscript', + 'epub' => 'application/epub+zip', + 'etx' => 'text/x-setext', + 'flac' => 'audio/flac', + 'flv' => 'video/x-flv', + 'gif' => 'image/gif', + 'gz' => 'application/gzip', + 'htm' => 'text/html', + 'html' => 'text/html', + 'ico' => 'image/x-icon', + 'ics' => 'text/calendar', + 'ini' => 'text/plain', + 'iso' => 'application/x-iso9660-image', + 'jar' => 'application/java-archive', + 'jpe' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'js' => 'text/javascript', + 'json' => 'application/json', + 'latex' => 'application/x-latex', + 'log' => 'text/plain', + 'm4a' => 'audio/mp4', + 'm4v' => 'video/mp4', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mov' => 'video/quicktime', + 'mkv' => 'video/x-matroska', + 'mp3' => 'audio/mpeg', + 'mp4' => 'video/mp4', + 'mp4a' => 'audio/mp4', + 'mp4v' => 'video/mp4', + 'mpe' => 'video/mpeg', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mpg4' => 'video/mp4', + 'oga' => 'audio/ogg', + 'ogg' => 'audio/ogg', + 'ogv' => 'video/ogg', + 'ogx' => 'application/ogg', + 'pbm' => 'image/x-portable-bitmap', + 'pdf' => 'application/pdf', + 'pgm' => 'image/x-portable-graymap', + 'png' => 'image/png', + 'pnm' => 'image/x-portable-anymap', + 'ppm' => 'image/x-portable-pixmap', + 'ppt' => 'application/vnd.ms-powerpoint', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'ps' => 'application/postscript', + 'qt' => 'video/quicktime', + 'rar' => 'application/x-rar-compressed', + 'ras' => 'image/x-cmu-raster', + 'rss' => 'application/rss+xml', + 'rtf' => 'application/rtf', + 'sgm' => 'text/sgml', + 'sgml' => 'text/sgml', + 'svg' => 'image/svg+xml', + 'swf' => 'application/x-shockwave-flash', + 'tar' => 'application/x-tar', + 'tif' => 'image/tiff', + 'tiff' => 'image/tiff', + 'torrent' => 'application/x-bittorrent', + 'ttf' => 'application/x-font-ttf', + 'txt' => 'text/plain', + 'wav' => 'audio/x-wav', + 'webm' => 'video/webm', + 'webp' => 'image/webp', + 'wma' => 'audio/x-ms-wma', + 'wmv' => 'video/x-ms-wmv', + 'woff' => 'application/x-font-woff', + 'wsdl' => 'application/wsdl+xml', + 'xbm' => 'image/x-xbitmap', + 'xls' => 'application/vnd.ms-excel', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xml' => 'application/xml', + 'xpm' => 'image/x-xpixmap', + 'xwd' => 'image/x-xwindowdump', + 'yaml' => 'text/yaml', + 'yml' => 'text/yaml', + 'zip' => 'application/zip', + ]; + + $extension = strtolower($extension); + + return isset($mimetypes[$extension]) + ? $mimetypes[$extension] + : null; } } diff --git a/Server/vendor/guzzlehttp/psr7/src/MultipartStream.php b/Server/vendor/guzzlehttp/psr7/src/MultipartStream.php index 43d718f6..5a6079a8 100644 --- a/Server/vendor/guzzlehttp/psr7/src/MultipartStream.php +++ b/Server/vendor/guzzlehttp/psr7/src/MultipartStream.php @@ -1,7 +1,5 @@ boundary = $boundary ?: bin2hex(random_bytes(20)); + $this->boundary = $boundary ?: sha1(uniqid('', true)); $this->stream = $this->createStream($elements); } - public function getBoundary(): string + /** + * Get the boundary + * + * @return string + */ + public function getBoundary() { return $this->boundary; } - public function isWritable(): bool + public function isWritable() { return false; } /** * Get the headers needed before transferring the content of a POST file - * - * @param string[] $headers */ - private function getHeaders(array $headers): string + private function getHeaders(array $headers) { $str = ''; foreach ($headers as $key => $value) { $str .= "{$key}: {$value}\r\n"; } - return "--{$this->boundary}\r\n".trim($str)."\r\n\r\n"; + return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n"; } /** * Create the aggregate stream that will be used to upload the POST data */ - protected function createStream(array $elements = []): StreamInterface + protected function createStream(array $elements) { $stream = new AppendStream(); foreach ($elements as $element) { - if (!is_array($element)) { - throw new \UnexpectedValueException('An array is expected'); - } $this->addElement($stream, $element); } @@ -83,7 +79,7 @@ final class MultipartStream implements StreamInterface return $stream; } - private function addElement(AppendStream $stream, array $element): void + private function addElement(AppendStream $stream, array $element) { foreach (['contents', 'name'] as $key) { if (!array_key_exists($key, $element)) { @@ -95,16 +91,16 @@ final class MultipartStream implements StreamInterface if (empty($element['filename'])) { $uri = $element['contents']->getMetadata('uri'); - if ($uri && \is_string($uri) && \substr($uri, 0, 6) !== 'php://' && \substr($uri, 0, 7) !== 'data://') { + if (substr($uri, 0, 6) !== 'php://') { $element['filename'] = $uri; } } - [$body, $headers] = $this->createElement( + list($body, $headers) = $this->createElement( $element['name'], $element['contents'], - $element['filename'] ?? null, - $element['headers'] ?? [] + isset($element['filename']) ? $element['filename'] : null, + isset($element['headers']) ? $element['headers'] : [] ); $stream->addStream(Utils::streamFor($this->getHeaders($headers))); @@ -113,14 +109,12 @@ final class MultipartStream implements StreamInterface } /** - * @param string[] $headers - * - * @return array{0: StreamInterface, 1: string[]} + * @return array */ - private function createElement(string $name, StreamInterface $stream, ?string $filename, array $headers): array + private function createElement($name, StreamInterface $stream, $filename, array $headers) { // Set a default content-disposition header if one was no provided - $disposition = self::getHeader($headers, 'content-disposition'); + $disposition = $this->getHeader($headers, 'content-disposition'); if (!$disposition) { $headers['Content-Disposition'] = ($filename === '0' || $filename) ? sprintf( @@ -132,7 +126,7 @@ final class MultipartStream implements StreamInterface } // Set a default content-length header if one was no provided - $length = self::getHeader($headers, 'content-length'); + $length = $this->getHeader($headers, 'content-length'); if (!$length) { if ($length = $stream->getSize()) { $headers['Content-Length'] = (string) $length; @@ -140,22 +134,21 @@ final class MultipartStream implements StreamInterface } // Set a default Content-Type if one was not supplied - $type = self::getHeader($headers, 'content-type'); + $type = $this->getHeader($headers, 'content-type'); if (!$type && ($filename === '0' || $filename)) { - $headers['Content-Type'] = MimeType::fromFilename($filename) ?? 'application/octet-stream'; + if ($type = MimeType::fromFilename($filename)) { + $headers['Content-Type'] = $type; + } } return [$stream, $headers]; } - /** - * @param string[] $headers - */ - private static function getHeader(array $headers, string $key): ?string + private function getHeader(array $headers, $key) { $lowercaseHeader = strtolower($key); foreach ($headers as $k => $v) { - if (strtolower((string) $k) === $lowercaseHeader) { + if (strtolower($k) === $lowercaseHeader) { return $v; } } diff --git a/Server/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/Server/vendor/guzzlehttp/psr7/src/NoSeekStream.php index 161a224f..d66bdde4 100644 --- a/Server/vendor/guzzlehttp/psr7/src/NoSeekStream.php +++ b/Server/vendor/guzzlehttp/psr7/src/NoSeekStream.php @@ -1,27 +1,24 @@ source = $source; - $this->size = $options['size'] ?? null; - $this->metadata = $options['metadata'] ?? []; + $this->size = isset($options['size']) ? $options['size'] : null; + $this->metadata = isset($options['metadata']) ? $options['metadata'] : []; $this->buffer = new BufferStream(); } - public function __toString(): string + public function __toString() { try { return Utils::copyToString($this); - } catch (\Throwable $e) { - if (\PHP_VERSION_ID >= 70400) { - throw $e; - } - trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); - + } catch (\Exception $e) { return ''; } } - public function close(): void + public function close() { $this->detach(); } public function detach() { - $this->tellPos = 0; + $this->tellPos = false; $this->source = null; return null; } - public function getSize(): ?int + public function getSize() { return $this->size; } - public function tell(): int + public function tell() { return $this->tellPos; } - public function eof(): bool + public function eof() { - return $this->source === null; + return !$this->source; } - public function isSeekable(): bool + public function isSeekable() { return false; } - public function rewind(): void + public function rewind() { $this->seek(0); } - public function seek($offset, $whence = SEEK_SET): void + public function seek($offset, $whence = SEEK_SET) { throw new \RuntimeException('Cannot seek a PumpStream'); } - public function isWritable(): bool + public function isWritable() { return false; } - public function write($string): int + public function write($string) { throw new \RuntimeException('Cannot write to a PumpStream'); } - public function isReadable(): bool + public function isReadable() { return true; } - public function read($length): string + public function read($length) { $data = $this->buffer->read($length); $readLen = strlen($data); @@ -139,7 +134,7 @@ final class PumpStream implements StreamInterface return $data; } - public function getContents(): string + public function getContents() { $result = ''; while (!$this->eof()) { @@ -149,26 +144,22 @@ final class PumpStream implements StreamInterface return $result; } - /** - * @return mixed - */ public function getMetadata($key = null) { if (!$key) { return $this->metadata; } - return $this->metadata[$key] ?? null; + return isset($this->metadata[$key]) ? $this->metadata[$key] : null; } - private function pump(int $length): void + private function pump($length) { - if ($this->source !== null) { + if ($this->source) { do { - $data = ($this->source)($length); + $data = call_user_func($this->source, $length); if ($data === false || $data === null) { $this->source = null; - return; } $this->buffer->write($data); diff --git a/Server/vendor/guzzlehttp/psr7/src/Query.php b/Server/vendor/guzzlehttp/psr7/src/Query.php index ccf867a0..5a7cc035 100644 --- a/Server/vendor/guzzlehttp/psr7/src/Query.php +++ b/Server/vendor/guzzlehttp/psr7/src/Query.php @@ -1,7 +1,5 @@ $v) { - $k = $encoder((string) $k); + $k = $encoder($k); if (!is_array($v)) { $qs .= $k; - $v = is_bool($v) ? $castBool($v) : $v; if ($v !== null) { - $qs .= '='.$encoder((string) $v); + $qs .= '=' . $encoder($v); } $qs .= '&'; } else { foreach ($v as $vv) { $qs .= $k; - $vv = is_bool($vv) ? $castBool($vv) : $vv; if ($vv !== null) { - $qs .= '='.$encoder((string) $vv); + $qs .= '=' . $encoder($vv); } $qs .= '&'; } diff --git a/Server/vendor/guzzlehttp/psr7/src/Request.php b/Server/vendor/guzzlehttp/psr7/src/Request.php index faafe1ad..c1cdaebf 100644 --- a/Server/vendor/guzzlehttp/psr7/src/Request.php +++ b/Server/vendor/guzzlehttp/psr7/src/Request.php @@ -1,7 +1,5 @@ assertMethod($method); if (!($uri instanceof UriInterface)) { @@ -58,24 +56,24 @@ class Request implements RequestInterface } } - public function getRequestTarget(): string + public function getRequestTarget() { if ($this->requestTarget !== null) { return $this->requestTarget; } $target = $this->uri->getPath(); - if ($target === '') { + if ($target == '') { $target = '/'; } if ($this->uri->getQuery() != '') { - $target .= '?'.$this->uri->getQuery(); + $target .= '?' . $this->uri->getQuery(); } return $target; } - public function withRequestTarget($requestTarget): RequestInterface + public function withRequestTarget($requestTarget) { if (preg_match('#\s#', $requestTarget)) { throw new InvalidArgumentException( @@ -85,30 +83,28 @@ class Request implements RequestInterface $new = clone $this; $new->requestTarget = $requestTarget; - return $new; } - public function getMethod(): string + public function getMethod() { return $this->method; } - public function withMethod($method): RequestInterface + public function withMethod($method) { $this->assertMethod($method); $new = clone $this; $new->method = strtoupper($method); - return $new; } - public function getUri(): UriInterface + public function getUri() { return $this->uri; } - public function withUri(UriInterface $uri, $preserveHost = false): RequestInterface + public function withUri(UriInterface $uri, $preserveHost = false) { if ($uri === $this->uri) { return $this; @@ -124,7 +120,7 @@ class Request implements RequestInterface return $new; } - private function updateHostFromUri(): void + private function updateHostFromUri() { $host = $this->uri->getHost(); @@ -133,7 +129,7 @@ class Request implements RequestInterface } if (($port = $this->uri->getPort()) !== null) { - $host .= ':'.$port; + $host .= ':' . $port; } if (isset($this->headerNames['host'])) { @@ -143,17 +139,14 @@ class Request implements RequestInterface $this->headerNames['host'] = 'Host'; } // Ensure Host is the first header. - // See: https://datatracker.ietf.org/doc/html/rfc7230#section-5.4 + // See: http://tools.ietf.org/html/rfc7230#section-5.4 $this->headers = [$header => [$host]] + $this->headers; } - /** - * @param mixed $method - */ - private function assertMethod($method): void + private function assertMethod($method) { if (!is_string($method) || $method === '') { - throw new InvalidArgumentException('Method must be a non-empty string.'); + throw new \InvalidArgumentException('Method must be a non-empty string.'); } } } diff --git a/Server/vendor/guzzlehttp/psr7/src/Response.php b/Server/vendor/guzzlehttp/psr7/src/Response.php index 34e612fd..8c01a0f5 100644 --- a/Server/vendor/guzzlehttp/psr7/src/Response.php +++ b/Server/vendor/guzzlehttp/psr7/src/Response.php @@ -1,7 +1,5 @@ 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', @@ -36,7 +34,6 @@ class Response implements ResponseInterface 305 => 'Use Proxy', 306 => 'Switch Proxy', 307 => 'Temporary Redirect', - 308 => 'Permanent Redirect', 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', @@ -74,30 +71,31 @@ class Response implements ResponseInterface 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected', - 510 => 'Not Extended', 511 => 'Network Authentication Required', ]; /** @var string */ - private $reasonPhrase; + private $reasonPhrase = ''; /** @var int */ - private $statusCode; + private $statusCode = 200; /** * @param int $status Status code - * @param (string|string[])[] $headers Response headers + * @param array $headers Response headers * @param string|resource|StreamInterface|null $body Response body * @param string $version Protocol version * @param string|null $reason Reason phrase (when empty a default will be used based on the status code) */ public function __construct( - int $status = 200, + $status = 200, array $headers = [], $body = null, - string $version = '1.1', - ?string $reason = null + $version = '1.1', + $reason = null ) { + $this->assertStatusCodeIsInteger($status); + $status = (int) $status; $this->assertStatusCodeRange($status); $this->statusCode = $status; @@ -107,8 +105,8 @@ class Response implements ResponseInterface } $this->setHeaders($headers); - if ($reason == '' && isset(self::PHRASES[$this->statusCode])) { - $this->reasonPhrase = self::PHRASES[$this->statusCode]; + if ($reason == '' && isset(self::$phrases[$this->statusCode])) { + $this->reasonPhrase = self::$phrases[$this->statusCode]; } else { $this->reasonPhrase = (string) $reason; } @@ -116,17 +114,17 @@ class Response implements ResponseInterface $this->protocol = $version; } - public function getStatusCode(): int + public function getStatusCode() { return $this->statusCode; } - public function getReasonPhrase(): string + public function getReasonPhrase() { return $this->reasonPhrase; } - public function withStatus($code, $reasonPhrase = ''): ResponseInterface + public function withStatus($code, $reasonPhrase = '') { $this->assertStatusCodeIsInteger($code); $code = (int) $code; @@ -134,25 +132,21 @@ class Response implements ResponseInterface $new = clone $this; $new->statusCode = $code; - if ($reasonPhrase == '' && isset(self::PHRASES[$new->statusCode])) { - $reasonPhrase = self::PHRASES[$new->statusCode]; + if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) { + $reasonPhrase = self::$phrases[$new->statusCode]; } $new->reasonPhrase = (string) $reasonPhrase; - return $new; } - /** - * @param mixed $statusCode - */ - private function assertStatusCodeIsInteger($statusCode): void + private function assertStatusCodeIsInteger($statusCode) { if (filter_var($statusCode, FILTER_VALIDATE_INT) === false) { throw new \InvalidArgumentException('Status code must be an integer value.'); } } - private function assertStatusCodeRange(int $statusCode): void + private function assertStatusCodeRange($statusCode) { if ($statusCode < 100 || $statusCode >= 600) { throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.'); diff --git a/Server/vendor/guzzlehttp/psr7/src/Rfc7230.php b/Server/vendor/guzzlehttp/psr7/src/Rfc7230.php index 8219dba4..51b571f2 100644 --- a/Server/vendor/guzzlehttp/psr7/src/Rfc7230.php +++ b/Server/vendor/guzzlehttp/psr7/src/Rfc7230.php @@ -1,23 +1,19 @@ @,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m"; - public const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)"; + const HEADER_REGEX = "(^([^()<>@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m"; + const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)"; } diff --git a/Server/vendor/guzzlehttp/psr7/src/ServerRequest.php b/Server/vendor/guzzlehttp/psr7/src/ServerRequest.php index 3cc95345..e6d26f5f 100644 --- a/Server/vendor/guzzlehttp/psr7/src/ServerRequest.php +++ b/Server/vendor/guzzlehttp/psr7/src/ServerRequest.php @@ -1,7 +1,5 @@ serverParams = $serverParams; @@ -80,11 +78,13 @@ class ServerRequest extends Request implements ServerRequestInterface /** * Return an UploadedFile instance array. * - * @param array $files An array which respect $_FILES structure + * @param array $files A array which respect $_FILES structure + * + * @return array * * @throws InvalidArgumentException for unrecognized values */ - public static function normalizeFiles(array $files): array + public static function normalizeFiles(array $files) { $normalized = []; @@ -112,7 +112,7 @@ class ServerRequest extends Request implements ServerRequestInterface * * @param array $value $_FILES struct * - * @return UploadedFileInterface|UploadedFileInterface[] + * @return array|UploadedFileInterface */ private static function createUploadedFileFromSpec(array $value) { @@ -135,19 +135,21 @@ class ServerRequest extends Request implements ServerRequestInterface * Loops through all nested files and returns a normalized array of * UploadedFileInterface instances. * + * @param array $files + * * @return UploadedFileInterface[] */ - private static function normalizeNestedFileSpec(array $files = []): array + private static function normalizeNestedFileSpec(array $files = []) { $normalizedFiles = []; foreach (array_keys($files['tmp_name']) as $key) { $spec = [ 'tmp_name' => $files['tmp_name'][$key], - 'size' => $files['size'][$key] ?? null, - 'error' => $files['error'][$key] ?? null, - 'name' => $files['name'][$key] ?? null, - 'type' => $files['type'][$key] ?? null, + 'size' => $files['size'][$key], + 'error' => $files['error'][$key], + 'name' => $files['name'][$key], + 'type' => $files['type'][$key], ]; $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec); } @@ -162,10 +164,12 @@ class ServerRequest extends Request implements ServerRequestInterface * $_COOKIE * $_FILES * $_SERVER + * + * @return ServerRequestInterface */ - public static function fromGlobals(): ServerRequestInterface + public static function fromGlobals() { - $method = $_SERVER['REQUEST_METHOD'] ?? 'GET'; + $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; $headers = getallheaders(); $uri = self::getUriFromGlobals(); $body = new CachingStream(new LazyOpenStream('php://input', 'r+')); @@ -180,24 +184,26 @@ class ServerRequest extends Request implements ServerRequestInterface ->withUploadedFiles(self::normalizeFiles($_FILES)); } - private static function extractHostAndPortFromAuthority(string $authority): array + private static function extractHostAndPortFromAuthority($authority) { - $uri = 'http://'.$authority; + $uri = 'http://' . $authority; $parts = parse_url($uri); if (false === $parts) { return [null, null]; } - $host = $parts['host'] ?? null; - $port = $parts['port'] ?? null; + $host = isset($parts['host']) ? $parts['host'] : null; + $port = isset($parts['port']) ? $parts['port'] : null; return [$host, $port]; } /** * Get a Uri populated with values from $_SERVER. + * + * @return UriInterface */ - public static function getUriFromGlobals(): UriInterface + public static function getUriFromGlobals() { $uri = new Uri(''); @@ -205,7 +211,7 @@ class ServerRequest extends Request implements ServerRequestInterface $hasPort = false; if (isset($_SERVER['HTTP_HOST'])) { - [$host, $port] = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']); + list($host, $port) = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']); if ($host !== null) { $uri = $uri->withHost($host); } @@ -241,17 +247,26 @@ class ServerRequest extends Request implements ServerRequestInterface return $uri; } - public function getServerParams(): array + /** + * {@inheritdoc} + */ + public function getServerParams() { return $this->serverParams; } - public function getUploadedFiles(): array + /** + * {@inheritdoc} + */ + public function getUploadedFiles() { return $this->uploadedFiles; } - public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface + /** + * {@inheritdoc} + */ + public function withUploadedFiles(array $uploadedFiles) { $new = clone $this; $new->uploadedFiles = $uploadedFiles; @@ -259,12 +274,18 @@ class ServerRequest extends Request implements ServerRequestInterface return $new; } - public function getCookieParams(): array + /** + * {@inheritdoc} + */ + public function getCookieParams() { return $this->cookieParams; } - public function withCookieParams(array $cookies): ServerRequestInterface + /** + * {@inheritdoc} + */ + public function withCookieParams(array $cookies) { $new = clone $this; $new->cookieParams = $cookies; @@ -272,12 +293,18 @@ class ServerRequest extends Request implements ServerRequestInterface return $new; } - public function getQueryParams(): array + /** + * {@inheritdoc} + */ + public function getQueryParams() { return $this->queryParams; } - public function withQueryParams(array $query): ServerRequestInterface + /** + * {@inheritdoc} + */ + public function withQueryParams(array $query) { $new = clone $this; $new->queryParams = $query; @@ -286,14 +313,17 @@ class ServerRequest extends Request implements ServerRequestInterface } /** - * @return array|object|null + * {@inheritdoc} */ public function getParsedBody() { return $this->parsedBody; } - public function withParsedBody($data): ServerRequestInterface + /** + * {@inheritdoc} + */ + public function withParsedBody($data) { $new = clone $this; $new->parsedBody = $data; @@ -301,13 +331,16 @@ class ServerRequest extends Request implements ServerRequestInterface return $new; } - public function getAttributes(): array + /** + * {@inheritdoc} + */ + public function getAttributes() { return $this->attributes; } /** - * @return mixed + * {@inheritdoc} */ public function getAttribute($attribute, $default = null) { @@ -318,7 +351,10 @@ class ServerRequest extends Request implements ServerRequestInterface return $this->attributes[$attribute]; } - public function withAttribute($attribute, $value): ServerRequestInterface + /** + * {@inheritdoc} + */ + public function withAttribute($attribute, $value) { $new = clone $this; $new->attributes[$attribute] = $value; @@ -326,7 +362,10 @@ class ServerRequest extends Request implements ServerRequestInterface return $new; } - public function withoutAttribute($attribute): ServerRequestInterface + /** + * {@inheritdoc} + */ + public function withoutAttribute($attribute) { if (false === array_key_exists($attribute, $this->attributes)) { return $this; diff --git a/Server/vendor/guzzlehttp/psr7/src/Stream.php b/Server/vendor/guzzlehttp/psr7/src/Stream.php index 0aff9b2b..3865d6d6 100644 --- a/Server/vendor/guzzlehttp/psr7/src/Stream.php +++ b/Server/vendor/guzzlehttp/psr7/src/Stream.php @@ -1,36 +1,33 @@ size = $options['size']; } - $this->customMetadata = $options['metadata'] ?? []; + $this->customMetadata = isset($options['metadata']) + ? $options['metadata'] + : []; + $this->stream = $stream; $meta = stream_get_meta_data($this->stream); $this->seekable = $meta['seekable']; - $this->readable = (bool) preg_match(self::READABLE_MODES, $meta['mode']); - $this->writable = (bool) preg_match(self::WRITABLE_MODES, $meta['mode']); + $this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']); + $this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']); $this->uri = $this->getMetadata('uri'); } @@ -74,38 +74,34 @@ class Stream implements StreamInterface $this->close(); } - public function __toString(): string + public function __toString() { try { if ($this->isSeekable()) { $this->seek(0); } - return $this->getContents(); - } catch (\Throwable $e) { - if (\PHP_VERSION_ID >= 70400) { - throw $e; - } - trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); - + } catch (\Exception $e) { return ''; } } - public function getContents(): string + public function getContents() { if (!isset($this->stream)) { throw new \RuntimeException('Stream is detached'); } - if (!$this->readable) { - throw new \RuntimeException('Cannot read from non-readable stream'); + $contents = stream_get_contents($this->stream); + + if ($contents === false) { + throw new \RuntimeException('Unable to read stream contents'); } - return Utils::tryGetContents($this->stream); + return $contents; } - public function close(): void + public function close() { if (isset($this->stream)) { if (is_resource($this->stream)) { @@ -129,7 +125,7 @@ class Stream implements StreamInterface return $result; } - public function getSize(): ?int + public function getSize() { if ($this->size !== null) { return $this->size; @@ -145,31 +141,30 @@ class Stream implements StreamInterface } $stats = fstat($this->stream); - if (is_array($stats) && isset($stats['size'])) { + if (isset($stats['size'])) { $this->size = $stats['size']; - return $this->size; } return null; } - public function isReadable(): bool + public function isReadable() { return $this->readable; } - public function isWritable(): bool + public function isWritable() { return $this->writable; } - public function isSeekable(): bool + public function isSeekable() { return $this->seekable; } - public function eof(): bool + public function eof() { if (!isset($this->stream)) { throw new \RuntimeException('Stream is detached'); @@ -178,7 +173,7 @@ class Stream implements StreamInterface return feof($this->stream); } - public function tell(): int + public function tell() { if (!isset($this->stream)) { throw new \RuntimeException('Stream is detached'); @@ -193,12 +188,12 @@ class Stream implements StreamInterface return $result; } - public function rewind(): void + public function rewind() { $this->seek(0); } - public function seek($offset, $whence = SEEK_SET): void + public function seek($offset, $whence = SEEK_SET) { $whence = (int) $whence; @@ -210,11 +205,11 @@ class Stream implements StreamInterface } if (fseek($this->stream, $offset, $whence) === -1) { throw new \RuntimeException('Unable to seek to stream position ' - .$offset.' with whence '.var_export($whence, true)); + . $offset . ' with whence ' . var_export($whence, true)); } } - public function read($length): string + public function read($length) { if (!isset($this->stream)) { throw new \RuntimeException('Stream is detached'); @@ -230,12 +225,7 @@ class Stream implements StreamInterface return ''; } - try { - $string = fread($this->stream, $length); - } catch (\Exception $e) { - throw new \RuntimeException('Unable to read from stream', 0, $e); - } - + $string = fread($this->stream, $length); if (false === $string) { throw new \RuntimeException('Unable to read from stream'); } @@ -243,7 +233,7 @@ class Stream implements StreamInterface return $string; } - public function write($string): int + public function write($string) { if (!isset($this->stream)) { throw new \RuntimeException('Stream is detached'); @@ -263,9 +253,6 @@ class Stream implements StreamInterface return $result; } - /** - * @return mixed - */ public function getMetadata($key = null) { if (!isset($this->stream)) { @@ -278,6 +265,6 @@ class Stream implements StreamInterface $meta = stream_get_meta_data($this->stream); - return $meta[$key] ?? null; + return isset($meta[$key]) ? $meta[$key] : null; } } diff --git a/Server/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/Server/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php index 601c13af..5025dd67 100644 --- a/Server/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php +++ b/Server/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php @@ -1,7 +1,5 @@ stream = $this->createStream(); - return $this->stream; } throw new \UnexpectedValueException("$name not found on class"); } - public function __toString(): string + public function __toString() { try { if ($this->isSeekable()) { $this->seek(0); } - return $this->getContents(); - } catch (\Throwable $e) { - if (\PHP_VERSION_ID >= 70400) { - throw $e; - } - trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); - + } catch (\Exception $e) { + // Really, PHP? https://bugs.php.net/bug.php?id=53648 + trigger_error('StreamDecorator::__toString exception: ' + . (string) $e, E_USER_ERROR); return ''; } } - public function getContents(): string + public function getContents() { return Utils::copyToString($this); } @@ -64,26 +60,24 @@ trait StreamDecoratorTrait /** * Allow decorators to implement custom methods * + * @param string $method Missing method name + * @param array $args Method arguments + * * @return mixed */ - public function __call(string $method, array $args) + public function __call($method, array $args) { - /** @var callable $callable */ - $callable = [$this->stream, $method]; - $result = ($callable)(...$args); + $result = call_user_func_array([$this->stream, $method], $args); // Always return the wrapped object if the result is a return $this return $result === $this->stream ? $this : $result; } - public function close(): void + public function close() { $this->stream->close(); } - /** - * @return mixed - */ public function getMetadata($key = null) { return $this->stream->getMetadata($key); @@ -94,52 +88,52 @@ trait StreamDecoratorTrait return $this->stream->detach(); } - public function getSize(): ?int + public function getSize() { return $this->stream->getSize(); } - public function eof(): bool + public function eof() { return $this->stream->eof(); } - public function tell(): int + public function tell() { return $this->stream->tell(); } - public function isReadable(): bool + public function isReadable() { return $this->stream->isReadable(); } - public function isWritable(): bool + public function isWritable() { return $this->stream->isWritable(); } - public function isSeekable(): bool + public function isSeekable() { return $this->stream->isSeekable(); } - public function rewind(): void + public function rewind() { $this->seek(0); } - public function seek($offset, $whence = SEEK_SET): void + public function seek($offset, $whence = SEEK_SET) { $this->stream->seek($offset, $whence); } - public function read($length): string + public function read($length) { return $this->stream->read($length); } - public function write($string): int + public function write($string) { return $this->stream->write($string); } @@ -147,9 +141,11 @@ trait StreamDecoratorTrait /** * Implement in subclasses to dynamically create streams when requested. * + * @return StreamInterface + * * @throws \BadMethodCallException */ - protected function createStream(): StreamInterface + protected function createStream() { throw new \BadMethodCallException('Not implemented'); } diff --git a/Server/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/Server/vendor/guzzlehttp/psr7/src/StreamWrapper.php index 77b04d74..fc7cb969 100644 --- a/Server/vendor/guzzlehttp/psr7/src/StreamWrapper.php +++ b/Server/vendor/guzzlehttp/psr7/src/StreamWrapper.php @@ -1,7 +1,5 @@ ['stream' => $stream], + 'guzzle' => ['stream' => $stream] ]); } /** * Registers the stream wrapper if needed */ - public static function register(): void + public static function register() { if (!in_array('guzzle', stream_get_wrappers())) { stream_wrapper_register('guzzle', __CLASS__); } } - public function stream_open(string $path, string $mode, int $options, ?string &$opened_path = null): bool + public function stream_open($path, $mode, $options, &$opened_path) { $options = stream_context_get_options($this->context); @@ -83,125 +83,83 @@ final class StreamWrapper return true; } - public function stream_read(int $count): string + public function stream_read($count) { return $this->stream->read($count); } - public function stream_write(string $data): int + public function stream_write($data) { - return $this->stream->write($data); + return (int) $this->stream->write($data); } - public function stream_tell(): int + public function stream_tell() { return $this->stream->tell(); } - public function stream_eof(): bool + public function stream_eof() { return $this->stream->eof(); } - public function stream_seek(int $offset, int $whence): bool + public function stream_seek($offset, $whence) { $this->stream->seek($offset, $whence); return true; } - /** - * @return resource|false - */ - public function stream_cast(int $cast_as) + public function stream_cast($cast_as) { - $stream = clone $this->stream; - $resource = $stream->detach(); + $stream = clone($this->stream); - return $resource ?? false; + return $stream->detach(); } - /** - * @return array{ - * dev: int, - * ino: int, - * mode: int, - * nlink: int, - * uid: int, - * gid: int, - * rdev: int, - * size: int, - * atime: int, - * mtime: int, - * ctime: int, - * blksize: int, - * blocks: int - * }|false - */ public function stream_stat() { - if ($this->stream->getSize() === null) { - return false; - } - static $modeMap = [ - 'r' => 33060, + 'r' => 33060, 'rb' => 33060, 'r+' => 33206, - 'w' => 33188, - 'wb' => 33188, + 'w' => 33188, + 'wb' => 33188 ]; return [ - 'dev' => 0, - 'ino' => 0, - 'mode' => $modeMap[$this->mode], - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => $this->stream->getSize() ?: 0, - 'atime' => 0, - 'mtime' => 0, - 'ctime' => 0, + 'dev' => 0, + 'ino' => 0, + 'mode' => $modeMap[$this->mode], + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => $this->stream->getSize() ?: 0, + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, 'blksize' => 0, - 'blocks' => 0, + 'blocks' => 0 ]; } - /** - * @return array{ - * dev: int, - * ino: int, - * mode: int, - * nlink: int, - * uid: int, - * gid: int, - * rdev: int, - * size: int, - * atime: int, - * mtime: int, - * ctime: int, - * blksize: int, - * blocks: int - * } - */ - public function url_stat(string $path, int $flags): array + public function url_stat($path, $flags) { return [ - 'dev' => 0, - 'ino' => 0, - 'mode' => 0, - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => 0, - 'atime' => 0, - 'mtime' => 0, - 'ctime' => 0, + 'dev' => 0, + 'ino' => 0, + 'mode' => 0, + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => 0, + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, 'blksize' => 0, - 'blocks' => 0, + 'blocks' => 0 ]; } } diff --git a/Server/vendor/guzzlehttp/psr7/src/UploadedFile.php b/Server/vendor/guzzlehttp/psr7/src/UploadedFile.php index 9c9ea49f..bf342c4d 100644 --- a/Server/vendor/guzzlehttp/psr7/src/UploadedFile.php +++ b/Server/vendor/guzzlehttp/psr7/src/UploadedFile.php @@ -1,7 +1,5 @@ setError($errorStatus); - $this->size = $size; - $this->clientFilename = $clientFilename; - $this->clientMediaType = $clientMediaType; + $this->setSize($size); + $this->setClientFilename($clientFilename); + $this->setClientMediaType($clientMediaType); if ($this->isOk()) { $this->setStreamOrFile($streamOrFile); @@ -80,11 +85,11 @@ class UploadedFile implements UploadedFileInterface /** * Depending on the value set file or stream variable * - * @param StreamInterface|string|resource $streamOrFile + * @param mixed $streamOrFile * * @throws InvalidArgumentException */ - private function setStreamOrFile($streamOrFile): void + private function setStreamOrFile($streamOrFile) { if (is_string($streamOrFile)) { $this->file = $streamOrFile; @@ -100,11 +105,19 @@ class UploadedFile implements UploadedFileInterface } /** + * @param int $error + * * @throws InvalidArgumentException */ - private function setError(int $error): void + private function setError($error) { - if (false === in_array($error, UploadedFile::ERRORS, true)) { + if (false === is_int($error)) { + throw new InvalidArgumentException( + 'Upload file error status must be an integer' + ); + } + + if (false === in_array($error, UploadedFile::$errors)) { throw new InvalidArgumentException( 'Invalid error status for UploadedFile' ); @@ -113,20 +126,88 @@ class UploadedFile implements UploadedFileInterface $this->error = $error; } - private static function isStringNotEmpty($param): bool + /** + * @param int $size + * + * @throws InvalidArgumentException + */ + private function setSize($size) + { + if (false === is_int($size)) { + throw new InvalidArgumentException( + 'Upload file size must be an integer' + ); + } + + $this->size = $size; + } + + /** + * @param mixed $param + * + * @return bool + */ + private function isStringOrNull($param) + { + return in_array(gettype($param), ['string', 'NULL']); + } + + /** + * @param mixed $param + * + * @return bool + */ + private function isStringNotEmpty($param) { return is_string($param) && false === empty($param); } /** - * Return true if there is no upload error + * @param string|null $clientFilename + * + * @throws InvalidArgumentException */ - private function isOk(): bool + private function setClientFilename($clientFilename) + { + if (false === $this->isStringOrNull($clientFilename)) { + throw new InvalidArgumentException( + 'Upload file client filename must be a string or null' + ); + } + + $this->clientFilename = $clientFilename; + } + + /** + * @param string|null $clientMediaType + * + * @throws InvalidArgumentException + */ + private function setClientMediaType($clientMediaType) + { + if (false === $this->isStringOrNull($clientMediaType)) { + throw new InvalidArgumentException( + 'Upload file client media type must be a string or null' + ); + } + + $this->clientMediaType = $clientMediaType; + } + + /** + * Return true if there is no upload error + * + * @return bool + */ + private function isOk() { return $this->error === UPLOAD_ERR_OK; } - public function isMoved(): bool + /** + * @return bool + */ + public function isMoved() { return $this->moved; } @@ -134,7 +215,7 @@ class UploadedFile implements UploadedFileInterface /** * @throws RuntimeException if is moved or not ok */ - private function validateActive(): void + private function validateActive() { if (false === $this->isOk()) { throw new RuntimeException('Cannot retrieve stream due to upload error'); @@ -145,7 +226,12 @@ class UploadedFile implements UploadedFileInterface } } - public function getStream(): StreamInterface + /** + * {@inheritdoc} + * + * @throws RuntimeException if the upload was not successful. + */ + public function getStream() { $this->validateActive(); @@ -153,24 +239,34 @@ class UploadedFile implements UploadedFileInterface return $this->stream; } - /** @var string $file */ - $file = $this->file; - - return new LazyOpenStream($file, 'r+'); + return new LazyOpenStream($this->file, 'r+'); } - public function moveTo($targetPath): void + /** + * {@inheritdoc} + * + * @see http://php.net/is_uploaded_file + * @see http://php.net/move_uploaded_file + * + * @param string $targetPath Path to which to move the uploaded file. + * + * @throws RuntimeException if the upload was not successful. + * @throws InvalidArgumentException if the $path specified is invalid. + * @throws RuntimeException on any error during the move operation, or on + * the second or subsequent call to the method. + */ + public function moveTo($targetPath) { $this->validateActive(); - if (false === self::isStringNotEmpty($targetPath)) { + if (false === $this->isStringNotEmpty($targetPath)) { throw new InvalidArgumentException( 'Invalid path provided for move operation; must be a non-empty string' ); } if ($this->file) { - $this->moved = PHP_SAPI === 'cli' + $this->moved = php_sapi_name() == 'cli' ? rename($this->file, $targetPath) : move_uploaded_file($this->file, $targetPath); } else { @@ -189,22 +285,43 @@ class UploadedFile implements UploadedFileInterface } } - public function getSize(): ?int + /** + * {@inheritdoc} + * + * @return int|null The file size in bytes or null if unknown. + */ + public function getSize() { return $this->size; } - public function getError(): int + /** + * {@inheritdoc} + * + * @see http://php.net/manual/en/features.file-upload.errors.php + * + * @return int One of PHP's UPLOAD_ERR_XXX constants. + */ + public function getError() { return $this->error; } - public function getClientFilename(): ?string + /** + * {@inheritdoc} + * + * @return string|null The filename sent by the client or null if none + * was provided. + */ + public function getClientFilename() { return $this->clientFilename; } - public function getClientMediaType(): ?string + /** + * {@inheritdoc} + */ + public function getClientMediaType() { return $this->clientMediaType; } diff --git a/Server/vendor/guzzlehttp/psr7/src/Uri.php b/Server/vendor/guzzlehttp/psr7/src/Uri.php index 481dfca9..0f9f020d 100644 --- a/Server/vendor/guzzlehttp/psr7/src/Uri.php +++ b/Server/vendor/guzzlehttp/psr7/src/Uri.php @@ -1,10 +1,7 @@ 80, + private static $defaultPorts = [ + 'http' => 80, 'https' => 443, 'ftp' => 21, 'gopher' => 70, @@ -38,20 +35,9 @@ class Uri implements UriInterface, \JsonSerializable 'ldap' => 389, ]; - /** - * Unreserved characters for use in a regex. - * - * @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.3 - */ - private const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~'; - - /** - * Sub-delims for use in a regex. - * - * @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.2 - */ - private const CHAR_SUB_DELIMS = '!\$&\'\(\)\*\+,;='; - private const QUERY_SEPARATORS_REPLACEMENT = ['=' => '%3D', '&' => '%26']; + private static $charUnreserved = 'a-zA-Z0-9_\-\.~'; + private static $charSubDelims = '!\$&\'\(\)\*\+,;='; + private static $replaceQuery = ['=' => '%3D', '&' => '%26']; /** @var string Uri scheme. */ private $scheme = ''; @@ -74,15 +60,16 @@ class Uri implements UriInterface, \JsonSerializable /** @var string Uri fragment. */ private $fragment = ''; - /** @var string|null String representation */ - private $composedComponents; - - public function __construct(string $uri = '') + /** + * @param string $uri URI to parse + */ + public function __construct($uri = '') { - if ($uri !== '') { + // weak type check to also accept null until we can add scalar type hints + if ($uri != '') { $parts = self::parse($uri); if ($parts === false) { - throw new MalformedUriException("Unable to parse URI: $uri"); + throw new \InvalidArgumentException("Unable to parse URI: $uri"); } $this->applyParts($parts); } @@ -101,19 +88,19 @@ class Uri implements UriInterface, \JsonSerializable * @see https://www.php.net/manual/en/function.parse-url.php#114817 * @see https://curl.haxx.se/libcurl/c/CURLOPT_URL.html#ENCODING * + * @param string $url + * * @return array|false */ - private static function parse(string $url) + private static function parse($url) { // If IPv6 $prefix = ''; if (preg_match('%^(.*://\[[0-9:a-f]+\])(.*?)$%', $url, $matches)) { - /** @var array{0:string, 1:string, 2:string} $matches */ $prefix = $matches[1]; $url = $matches[2]; } - /** @var string */ $encodedUrl = preg_replace_callback( '%[^:/@?&=#]+%usD', static function ($matches) { @@ -122,7 +109,7 @@ class Uri implements UriInterface, \JsonSerializable $url ); - $result = parse_url($prefix.$encodedUrl); + $result = parse_url($prefix . $encodedUrl); if ($result === false) { return false; @@ -131,19 +118,15 @@ class Uri implements UriInterface, \JsonSerializable return array_map('urldecode', $result); } - public function __toString(): string + public function __toString() { - if ($this->composedComponents === null) { - $this->composedComponents = self::composeComponents( - $this->scheme, - $this->getAuthority(), - $this->path, - $this->query, - $this->fragment - ); - } - - return $this->composedComponents; + return self::composeComponents( + $this->scheme, + $this->getAuthority(), + $this->path, + $this->query, + $this->fragment + ); } /** @@ -162,33 +145,37 @@ class Uri implements UriInterface, \JsonSerializable * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to * that format). * - * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.3 + * @param string $scheme + * @param string $authority + * @param string $path + * @param string $query + * @param string $fragment + * + * @return string + * + * @link https://tools.ietf.org/html/rfc3986#section-5.3 */ - public static function composeComponents(?string $scheme, ?string $authority, string $path, ?string $query, ?string $fragment): string + public static function composeComponents($scheme, $authority, $path, $query, $fragment) { $uri = ''; // weak type checks to also accept null until we can add scalar type hints if ($scheme != '') { - $uri .= $scheme.':'; + $uri .= $scheme . ':'; } - if ($authority != '' || $scheme === 'file') { - $uri .= '//'.$authority; - } - - if ($authority != '' && $path != '' && $path[0] != '/') { - $path = '/'.$path; + if ($authority != ''|| $scheme === 'file') { + $uri .= '//' . $authority; } $uri .= $path; if ($query != '') { - $uri .= '?'.$query; + $uri .= '?' . $query; } if ($fragment != '') { - $uri .= '#'.$fragment; + $uri .= '#' . $fragment; } return $uri; @@ -199,11 +186,15 @@ class Uri implements UriInterface, \JsonSerializable * * `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used * independently of the implementation. + * + * @param UriInterface $uri + * + * @return bool */ - public static function isDefaultPort(UriInterface $uri): bool + public static function isDefaultPort(UriInterface $uri) { return $uri->getPort() === null - || (isset(self::DEFAULT_PORTS[$uri->getScheme()]) && $uri->getPort() === self::DEFAULT_PORTS[$uri->getScheme()]); + || (isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]); } /** @@ -216,12 +207,16 @@ class Uri implements UriInterface, \JsonSerializable * - absolute-path references, e.g. '/path' * - relative-path references, e.g. 'subpath' * + * @param UriInterface $uri + * + * @return bool + * * @see Uri::isNetworkPathReference * @see Uri::isAbsolutePathReference * @see Uri::isRelativePathReference - * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4 + * @link https://tools.ietf.org/html/rfc3986#section-4 */ - public static function isAbsolute(UriInterface $uri): bool + public static function isAbsolute(UriInterface $uri) { return $uri->getScheme() !== ''; } @@ -231,9 +226,13 @@ class Uri implements UriInterface, \JsonSerializable * * A relative reference that begins with two slash characters is termed an network-path reference. * - * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2 + * @param UriInterface $uri + * + * @return bool + * + * @link https://tools.ietf.org/html/rfc3986#section-4.2 */ - public static function isNetworkPathReference(UriInterface $uri): bool + public static function isNetworkPathReference(UriInterface $uri) { return $uri->getScheme() === '' && $uri->getAuthority() !== ''; } @@ -243,9 +242,13 @@ class Uri implements UriInterface, \JsonSerializable * * A relative reference that begins with a single slash character is termed an absolute-path reference. * - * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2 + * @param UriInterface $uri + * + * @return bool + * + * @link https://tools.ietf.org/html/rfc3986#section-4.2 */ - public static function isAbsolutePathReference(UriInterface $uri): bool + public static function isAbsolutePathReference(UriInterface $uri) { return $uri->getScheme() === '' && $uri->getAuthority() === '' @@ -258,9 +261,13 @@ class Uri implements UriInterface, \JsonSerializable * * A relative reference that does not begin with a slash character is termed a relative-path reference. * - * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2 + * @param UriInterface $uri + * + * @return bool + * + * @link https://tools.ietf.org/html/rfc3986#section-4.2 */ - public static function isRelativePathReference(UriInterface $uri): bool + public static function isRelativePathReference(UriInterface $uri) { return $uri->getScheme() === '' && $uri->getAuthority() === '' @@ -277,9 +284,11 @@ class Uri implements UriInterface, \JsonSerializable * @param UriInterface $uri The URI to check * @param UriInterface|null $base An optional base URI to compare against * - * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.4 + * @return bool + * + * @link https://tools.ietf.org/html/rfc3986#section-4.4 */ - public static function isSameDocumentReference(UriInterface $uri, ?UriInterface $base = null): bool + public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null) { if ($base !== null) { $uri = UriResolver::resolve($base, $uri); @@ -293,6 +302,41 @@ class Uri implements UriInterface, \JsonSerializable return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === ''; } + /** + * Removes dot segments from a path and returns the new path. + * + * @param string $path + * + * @return string + * + * @deprecated since version 1.4. Use UriResolver::removeDotSegments instead. + * @see UriResolver::removeDotSegments + */ + public static function removeDotSegments($path) + { + return UriResolver::removeDotSegments($path); + } + + /** + * Converts the relative URI into a new URI that is resolved against the base URI. + * + * @param UriInterface $base Base URI + * @param string|UriInterface $rel Relative URI + * + * @return UriInterface + * + * @deprecated since version 1.4. Use UriResolver::resolve instead. + * @see UriResolver::resolve + */ + public static function resolve(UriInterface $base, $rel) + { + if (!($rel instanceof UriInterface)) { + $rel = new self($rel); + } + + return UriResolver::resolve($base, $rel); + } + /** * Creates a new URI with a specific query string value removed. * @@ -301,8 +345,10 @@ class Uri implements UriInterface, \JsonSerializable * * @param UriInterface $uri URI to use as a base. * @param string $key Query string key to remove. + * + * @return UriInterface */ - public static function withoutQueryValue(UriInterface $uri, string $key): UriInterface + public static function withoutQueryValue(UriInterface $uri, $key) { $result = self::getFilteredQueryString($uri, [$key]); @@ -321,8 +367,10 @@ class Uri implements UriInterface, \JsonSerializable * @param UriInterface $uri URI to use as a base. * @param string $key Key to set. * @param string|null $value Value to set + * + * @return UriInterface */ - public static function withQueryValue(UriInterface $uri, string $key, ?string $value): UriInterface + public static function withQueryValue(UriInterface $uri, $key, $value) { $result = self::getFilteredQueryString($uri, [$key]); @@ -336,15 +384,17 @@ class Uri implements UriInterface, \JsonSerializable * * It has the same behavior as withQueryValue() but for an associative array of key => value. * - * @param UriInterface $uri URI to use as a base. - * @param (string|null)[] $keyValueArray Associative array of key and values + * @param UriInterface $uri URI to use as a base. + * @param array $keyValueArray Associative array of key and values + * + * @return UriInterface */ - public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface + public static function withQueryValues(UriInterface $uri, array $keyValueArray) { $result = self::getFilteredQueryString($uri, array_keys($keyValueArray)); foreach ($keyValueArray as $key => $value) { - $result[] = self::generateQueryString((string) $key, $value !== null ? (string) $value : null); + $result[] = self::generateQueryString($key, $value); } return $uri->withQuery(implode('&', $result)); @@ -353,11 +403,15 @@ class Uri implements UriInterface, \JsonSerializable /** * Creates a URI from a hash of `parse_url` components. * - * @see https://www.php.net/manual/en/function.parse-url.php + * @param array $parts * - * @throws MalformedUriException If the components do not form a valid URI. + * @return UriInterface + * + * @link http://php.net/manual/en/function.parse-url.php + * + * @throws \InvalidArgumentException If the components do not form a valid URI. */ - public static function fromParts(array $parts): UriInterface + public static function fromParts(array $parts) { $uri = new self(); $uri->applyParts($parts); @@ -366,56 +420,56 @@ class Uri implements UriInterface, \JsonSerializable return $uri; } - public function getScheme(): string + public function getScheme() { return $this->scheme; } - public function getAuthority(): string + public function getAuthority() { $authority = $this->host; if ($this->userInfo !== '') { - $authority = $this->userInfo.'@'.$authority; + $authority = $this->userInfo . '@' . $authority; } if ($this->port !== null) { - $authority .= ':'.$this->port; + $authority .= ':' . $this->port; } return $authority; } - public function getUserInfo(): string + public function getUserInfo() { return $this->userInfo; } - public function getHost(): string + public function getHost() { return $this->host; } - public function getPort(): ?int + public function getPort() { return $this->port; } - public function getPath(): string + public function getPath() { return $this->path; } - public function getQuery(): string + public function getQuery() { return $this->query; } - public function getFragment(): string + public function getFragment() { return $this->fragment; } - public function withScheme($scheme): UriInterface + public function withScheme($scheme) { $scheme = $this->filterScheme($scheme); @@ -425,18 +479,17 @@ class Uri implements UriInterface, \JsonSerializable $new = clone $this; $new->scheme = $scheme; - $new->composedComponents = null; $new->removeDefaultPort(); $new->validateState(); return $new; } - public function withUserInfo($user, $password = null): UriInterface + public function withUserInfo($user, $password = null) { $info = $this->filterUserInfoComponent($user); if ($password !== null) { - $info .= ':'.$this->filterUserInfoComponent($password); + $info .= ':' . $this->filterUserInfoComponent($password); } if ($this->userInfo === $info) { @@ -445,13 +498,12 @@ class Uri implements UriInterface, \JsonSerializable $new = clone $this; $new->userInfo = $info; - $new->composedComponents = null; $new->validateState(); return $new; } - public function withHost($host): UriInterface + public function withHost($host) { $host = $this->filterHost($host); @@ -461,13 +513,12 @@ class Uri implements UriInterface, \JsonSerializable $new = clone $this; $new->host = $host; - $new->composedComponents = null; $new->validateState(); return $new; } - public function withPort($port): UriInterface + public function withPort($port) { $port = $this->filterPort($port); @@ -477,14 +528,13 @@ class Uri implements UriInterface, \JsonSerializable $new = clone $this; $new->port = $port; - $new->composedComponents = null; $new->removeDefaultPort(); $new->validateState(); return $new; } - public function withPath($path): UriInterface + public function withPath($path) { $path = $this->filterPath($path); @@ -494,13 +544,12 @@ class Uri implements UriInterface, \JsonSerializable $new = clone $this; $new->path = $path; - $new->composedComponents = null; $new->validateState(); return $new; } - public function withQuery($query): UriInterface + public function withQuery($query) { $query = $this->filterQueryAndFragment($query); @@ -510,12 +559,11 @@ class Uri implements UriInterface, \JsonSerializable $new = clone $this; $new->query = $query; - $new->composedComponents = null; return $new; } - public function withFragment($fragment): UriInterface + public function withFragment($fragment) { $fragment = $this->filterQueryAndFragment($fragment); @@ -525,22 +573,16 @@ class Uri implements UriInterface, \JsonSerializable $new = clone $this; $new->fragment = $fragment; - $new->composedComponents = null; return $new; } - public function jsonSerialize(): string - { - return $this->__toString(); - } - /** * Apply parse_url parts to a URI. * * @param array $parts Array of parse_url parts to apply. */ - private function applyParts(array $parts): void + private function applyParts(array $parts) { $this->scheme = isset($parts['scheme']) ? $this->filterScheme($parts['scheme']) @@ -564,18 +606,20 @@ class Uri implements UriInterface, \JsonSerializable ? $this->filterQueryAndFragment($parts['fragment']) : ''; if (isset($parts['pass'])) { - $this->userInfo .= ':'.$this->filterUserInfoComponent($parts['pass']); + $this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']); } $this->removeDefaultPort(); } /** - * @param mixed $scheme + * @param string $scheme + * + * @return string * * @throws \InvalidArgumentException If the scheme is invalid. */ - private function filterScheme($scheme): string + private function filterScheme($scheme) { if (!is_string($scheme)) { throw new \InvalidArgumentException('Scheme must be a string'); @@ -585,29 +629,33 @@ class Uri implements UriInterface, \JsonSerializable } /** - * @param mixed $component + * @param string $component + * + * @return string * * @throws \InvalidArgumentException If the user info is invalid. */ - private function filterUserInfoComponent($component): string + private function filterUserInfoComponent($component) { if (!is_string($component)) { throw new \InvalidArgumentException('User info must be a string'); } return preg_replace_callback( - '/(?:[^%'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.']+|%(?![A-Fa-f0-9]{2}))/', + '/(?:[^%' . self::$charUnreserved . self::$charSubDelims . ']+|%(?![A-Fa-f0-9]{2}))/', [$this, 'rawurlencodeMatchZero'], $component ); } /** - * @param mixed $host + * @param string $host + * + * @return string * * @throws \InvalidArgumentException If the host is invalid. */ - private function filterHost($host): string + private function filterHost($host) { if (!is_string($host)) { throw new \InvalidArgumentException('Host must be a string'); @@ -617,18 +665,20 @@ class Uri implements UriInterface, \JsonSerializable } /** - * @param mixed $port + * @param int|null $port + * + * @return int|null * * @throws \InvalidArgumentException If the port is invalid. */ - private function filterPort($port): ?int + private function filterPort($port) { if ($port === null) { return null; } $port = (int) $port; - if (0 > $port || 0xFFFF < $port) { + if (0 > $port || 0xffff < $port) { throw new \InvalidArgumentException( sprintf('Invalid port: %d. Must be between 0 and 65535', $port) ); @@ -638,11 +688,12 @@ class Uri implements UriInterface, \JsonSerializable } /** - * @param (string|int)[] $keys + * @param UriInterface $uri + * @param array $keys * - * @return string[] + * @return array */ - private static function getFilteredQueryString(UriInterface $uri, array $keys): array + private static function getFilteredQueryString(UriInterface $uri, array $keys) { $current = $uri->getQuery(); @@ -650,30 +701,34 @@ class Uri implements UriInterface, \JsonSerializable return []; } - $decodedKeys = array_map(function ($k): string { - return rawurldecode((string) $k); - }, $keys); + $decodedKeys = array_map('rawurldecode', $keys); return array_filter(explode('&', $current), function ($part) use ($decodedKeys) { return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true); }); } - private static function generateQueryString(string $key, ?string $value): string + /** + * @param string $key + * @param string|null $value + * + * @return string + */ + private static function generateQueryString($key, $value) { // Query string separators ("=", "&") within the key or value need to be encoded // (while preventing double-encoding) before setting the query string. All other // chars that need percent-encoding will be encoded by withQuery(). - $queryString = strtr($key, self::QUERY_SEPARATORS_REPLACEMENT); + $queryString = strtr($key, self::$replaceQuery); if ($value !== null) { - $queryString .= '='.strtr($value, self::QUERY_SEPARATORS_REPLACEMENT); + $queryString .= '=' . strtr($value, self::$replaceQuery); } return $queryString; } - private function removeDefaultPort(): void + private function removeDefaultPort() { if ($this->port !== null && self::isDefaultPort($this)) { $this->port = null; @@ -683,18 +738,20 @@ class Uri implements UriInterface, \JsonSerializable /** * Filters the path of a URI * - * @param mixed $path + * @param string $path + * + * @return string * * @throws \InvalidArgumentException If the path is invalid. */ - private function filterPath($path): string + private function filterPath($path) { if (!is_string($path)) { throw new \InvalidArgumentException('Path must be a string'); } return preg_replace_callback( - '/(?:[^'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.'%:@\/]++|%(?![A-Fa-f0-9]{2}))/', + '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/', [$this, 'rawurlencodeMatchZero'], $path ); @@ -703,29 +760,31 @@ class Uri implements UriInterface, \JsonSerializable /** * Filters the query string or fragment of a URI. * - * @param mixed $str + * @param string $str + * + * @return string * * @throws \InvalidArgumentException If the query or fragment is invalid. */ - private function filterQueryAndFragment($str): string + private function filterQueryAndFragment($str) { if (!is_string($str)) { throw new \InvalidArgumentException('Query and fragment must be a string'); } return preg_replace_callback( - '/(?:[^'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.'%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', + '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', [$this, 'rawurlencodeMatchZero'], $str ); } - private function rawurlencodeMatchZero(array $match): string + private function rawurlencodeMatchZero(array $match) { return rawurlencode($match[0]); } - private function validateState(): void + private function validateState() { if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) { $this->host = self::HTTP_DEFAULT_HOST; @@ -733,11 +792,19 @@ class Uri implements UriInterface, \JsonSerializable if ($this->getAuthority() === '') { if (0 === strpos($this->path, '//')) { - throw new MalformedUriException('The path of a URI without an authority must not start with two slashes "//"'); + throw new \InvalidArgumentException('The path of a URI without an authority must not start with two slashes "//"'); } if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) { - throw new MalformedUriException('A relative URI must not have a path beginning with a segment containing a colon'); + throw new \InvalidArgumentException('A relative URI must not have a path beginning with a segment containing a colon'); } + } elseif (isset($this->path[0]) && $this->path[0] !== '/') { + @trigger_error( + 'The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI ' . + 'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.', + E_USER_DEPRECATED + ); + $this->path = '/' . $this->path; + //throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty'); } } } diff --git a/Server/vendor/guzzlehttp/psr7/src/UriComparator.php b/Server/vendor/guzzlehttp/psr7/src/UriComparator.php index 70c582aa..ccf51ffb 100644 --- a/Server/vendor/guzzlehttp/psr7/src/UriComparator.php +++ b/Server/vendor/guzzlehttp/psr7/src/UriComparator.php @@ -1,7 +1,5 @@ getHost(), $modified->getHost()) !== 0) { return true; @@ -34,7 +34,10 @@ final class UriComparator return false; } - private static function computePort(UriInterface $uri): int + /** + * @return int + */ + private static function computePort(UriInterface $uri) { $port = $uri->getPort(); diff --git a/Server/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/Server/vendor/guzzlehttp/psr7/src/UriNormalizer.php index e1745573..81419ead 100644 --- a/Server/vendor/guzzlehttp/psr7/src/UriNormalizer.php +++ b/Server/vendor/guzzlehttp/psr7/src/UriNormalizer.php @@ -1,7 +1,5 @@ getPath() === '' - && ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') + if ($flags & self::CONVERT_EMPTY_PATH && $uri->getPath() === '' && + ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') ) { $uri = $uri->withPath('/'); } @@ -174,18 +171,20 @@ final class UriNormalizer * @param UriInterface $uri2 An URI to compare * @param int $normalizations A bitmask of normalizations to apply, see constants * - * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.1 + * @return bool + * + * @link https://tools.ietf.org/html/rfc3986#section-6.1 */ - public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, int $normalizations = self::PRESERVING_NORMALIZATIONS): bool + public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS) { return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations); } - private static function capitalizePercentEncoding(UriInterface $uri): UriInterface + private static function capitalizePercentEncoding(UriInterface $uri) { $regex = '/(?:%[A-Fa-f0-9]{2})++/'; - $callback = function (array $match): string { + $callback = function (array $match) { return strtoupper($match[0]); }; @@ -197,11 +196,11 @@ final class UriNormalizer ); } - private static function decodeUnreservedCharacters(UriInterface $uri): UriInterface + private static function decodeUnreservedCharacters(UriInterface $uri) { $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; - $callback = function (array $match): string { + $callback = function (array $match) { return rawurldecode($match[0]); }; diff --git a/Server/vendor/guzzlehttp/psr7/src/UriResolver.php b/Server/vendor/guzzlehttp/psr7/src/UriResolver.php index 3737be1e..a3cb15d5 100644 --- a/Server/vendor/guzzlehttp/psr7/src/UriResolver.php +++ b/Server/vendor/guzzlehttp/psr7/src/UriResolver.php @@ -1,7 +1,5 @@ getPath(); } else { if ($targetAuthority != '' && $base->getPath() === '') { - $targetPath = '/'.$rel->getPath(); + $targetPath = '/' . $rel->getPath(); } else { $lastSlashPos = strrpos($base->getPath(), '/'); if ($lastSlashPos === false) { $targetPath = $rel->getPath(); } else { - $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1).$rel->getPath(); + $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath(); } } } @@ -124,11 +131,16 @@ final class UriResolver * relative-path reference will be returned as-is. * * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well + * + * @param UriInterface $base Base URI + * @param UriInterface $target Target URI + * + * @return UriInterface The relative URI reference */ - public static function relativize(UriInterface $base, UriInterface $target): UriInterface + public static function relativize(UriInterface $base, UriInterface $target) { - if ($target->getScheme() !== '' - && ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') + if ($target->getScheme() !== '' && + ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') ) { return $target; } @@ -162,7 +174,6 @@ final class UriResolver // inherit the base query component when resolving. if ($target->getQuery() === '') { $segments = explode('/', $target->getPath()); - /** @var string $lastSegment */ $lastSegment = end($segments); return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment); @@ -171,7 +182,7 @@ final class UriResolver return $emptyPathUri; } - private static function getRelativePath(UriInterface $base, UriInterface $target): string + private static function getRelativePath(UriInterface $base, UriInterface $target) { $sourceSegments = explode('/', $base->getPath()); $targetSegments = explode('/', $target->getPath()); @@ -185,7 +196,7 @@ final class UriResolver } } $targetSegments[] = $targetLastSegment; - $relativePath = str_repeat('../', count($sourceSegments)).implode('/', $targetSegments); + $relativePath = str_repeat('../', count($sourceSegments)) . implode('/', $targetSegments); // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./". // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used diff --git a/Server/vendor/guzzlehttp/psr7/src/Utils.php b/Server/vendor/guzzlehttp/psr7/src/Utils.php index 7682d2cd..6b6c8cce 100644 --- a/Server/vendor/guzzlehttp/psr7/src/Utils.php +++ b/Server/vendor/guzzlehttp/psr7/src/Utils.php @@ -1,7 +1,5 @@ $keys + * + * @return array */ - public static function caselessRemove(array $keys, array $data): array + public static function caselessRemove($keys, array $data) { $result = []; foreach ($keys as &$key) { - $key = strtolower((string) $key); + $key = strtolower($key); } foreach ($data as $k => $v) { - if (!in_array(strtolower((string) $k), $keys)) { + if (!in_array(strtolower($k), $keys)) { $result[$k] = $v; } } @@ -44,7 +44,7 @@ final class Utils * * @throws \RuntimeException on error. */ - public static function copyToStream(StreamInterface $source, StreamInterface $dest, int $maxLen = -1): void + public static function copyToStream(StreamInterface $source, StreamInterface $dest, $maxLen = -1) { $bufferSize = 8192; @@ -76,28 +76,31 @@ final class Utils * @param int $maxLen Maximum number of bytes to read. Pass -1 * to read the entire stream. * + * @return string + * * @throws \RuntimeException on error. */ - public static function copyToString(StreamInterface $stream, int $maxLen = -1): string + public static function copyToString(StreamInterface $stream, $maxLen = -1) { $buffer = ''; if ($maxLen === -1) { while (!$stream->eof()) { $buf = $stream->read(1048576); - if ($buf === '') { + // Using a loose equality here to match on '' and false. + if ($buf == null) { break; } $buffer .= $buf; } - return $buffer; } $len = 0; while (!$stream->eof() && $len < $maxLen) { $buf = $stream->read($maxLen - $len); - if ($buf === '') { + // Using a loose equality here to match on '' and false. + if ($buf == null) { break; } $buffer .= $buf; @@ -117,9 +120,11 @@ final class Utils * @param string $algo Hash algorithm (e.g. md5, crc32, etc) * @param bool $rawOutput Whether or not to use raw output * + * @return string Returns the hash of the stream + * * @throws \RuntimeException on error. */ - public static function hash(StreamInterface $stream, string $algo, bool $rawOutput = false): string + public static function hash(StreamInterface $stream, $algo, $rawOutput = false) { $pos = $stream->tell(); @@ -132,7 +137,7 @@ final class Utils hash_update($ctx, $stream->read(1048576)); } - $out = hash_final($ctx, $rawOutput); + $out = hash_final($ctx, (bool) $rawOutput); $stream->seek($pos); return $out; @@ -155,8 +160,10 @@ final class Utils * * @param RequestInterface $request Request to clone and modify. * @param array $changes Changes to apply. + * + * @return RequestInterface */ - public static function modifyRequest(RequestInterface $request, array $changes): RequestInterface + public static function modifyRequest(RequestInterface $request, array $changes) { if (!$changes) { return $request; @@ -175,7 +182,7 @@ final class Utils $standardPorts = ['http' => 80, 'https' => 443]; $scheme = $changes['uri']->getScheme(); if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { - $changes['set_headers']['Host'] .= ':'.$port; + $changes['set_headers']['Host'] .= ':' . $port; } } } @@ -197,11 +204,13 @@ final class Utils if ($request instanceof ServerRequestInterface) { $new = (new ServerRequest( - $changes['method'] ?? $request->getMethod(), + isset($changes['method']) ? $changes['method'] : $request->getMethod(), $uri, $headers, - $changes['body'] ?? $request->getBody(), - $changes['version'] ?? $request->getProtocolVersion(), + isset($changes['body']) ? $changes['body'] : $request->getBody(), + isset($changes['version']) + ? $changes['version'] + : $request->getProtocolVersion(), $request->getServerParams() )) ->withParsedBody($request->getParsedBody()) @@ -217,11 +226,13 @@ final class Utils } return new Request( - $changes['method'] ?? $request->getMethod(), + isset($changes['method']) ? $changes['method'] : $request->getMethod(), $uri, $headers, - $changes['body'] ?? $request->getBody(), - $changes['version'] ?? $request->getProtocolVersion() + isset($changes['body']) ? $changes['body'] : $request->getBody(), + isset($changes['version']) + ? $changes['version'] + : $request->getProtocolVersion() ); } @@ -230,14 +241,17 @@ final class Utils * * @param StreamInterface $stream Stream to read from * @param int|null $maxLength Maximum buffer length + * + * @return string */ - public static function readLine(StreamInterface $stream, ?int $maxLength = null): string + public static function readLine(StreamInterface $stream, $maxLength = null) { $buffer = ''; $size = 0; while (!$stream->eof()) { - if ('' === ($byte = $stream->read(1))) { + // Using a loose equality here to match on '' and false. + if (null == ($byte = $stream->read(1))) { return $buffer; } $buffer .= $byte; @@ -250,20 +264,6 @@ final class Utils return $buffer; } - /** - * Redact the password in the user info part of a URI. - */ - public static function redactUserInfo(UriInterface $uri): UriInterface - { - $userInfo = $uri->getUserInfo(); - - if (false !== ($pos = \strpos($userInfo, ':'))) { - return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***'); - } - - return $uri; - } - /** * Create a new stream based on the input type. * @@ -294,19 +294,20 @@ final class Utils * buffered and used in subsequent reads. * * @param resource|string|int|float|bool|StreamInterface|callable|\Iterator|null $resource Entity body data - * @param array{size?: int, metadata?: array} $options Additional options + * @param array $options Additional options + * + * @return StreamInterface * * @throws \InvalidArgumentException if the $resource arg is not valid. */ - public static function streamFor($resource = '', array $options = []): StreamInterface + public static function streamFor($resource = '', array $options = []) { if (is_scalar($resource)) { $stream = self::tryFopen('php://temp', 'r+'); if ($resource !== '') { - fwrite($stream, (string) $resource); + fwrite($stream, $resource); fseek($stream, 0); } - return new Stream($stream, $options); } @@ -316,18 +317,15 @@ final class Utils * The 'php://input' is a special stream with quirks and inconsistencies. * We avoid using that stream by reading it into php://temp */ - - /** @var resource $resource */ - if ((\stream_get_meta_data($resource)['uri'] ?? '') === 'php://input') { + $metaData = \stream_get_meta_data($resource); + if (isset($metaData['uri']) && $metaData['uri'] === 'php://input') { $stream = self::tryFopen('php://temp', 'w+'); - stream_copy_to_stream($resource, $stream); + fwrite($stream, stream_get_contents($resource)); fseek($stream, 0); $resource = $stream; } - return new Stream($resource, $options); case 'object': - /** @var object $resource */ if ($resource instanceof StreamInterface) { return $resource; } elseif ($resource instanceof \Iterator) { @@ -337,11 +335,10 @@ final class Utils } $result = $resource->current(); $resource->next(); - return $result; }, $options); } elseif (method_exists($resource, '__toString')) { - return self::streamFor((string) $resource, $options); + return Utils::streamFor((string) $resource, $options); } break; case 'NULL': @@ -352,7 +349,7 @@ final class Utils return new PumpStream($resource, $options); } - throw new \InvalidArgumentException('Invalid resource type: '.gettype($resource)); + throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource)); } /** @@ -368,22 +365,21 @@ final class Utils * * @throws \RuntimeException if the file cannot be opened */ - public static function tryFopen(string $filename, string $mode) + public static function tryFopen($filename, $mode) { $ex = null; - set_error_handler(static function (int $errno, string $errstr) use ($filename, $mode, &$ex): bool { + set_error_handler(function () use ($filename, $mode, &$ex) { $ex = new \RuntimeException(sprintf( 'Unable to open "%s" using mode "%s": %s', $filename, $mode, - $errstr + func_get_args()[1] )); return true; }); try { - /** @var resource $handle */ $handle = fopen($filename, $mode); } catch (\Throwable $e) { $ex = new \RuntimeException(sprintf( @@ -404,53 +400,6 @@ final class Utils return $handle; } - /** - * Safely gets the contents of a given stream. - * - * When stream_get_contents fails, PHP normally raises a warning. This - * function adds an error handler that checks for errors and throws an - * exception instead. - * - * @param resource $stream - * - * @throws \RuntimeException if the stream cannot be read - */ - public static function tryGetContents($stream): string - { - $ex = null; - set_error_handler(static function (int $errno, string $errstr) use (&$ex): bool { - $ex = new \RuntimeException(sprintf( - 'Unable to read stream contents: %s', - $errstr - )); - - return true; - }); - - try { - /** @var string|false $contents */ - $contents = stream_get_contents($stream); - - if ($contents === false) { - $ex = new \RuntimeException('Unable to read stream contents'); - } - } catch (\Throwable $e) { - $ex = new \RuntimeException(sprintf( - 'Unable to read stream contents: %s', - $e->getMessage() - ), 0, $e); - } - - restore_error_handler(); - - if ($ex) { - /** @var $ex \RuntimeException */ - throw $ex; - } - - return $contents; - } - /** * Returns a UriInterface for the given value. * @@ -460,9 +409,11 @@ final class Utils * * @param string|UriInterface $uri * + * @return UriInterface + * * @throws \InvalidArgumentException */ - public static function uriFor($uri): UriInterface + public static function uriFor($uri) { if ($uri instanceof UriInterface) { return $uri; diff --git a/Server/vendor/guzzlehttp/psr7/src/functions.php b/Server/vendor/guzzlehttp/psr7/src/functions.php new file mode 100644 index 00000000..b0901fad --- /dev/null +++ b/Server/vendor/guzzlehttp/psr7/src/functions.php @@ -0,0 +1,422 @@ + '1', 'foo[b]' => '2'])`. + * + * @param string $str Query string to parse + * @param int|bool $urlEncoding How the query string is encoded + * + * @return array + * + * @deprecated parse_query will be removed in guzzlehttp/psr7:2.0. Use Query::parse instead. + */ +function parse_query($str, $urlEncoding = true) +{ + return Query::parse($str, $urlEncoding); +} + +/** + * Build a query string from an array of key value pairs. + * + * This function can use the return value of `parse_query()` to build a query + * string. This function does not modify the provided keys when an array is + * encountered (like `http_build_query()` would). + * + * @param array $params Query string parameters. + * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 + * to encode using RFC3986, or PHP_QUERY_RFC1738 + * to encode using RFC1738. + * + * @return string + * + * @deprecated build_query will be removed in guzzlehttp/psr7:2.0. Use Query::build instead. + */ +function build_query(array $params, $encoding = PHP_QUERY_RFC3986) +{ + return Query::build($params, $encoding); +} + +/** + * Determines the mimetype of a file by looking at its extension. + * + * @param string $filename + * + * @return string|null + * + * @deprecated mimetype_from_filename will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromFilename instead. + */ +function mimetype_from_filename($filename) +{ + return MimeType::fromFilename($filename); +} + +/** + * Maps a file extensions to a mimetype. + * + * @param $extension string The file extension. + * + * @return string|null + * + * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types + * @deprecated mimetype_from_extension will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromExtension instead. + */ +function mimetype_from_extension($extension) +{ + return MimeType::fromExtension($extension); +} + +/** + * Parses an HTTP message into an associative array. + * + * The array contains the "start-line" key containing the start line of + * the message, "headers" key containing an associative array of header + * array values, and a "body" key containing the body of the message. + * + * @param string $message HTTP request or response to parse. + * + * @return array + * + * @internal + * + * @deprecated _parse_message will be removed in guzzlehttp/psr7:2.0. Use Message::parseMessage instead. + */ +function _parse_message($message) +{ + return Message::parseMessage($message); +} + +/** + * Constructs a URI for an HTTP request message. + * + * @param string $path Path from the start-line + * @param array $headers Array of headers (each value an array). + * + * @return string + * + * @internal + * + * @deprecated _parse_request_uri will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequestUri instead. + */ +function _parse_request_uri($path, array $headers) +{ + return Message::parseRequestUri($path, $headers); +} + +/** + * Get a short summary of the message body. + * + * Will return `null` if the response is not printable. + * + * @param MessageInterface $message The message to get the body summary + * @param int $truncateAt The maximum allowed size of the summary + * + * @return string|null + * + * @deprecated get_message_body_summary will be removed in guzzlehttp/psr7:2.0. Use Message::bodySummary instead. + */ +function get_message_body_summary(MessageInterface $message, $truncateAt = 120) +{ + return Message::bodySummary($message, $truncateAt); +} + +/** + * Remove the items given by the keys, case insensitively from the data. + * + * @param iterable $keys + * + * @return array + * + * @internal + * + * @deprecated _caseless_remove will be removed in guzzlehttp/psr7:2.0. Use Utils::caselessRemove instead. + */ +function _caseless_remove($keys, array $data) +{ + return Utils::caselessRemove($keys, $data); +} diff --git a/Server/vendor/guzzlehttp/psr7/src/functions_include.php b/Server/vendor/guzzlehttp/psr7/src/functions_include.php new file mode 100644 index 00000000..96a4a83a --- /dev/null +++ b/Server/vendor/guzzlehttp/psr7/src/functions_include.php @@ -0,0 +1,6 @@ +getValue()` | `$enumCase->value` | -| Compare two enum instances | `$enumCase1 == $enumCase2`
or
`$enumCase1->equals($enumCase2)` | `$enumCase1 === $enumCase2` | -| Get the key/name of the enum instance | `$enumCase->getKey()` | `$enumCase->name` | -| Get a list of all the possible instances of the enum | `Action::values()` | `Action::cases()` | -| Get a map of possible instances of the enum mapped by name | `Action::values()` | `array_combine(array_map(fn($case) => $case->name, Action::cases()), Action::cases())`
or
`(new ReflectionEnum(Action::class))->getConstants()` | -| Get a list of all possible names of the enum | `Action::keys()` | `array_map(fn($case) => $case->name, Action::cases())` | -| Get a list of all possible backed values of the enum | `Action::toArray()` | `array_map(fn($case) => $case->value, Action::cases())` | -| Get a map of possible backed values of the enum mapped by name | `Action::toArray()` | `array_combine(array_map(fn($case) => $case->name, Action::cases()), array_map(fn($case) => $case->value, Action::cases()))`
or
`array_map(fn($case) => $case->value, (new ReflectionEnum(Action::class))->getConstants()))` | - ## Related projects -- [PHP 8.1+ native enum](https://www.php.net/enumerations) - [Doctrine enum mapping](https://github.com/acelaya/doctrine-enum-type) - [Symfony ParamConverter integration](https://github.com/Ex3v/MyCLabsEnumParamConverter) - [PHPStan integration](https://github.com/timeweb/phpstan-enum) - - -[GA Image]: https://github.com/myclabs/php-enum/workflows/CI/badge.svg - -[GA Link]: https://github.com/myclabs/php-enum/actions?query=workflow%3A%22CI%22+branch%3Amaster - -[Shepherd Image]: https://shepherd.dev/github/myclabs/php-enum/coverage.svg - -[Shepherd Link]: https://shepherd.dev/github/myclabs/php-enum +- [Yii2 enum mapping](https://github.com/KartaviK/yii2-enum) diff --git a/Server/vendor/myclabs/php-enum/composer.json b/Server/vendor/myclabs/php-enum/composer.json index 978cb195..6861a5ce 100644 --- a/Server/vendor/myclabs/php-enum/composer.json +++ b/Server/vendor/myclabs/php-enum/composer.json @@ -14,10 +14,7 @@ "autoload": { "psr-4": { "MyCLabs\\Enum\\": "src/" - }, - "classmap": [ - "stubs/Stringable.php" - ] + } }, "autoload-dev": { "psr-4": { @@ -25,12 +22,12 @@ } }, "require": { - "php": "^7.3 || ^8.0", + "php": ">=7.1", "ext-json": "*" }, "require-dev": { - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^7", "squizlabs/php_codesniffer": "1.*", - "vimeo/psalm": "^4.6.2" + "vimeo/psalm": "^3.8" } } diff --git a/Server/vendor/myclabs/php-enum/psalm.xml b/Server/vendor/myclabs/php-enum/psalm.xml new file mode 100644 index 00000000..b07e9294 --- /dev/null +++ b/Server/vendor/myclabs/php-enum/psalm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/Server/vendor/myclabs/php-enum/src/Enum.php b/Server/vendor/myclabs/php-enum/src/Enum.php index 4c94cf6d..b8b93277 100644 --- a/Server/vendor/myclabs/php-enum/src/Enum.php +++ b/Server/vendor/myclabs/php-enum/src/Enum.php @@ -17,9 +17,8 @@ namespace MyCLabs\Enum; * * @psalm-template T * @psalm-immutable - * @psalm-consistent-constructor */ -abstract class Enum implements \JsonSerializable, \Stringable +abstract class Enum implements \JsonSerializable { /** * Enum value @@ -29,13 +28,6 @@ abstract class Enum implements \JsonSerializable, \Stringable */ protected $value; - /** - * Enum key, the constant name - * - * @var string - */ - private $key; - /** * Store existing constants in a static cache per object. * @@ -59,7 +51,7 @@ abstract class Enum implements \JsonSerializable, \Stringable * @psalm-pure * @param mixed $value * - * @psalm-param T $value + * @psalm-param static|T $value * @throws \UnexpectedValueException if incompatible type is given. */ public function __construct($value) @@ -69,40 +61,15 @@ abstract class Enum implements \JsonSerializable, \Stringable $value = $value->getValue(); } - /** @psalm-suppress ImplicitToStringCast assertValidValueReturningKey returns always a string but psalm has currently an issue here */ - $this->key = static::assertValidValueReturningKey($value); + if (!$this->isValid($value)) { + /** @psalm-suppress InvalidCast */ + throw new \UnexpectedValueException("Value '$value' is not part of the enum " . static::class); + } /** @psalm-var T */ $this->value = $value; } - /** - * This method exists only for the compatibility reason when deserializing a previously serialized version - * that didn't had the key property - */ - public function __wakeup() - { - /** @psalm-suppress DocblockTypeContradiction key can be null when deserializing an enum without the key */ - if ($this->key === null) { - /** - * @psalm-suppress InaccessibleProperty key is not readonly as marked by psalm - * @psalm-suppress PossiblyFalsePropertyAssignmentValue deserializing a case that was removed - */ - $this->key = static::search($this->value); - } - } - - /** - * @param mixed $value - * @return static - */ - public static function from($value): self - { - $key = static::assertValidValueReturningKey($value); - - return self::__callStatic($key, []); - } - /** * @psalm-pure * @return mixed @@ -117,11 +84,11 @@ abstract class Enum implements \JsonSerializable, \Stringable * Returns the enum key (i.e. the constant name). * * @psalm-pure - * @return string + * @return mixed */ public function getKey() { - return $this->key; + return static::search($this->value); } /** @@ -196,9 +163,7 @@ abstract class Enum implements \JsonSerializable, \Stringable $class = static::class; if (!isset(static::$cache[$class])) { - /** @psalm-suppress ImpureMethodCall this reflection API usage has no side-effects here */ $reflection = new \ReflectionClass($class); - /** @psalm-suppress ImpureMethodCall this reflection API usage has no side-effects here */ static::$cache[$class] = $reflection->getConstants(); } @@ -211,7 +176,6 @@ abstract class Enum implements \JsonSerializable, \Stringable * @param $value * @psalm-param mixed $value * @psalm-pure - * @psalm-assert-if-true T $value * @return bool */ public static function isValid($value) @@ -219,35 +183,6 @@ abstract class Enum implements \JsonSerializable, \Stringable return \in_array($value, static::toArray(), true); } - /** - * Asserts valid enum value - * - * @psalm-pure - * @psalm-assert T $value - * @param mixed $value - */ - public static function assertValidValue($value): void - { - self::assertValidValueReturningKey($value); - } - - /** - * Asserts valid enum value - * - * @psalm-pure - * @psalm-assert T $value - * @param mixed $value - * @return string - */ - private static function assertValidValueReturningKey($value): string - { - if (false === ($key = static::search($value))) { - throw new \UnexpectedValueException("Value '$value' is not part of the enum " . static::class); - } - - return $key; - } - /** * Check if is valid enum key * @@ -266,11 +201,11 @@ abstract class Enum implements \JsonSerializable, \Stringable /** * Return key for value * - * @param mixed $value + * @param $value * * @psalm-param mixed $value * @psalm-pure - * @return string|false + * @return mixed */ public static function search($value) { @@ -285,8 +220,6 @@ abstract class Enum implements \JsonSerializable, \Stringable * * @return static * @throws \BadMethodCallException - * - * @psalm-pure */ public static function __callStatic($name, $arguments) { @@ -310,7 +243,6 @@ abstract class Enum implements \JsonSerializable, \Stringable * @link http://php.net/manual/en/jsonserializable.jsonserialize.php * @psalm-pure */ - #[\ReturnTypeWillChange] public function jsonSerialize() { return $this->getValue(); diff --git a/Server/vendor/myclabs/php-enum/stubs/Stringable.php b/Server/vendor/myclabs/php-enum/stubs/Stringable.php deleted file mode 100644 index 4811af70..00000000 --- a/Server/vendor/myclabs/php-enum/stubs/Stringable.php +++ /dev/null @@ -1,11 +0,0 @@ -=7.0.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/Server/vendor/psr/http-factory/src/RequestFactoryInterface.php b/Server/vendor/psr/http-factory/src/RequestFactoryInterface.php deleted file mode 100644 index cb39a08b..00000000 --- a/Server/vendor/psr/http-factory/src/RequestFactoryInterface.php +++ /dev/null @@ -1,18 +0,0 @@ -=5.3.0" }, "autoload": { "psr-4": { @@ -20,7 +20,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.0.x-dev" } } } diff --git a/Server/vendor/psr/http-message/docs/PSR7-Interfaces.md b/Server/vendor/psr/http-message/docs/PSR7-Interfaces.md deleted file mode 100644 index 3a7e7dda..00000000 --- a/Server/vendor/psr/http-message/docs/PSR7-Interfaces.md +++ /dev/null @@ -1,130 +0,0 @@ -# Interfaces - -The purpose of this list is to help in finding the methods when working with PSR-7. This can be considered as a cheatsheet for PSR-7 interfaces. - -The interfaces defined in PSR-7 are the following: - -| Class Name | Description | -|---|---| -| [Psr\Http\Message\MessageInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessagemessageinterface) | Representation of a HTTP message | -| [Psr\Http\Message\RequestInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessagerequestinterface) | Representation of an outgoing, client-side request. | -| [Psr\Http\Message\ServerRequestInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessageserverrequestinterface) | Representation of an incoming, server-side HTTP request. | -| [Psr\Http\Message\ResponseInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessageresponseinterface) | Representation of an outgoing, server-side response. | -| [Psr\Http\Message\StreamInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessagestreaminterface) | Describes a data stream | -| [Psr\Http\Message\UriInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessageuriinterface) | Value object representing a URI. | -| [Psr\Http\Message\UploadedFileInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessageuploadedfileinterface) | Value object representing a file uploaded through an HTTP request. | - -## `Psr\Http\Message\MessageInterface` Methods - -| Method Name | Description | Notes | -|------------------------------------| ----------- | ----- | -| `getProtocolVersion()` | Retrieve HTTP protocol version | 1.0 or 1.1 | -| `withProtocolVersion($version)` | Returns new message instance with given HTTP protocol version | | -| `getHeaders()` | Retrieve all HTTP Headers | [Request Header List](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields), [Response Header List](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Response_fields) | -| `hasHeader($name)` | Checks if HTTP Header with given name exists | | -| `getHeader($name)` | Retrieves a array with the values for a single header | | -| `getHeaderLine($name)` | Retrieves a comma-separated string of the values for a single header | | -| `withHeader($name, $value)` | Returns new message instance with given HTTP Header | if the header existed in the original instance, replaces the header value from the original message with the value provided when creating the new instance. | -| `withAddedHeader($name, $value)` | Returns new message instance with appended value to given header | If header already exists value will be appended, if not a new header will be created | -| `withoutHeader($name)` | Removes HTTP Header with given name| | -| `getBody()` | Retrieves the HTTP Message Body | Returns object implementing `StreamInterface`| -| `withBody(StreamInterface $body)` | Returns new message instance with given HTTP Message Body | | - - -## `Psr\Http\Message\RequestInterface` Methods - -Same methods as `Psr\Http\Message\MessageInterface` + the following methods: - -| Method Name | Description | Notes | -|------------------------------------| ----------- | ----- | -| `getRequestTarget()` | Retrieves the message's request target | origin-form, absolute-form, authority-form, asterisk-form ([RFC7230](https://www.rfc-editor.org/rfc/rfc7230.txt)) | -| `withRequestTarget($requestTarget)` | Return a new message instance with the specific request-target | | -| `getMethod()` | Retrieves the HTTP method of the request. | GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE (defined in [RFC7231](https://tools.ietf.org/html/rfc7231)), PATCH (defined in [RFC5789](https://tools.ietf.org/html/rfc5789)) | -| `withMethod($method)` | Returns a new message instance with the provided HTTP method | | -| `getUri()` | Retrieves the URI instance | | -| `withUri(UriInterface $uri, $preserveHost = false)` | Returns a new message instance with the provided URI | | - - -## `Psr\Http\Message\ServerRequestInterface` Methods - -Same methods as `Psr\Http\Message\RequestInterface` + the following methods: - -| Method Name | Description | Notes | -|------------------------------------| ----------- | ----- | -| `getServerParams() ` | Retrieve server parameters | Typically derived from `$_SERVER` | -| `getCookieParams()` | Retrieves cookies sent by the client to the server. | Typically derived from `$_COOKIES` | -| `withCookieParams(array $cookies)` | Returns a new request instance with the specified cookies | | -| `withQueryParams(array $query)` | Returns a new request instance with the specified query string arguments | | -| `getUploadedFiles()` | Retrieve normalized file upload data | | -| `withUploadedFiles(array $uploadedFiles)` | Returns a new request instance with the specified uploaded files | | -| `getParsedBody()` | Retrieve any parameters provided in the request body | | -| `withParsedBody($data)` | Returns a new request instance with the specified body parameters | | -| `getAttributes()` | Retrieve attributes derived from the request | | -| `getAttribute($name, $default = null)` | Retrieve a single derived request attribute | | -| `withAttribute($name, $value)` | Returns a new request instance with the specified derived request attribute | | -| `withoutAttribute($name)` | Returns a new request instance that without the specified derived request attribute | | - -## `Psr\Http\Message\ResponseInterface` Methods: - -Same methods as `Psr\Http\Message\MessageInterface` + the following methods: - -| Method Name | Description | Notes | -|------------------------------------| ----------- | ----- | -| `getStatusCode()` | Gets the response status code. | | -| `withStatus($code, $reasonPhrase = '')` | Returns a new response instance with the specified status code and, optionally, reason phrase. | | -| `getReasonPhrase()` | Gets the response reason phrase associated with the status code. | | - -## `Psr\Http\Message\StreamInterface` Methods - -| Method Name | Description | Notes | -|------------------------------------| ----------- | ----- | -| `__toString()` | Reads all data from the stream into a string, from the beginning to end. | | -| `close()` | Closes the stream and any underlying resources. | | -| `detach()` | Separates any underlying resources from the stream. | | -| `getSize()` | Get the size of the stream if known. | | -| `eof()` | Returns true if the stream is at the end of the stream.| | -| `isSeekable()` | Returns whether or not the stream is seekable. | | -| `seek($offset, $whence = SEEK_SET)` | Seek to a position in the stream. | | -| `rewind()` | Seek to the beginning of the stream. | | -| `isWritable()` | Returns whether or not the stream is writable. | | -| `write($string)` | Write data to the stream. | | -| `isReadable()` | Returns whether or not the stream is readable. | | -| `read($length)` | Read data from the stream. | | -| `getContents()` | Returns the remaining contents in a string | | -| `getMetadata($key = null)()` | Get stream metadata as an associative array or retrieve a specific key. | | - -## `Psr\Http\Message\UriInterface` Methods - -| Method Name | Description | Notes | -|------------------------------------| ----------- | ----- | -| `getScheme()` | Retrieve the scheme component of the URI. | | -| `getAuthority()` | Retrieve the authority component of the URI. | | -| `getUserInfo()` | Retrieve the user information component of the URI. | | -| `getHost()` | Retrieve the host component of the URI. | | -| `getPort()` | Retrieve the port component of the URI. | | -| `getPath()` | Retrieve the path component of the URI. | | -| `getQuery()` | Retrieve the query string of the URI. | | -| `getFragment()` | Retrieve the fragment component of the URI. | | -| `withScheme($scheme)` | Return an instance with the specified scheme. | | -| `withUserInfo($user, $password = null)` | Return an instance with the specified user information. | | -| `withHost($host)` | Return an instance with the specified host. | | -| `withPort($port)` | Return an instance with the specified port. | | -| `withPath($path)` | Return an instance with the specified path. | | -| `withQuery($query)` | Return an instance with the specified query string. | | -| `withFragment($fragment)` | Return an instance with the specified URI fragment. | | -| `__toString()` | Return the string representation as a URI reference. | | - -## `Psr\Http\Message\UploadedFileInterface` Methods - -| Method Name | Description | Notes | -|------------------------------------| ----------- | ----- | -| `getStream()` | Retrieve a stream representing the uploaded file. | | -| `moveTo($targetPath)` | Move the uploaded file to a new location. | | -| `getSize()` | Retrieve the file size. | | -| `getError()` | Retrieve the error associated with the uploaded file. | | -| `getClientFilename()` | Retrieve the filename sent by the client. | | -| `getClientMediaType()` | Retrieve the media type sent by the client. | | - -> `RequestInterface`, `ServerRequestInterface`, `ResponseInterface` extend `MessageInterface` because the `Request` and the `Response` are `HTTP Messages`. -> When using `ServerRequestInterface`, both `RequestInterface` and `Psr\Http\Message\MessageInterface` methods are considered. - diff --git a/Server/vendor/psr/http-message/docs/PSR7-Usage.md b/Server/vendor/psr/http-message/docs/PSR7-Usage.md deleted file mode 100644 index b6d048a3..00000000 --- a/Server/vendor/psr/http-message/docs/PSR7-Usage.md +++ /dev/null @@ -1,159 +0,0 @@ -### PSR-7 Usage - -All PSR-7 applications comply with these interfaces -They were created to establish a standard between middleware implementations. - -> `RequestInterface`, `ServerRequestInterface`, `ResponseInterface` extend `MessageInterface` because the `Request` and the `Response` are `HTTP Messages`. -> When using `ServerRequestInterface`, both `RequestInterface` and `Psr\Http\Message\MessageInterface` methods are considered. - - -The following examples will illustrate how basic operations are done in PSR-7. - -##### Examples - - -For this examples to work (at least) a PSR-7 implementation package is required. (eg: zendframework/zend-diactoros, guzzlehttp/psr7, slim/slim, etc) -All PSR-7 implementations should have the same behaviour. - -The following will be assumed: -`$request` is an object of `Psr\Http\Message\RequestInterface` and - -`$response` is an object implementing `Psr\Http\Message\RequestInterface` - - -### Working with HTTP Headers - -#### Adding headers to response: - -```php -$response->withHeader('My-Custom-Header', 'My Custom Message'); -``` - -#### Appending values to headers - -```php -$response->withAddedHeader('My-Custom-Header', 'The second message'); -``` - -#### Checking if header exists: - -```php -$request->hasHeader('My-Custom-Header'); // will return false -$response->hasHeader('My-Custom-Header'); // will return true -``` - -> Note: My-Custom-Header was only added in the Response - -#### Getting comma-separated values from a header (also applies to request) - -```php -// getting value from request headers -$request->getHeaderLine('Content-Type'); // will return: "text/html; charset=UTF-8" -// getting value from response headers -$response->getHeaderLine('My-Custom-Header'); // will return: "My Custom Message; The second message" -``` - -#### Getting array of value from a header (also applies to request) -```php -// getting value from request headers -$request->getHeader('Content-Type'); // will return: ["text/html", "charset=UTF-8"] -// getting value from response headers -$response->getHeader('My-Custom-Header'); // will return: ["My Custom Message", "The second message"] -``` - -#### Removing headers from HTTP Messages -```php -// removing a header from Request, removing deprecated "Content-MD5" header -$request->withoutHeader('Content-MD5'); - -// removing a header from Response -// effect: the browser won't know the size of the stream -// the browser will download the stream till it ends -$response->withoutHeader('Content-Length'); -``` - -### Working with HTTP Message Body - -When working with the PSR-7 there are two methods of implementation: -#### 1. Getting the body separately - -> This method makes the body handling easier to understand and is useful when repeatedly calling body methods. (You only call `getBody()` once). Using this method mistakes like `$response->write()` are also prevented. - -```php -$body = $response->getBody(); -// operations on body, eg. read, write, seek -// ... -// replacing the old body -$response->withBody($body); -// this last statement is optional as we working with objects -// in this case the "new" body is same with the "old" one -// the $body variable has the same value as the one in $request, only the reference is passed -``` - -#### 2. Working directly on response - -> This method is useful when only performing few operations as the `$request->getBody()` statement fragment is required - -```php -$response->getBody()->write('hello'); -``` - -### Getting the body contents - -The following snippet gets the contents of a stream contents. -> Note: Streams must be rewinded, if content was written into streams, it will be ignored when calling `getContents()` because the stream pointer is set to the last character, which is `\0` - meaning end of stream. -```php -$body = $response->getBody(); -$body->rewind(); // or $body->seek(0); -$bodyText = $body->getContents(); -``` -> Note: If `$body->seek(1)` is called before `$body->getContents()`, the first character will be ommited as the starting pointer is set to `1`, not `0`. This is why using `$body->rewind()` is recommended. - -### Append to body - -```php -$response->getBody()->write('Hello'); // writing directly -$body = $request->getBody(); // which is a `StreamInterface` -$body->write('xxxxx'); -``` - -### Prepend to body -Prepending is different when it comes to streams. The content must be copied before writing the content to be prepended. -The following example will explain the behaviour of streams. - -```php -// assuming our response is initially empty -$body = $repsonse->getBody(); -// writing the string "abcd" -$body->write('abcd'); - -// seeking to start of stream -$body->seek(0); -// writing 'ef' -$body->write('ef'); // at this point the stream contains "efcd" -``` - -#### Prepending by rewriting separately - -```php -// assuming our response body stream only contains: "abcd" -$body = $response->getBody(); -$body->rewind(); -$contents = $body->getContents(); // abcd -// seeking the stream to beginning -$body->rewind(); -$body->write('ef'); // stream contains "efcd" -$body->write($contents); // stream contains "efabcd" -``` - -> Note: `getContents()` seeks the stream while reading it, therefore if the second `rewind()` method call was not present the stream would have resulted in `abcdefabcd` because the `write()` method appends to stream if not preceeded by `rewind()` or `seek(0)`. - -#### Prepending by using contents as a string -```php -$body = $response->getBody(); -$body->rewind(); -$contents = $body->getContents(); // efabcd -$contents = 'ef'.$contents; -$body->rewind(); -$body->write($contents); -``` diff --git a/Server/vendor/psr/http-message/src/MessageInterface.php b/Server/vendor/psr/http-message/src/MessageInterface.php index a83c9851..dd46e5ec 100644 --- a/Server/vendor/psr/http-message/src/MessageInterface.php +++ b/Server/vendor/psr/http-message/src/MessageInterface.php @@ -23,7 +23,7 @@ interface MessageInterface * * @return string HTTP protocol version. */ - public function getProtocolVersion(): string; + public function getProtocolVersion(); /** * Return an instance with the specified HTTP protocol version. @@ -38,7 +38,7 @@ interface MessageInterface * @param string $version HTTP protocol version * @return static */ - public function withProtocolVersion(string $version): MessageInterface; + public function withProtocolVersion($version); /** * Retrieves all message header values. @@ -65,7 +65,7 @@ interface MessageInterface * key MUST be a header name, and each value MUST be an array of strings * for that header. */ - public function getHeaders(): array; + public function getHeaders(); /** * Checks if a header exists by the given case-insensitive name. @@ -75,7 +75,7 @@ interface MessageInterface * name using a case-insensitive string comparison. Returns false if * no matching header name is found in the message. */ - public function hasHeader(string $name): bool; + public function hasHeader($name); /** * Retrieves a message header value by the given case-insensitive name. @@ -91,7 +91,7 @@ interface MessageInterface * header. If the header does not appear in the message, this method MUST * return an empty array. */ - public function getHeader(string $name): array; + public function getHeader($name); /** * Retrieves a comma-separated string of the values for a single header. @@ -112,7 +112,7 @@ interface MessageInterface * concatenated together using a comma. If the header does not appear in * the message, this method MUST return an empty string. */ - public function getHeaderLine(string $name): string; + public function getHeaderLine($name); /** * Return an instance with the provided value replacing the specified header. @@ -129,7 +129,7 @@ interface MessageInterface * @return static * @throws \InvalidArgumentException for invalid header names or values. */ - public function withHeader(string $name, $value): MessageInterface; + public function withHeader($name, $value); /** * Return an instance with the specified header appended with the given value. @@ -147,7 +147,7 @@ interface MessageInterface * @return static * @throws \InvalidArgumentException for invalid header names or values. */ - public function withAddedHeader(string $name, $value): MessageInterface; + public function withAddedHeader($name, $value); /** * Return an instance without the specified header. @@ -161,14 +161,14 @@ interface MessageInterface * @param string $name Case-insensitive header field name to remove. * @return static */ - public function withoutHeader(string $name): MessageInterface; + public function withoutHeader($name); /** * Gets the body of the message. * * @return StreamInterface Returns the body as a stream. */ - public function getBody(): StreamInterface; + public function getBody(); /** * Return an instance with the specified message body. @@ -183,5 +183,5 @@ interface MessageInterface * @return static * @throws \InvalidArgumentException When the body is not valid. */ - public function withBody(StreamInterface $body): MessageInterface; + public function withBody(StreamInterface $body); } diff --git a/Server/vendor/psr/http-message/src/RequestInterface.php b/Server/vendor/psr/http-message/src/RequestInterface.php index 33f85e55..a96d4fd6 100644 --- a/Server/vendor/psr/http-message/src/RequestInterface.php +++ b/Server/vendor/psr/http-message/src/RequestInterface.php @@ -39,7 +39,7 @@ interface RequestInterface extends MessageInterface * * @return string */ - public function getRequestTarget(): string; + public function getRequestTarget(); /** * Return an instance with the specific request-target. @@ -55,18 +55,17 @@ interface RequestInterface extends MessageInterface * * @link http://tools.ietf.org/html/rfc7230#section-5.3 (for the various * request-target forms allowed in request messages) - * @param string $requestTarget + * @param mixed $requestTarget * @return static */ - public function withRequestTarget(string $requestTarget): RequestInterface; - + public function withRequestTarget($requestTarget); /** * Retrieves the HTTP method of the request. * * @return string Returns the request method. */ - public function getMethod(): string; + public function getMethod(); /** * Return an instance with the provided HTTP method. @@ -83,7 +82,7 @@ interface RequestInterface extends MessageInterface * @return static * @throws \InvalidArgumentException for invalid HTTP methods. */ - public function withMethod(string $method): RequestInterface; + public function withMethod($method); /** * Retrieves the URI instance. @@ -94,7 +93,7 @@ interface RequestInterface extends MessageInterface * @return UriInterface Returns a UriInterface instance * representing the URI of the request. */ - public function getUri(): UriInterface; + public function getUri(); /** * Returns an instance with the provided URI. @@ -126,5 +125,5 @@ interface RequestInterface extends MessageInterface * @param bool $preserveHost Preserve the original state of the Host header. * @return static */ - public function withUri(UriInterface $uri, bool $preserveHost = false): RequestInterface; + public function withUri(UriInterface $uri, $preserveHost = false); } diff --git a/Server/vendor/psr/http-message/src/ResponseInterface.php b/Server/vendor/psr/http-message/src/ResponseInterface.php index e9299a91..c306514e 100644 --- a/Server/vendor/psr/http-message/src/ResponseInterface.php +++ b/Server/vendor/psr/http-message/src/ResponseInterface.php @@ -27,7 +27,7 @@ interface ResponseInterface extends MessageInterface * * @return int Status code. */ - public function getStatusCode(): int; + public function getStatusCode(); /** * Return an instance with the specified status code and, optionally, reason phrase. @@ -49,7 +49,7 @@ interface ResponseInterface extends MessageInterface * @return static * @throws \InvalidArgumentException For invalid status code arguments. */ - public function withStatus(int $code, string $reasonPhrase = ''): ResponseInterface; + public function withStatus($code, $reasonPhrase = ''); /** * Gets the response reason phrase associated with the status code. @@ -64,5 +64,5 @@ interface ResponseInterface extends MessageInterface * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml * @return string Reason phrase; must return an empty string if none present. */ - public function getReasonPhrase(): string; + public function getReasonPhrase(); } diff --git a/Server/vendor/psr/http-message/src/ServerRequestInterface.php b/Server/vendor/psr/http-message/src/ServerRequestInterface.php index 8625d0e1..02512340 100644 --- a/Server/vendor/psr/http-message/src/ServerRequestInterface.php +++ b/Server/vendor/psr/http-message/src/ServerRequestInterface.php @@ -51,7 +51,7 @@ interface ServerRequestInterface extends RequestInterface * * @return array */ - public function getServerParams(): array; + public function getServerParams(); /** * Retrieve cookies. @@ -63,7 +63,7 @@ interface ServerRequestInterface extends RequestInterface * * @return array */ - public function getCookieParams(): array; + public function getCookieParams(); /** * Return an instance with the specified cookies. @@ -82,7 +82,7 @@ interface ServerRequestInterface extends RequestInterface * @param array $cookies Array of key/value pairs representing cookies. * @return static */ - public function withCookieParams(array $cookies): ServerRequestInterface; + public function withCookieParams(array $cookies); /** * Retrieve query string arguments. @@ -96,7 +96,7 @@ interface ServerRequestInterface extends RequestInterface * * @return array */ - public function getQueryParams(): array; + public function getQueryParams(); /** * Return an instance with the specified query string arguments. @@ -120,7 +120,7 @@ interface ServerRequestInterface extends RequestInterface * $_GET. * @return static */ - public function withQueryParams(array $query): ServerRequestInterface; + public function withQueryParams(array $query); /** * Retrieve normalized file upload data. @@ -134,7 +134,7 @@ interface ServerRequestInterface extends RequestInterface * @return array An array tree of UploadedFileInterface instances; an empty * array MUST be returned if no data is present. */ - public function getUploadedFiles(): array; + public function getUploadedFiles(); /** * Create a new instance with the specified uploaded files. @@ -147,7 +147,7 @@ interface ServerRequestInterface extends RequestInterface * @return static * @throws \InvalidArgumentException if an invalid structure is provided. */ - public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface; + public function withUploadedFiles(array $uploadedFiles); /** * Retrieve any parameters provided in the request body. @@ -194,7 +194,7 @@ interface ServerRequestInterface extends RequestInterface * @throws \InvalidArgumentException if an unsupported argument type is * provided. */ - public function withParsedBody($data): ServerRequestInterface; + public function withParsedBody($data); /** * Retrieve attributes derived from the request. @@ -207,7 +207,7 @@ interface ServerRequestInterface extends RequestInterface * * @return array Attributes derived from the request. */ - public function getAttributes(): array; + public function getAttributes(); /** * Retrieve a single derived request attribute. @@ -224,7 +224,7 @@ interface ServerRequestInterface extends RequestInterface * @param mixed $default Default value to return if the attribute does not exist. * @return mixed */ - public function getAttribute(string $name, $default = null); + public function getAttribute($name, $default = null); /** * Return an instance with the specified derived request attribute. @@ -241,7 +241,7 @@ interface ServerRequestInterface extends RequestInterface * @param mixed $value The value of the attribute. * @return static */ - public function withAttribute(string $name, $value): ServerRequestInterface; + public function withAttribute($name, $value); /** * Return an instance that removes the specified derived request attribute. @@ -257,5 +257,5 @@ interface ServerRequestInterface extends RequestInterface * @param string $name The attribute name. * @return static */ - public function withoutAttribute(string $name): ServerRequestInterface; + public function withoutAttribute($name); } diff --git a/Server/vendor/psr/http-message/src/StreamInterface.php b/Server/vendor/psr/http-message/src/StreamInterface.php index a62aabb8..f68f3912 100644 --- a/Server/vendor/psr/http-message/src/StreamInterface.php +++ b/Server/vendor/psr/http-message/src/StreamInterface.php @@ -25,14 +25,14 @@ interface StreamInterface * @see http://php.net/manual/en/language.oop5.magic.php#object.tostring * @return string */ - public function __toString(): string; + public function __toString(); /** * Closes the stream and any underlying resources. * * @return void */ - public function close(): void; + public function close(); /** * Separates any underlying resources from the stream. @@ -48,7 +48,7 @@ interface StreamInterface * * @return int|null Returns the size in bytes if known, or null if unknown. */ - public function getSize(): ?int; + public function getSize(); /** * Returns the current position of the file read/write pointer @@ -56,21 +56,21 @@ interface StreamInterface * @return int Position of the file pointer * @throws \RuntimeException on error. */ - public function tell(): int; + public function tell(); /** * Returns true if the stream is at the end of the stream. * * @return bool */ - public function eof(): bool; + public function eof(); /** * Returns whether or not the stream is seekable. * * @return bool */ - public function isSeekable(): bool; + public function isSeekable(); /** * Seek to a position in the stream. @@ -84,7 +84,7 @@ interface StreamInterface * SEEK_END: Set position to end-of-stream plus offset. * @throws \RuntimeException on failure. */ - public function seek(int $offset, int $whence = SEEK_SET): void; + public function seek($offset, $whence = SEEK_SET); /** * Seek to the beginning of the stream. @@ -96,14 +96,14 @@ interface StreamInterface * @link http://www.php.net/manual/en/function.fseek.php * @throws \RuntimeException on failure. */ - public function rewind(): void; + public function rewind(); /** * Returns whether or not the stream is writable. * * @return bool */ - public function isWritable(): bool; + public function isWritable(); /** * Write data to the stream. @@ -112,14 +112,14 @@ interface StreamInterface * @return int Returns the number of bytes written to the stream. * @throws \RuntimeException on failure. */ - public function write(string $string): int; + public function write($string); /** * Returns whether or not the stream is readable. * * @return bool */ - public function isReadable(): bool; + public function isReadable(); /** * Read data from the stream. @@ -131,7 +131,7 @@ interface StreamInterface * if no bytes are available. * @throws \RuntimeException if an error occurs. */ - public function read(int $length): string; + public function read($length); /** * Returns the remaining contents in a string @@ -140,7 +140,7 @@ interface StreamInterface * @throws \RuntimeException if unable to read or an error occurs while * reading. */ - public function getContents(): string; + public function getContents(); /** * Get stream metadata as an associative array or retrieve a specific key. @@ -149,10 +149,10 @@ interface StreamInterface * stream_get_meta_data() function. * * @link http://php.net/manual/en/function.stream-get-meta-data.php - * @param string|null $key Specific metadata to retrieve. + * @param string $key Specific metadata to retrieve. * @return array|mixed|null Returns an associative array if no key is * provided. Returns a specific key value if a key is provided and the * value is found, or null if the key is not found. */ - public function getMetadata(?string $key = null); + public function getMetadata($key = null); } diff --git a/Server/vendor/psr/http-message/src/UploadedFileInterface.php b/Server/vendor/psr/http-message/src/UploadedFileInterface.php index dd19d653..f8a6901e 100644 --- a/Server/vendor/psr/http-message/src/UploadedFileInterface.php +++ b/Server/vendor/psr/http-message/src/UploadedFileInterface.php @@ -28,7 +28,7 @@ interface UploadedFileInterface * @throws \RuntimeException in cases when no stream is available or can be * created. */ - public function getStream(): StreamInterface; + public function getStream(); /** * Move the uploaded file to a new location. @@ -62,7 +62,7 @@ interface UploadedFileInterface * @throws \RuntimeException on any error during the move operation, or on * the second or subsequent call to the method. */ - public function moveTo(string $targetPath): void; + public function moveTo($targetPath); /** * Retrieve the file size. @@ -73,7 +73,7 @@ interface UploadedFileInterface * * @return int|null The file size in bytes or null if unknown. */ - public function getSize(): ?int; + public function getSize(); /** * Retrieve the error associated with the uploaded file. @@ -89,7 +89,7 @@ interface UploadedFileInterface * @see http://php.net/manual/en/features.file-upload.errors.php * @return int One of PHP's UPLOAD_ERR_XXX constants. */ - public function getError(): int; + public function getError(); /** * Retrieve the filename sent by the client. @@ -104,7 +104,7 @@ interface UploadedFileInterface * @return string|null The filename sent by the client or null if none * was provided. */ - public function getClientFilename(): ?string; + public function getClientFilename(); /** * Retrieve the media type sent by the client. @@ -119,5 +119,5 @@ interface UploadedFileInterface * @return string|null The media type sent by the client or null if none * was provided. */ - public function getClientMediaType(): ?string; + public function getClientMediaType(); } diff --git a/Server/vendor/psr/http-message/src/UriInterface.php b/Server/vendor/psr/http-message/src/UriInterface.php index 15e2cf28..9d7ab9ea 100644 --- a/Server/vendor/psr/http-message/src/UriInterface.php +++ b/Server/vendor/psr/http-message/src/UriInterface.php @@ -1,5 +1,4 @@ logger = $logger; - } - - public function doSomething() - { - if ($this->logger) { - $this->logger->info('Doing work'); - } - - try { - $this->doSomethingElse(); - } catch (Exception $exception) { - $this->logger->error('Oh no!', array('exception' => $exception)); - } - - // do something useful - } -} -``` - -You can then pick one of the implementations of the interface to get a logger. - -If you want to implement the interface, you can require this package and -implement `Psr\Log\LoggerInterface` in your code. Please read the -[specification text](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) -for details. diff --git a/Server/vendor/psr/log/composer.json b/Server/vendor/psr/log/composer.json deleted file mode 100644 index 879fc6f5..00000000 --- a/Server/vendor/psr/log/composer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "psr/log", - "description": "Common interface for logging libraries", - "keywords": ["psr", "psr-3", "log"], - "homepage": "https://github.com/php-fig/log", - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "require": { - "php": ">=8.0.0" - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - } -} diff --git a/Server/vendor/psr/log/src/AbstractLogger.php b/Server/vendor/psr/log/src/AbstractLogger.php deleted file mode 100644 index d60a091a..00000000 --- a/Server/vendor/psr/log/src/AbstractLogger.php +++ /dev/null @@ -1,15 +0,0 @@ -logger = $logger; - } -} diff --git a/Server/vendor/psr/log/src/LoggerInterface.php b/Server/vendor/psr/log/src/LoggerInterface.php deleted file mode 100644 index 8afabc90..00000000 --- a/Server/vendor/psr/log/src/LoggerInterface.php +++ /dev/null @@ -1,97 +0,0 @@ -log(LogLevel::EMERGENCY, $message, $context); - } - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - */ - public function alert(string|\Stringable $message, array $context = []): void - { - $this->log(LogLevel::ALERT, $message, $context); - } - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - */ - public function critical(string|\Stringable $message, array $context = []): void - { - $this->log(LogLevel::CRITICAL, $message, $context); - } - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - */ - public function error(string|\Stringable $message, array $context = []): void - { - $this->log(LogLevel::ERROR, $message, $context); - } - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - */ - public function warning(string|\Stringable $message, array $context = []): void - { - $this->log(LogLevel::WARNING, $message, $context); - } - - /** - * Normal but significant events. - */ - public function notice(string|\Stringable $message, array $context = []): void - { - $this->log(LogLevel::NOTICE, $message, $context); - } - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - */ - public function info(string|\Stringable $message, array $context = []): void - { - $this->log(LogLevel::INFO, $message, $context); - } - - /** - * Detailed debug information. - */ - public function debug(string|\Stringable $message, array $context = []): void - { - $this->log(LogLevel::DEBUG, $message, $context); - } - - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * - * @throws \Psr\Log\InvalidArgumentException - */ - abstract public function log($level, string|\Stringable $message, array $context = []): void; -} diff --git a/Server/vendor/psr/log/src/NullLogger.php b/Server/vendor/psr/log/src/NullLogger.php deleted file mode 100644 index de0561e2..00000000 --- a/Server/vendor/psr/log/src/NullLogger.php +++ /dev/null @@ -1,26 +0,0 @@ -logger) { }` - * blocks. - */ -class NullLogger extends AbstractLogger -{ - /** - * Logs with an arbitrary level. - * - * @param mixed[] $context - * - * @throws \Psr\Log\InvalidArgumentException - */ - public function log($level, string|\Stringable $message, array $context = []): void - { - // noop - } -} diff --git a/Server/vendor/symfony/deprecation-contracts/CHANGELOG.md b/Server/vendor/symfony/deprecation-contracts/CHANGELOG.md deleted file mode 100644 index 7932e261..00000000 --- a/Server/vendor/symfony/deprecation-contracts/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -CHANGELOG -========= - -The changelog is maintained for all Symfony contracts at the following URL: -https://github.com/symfony/contracts/blob/main/CHANGELOG.md diff --git a/Server/vendor/symfony/deprecation-contracts/README.md b/Server/vendor/symfony/deprecation-contracts/README.md deleted file mode 100644 index 9814864c..00000000 --- a/Server/vendor/symfony/deprecation-contracts/README.md +++ /dev/null @@ -1,26 +0,0 @@ -Symfony Deprecation Contracts -============================= - -A generic function and convention to trigger deprecation notices. - -This package provides a single global function named `trigger_deprecation()` that triggers silenced deprecation notices. - -By using a custom PHP error handler such as the one provided by the Symfony ErrorHandler component, -the triggered deprecations can be caught and logged for later discovery, both on dev and prod environments. - -The function requires at least 3 arguments: - - the name of the Composer package that is triggering the deprecation - - the version of the package that introduced the deprecation - - the message of the deprecation - - more arguments can be provided: they will be inserted in the message using `printf()` formatting - -Example: -```php -trigger_deprecation('symfony/blockchain', '8.9', 'Using "%s" is deprecated, use "%s" instead.', 'bitcoin', 'fabcoin'); -``` - -This will generate the following message: -`Since symfony/blockchain 8.9: Using "bitcoin" is deprecated, use "fabcoin" instead.` - -While not recommended, the deprecation notices can be completely ignored by declaring an empty -`function trigger_deprecation() {}` in your application. diff --git a/Server/vendor/symfony/deprecation-contracts/function.php b/Server/vendor/symfony/deprecation-contracts/function.php deleted file mode 100644 index 2d56512b..00000000 --- a/Server/vendor/symfony/deprecation-contracts/function.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (!function_exists('trigger_deprecation')) { - /** - * Triggers a silenced deprecation notice. - * - * @param string $package The name of the Composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string $message The message of the deprecation - * @param mixed ...$args Values to insert in the message using printf() formatting - * - * @author Nicolas Grekas - */ - function trigger_deprecation(string $package, string $version, string $message, mixed ...$args): void - { - @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED); - } -} diff --git a/Server/vendor/symfony/polyfill-ctype/LICENSE b/Server/vendor/symfony/polyfill-ctype/LICENSE index 7536caea..3f853aaf 100644 --- a/Server/vendor/symfony/polyfill-ctype/LICENSE +++ b/Server/vendor/symfony/polyfill-ctype/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018-present Fabien Potencier +Copyright (c) 2018-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Server/vendor/symfony/polyfill-ctype/composer.json b/Server/vendor/symfony/polyfill-ctype/composer.json index 131ca7ad..ee5c931c 100644 --- a/Server/vendor/symfony/polyfill-ctype/composer.json +++ b/Server/vendor/symfony/polyfill-ctype/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=7.2" + "php": ">=7.1" }, "provide": { "ext-ctype": "*" @@ -30,6 +30,9 @@ }, "minimum-stability": "dev", "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" diff --git a/Server/vendor/symfony/polyfill-intl-idn/Idn.php b/Server/vendor/symfony/polyfill-intl-idn/Idn.php new file mode 100644 index 00000000..fee3026d --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-idn/Idn.php @@ -0,0 +1,925 @@ + and Trevor Rowbotham + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Intl\Idn; + +use Exception; +use Normalizer; +use Symfony\Polyfill\Intl\Idn\Resources\unidata\DisallowedRanges; +use Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex; + +/** + * @see https://www.unicode.org/reports/tr46/ + * + * @internal + */ +final class Idn +{ + public const ERROR_EMPTY_LABEL = 1; + public const ERROR_LABEL_TOO_LONG = 2; + public const ERROR_DOMAIN_NAME_TOO_LONG = 4; + public const ERROR_LEADING_HYPHEN = 8; + public const ERROR_TRAILING_HYPHEN = 0x10; + public const ERROR_HYPHEN_3_4 = 0x20; + public const ERROR_LEADING_COMBINING_MARK = 0x40; + public const ERROR_DISALLOWED = 0x80; + public const ERROR_PUNYCODE = 0x100; + public const ERROR_LABEL_HAS_DOT = 0x200; + public const ERROR_INVALID_ACE_LABEL = 0x400; + public const ERROR_BIDI = 0x800; + public const ERROR_CONTEXTJ = 0x1000; + public const ERROR_CONTEXTO_PUNCTUATION = 0x2000; + public const ERROR_CONTEXTO_DIGITS = 0x4000; + + public const INTL_IDNA_VARIANT_2003 = 0; + public const INTL_IDNA_VARIANT_UTS46 = 1; + + public const IDNA_DEFAULT = 0; + public const IDNA_ALLOW_UNASSIGNED = 1; + public const IDNA_USE_STD3_RULES = 2; + public const IDNA_CHECK_BIDI = 4; + public const IDNA_CHECK_CONTEXTJ = 8; + public const IDNA_NONTRANSITIONAL_TO_ASCII = 16; + public const IDNA_NONTRANSITIONAL_TO_UNICODE = 32; + + public const MAX_DOMAIN_SIZE = 253; + public const MAX_LABEL_SIZE = 63; + + public const BASE = 36; + public const TMIN = 1; + public const TMAX = 26; + public const SKEW = 38; + public const DAMP = 700; + public const INITIAL_BIAS = 72; + public const INITIAL_N = 128; + public const DELIMITER = '-'; + public const MAX_INT = 2147483647; + + /** + * Contains the numeric value of a basic code point (for use in representing integers) in the + * range 0 to BASE-1, or -1 if b is does not represent a value. + * + * @var array + */ + private static $basicToDigit = [ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1, + + -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, + + -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, + + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + ]; + + /** + * @var array + */ + private static $virama; + + /** + * @var array + */ + private static $mapped; + + /** + * @var array + */ + private static $ignored; + + /** + * @var array + */ + private static $deviation; + + /** + * @var array + */ + private static $disallowed; + + /** + * @var array + */ + private static $disallowed_STD3_mapped; + + /** + * @var array + */ + private static $disallowed_STD3_valid; + + /** + * @var bool + */ + private static $mappingTableLoaded = false; + + /** + * @see https://www.unicode.org/reports/tr46/#ToASCII + * + * @param string $domainName + * @param int $options + * @param int $variant + * @param array $idna_info + * + * @return string|false + */ + public static function idn_to_ascii($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = []) + { + if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) { + @trigger_error('idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED); + } + + $options = [ + 'CheckHyphens' => true, + 'CheckBidi' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 !== ($options & self::IDNA_CHECK_BIDI), + 'CheckJoiners' => self::INTL_IDNA_VARIANT_UTS46 === $variant && 0 !== ($options & self::IDNA_CHECK_CONTEXTJ), + 'UseSTD3ASCIIRules' => 0 !== ($options & self::IDNA_USE_STD3_RULES), + 'Transitional_Processing' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 === ($options & self::IDNA_NONTRANSITIONAL_TO_ASCII), + 'VerifyDnsLength' => true, + ]; + $info = new Info(); + $labels = self::process((string) $domainName, $options, $info); + + foreach ($labels as $i => $label) { + // Only convert labels to punycode that contain non-ASCII code points + if (1 === preg_match('/[^\x00-\x7F]/', $label)) { + try { + $label = 'xn--'.self::punycodeEncode($label); + } catch (Exception $e) { + $info->errors |= self::ERROR_PUNYCODE; + } + + $labels[$i] = $label; + } + } + + if ($options['VerifyDnsLength']) { + self::validateDomainAndLabelLength($labels, $info); + } + + $idna_info = [ + 'result' => implode('.', $labels), + 'isTransitionalDifferent' => $info->transitionalDifferent, + 'errors' => $info->errors, + ]; + + return 0 === $info->errors ? $idna_info['result'] : false; + } + + /** + * @see https://www.unicode.org/reports/tr46/#ToUnicode + * + * @param string $domainName + * @param int $options + * @param int $variant + * @param array $idna_info + * + * @return string|false + */ + public static function idn_to_utf8($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = []) + { + if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) { + @trigger_error('idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED); + } + + $info = new Info(); + $labels = self::process((string) $domainName, [ + 'CheckHyphens' => true, + 'CheckBidi' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 !== ($options & self::IDNA_CHECK_BIDI), + 'CheckJoiners' => self::INTL_IDNA_VARIANT_UTS46 === $variant && 0 !== ($options & self::IDNA_CHECK_CONTEXTJ), + 'UseSTD3ASCIIRules' => 0 !== ($options & self::IDNA_USE_STD3_RULES), + 'Transitional_Processing' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 === ($options & self::IDNA_NONTRANSITIONAL_TO_UNICODE), + ], $info); + $idna_info = [ + 'result' => implode('.', $labels), + 'isTransitionalDifferent' => $info->transitionalDifferent, + 'errors' => $info->errors, + ]; + + return 0 === $info->errors ? $idna_info['result'] : false; + } + + /** + * @param string $label + * + * @return bool + */ + private static function isValidContextJ(array $codePoints, $label) + { + if (!isset(self::$virama)) { + self::$virama = require __DIR__.\DIRECTORY_SEPARATOR.'Resources'.\DIRECTORY_SEPARATOR.'unidata'.\DIRECTORY_SEPARATOR.'virama.php'; + } + + $offset = 0; + + foreach ($codePoints as $i => $codePoint) { + if (0x200C !== $codePoint && 0x200D !== $codePoint) { + continue; + } + + if (!isset($codePoints[$i - 1])) { + return false; + } + + // If Canonical_Combining_Class(Before(cp)) .eq. Virama Then True; + if (isset(self::$virama[$codePoints[$i - 1]])) { + continue; + } + + // If RegExpMatch((Joining_Type:{L,D})(Joining_Type:T)*\u200C(Joining_Type:T)*(Joining_Type:{R,D})) Then + // True; + // Generated RegExp = ([Joining_Type:{L,D}][Joining_Type:T]*\u200C[Joining_Type:T]*)[Joining_Type:{R,D}] + if (0x200C === $codePoint && 1 === preg_match(Regex::ZWNJ, $label, $matches, \PREG_OFFSET_CAPTURE, $offset)) { + $offset += \strlen($matches[1][0]); + + continue; + } + + return false; + } + + return true; + } + + /** + * @see https://www.unicode.org/reports/tr46/#ProcessingStepMap + * + * @param string $input + * @param array $options + * + * @return string + */ + private static function mapCodePoints($input, array $options, Info $info) + { + $str = ''; + $useSTD3ASCIIRules = $options['UseSTD3ASCIIRules']; + $transitional = $options['Transitional_Processing']; + + foreach (self::utf8Decode($input) as $codePoint) { + $data = self::lookupCodePointStatus($codePoint, $useSTD3ASCIIRules); + + switch ($data['status']) { + case 'disallowed': + $info->errors |= self::ERROR_DISALLOWED; + + // no break. + + case 'valid': + $str .= mb_chr($codePoint, 'utf-8'); + + break; + + case 'ignored': + // Do nothing. + break; + + case 'mapped': + $str .= $data['mapping']; + + break; + + case 'deviation': + $info->transitionalDifferent = true; + $str .= ($transitional ? $data['mapping'] : mb_chr($codePoint, 'utf-8')); + + break; + } + } + + return $str; + } + + /** + * @see https://www.unicode.org/reports/tr46/#Processing + * + * @param string $domain + * @param array $options + * + * @return array + */ + private static function process($domain, array $options, Info $info) + { + // If VerifyDnsLength is not set, we are doing ToUnicode otherwise we are doing ToASCII and + // we need to respect the VerifyDnsLength option. + $checkForEmptyLabels = !isset($options['VerifyDnsLength']) || $options['VerifyDnsLength']; + + if ($checkForEmptyLabels && '' === $domain) { + $info->errors |= self::ERROR_EMPTY_LABEL; + + return [$domain]; + } + + // Step 1. Map each code point in the domain name string + $domain = self::mapCodePoints($domain, $options, $info); + + // Step 2. Normalize the domain name string to Unicode Normalization Form C. + if (!Normalizer::isNormalized($domain, Normalizer::FORM_C)) { + $domain = Normalizer::normalize($domain, Normalizer::FORM_C); + } + + // Step 3. Break the string into labels at U+002E (.) FULL STOP. + $labels = explode('.', $domain); + $lastLabelIndex = \count($labels) - 1; + + // Step 4. Convert and validate each label in the domain name string. + foreach ($labels as $i => $label) { + $validationOptions = $options; + + if ('xn--' === substr($label, 0, 4)) { + try { + $label = self::punycodeDecode(substr($label, 4)); + } catch (Exception $e) { + $info->errors |= self::ERROR_PUNYCODE; + + continue; + } + + $validationOptions['Transitional_Processing'] = false; + $labels[$i] = $label; + } + + self::validateLabel($label, $info, $validationOptions, $i > 0 && $i === $lastLabelIndex); + } + + if ($info->bidiDomain && !$info->validBidiDomain) { + $info->errors |= self::ERROR_BIDI; + } + + // Any input domain name string that does not record an error has been successfully + // processed according to this specification. Conversely, if an input domain_name string + // causes an error, then the processing of the input domain_name string fails. Determining + // what to do with error input is up to the caller, and not in the scope of this document. + return $labels; + } + + /** + * @see https://tools.ietf.org/html/rfc5893#section-2 + * + * @param string $label + */ + private static function validateBidiLabel($label, Info $info) + { + if (1 === preg_match(Regex::RTL_LABEL, $label)) { + $info->bidiDomain = true; + + // Step 1. The first character must be a character with Bidi property L, R, or AL. + // If it has the R or AL property, it is an RTL label + if (1 !== preg_match(Regex::BIDI_STEP_1_RTL, $label)) { + $info->validBidiDomain = false; + + return; + } + + // Step 2. In an RTL label, only characters with the Bidi properties R, AL, AN, EN, ES, + // CS, ET, ON, BN, or NSM are allowed. + if (1 === preg_match(Regex::BIDI_STEP_2, $label)) { + $info->validBidiDomain = false; + + return; + } + + // Step 3. In an RTL label, the end of the label must be a character with Bidi property + // R, AL, EN, or AN, followed by zero or more characters with Bidi property NSM. + if (1 !== preg_match(Regex::BIDI_STEP_3, $label)) { + $info->validBidiDomain = false; + + return; + } + + // Step 4. In an RTL label, if an EN is present, no AN may be present, and vice versa. + if (1 === preg_match(Regex::BIDI_STEP_4_AN, $label) && 1 === preg_match(Regex::BIDI_STEP_4_EN, $label)) { + $info->validBidiDomain = false; + + return; + } + + return; + } + + // We are a LTR label + // Step 1. The first character must be a character with Bidi property L, R, or AL. + // If it has the L property, it is an LTR label. + if (1 !== preg_match(Regex::BIDI_STEP_1_LTR, $label)) { + $info->validBidiDomain = false; + + return; + } + + // Step 5. In an LTR label, only characters with the Bidi properties L, EN, + // ES, CS, ET, ON, BN, or NSM are allowed. + if (1 === preg_match(Regex::BIDI_STEP_5, $label)) { + $info->validBidiDomain = false; + + return; + } + + // Step 6.In an LTR label, the end of the label must be a character with Bidi property L or + // EN, followed by zero or more characters with Bidi property NSM. + if (1 !== preg_match(Regex::BIDI_STEP_6, $label)) { + $info->validBidiDomain = false; + + return; + } + } + + /** + * @param array $labels + */ + private static function validateDomainAndLabelLength(array $labels, Info $info) + { + $maxDomainSize = self::MAX_DOMAIN_SIZE; + $length = \count($labels); + + // Number of "." delimiters. + $domainLength = $length - 1; + + // If the last label is empty and it is not the first label, then it is the root label. + // Increase the max size by 1, making it 254, to account for the root label's "." + // delimiter. This also means we don't need to check the last label's length for being too + // long. + if ($length > 1 && '' === $labels[$length - 1]) { + ++$maxDomainSize; + --$length; + } + + for ($i = 0; $i < $length; ++$i) { + $bytes = \strlen($labels[$i]); + $domainLength += $bytes; + + if ($bytes > self::MAX_LABEL_SIZE) { + $info->errors |= self::ERROR_LABEL_TOO_LONG; + } + } + + if ($domainLength > $maxDomainSize) { + $info->errors |= self::ERROR_DOMAIN_NAME_TOO_LONG; + } + } + + /** + * @see https://www.unicode.org/reports/tr46/#Validity_Criteria + * + * @param string $label + * @param array $options + * @param bool $canBeEmpty + */ + private static function validateLabel($label, Info $info, array $options, $canBeEmpty) + { + if ('' === $label) { + if (!$canBeEmpty && (!isset($options['VerifyDnsLength']) || $options['VerifyDnsLength'])) { + $info->errors |= self::ERROR_EMPTY_LABEL; + } + + return; + } + + // Step 1. The label must be in Unicode Normalization Form C. + if (!Normalizer::isNormalized($label, Normalizer::FORM_C)) { + $info->errors |= self::ERROR_INVALID_ACE_LABEL; + } + + $codePoints = self::utf8Decode($label); + + if ($options['CheckHyphens']) { + // Step 2. If CheckHyphens, the label must not contain a U+002D HYPHEN-MINUS character + // in both the thrid and fourth positions. + if (isset($codePoints[2], $codePoints[3]) && 0x002D === $codePoints[2] && 0x002D === $codePoints[3]) { + $info->errors |= self::ERROR_HYPHEN_3_4; + } + + // Step 3. If CheckHyphens, the label must neither begin nor end with a U+002D + // HYPHEN-MINUS character. + if ('-' === substr($label, 0, 1)) { + $info->errors |= self::ERROR_LEADING_HYPHEN; + } + + if ('-' === substr($label, -1, 1)) { + $info->errors |= self::ERROR_TRAILING_HYPHEN; + } + } + + // Step 4. The label must not contain a U+002E (.) FULL STOP. + if (false !== strpos($label, '.')) { + $info->errors |= self::ERROR_LABEL_HAS_DOT; + } + + // Step 5. The label must not begin with a combining mark, that is: General_Category=Mark. + if (1 === preg_match(Regex::COMBINING_MARK, $label)) { + $info->errors |= self::ERROR_LEADING_COMBINING_MARK; + } + + // Step 6. Each code point in the label must only have certain status values according to + // Section 5, IDNA Mapping Table: + $transitional = $options['Transitional_Processing']; + $useSTD3ASCIIRules = $options['UseSTD3ASCIIRules']; + + foreach ($codePoints as $codePoint) { + $data = self::lookupCodePointStatus($codePoint, $useSTD3ASCIIRules); + $status = $data['status']; + + if ('valid' === $status || (!$transitional && 'deviation' === $status)) { + continue; + } + + $info->errors |= self::ERROR_DISALLOWED; + + break; + } + + // Step 7. If CheckJoiners, the label must satisify the ContextJ rules from Appendix A, in + // The Unicode Code Points and Internationalized Domain Names for Applications (IDNA) + // [IDNA2008]. + if ($options['CheckJoiners'] && !self::isValidContextJ($codePoints, $label)) { + $info->errors |= self::ERROR_CONTEXTJ; + } + + // Step 8. If CheckBidi, and if the domain name is a Bidi domain name, then the label must + // satisfy all six of the numbered conditions in [IDNA2008] RFC 5893, Section 2. + if ($options['CheckBidi'] && (!$info->bidiDomain || $info->validBidiDomain)) { + self::validateBidiLabel($label, $info); + } + } + + /** + * @see https://tools.ietf.org/html/rfc3492#section-6.2 + * + * @param string $input + * + * @return string + */ + private static function punycodeDecode($input) + { + $n = self::INITIAL_N; + $out = 0; + $i = 0; + $bias = self::INITIAL_BIAS; + $lastDelimIndex = strrpos($input, self::DELIMITER); + $b = false === $lastDelimIndex ? 0 : $lastDelimIndex; + $inputLength = \strlen($input); + $output = []; + $bytes = array_map('ord', str_split($input)); + + for ($j = 0; $j < $b; ++$j) { + if ($bytes[$j] > 0x7F) { + throw new Exception('Invalid input'); + } + + $output[$out++] = $input[$j]; + } + + if ($b > 0) { + ++$b; + } + + for ($in = $b; $in < $inputLength; ++$out) { + $oldi = $i; + $w = 1; + + for ($k = self::BASE; /* no condition */; $k += self::BASE) { + if ($in >= $inputLength) { + throw new Exception('Invalid input'); + } + + $digit = self::$basicToDigit[$bytes[$in++] & 0xFF]; + + if ($digit < 0) { + throw new Exception('Invalid input'); + } + + if ($digit > intdiv(self::MAX_INT - $i, $w)) { + throw new Exception('Integer overflow'); + } + + $i += $digit * $w; + + if ($k <= $bias) { + $t = self::TMIN; + } elseif ($k >= $bias + self::TMAX) { + $t = self::TMAX; + } else { + $t = $k - $bias; + } + + if ($digit < $t) { + break; + } + + $baseMinusT = self::BASE - $t; + + if ($w > intdiv(self::MAX_INT, $baseMinusT)) { + throw new Exception('Integer overflow'); + } + + $w *= $baseMinusT; + } + + $outPlusOne = $out + 1; + $bias = self::adaptBias($i - $oldi, $outPlusOne, 0 === $oldi); + + if (intdiv($i, $outPlusOne) > self::MAX_INT - $n) { + throw new Exception('Integer overflow'); + } + + $n += intdiv($i, $outPlusOne); + $i %= $outPlusOne; + array_splice($output, $i++, 0, [mb_chr($n, 'utf-8')]); + } + + return implode('', $output); + } + + /** + * @see https://tools.ietf.org/html/rfc3492#section-6.3 + * + * @param string $input + * + * @return string + */ + private static function punycodeEncode($input) + { + $n = self::INITIAL_N; + $delta = 0; + $out = 0; + $bias = self::INITIAL_BIAS; + $inputLength = 0; + $output = ''; + $iter = self::utf8Decode($input); + + foreach ($iter as $codePoint) { + ++$inputLength; + + if ($codePoint < 0x80) { + $output .= \chr($codePoint); + ++$out; + } + } + + $h = $out; + $b = $out; + + if ($b > 0) { + $output .= self::DELIMITER; + ++$out; + } + + while ($h < $inputLength) { + $m = self::MAX_INT; + + foreach ($iter as $codePoint) { + if ($codePoint >= $n && $codePoint < $m) { + $m = $codePoint; + } + } + + if ($m - $n > intdiv(self::MAX_INT - $delta, $h + 1)) { + throw new Exception('Integer overflow'); + } + + $delta += ($m - $n) * ($h + 1); + $n = $m; + + foreach ($iter as $codePoint) { + if ($codePoint < $n && 0 === ++$delta) { + throw new Exception('Integer overflow'); + } + + if ($codePoint === $n) { + $q = $delta; + + for ($k = self::BASE; /* no condition */; $k += self::BASE) { + if ($k <= $bias) { + $t = self::TMIN; + } elseif ($k >= $bias + self::TMAX) { + $t = self::TMAX; + } else { + $t = $k - $bias; + } + + if ($q < $t) { + break; + } + + $qMinusT = $q - $t; + $baseMinusT = self::BASE - $t; + $output .= self::encodeDigit($t + ($qMinusT) % ($baseMinusT), false); + ++$out; + $q = intdiv($qMinusT, $baseMinusT); + } + + $output .= self::encodeDigit($q, false); + ++$out; + $bias = self::adaptBias($delta, $h + 1, $h === $b); + $delta = 0; + ++$h; + } + } + + ++$delta; + ++$n; + } + + return $output; + } + + /** + * @see https://tools.ietf.org/html/rfc3492#section-6.1 + * + * @param int $delta + * @param int $numPoints + * @param bool $firstTime + * + * @return int + */ + private static function adaptBias($delta, $numPoints, $firstTime) + { + // xxx >> 1 is a faster way of doing intdiv(xxx, 2) + $delta = $firstTime ? intdiv($delta, self::DAMP) : $delta >> 1; + $delta += intdiv($delta, $numPoints); + $k = 0; + + while ($delta > ((self::BASE - self::TMIN) * self::TMAX) >> 1) { + $delta = intdiv($delta, self::BASE - self::TMIN); + $k += self::BASE; + } + + return $k + intdiv((self::BASE - self::TMIN + 1) * $delta, $delta + self::SKEW); + } + + /** + * @param int $d + * @param bool $flag + * + * @return string + */ + private static function encodeDigit($d, $flag) + { + return \chr($d + 22 + 75 * ($d < 26 ? 1 : 0) - (($flag ? 1 : 0) << 5)); + } + + /** + * Takes a UTF-8 encoded string and converts it into a series of integer code points. Any + * invalid byte sequences will be replaced by a U+FFFD replacement code point. + * + * @see https://encoding.spec.whatwg.org/#utf-8-decoder + * + * @param string $input + * + * @return array + */ + private static function utf8Decode($input) + { + $bytesSeen = 0; + $bytesNeeded = 0; + $lowerBoundary = 0x80; + $upperBoundary = 0xBF; + $codePoint = 0; + $codePoints = []; + $length = \strlen($input); + + for ($i = 0; $i < $length; ++$i) { + $byte = \ord($input[$i]); + + if (0 === $bytesNeeded) { + if ($byte >= 0x00 && $byte <= 0x7F) { + $codePoints[] = $byte; + + continue; + } + + if ($byte >= 0xC2 && $byte <= 0xDF) { + $bytesNeeded = 1; + $codePoint = $byte & 0x1F; + } elseif ($byte >= 0xE0 && $byte <= 0xEF) { + if (0xE0 === $byte) { + $lowerBoundary = 0xA0; + } elseif (0xED === $byte) { + $upperBoundary = 0x9F; + } + + $bytesNeeded = 2; + $codePoint = $byte & 0xF; + } elseif ($byte >= 0xF0 && $byte <= 0xF4) { + if (0xF0 === $byte) { + $lowerBoundary = 0x90; + } elseif (0xF4 === $byte) { + $upperBoundary = 0x8F; + } + + $bytesNeeded = 3; + $codePoint = $byte & 0x7; + } else { + $codePoints[] = 0xFFFD; + } + + continue; + } + + if ($byte < $lowerBoundary || $byte > $upperBoundary) { + $codePoint = 0; + $bytesNeeded = 0; + $bytesSeen = 0; + $lowerBoundary = 0x80; + $upperBoundary = 0xBF; + --$i; + $codePoints[] = 0xFFFD; + + continue; + } + + $lowerBoundary = 0x80; + $upperBoundary = 0xBF; + $codePoint = ($codePoint << 6) | ($byte & 0x3F); + + if (++$bytesSeen !== $bytesNeeded) { + continue; + } + + $codePoints[] = $codePoint; + $codePoint = 0; + $bytesNeeded = 0; + $bytesSeen = 0; + } + + // String unexpectedly ended, so append a U+FFFD code point. + if (0 !== $bytesNeeded) { + $codePoints[] = 0xFFFD; + } + + return $codePoints; + } + + /** + * @param int $codePoint + * @param bool $useSTD3ASCIIRules + * + * @return array{status: string, mapping?: string} + */ + private static function lookupCodePointStatus($codePoint, $useSTD3ASCIIRules) + { + if (!self::$mappingTableLoaded) { + self::$mappingTableLoaded = true; + self::$mapped = require __DIR__.'/Resources/unidata/mapped.php'; + self::$ignored = require __DIR__.'/Resources/unidata/ignored.php'; + self::$deviation = require __DIR__.'/Resources/unidata/deviation.php'; + self::$disallowed = require __DIR__.'/Resources/unidata/disallowed.php'; + self::$disallowed_STD3_mapped = require __DIR__.'/Resources/unidata/disallowed_STD3_mapped.php'; + self::$disallowed_STD3_valid = require __DIR__.'/Resources/unidata/disallowed_STD3_valid.php'; + } + + if (isset(self::$mapped[$codePoint])) { + return ['status' => 'mapped', 'mapping' => self::$mapped[$codePoint]]; + } + + if (isset(self::$ignored[$codePoint])) { + return ['status' => 'ignored']; + } + + if (isset(self::$deviation[$codePoint])) { + return ['status' => 'deviation', 'mapping' => self::$deviation[$codePoint]]; + } + + if (isset(self::$disallowed[$codePoint]) || DisallowedRanges::inRange($codePoint)) { + return ['status' => 'disallowed']; + } + + $isDisallowedMapped = isset(self::$disallowed_STD3_mapped[$codePoint]); + + if ($isDisallowedMapped || isset(self::$disallowed_STD3_valid[$codePoint])) { + $status = 'disallowed'; + + if (!$useSTD3ASCIIRules) { + $status = $isDisallowedMapped ? 'mapped' : 'valid'; + } + + if ($isDisallowedMapped) { + return ['status' => $status, 'mapping' => self::$disallowed_STD3_mapped[$codePoint]]; + } + + return ['status' => $status]; + } + + return ['status' => 'valid']; + } +} diff --git a/Server/vendor/symfony/polyfill-intl-idn/Info.php b/Server/vendor/symfony/polyfill-intl-idn/Info.php new file mode 100644 index 00000000..25c3582b --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-idn/Info.php @@ -0,0 +1,23 @@ + and Trevor Rowbotham + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Intl\Idn; + +/** + * @internal + */ +class Info +{ + public $bidiDomain = false; + public $errors = 0; + public $validBidiDomain = true; + public $transitionalDifferent = false; +} diff --git a/Server/vendor/psr/http-client/LICENSE b/Server/vendor/symfony/polyfill-intl-idn/LICENSE similarity index 77% rename from Server/vendor/psr/http-client/LICENSE rename to Server/vendor/symfony/polyfill-intl-idn/LICENSE index cd5e0020..03c5e257 100644 --- a/Server/vendor/psr/http-client/LICENSE +++ b/Server/vendor/symfony/polyfill-intl-idn/LICENSE @@ -1,14 +1,14 @@ -Copyright (c) 2017 PHP Framework Interoperability Group +Copyright (c) 2018-2019 Fabien Potencier and Trevor Rowbotham -Permission is hereby granted, free of charge, to any person obtaining a copy +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: +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 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, diff --git a/Server/vendor/symfony/polyfill-intl-idn/README.md b/Server/vendor/symfony/polyfill-intl-idn/README.md new file mode 100644 index 00000000..cae55170 --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-idn/README.md @@ -0,0 +1,12 @@ +Symfony Polyfill / Intl: Idn +============================ + +This component provides [`idn_to_ascii`](https://php.net/idn-to-ascii) and [`idn_to_utf8`](https://php.net/idn-to-utf8) functions to users who run php versions without the [Intl](https://php.net/intl) extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php b/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php new file mode 100644 index 00000000..5bb70e48 --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php @@ -0,0 +1,375 @@ += 128 && $codePoint <= 159) { + return true; + } + + if ($codePoint >= 2155 && $codePoint <= 2207) { + return true; + } + + if ($codePoint >= 3676 && $codePoint <= 3712) { + return true; + } + + if ($codePoint >= 3808 && $codePoint <= 3839) { + return true; + } + + if ($codePoint >= 4059 && $codePoint <= 4095) { + return true; + } + + if ($codePoint >= 4256 && $codePoint <= 4293) { + return true; + } + + if ($codePoint >= 6849 && $codePoint <= 6911) { + return true; + } + + if ($codePoint >= 11859 && $codePoint <= 11903) { + return true; + } + + if ($codePoint >= 42955 && $codePoint <= 42996) { + return true; + } + + if ($codePoint >= 55296 && $codePoint <= 57343) { + return true; + } + + if ($codePoint >= 57344 && $codePoint <= 63743) { + return true; + } + + if ($codePoint >= 64218 && $codePoint <= 64255) { + return true; + } + + if ($codePoint >= 64976 && $codePoint <= 65007) { + return true; + } + + if ($codePoint >= 65630 && $codePoint <= 65663) { + return true; + } + + if ($codePoint >= 65953 && $codePoint <= 65999) { + return true; + } + + if ($codePoint >= 66046 && $codePoint <= 66175) { + return true; + } + + if ($codePoint >= 66518 && $codePoint <= 66559) { + return true; + } + + if ($codePoint >= 66928 && $codePoint <= 67071) { + return true; + } + + if ($codePoint >= 67432 && $codePoint <= 67583) { + return true; + } + + if ($codePoint >= 67760 && $codePoint <= 67807) { + return true; + } + + if ($codePoint >= 67904 && $codePoint <= 67967) { + return true; + } + + if ($codePoint >= 68256 && $codePoint <= 68287) { + return true; + } + + if ($codePoint >= 68528 && $codePoint <= 68607) { + return true; + } + + if ($codePoint >= 68681 && $codePoint <= 68735) { + return true; + } + + if ($codePoint >= 68922 && $codePoint <= 69215) { + return true; + } + + if ($codePoint >= 69298 && $codePoint <= 69375) { + return true; + } + + if ($codePoint >= 69466 && $codePoint <= 69551) { + return true; + } + + if ($codePoint >= 70207 && $codePoint <= 70271) { + return true; + } + + if ($codePoint >= 70517 && $codePoint <= 70655) { + return true; + } + + if ($codePoint >= 70874 && $codePoint <= 71039) { + return true; + } + + if ($codePoint >= 71134 && $codePoint <= 71167) { + return true; + } + + if ($codePoint >= 71370 && $codePoint <= 71423) { + return true; + } + + if ($codePoint >= 71488 && $codePoint <= 71679) { + return true; + } + + if ($codePoint >= 71740 && $codePoint <= 71839) { + return true; + } + + if ($codePoint >= 72026 && $codePoint <= 72095) { + return true; + } + + if ($codePoint >= 72441 && $codePoint <= 72703) { + return true; + } + + if ($codePoint >= 72887 && $codePoint <= 72959) { + return true; + } + + if ($codePoint >= 73130 && $codePoint <= 73439) { + return true; + } + + if ($codePoint >= 73465 && $codePoint <= 73647) { + return true; + } + + if ($codePoint >= 74650 && $codePoint <= 74751) { + return true; + } + + if ($codePoint >= 75076 && $codePoint <= 77823) { + return true; + } + + if ($codePoint >= 78905 && $codePoint <= 82943) { + return true; + } + + if ($codePoint >= 83527 && $codePoint <= 92159) { + return true; + } + + if ($codePoint >= 92784 && $codePoint <= 92879) { + return true; + } + + if ($codePoint >= 93072 && $codePoint <= 93759) { + return true; + } + + if ($codePoint >= 93851 && $codePoint <= 93951) { + return true; + } + + if ($codePoint >= 94112 && $codePoint <= 94175) { + return true; + } + + if ($codePoint >= 101590 && $codePoint <= 101631) { + return true; + } + + if ($codePoint >= 101641 && $codePoint <= 110591) { + return true; + } + + if ($codePoint >= 110879 && $codePoint <= 110927) { + return true; + } + + if ($codePoint >= 111356 && $codePoint <= 113663) { + return true; + } + + if ($codePoint >= 113828 && $codePoint <= 118783) { + return true; + } + + if ($codePoint >= 119366 && $codePoint <= 119519) { + return true; + } + + if ($codePoint >= 119673 && $codePoint <= 119807) { + return true; + } + + if ($codePoint >= 121520 && $codePoint <= 122879) { + return true; + } + + if ($codePoint >= 122923 && $codePoint <= 123135) { + return true; + } + + if ($codePoint >= 123216 && $codePoint <= 123583) { + return true; + } + + if ($codePoint >= 123648 && $codePoint <= 124927) { + return true; + } + + if ($codePoint >= 125143 && $codePoint <= 125183) { + return true; + } + + if ($codePoint >= 125280 && $codePoint <= 126064) { + return true; + } + + if ($codePoint >= 126133 && $codePoint <= 126208) { + return true; + } + + if ($codePoint >= 126270 && $codePoint <= 126463) { + return true; + } + + if ($codePoint >= 126652 && $codePoint <= 126703) { + return true; + } + + if ($codePoint >= 126706 && $codePoint <= 126975) { + return true; + } + + if ($codePoint >= 127406 && $codePoint <= 127461) { + return true; + } + + if ($codePoint >= 127590 && $codePoint <= 127743) { + return true; + } + + if ($codePoint >= 129202 && $codePoint <= 129279) { + return true; + } + + if ($codePoint >= 129751 && $codePoint <= 129791) { + return true; + } + + if ($codePoint >= 129995 && $codePoint <= 130031) { + return true; + } + + if ($codePoint >= 130042 && $codePoint <= 131069) { + return true; + } + + if ($codePoint >= 173790 && $codePoint <= 173823) { + return true; + } + + if ($codePoint >= 191457 && $codePoint <= 194559) { + return true; + } + + if ($codePoint >= 195102 && $codePoint <= 196605) { + return true; + } + + if ($codePoint >= 201547 && $codePoint <= 262141) { + return true; + } + + if ($codePoint >= 262144 && $codePoint <= 327677) { + return true; + } + + if ($codePoint >= 327680 && $codePoint <= 393213) { + return true; + } + + if ($codePoint >= 393216 && $codePoint <= 458749) { + return true; + } + + if ($codePoint >= 458752 && $codePoint <= 524285) { + return true; + } + + if ($codePoint >= 524288 && $codePoint <= 589821) { + return true; + } + + if ($codePoint >= 589824 && $codePoint <= 655357) { + return true; + } + + if ($codePoint >= 655360 && $codePoint <= 720893) { + return true; + } + + if ($codePoint >= 720896 && $codePoint <= 786429) { + return true; + } + + if ($codePoint >= 786432 && $codePoint <= 851965) { + return true; + } + + if ($codePoint >= 851968 && $codePoint <= 917501) { + return true; + } + + if ($codePoint >= 917536 && $codePoint <= 917631) { + return true; + } + + if ($codePoint >= 917632 && $codePoint <= 917759) { + return true; + } + + if ($codePoint >= 918000 && $codePoint <= 983037) { + return true; + } + + if ($codePoint >= 983040 && $codePoint <= 1048573) { + return true; + } + + if ($codePoint >= 1048576 && $codePoint <= 1114109) { + return true; + } + + return false; + } +} diff --git a/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php b/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php new file mode 100644 index 00000000..5c1c51dd --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php @@ -0,0 +1,24 @@ + 'ss', + 962 => 'σ', + 8204 => '', + 8205 => '', +); diff --git a/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php b/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php new file mode 100644 index 00000000..25a5f564 --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php @@ -0,0 +1,2638 @@ + true, + 889 => true, + 896 => true, + 897 => true, + 898 => true, + 899 => true, + 907 => true, + 909 => true, + 930 => true, + 1216 => true, + 1328 => true, + 1367 => true, + 1368 => true, + 1419 => true, + 1420 => true, + 1424 => true, + 1480 => true, + 1481 => true, + 1482 => true, + 1483 => true, + 1484 => true, + 1485 => true, + 1486 => true, + 1487 => true, + 1515 => true, + 1516 => true, + 1517 => true, + 1518 => true, + 1525 => true, + 1526 => true, + 1527 => true, + 1528 => true, + 1529 => true, + 1530 => true, + 1531 => true, + 1532 => true, + 1533 => true, + 1534 => true, + 1535 => true, + 1536 => true, + 1537 => true, + 1538 => true, + 1539 => true, + 1540 => true, + 1541 => true, + 1564 => true, + 1565 => true, + 1757 => true, + 1806 => true, + 1807 => true, + 1867 => true, + 1868 => true, + 1970 => true, + 1971 => true, + 1972 => true, + 1973 => true, + 1974 => true, + 1975 => true, + 1976 => true, + 1977 => true, + 1978 => true, + 1979 => true, + 1980 => true, + 1981 => true, + 1982 => true, + 1983 => true, + 2043 => true, + 2044 => true, + 2094 => true, + 2095 => true, + 2111 => true, + 2140 => true, + 2141 => true, + 2143 => true, + 2229 => true, + 2248 => true, + 2249 => true, + 2250 => true, + 2251 => true, + 2252 => true, + 2253 => true, + 2254 => true, + 2255 => true, + 2256 => true, + 2257 => true, + 2258 => true, + 2274 => true, + 2436 => true, + 2445 => true, + 2446 => true, + 2449 => true, + 2450 => true, + 2473 => true, + 2481 => true, + 2483 => true, + 2484 => true, + 2485 => true, + 2490 => true, + 2491 => true, + 2501 => true, + 2502 => true, + 2505 => true, + 2506 => true, + 2511 => true, + 2512 => true, + 2513 => true, + 2514 => true, + 2515 => true, + 2516 => true, + 2517 => true, + 2518 => true, + 2520 => true, + 2521 => true, + 2522 => true, + 2523 => true, + 2526 => true, + 2532 => true, + 2533 => true, + 2559 => true, + 2560 => true, + 2564 => true, + 2571 => true, + 2572 => true, + 2573 => true, + 2574 => true, + 2577 => true, + 2578 => true, + 2601 => true, + 2609 => true, + 2612 => true, + 2615 => true, + 2618 => true, + 2619 => true, + 2621 => true, + 2627 => true, + 2628 => true, + 2629 => true, + 2630 => true, + 2633 => true, + 2634 => true, + 2638 => true, + 2639 => true, + 2640 => true, + 2642 => true, + 2643 => true, + 2644 => true, + 2645 => true, + 2646 => true, + 2647 => true, + 2648 => true, + 2653 => true, + 2655 => true, + 2656 => true, + 2657 => true, + 2658 => true, + 2659 => true, + 2660 => true, + 2661 => true, + 2679 => true, + 2680 => true, + 2681 => true, + 2682 => true, + 2683 => true, + 2684 => true, + 2685 => true, + 2686 => true, + 2687 => true, + 2688 => true, + 2692 => true, + 2702 => true, + 2706 => true, + 2729 => true, + 2737 => true, + 2740 => true, + 2746 => true, + 2747 => true, + 2758 => true, + 2762 => true, + 2766 => true, + 2767 => true, + 2769 => true, + 2770 => true, + 2771 => true, + 2772 => true, + 2773 => true, + 2774 => true, + 2775 => true, + 2776 => true, + 2777 => true, + 2778 => true, + 2779 => true, + 2780 => true, + 2781 => true, + 2782 => true, + 2783 => true, + 2788 => true, + 2789 => true, + 2802 => true, + 2803 => true, + 2804 => true, + 2805 => true, + 2806 => true, + 2807 => true, + 2808 => true, + 2816 => true, + 2820 => true, + 2829 => true, + 2830 => true, + 2833 => true, + 2834 => true, + 2857 => true, + 2865 => true, + 2868 => true, + 2874 => true, + 2875 => true, + 2885 => true, + 2886 => true, + 2889 => true, + 2890 => true, + 2894 => true, + 2895 => true, + 2896 => true, + 2897 => true, + 2898 => true, + 2899 => true, + 2900 => true, + 2904 => true, + 2905 => true, + 2906 => true, + 2907 => true, + 2910 => true, + 2916 => true, + 2917 => true, + 2936 => true, + 2937 => true, + 2938 => true, + 2939 => true, + 2940 => true, + 2941 => true, + 2942 => true, + 2943 => true, + 2944 => true, + 2945 => true, + 2948 => true, + 2955 => true, + 2956 => true, + 2957 => true, + 2961 => true, + 2966 => true, + 2967 => true, + 2968 => true, + 2971 => true, + 2973 => true, + 2976 => true, + 2977 => true, + 2978 => true, + 2981 => true, + 2982 => true, + 2983 => true, + 2987 => true, + 2988 => true, + 2989 => true, + 3002 => true, + 3003 => true, + 3004 => true, + 3005 => true, + 3011 => true, + 3012 => true, + 3013 => true, + 3017 => true, + 3022 => true, + 3023 => true, + 3025 => true, + 3026 => true, + 3027 => true, + 3028 => true, + 3029 => true, + 3030 => true, + 3032 => true, + 3033 => true, + 3034 => true, + 3035 => true, + 3036 => true, + 3037 => true, + 3038 => true, + 3039 => true, + 3040 => true, + 3041 => true, + 3042 => true, + 3043 => true, + 3044 => true, + 3045 => true, + 3067 => true, + 3068 => true, + 3069 => true, + 3070 => true, + 3071 => true, + 3085 => true, + 3089 => true, + 3113 => true, + 3130 => true, + 3131 => true, + 3132 => true, + 3141 => true, + 3145 => true, + 3150 => true, + 3151 => true, + 3152 => true, + 3153 => true, + 3154 => true, + 3155 => true, + 3156 => true, + 3159 => true, + 3163 => true, + 3164 => true, + 3165 => true, + 3166 => true, + 3167 => true, + 3172 => true, + 3173 => true, + 3184 => true, + 3185 => true, + 3186 => true, + 3187 => true, + 3188 => true, + 3189 => true, + 3190 => true, + 3213 => true, + 3217 => true, + 3241 => true, + 3252 => true, + 3258 => true, + 3259 => true, + 3269 => true, + 3273 => true, + 3278 => true, + 3279 => true, + 3280 => true, + 3281 => true, + 3282 => true, + 3283 => true, + 3284 => true, + 3287 => true, + 3288 => true, + 3289 => true, + 3290 => true, + 3291 => true, + 3292 => true, + 3293 => true, + 3295 => true, + 3300 => true, + 3301 => true, + 3312 => true, + 3315 => true, + 3316 => true, + 3317 => true, + 3318 => true, + 3319 => true, + 3320 => true, + 3321 => true, + 3322 => true, + 3323 => true, + 3324 => true, + 3325 => true, + 3326 => true, + 3327 => true, + 3341 => true, + 3345 => true, + 3397 => true, + 3401 => true, + 3408 => true, + 3409 => true, + 3410 => true, + 3411 => true, + 3428 => true, + 3429 => true, + 3456 => true, + 3460 => true, + 3479 => true, + 3480 => true, + 3481 => true, + 3506 => true, + 3516 => true, + 3518 => true, + 3519 => true, + 3527 => true, + 3528 => true, + 3529 => true, + 3531 => true, + 3532 => true, + 3533 => true, + 3534 => true, + 3541 => true, + 3543 => true, + 3552 => true, + 3553 => true, + 3554 => true, + 3555 => true, + 3556 => true, + 3557 => true, + 3568 => true, + 3569 => true, + 3573 => true, + 3574 => true, + 3575 => true, + 3576 => true, + 3577 => true, + 3578 => true, + 3579 => true, + 3580 => true, + 3581 => true, + 3582 => true, + 3583 => true, + 3584 => true, + 3643 => true, + 3644 => true, + 3645 => true, + 3646 => true, + 3715 => true, + 3717 => true, + 3723 => true, + 3748 => true, + 3750 => true, + 3774 => true, + 3775 => true, + 3781 => true, + 3783 => true, + 3790 => true, + 3791 => true, + 3802 => true, + 3803 => true, + 3912 => true, + 3949 => true, + 3950 => true, + 3951 => true, + 3952 => true, + 3992 => true, + 4029 => true, + 4045 => true, + 4294 => true, + 4296 => true, + 4297 => true, + 4298 => true, + 4299 => true, + 4300 => true, + 4302 => true, + 4303 => true, + 4447 => true, + 4448 => true, + 4681 => true, + 4686 => true, + 4687 => true, + 4695 => true, + 4697 => true, + 4702 => true, + 4703 => true, + 4745 => true, + 4750 => true, + 4751 => true, + 4785 => true, + 4790 => true, + 4791 => true, + 4799 => true, + 4801 => true, + 4806 => true, + 4807 => true, + 4823 => true, + 4881 => true, + 4886 => true, + 4887 => true, + 4955 => true, + 4956 => true, + 4989 => true, + 4990 => true, + 4991 => true, + 5018 => true, + 5019 => true, + 5020 => true, + 5021 => true, + 5022 => true, + 5023 => true, + 5110 => true, + 5111 => true, + 5118 => true, + 5119 => true, + 5760 => true, + 5789 => true, + 5790 => true, + 5791 => true, + 5881 => true, + 5882 => true, + 5883 => true, + 5884 => true, + 5885 => true, + 5886 => true, + 5887 => true, + 5901 => true, + 5909 => true, + 5910 => true, + 5911 => true, + 5912 => true, + 5913 => true, + 5914 => true, + 5915 => true, + 5916 => true, + 5917 => true, + 5918 => true, + 5919 => true, + 5943 => true, + 5944 => true, + 5945 => true, + 5946 => true, + 5947 => true, + 5948 => true, + 5949 => true, + 5950 => true, + 5951 => true, + 5972 => true, + 5973 => true, + 5974 => true, + 5975 => true, + 5976 => true, + 5977 => true, + 5978 => true, + 5979 => true, + 5980 => true, + 5981 => true, + 5982 => true, + 5983 => true, + 5997 => true, + 6001 => true, + 6004 => true, + 6005 => true, + 6006 => true, + 6007 => true, + 6008 => true, + 6009 => true, + 6010 => true, + 6011 => true, + 6012 => true, + 6013 => true, + 6014 => true, + 6015 => true, + 6068 => true, + 6069 => true, + 6110 => true, + 6111 => true, + 6122 => true, + 6123 => true, + 6124 => true, + 6125 => true, + 6126 => true, + 6127 => true, + 6138 => true, + 6139 => true, + 6140 => true, + 6141 => true, + 6142 => true, + 6143 => true, + 6150 => true, + 6158 => true, + 6159 => true, + 6170 => true, + 6171 => true, + 6172 => true, + 6173 => true, + 6174 => true, + 6175 => true, + 6265 => true, + 6266 => true, + 6267 => true, + 6268 => true, + 6269 => true, + 6270 => true, + 6271 => true, + 6315 => true, + 6316 => true, + 6317 => true, + 6318 => true, + 6319 => true, + 6390 => true, + 6391 => true, + 6392 => true, + 6393 => true, + 6394 => true, + 6395 => true, + 6396 => true, + 6397 => true, + 6398 => true, + 6399 => true, + 6431 => true, + 6444 => true, + 6445 => true, + 6446 => true, + 6447 => true, + 6460 => true, + 6461 => true, + 6462 => true, + 6463 => true, + 6465 => true, + 6466 => true, + 6467 => true, + 6510 => true, + 6511 => true, + 6517 => true, + 6518 => true, + 6519 => true, + 6520 => true, + 6521 => true, + 6522 => true, + 6523 => true, + 6524 => true, + 6525 => true, + 6526 => true, + 6527 => true, + 6572 => true, + 6573 => true, + 6574 => true, + 6575 => true, + 6602 => true, + 6603 => true, + 6604 => true, + 6605 => true, + 6606 => true, + 6607 => true, + 6619 => true, + 6620 => true, + 6621 => true, + 6684 => true, + 6685 => true, + 6751 => true, + 6781 => true, + 6782 => true, + 6794 => true, + 6795 => true, + 6796 => true, + 6797 => true, + 6798 => true, + 6799 => true, + 6810 => true, + 6811 => true, + 6812 => true, + 6813 => true, + 6814 => true, + 6815 => true, + 6830 => true, + 6831 => true, + 6988 => true, + 6989 => true, + 6990 => true, + 6991 => true, + 7037 => true, + 7038 => true, + 7039 => true, + 7156 => true, + 7157 => true, + 7158 => true, + 7159 => true, + 7160 => true, + 7161 => true, + 7162 => true, + 7163 => true, + 7224 => true, + 7225 => true, + 7226 => true, + 7242 => true, + 7243 => true, + 7244 => true, + 7305 => true, + 7306 => true, + 7307 => true, + 7308 => true, + 7309 => true, + 7310 => true, + 7311 => true, + 7355 => true, + 7356 => true, + 7368 => true, + 7369 => true, + 7370 => true, + 7371 => true, + 7372 => true, + 7373 => true, + 7374 => true, + 7375 => true, + 7419 => true, + 7420 => true, + 7421 => true, + 7422 => true, + 7423 => true, + 7674 => true, + 7958 => true, + 7959 => true, + 7966 => true, + 7967 => true, + 8006 => true, + 8007 => true, + 8014 => true, + 8015 => true, + 8024 => true, + 8026 => true, + 8028 => true, + 8030 => true, + 8062 => true, + 8063 => true, + 8117 => true, + 8133 => true, + 8148 => true, + 8149 => true, + 8156 => true, + 8176 => true, + 8177 => true, + 8181 => true, + 8191 => true, + 8206 => true, + 8207 => true, + 8228 => true, + 8229 => true, + 8230 => true, + 8232 => true, + 8233 => true, + 8234 => true, + 8235 => true, + 8236 => true, + 8237 => true, + 8238 => true, + 8289 => true, + 8290 => true, + 8291 => true, + 8293 => true, + 8294 => true, + 8295 => true, + 8296 => true, + 8297 => true, + 8298 => true, + 8299 => true, + 8300 => true, + 8301 => true, + 8302 => true, + 8303 => true, + 8306 => true, + 8307 => true, + 8335 => true, + 8349 => true, + 8350 => true, + 8351 => true, + 8384 => true, + 8385 => true, + 8386 => true, + 8387 => true, + 8388 => true, + 8389 => true, + 8390 => true, + 8391 => true, + 8392 => true, + 8393 => true, + 8394 => true, + 8395 => true, + 8396 => true, + 8397 => true, + 8398 => true, + 8399 => true, + 8433 => true, + 8434 => true, + 8435 => true, + 8436 => true, + 8437 => true, + 8438 => true, + 8439 => true, + 8440 => true, + 8441 => true, + 8442 => true, + 8443 => true, + 8444 => true, + 8445 => true, + 8446 => true, + 8447 => true, + 8498 => true, + 8579 => true, + 8588 => true, + 8589 => true, + 8590 => true, + 8591 => true, + 9255 => true, + 9256 => true, + 9257 => true, + 9258 => true, + 9259 => true, + 9260 => true, + 9261 => true, + 9262 => true, + 9263 => true, + 9264 => true, + 9265 => true, + 9266 => true, + 9267 => true, + 9268 => true, + 9269 => true, + 9270 => true, + 9271 => true, + 9272 => true, + 9273 => true, + 9274 => true, + 9275 => true, + 9276 => true, + 9277 => true, + 9278 => true, + 9279 => true, + 9291 => true, + 9292 => true, + 9293 => true, + 9294 => true, + 9295 => true, + 9296 => true, + 9297 => true, + 9298 => true, + 9299 => true, + 9300 => true, + 9301 => true, + 9302 => true, + 9303 => true, + 9304 => true, + 9305 => true, + 9306 => true, + 9307 => true, + 9308 => true, + 9309 => true, + 9310 => true, + 9311 => true, + 9352 => true, + 9353 => true, + 9354 => true, + 9355 => true, + 9356 => true, + 9357 => true, + 9358 => true, + 9359 => true, + 9360 => true, + 9361 => true, + 9362 => true, + 9363 => true, + 9364 => true, + 9365 => true, + 9366 => true, + 9367 => true, + 9368 => true, + 9369 => true, + 9370 => true, + 9371 => true, + 11124 => true, + 11125 => true, + 11158 => true, + 11311 => true, + 11359 => true, + 11508 => true, + 11509 => true, + 11510 => true, + 11511 => true, + 11512 => true, + 11558 => true, + 11560 => true, + 11561 => true, + 11562 => true, + 11563 => true, + 11564 => true, + 11566 => true, + 11567 => true, + 11624 => true, + 11625 => true, + 11626 => true, + 11627 => true, + 11628 => true, + 11629 => true, + 11630 => true, + 11633 => true, + 11634 => true, + 11635 => true, + 11636 => true, + 11637 => true, + 11638 => true, + 11639 => true, + 11640 => true, + 11641 => true, + 11642 => true, + 11643 => true, + 11644 => true, + 11645 => true, + 11646 => true, + 11671 => true, + 11672 => true, + 11673 => true, + 11674 => true, + 11675 => true, + 11676 => true, + 11677 => true, + 11678 => true, + 11679 => true, + 11687 => true, + 11695 => true, + 11703 => true, + 11711 => true, + 11719 => true, + 11727 => true, + 11735 => true, + 11743 => true, + 11930 => true, + 12020 => true, + 12021 => true, + 12022 => true, + 12023 => true, + 12024 => true, + 12025 => true, + 12026 => true, + 12027 => true, + 12028 => true, + 12029 => true, + 12030 => true, + 12031 => true, + 12246 => true, + 12247 => true, + 12248 => true, + 12249 => true, + 12250 => true, + 12251 => true, + 12252 => true, + 12253 => true, + 12254 => true, + 12255 => true, + 12256 => true, + 12257 => true, + 12258 => true, + 12259 => true, + 12260 => true, + 12261 => true, + 12262 => true, + 12263 => true, + 12264 => true, + 12265 => true, + 12266 => true, + 12267 => true, + 12268 => true, + 12269 => true, + 12270 => true, + 12271 => true, + 12272 => true, + 12273 => true, + 12274 => true, + 12275 => true, + 12276 => true, + 12277 => true, + 12278 => true, + 12279 => true, + 12280 => true, + 12281 => true, + 12282 => true, + 12283 => true, + 12284 => true, + 12285 => true, + 12286 => true, + 12287 => true, + 12352 => true, + 12439 => true, + 12440 => true, + 12544 => true, + 12545 => true, + 12546 => true, + 12547 => true, + 12548 => true, + 12592 => true, + 12644 => true, + 12687 => true, + 12772 => true, + 12773 => true, + 12774 => true, + 12775 => true, + 12776 => true, + 12777 => true, + 12778 => true, + 12779 => true, + 12780 => true, + 12781 => true, + 12782 => true, + 12783 => true, + 12831 => true, + 13250 => true, + 13255 => true, + 13272 => true, + 40957 => true, + 40958 => true, + 40959 => true, + 42125 => true, + 42126 => true, + 42127 => true, + 42183 => true, + 42184 => true, + 42185 => true, + 42186 => true, + 42187 => true, + 42188 => true, + 42189 => true, + 42190 => true, + 42191 => true, + 42540 => true, + 42541 => true, + 42542 => true, + 42543 => true, + 42544 => true, + 42545 => true, + 42546 => true, + 42547 => true, + 42548 => true, + 42549 => true, + 42550 => true, + 42551 => true, + 42552 => true, + 42553 => true, + 42554 => true, + 42555 => true, + 42556 => true, + 42557 => true, + 42558 => true, + 42559 => true, + 42744 => true, + 42745 => true, + 42746 => true, + 42747 => true, + 42748 => true, + 42749 => true, + 42750 => true, + 42751 => true, + 42944 => true, + 42945 => true, + 43053 => true, + 43054 => true, + 43055 => true, + 43066 => true, + 43067 => true, + 43068 => true, + 43069 => true, + 43070 => true, + 43071 => true, + 43128 => true, + 43129 => true, + 43130 => true, + 43131 => true, + 43132 => true, + 43133 => true, + 43134 => true, + 43135 => true, + 43206 => true, + 43207 => true, + 43208 => true, + 43209 => true, + 43210 => true, + 43211 => true, + 43212 => true, + 43213 => true, + 43226 => true, + 43227 => true, + 43228 => true, + 43229 => true, + 43230 => true, + 43231 => true, + 43348 => true, + 43349 => true, + 43350 => true, + 43351 => true, + 43352 => true, + 43353 => true, + 43354 => true, + 43355 => true, + 43356 => true, + 43357 => true, + 43358 => true, + 43389 => true, + 43390 => true, + 43391 => true, + 43470 => true, + 43482 => true, + 43483 => true, + 43484 => true, + 43485 => true, + 43519 => true, + 43575 => true, + 43576 => true, + 43577 => true, + 43578 => true, + 43579 => true, + 43580 => true, + 43581 => true, + 43582 => true, + 43583 => true, + 43598 => true, + 43599 => true, + 43610 => true, + 43611 => true, + 43715 => true, + 43716 => true, + 43717 => true, + 43718 => true, + 43719 => true, + 43720 => true, + 43721 => true, + 43722 => true, + 43723 => true, + 43724 => true, + 43725 => true, + 43726 => true, + 43727 => true, + 43728 => true, + 43729 => true, + 43730 => true, + 43731 => true, + 43732 => true, + 43733 => true, + 43734 => true, + 43735 => true, + 43736 => true, + 43737 => true, + 43738 => true, + 43767 => true, + 43768 => true, + 43769 => true, + 43770 => true, + 43771 => true, + 43772 => true, + 43773 => true, + 43774 => true, + 43775 => true, + 43776 => true, + 43783 => true, + 43784 => true, + 43791 => true, + 43792 => true, + 43799 => true, + 43800 => true, + 43801 => true, + 43802 => true, + 43803 => true, + 43804 => true, + 43805 => true, + 43806 => true, + 43807 => true, + 43815 => true, + 43823 => true, + 43884 => true, + 43885 => true, + 43886 => true, + 43887 => true, + 44014 => true, + 44015 => true, + 44026 => true, + 44027 => true, + 44028 => true, + 44029 => true, + 44030 => true, + 44031 => true, + 55204 => true, + 55205 => true, + 55206 => true, + 55207 => true, + 55208 => true, + 55209 => true, + 55210 => true, + 55211 => true, + 55212 => true, + 55213 => true, + 55214 => true, + 55215 => true, + 55239 => true, + 55240 => true, + 55241 => true, + 55242 => true, + 55292 => true, + 55293 => true, + 55294 => true, + 55295 => true, + 64110 => true, + 64111 => true, + 64263 => true, + 64264 => true, + 64265 => true, + 64266 => true, + 64267 => true, + 64268 => true, + 64269 => true, + 64270 => true, + 64271 => true, + 64272 => true, + 64273 => true, + 64274 => true, + 64280 => true, + 64281 => true, + 64282 => true, + 64283 => true, + 64284 => true, + 64311 => true, + 64317 => true, + 64319 => true, + 64322 => true, + 64325 => true, + 64450 => true, + 64451 => true, + 64452 => true, + 64453 => true, + 64454 => true, + 64455 => true, + 64456 => true, + 64457 => true, + 64458 => true, + 64459 => true, + 64460 => true, + 64461 => true, + 64462 => true, + 64463 => true, + 64464 => true, + 64465 => true, + 64466 => true, + 64832 => true, + 64833 => true, + 64834 => true, + 64835 => true, + 64836 => true, + 64837 => true, + 64838 => true, + 64839 => true, + 64840 => true, + 64841 => true, + 64842 => true, + 64843 => true, + 64844 => true, + 64845 => true, + 64846 => true, + 64847 => true, + 64912 => true, + 64913 => true, + 64968 => true, + 64969 => true, + 64970 => true, + 64971 => true, + 64972 => true, + 64973 => true, + 64974 => true, + 64975 => true, + 65022 => true, + 65023 => true, + 65042 => true, + 65049 => true, + 65050 => true, + 65051 => true, + 65052 => true, + 65053 => true, + 65054 => true, + 65055 => true, + 65072 => true, + 65106 => true, + 65107 => true, + 65127 => true, + 65132 => true, + 65133 => true, + 65134 => true, + 65135 => true, + 65141 => true, + 65277 => true, + 65278 => true, + 65280 => true, + 65440 => true, + 65471 => true, + 65472 => true, + 65473 => true, + 65480 => true, + 65481 => true, + 65488 => true, + 65489 => true, + 65496 => true, + 65497 => true, + 65501 => true, + 65502 => true, + 65503 => true, + 65511 => true, + 65519 => true, + 65520 => true, + 65521 => true, + 65522 => true, + 65523 => true, + 65524 => true, + 65525 => true, + 65526 => true, + 65527 => true, + 65528 => true, + 65529 => true, + 65530 => true, + 65531 => true, + 65532 => true, + 65533 => true, + 65534 => true, + 65535 => true, + 65548 => true, + 65575 => true, + 65595 => true, + 65598 => true, + 65614 => true, + 65615 => true, + 65787 => true, + 65788 => true, + 65789 => true, + 65790 => true, + 65791 => true, + 65795 => true, + 65796 => true, + 65797 => true, + 65798 => true, + 65844 => true, + 65845 => true, + 65846 => true, + 65935 => true, + 65949 => true, + 65950 => true, + 65951 => true, + 66205 => true, + 66206 => true, + 66207 => true, + 66257 => true, + 66258 => true, + 66259 => true, + 66260 => true, + 66261 => true, + 66262 => true, + 66263 => true, + 66264 => true, + 66265 => true, + 66266 => true, + 66267 => true, + 66268 => true, + 66269 => true, + 66270 => true, + 66271 => true, + 66300 => true, + 66301 => true, + 66302 => true, + 66303 => true, + 66340 => true, + 66341 => true, + 66342 => true, + 66343 => true, + 66344 => true, + 66345 => true, + 66346 => true, + 66347 => true, + 66348 => true, + 66379 => true, + 66380 => true, + 66381 => true, + 66382 => true, + 66383 => true, + 66427 => true, + 66428 => true, + 66429 => true, + 66430 => true, + 66431 => true, + 66462 => true, + 66500 => true, + 66501 => true, + 66502 => true, + 66503 => true, + 66718 => true, + 66719 => true, + 66730 => true, + 66731 => true, + 66732 => true, + 66733 => true, + 66734 => true, + 66735 => true, + 66772 => true, + 66773 => true, + 66774 => true, + 66775 => true, + 66812 => true, + 66813 => true, + 66814 => true, + 66815 => true, + 66856 => true, + 66857 => true, + 66858 => true, + 66859 => true, + 66860 => true, + 66861 => true, + 66862 => true, + 66863 => true, + 66916 => true, + 66917 => true, + 66918 => true, + 66919 => true, + 66920 => true, + 66921 => true, + 66922 => true, + 66923 => true, + 66924 => true, + 66925 => true, + 66926 => true, + 67383 => true, + 67384 => true, + 67385 => true, + 67386 => true, + 67387 => true, + 67388 => true, + 67389 => true, + 67390 => true, + 67391 => true, + 67414 => true, + 67415 => true, + 67416 => true, + 67417 => true, + 67418 => true, + 67419 => true, + 67420 => true, + 67421 => true, + 67422 => true, + 67423 => true, + 67590 => true, + 67591 => true, + 67593 => true, + 67638 => true, + 67641 => true, + 67642 => true, + 67643 => true, + 67645 => true, + 67646 => true, + 67670 => true, + 67743 => true, + 67744 => true, + 67745 => true, + 67746 => true, + 67747 => true, + 67748 => true, + 67749 => true, + 67750 => true, + 67827 => true, + 67830 => true, + 67831 => true, + 67832 => true, + 67833 => true, + 67834 => true, + 67868 => true, + 67869 => true, + 67870 => true, + 67898 => true, + 67899 => true, + 67900 => true, + 67901 => true, + 67902 => true, + 68024 => true, + 68025 => true, + 68026 => true, + 68027 => true, + 68048 => true, + 68049 => true, + 68100 => true, + 68103 => true, + 68104 => true, + 68105 => true, + 68106 => true, + 68107 => true, + 68116 => true, + 68120 => true, + 68150 => true, + 68151 => true, + 68155 => true, + 68156 => true, + 68157 => true, + 68158 => true, + 68169 => true, + 68170 => true, + 68171 => true, + 68172 => true, + 68173 => true, + 68174 => true, + 68175 => true, + 68185 => true, + 68186 => true, + 68187 => true, + 68188 => true, + 68189 => true, + 68190 => true, + 68191 => true, + 68327 => true, + 68328 => true, + 68329 => true, + 68330 => true, + 68343 => true, + 68344 => true, + 68345 => true, + 68346 => true, + 68347 => true, + 68348 => true, + 68349 => true, + 68350 => true, + 68351 => true, + 68406 => true, + 68407 => true, + 68408 => true, + 68438 => true, + 68439 => true, + 68467 => true, + 68468 => true, + 68469 => true, + 68470 => true, + 68471 => true, + 68498 => true, + 68499 => true, + 68500 => true, + 68501 => true, + 68502 => true, + 68503 => true, + 68504 => true, + 68509 => true, + 68510 => true, + 68511 => true, + 68512 => true, + 68513 => true, + 68514 => true, + 68515 => true, + 68516 => true, + 68517 => true, + 68518 => true, + 68519 => true, + 68520 => true, + 68787 => true, + 68788 => true, + 68789 => true, + 68790 => true, + 68791 => true, + 68792 => true, + 68793 => true, + 68794 => true, + 68795 => true, + 68796 => true, + 68797 => true, + 68798 => true, + 68799 => true, + 68851 => true, + 68852 => true, + 68853 => true, + 68854 => true, + 68855 => true, + 68856 => true, + 68857 => true, + 68904 => true, + 68905 => true, + 68906 => true, + 68907 => true, + 68908 => true, + 68909 => true, + 68910 => true, + 68911 => true, + 69247 => true, + 69290 => true, + 69294 => true, + 69295 => true, + 69416 => true, + 69417 => true, + 69418 => true, + 69419 => true, + 69420 => true, + 69421 => true, + 69422 => true, + 69423 => true, + 69580 => true, + 69581 => true, + 69582 => true, + 69583 => true, + 69584 => true, + 69585 => true, + 69586 => true, + 69587 => true, + 69588 => true, + 69589 => true, + 69590 => true, + 69591 => true, + 69592 => true, + 69593 => true, + 69594 => true, + 69595 => true, + 69596 => true, + 69597 => true, + 69598 => true, + 69599 => true, + 69623 => true, + 69624 => true, + 69625 => true, + 69626 => true, + 69627 => true, + 69628 => true, + 69629 => true, + 69630 => true, + 69631 => true, + 69710 => true, + 69711 => true, + 69712 => true, + 69713 => true, + 69744 => true, + 69745 => true, + 69746 => true, + 69747 => true, + 69748 => true, + 69749 => true, + 69750 => true, + 69751 => true, + 69752 => true, + 69753 => true, + 69754 => true, + 69755 => true, + 69756 => true, + 69757 => true, + 69758 => true, + 69821 => true, + 69826 => true, + 69827 => true, + 69828 => true, + 69829 => true, + 69830 => true, + 69831 => true, + 69832 => true, + 69833 => true, + 69834 => true, + 69835 => true, + 69836 => true, + 69837 => true, + 69838 => true, + 69839 => true, + 69865 => true, + 69866 => true, + 69867 => true, + 69868 => true, + 69869 => true, + 69870 => true, + 69871 => true, + 69882 => true, + 69883 => true, + 69884 => true, + 69885 => true, + 69886 => true, + 69887 => true, + 69941 => true, + 69960 => true, + 69961 => true, + 69962 => true, + 69963 => true, + 69964 => true, + 69965 => true, + 69966 => true, + 69967 => true, + 70007 => true, + 70008 => true, + 70009 => true, + 70010 => true, + 70011 => true, + 70012 => true, + 70013 => true, + 70014 => true, + 70015 => true, + 70112 => true, + 70133 => true, + 70134 => true, + 70135 => true, + 70136 => true, + 70137 => true, + 70138 => true, + 70139 => true, + 70140 => true, + 70141 => true, + 70142 => true, + 70143 => true, + 70162 => true, + 70279 => true, + 70281 => true, + 70286 => true, + 70302 => true, + 70314 => true, + 70315 => true, + 70316 => true, + 70317 => true, + 70318 => true, + 70319 => true, + 70379 => true, + 70380 => true, + 70381 => true, + 70382 => true, + 70383 => true, + 70394 => true, + 70395 => true, + 70396 => true, + 70397 => true, + 70398 => true, + 70399 => true, + 70404 => true, + 70413 => true, + 70414 => true, + 70417 => true, + 70418 => true, + 70441 => true, + 70449 => true, + 70452 => true, + 70458 => true, + 70469 => true, + 70470 => true, + 70473 => true, + 70474 => true, + 70478 => true, + 70479 => true, + 70481 => true, + 70482 => true, + 70483 => true, + 70484 => true, + 70485 => true, + 70486 => true, + 70488 => true, + 70489 => true, + 70490 => true, + 70491 => true, + 70492 => true, + 70500 => true, + 70501 => true, + 70509 => true, + 70510 => true, + 70511 => true, + 70748 => true, + 70754 => true, + 70755 => true, + 70756 => true, + 70757 => true, + 70758 => true, + 70759 => true, + 70760 => true, + 70761 => true, + 70762 => true, + 70763 => true, + 70764 => true, + 70765 => true, + 70766 => true, + 70767 => true, + 70768 => true, + 70769 => true, + 70770 => true, + 70771 => true, + 70772 => true, + 70773 => true, + 70774 => true, + 70775 => true, + 70776 => true, + 70777 => true, + 70778 => true, + 70779 => true, + 70780 => true, + 70781 => true, + 70782 => true, + 70783 => true, + 70856 => true, + 70857 => true, + 70858 => true, + 70859 => true, + 70860 => true, + 70861 => true, + 70862 => true, + 70863 => true, + 71094 => true, + 71095 => true, + 71237 => true, + 71238 => true, + 71239 => true, + 71240 => true, + 71241 => true, + 71242 => true, + 71243 => true, + 71244 => true, + 71245 => true, + 71246 => true, + 71247 => true, + 71258 => true, + 71259 => true, + 71260 => true, + 71261 => true, + 71262 => true, + 71263 => true, + 71277 => true, + 71278 => true, + 71279 => true, + 71280 => true, + 71281 => true, + 71282 => true, + 71283 => true, + 71284 => true, + 71285 => true, + 71286 => true, + 71287 => true, + 71288 => true, + 71289 => true, + 71290 => true, + 71291 => true, + 71292 => true, + 71293 => true, + 71294 => true, + 71295 => true, + 71353 => true, + 71354 => true, + 71355 => true, + 71356 => true, + 71357 => true, + 71358 => true, + 71359 => true, + 71451 => true, + 71452 => true, + 71468 => true, + 71469 => true, + 71470 => true, + 71471 => true, + 71923 => true, + 71924 => true, + 71925 => true, + 71926 => true, + 71927 => true, + 71928 => true, + 71929 => true, + 71930 => true, + 71931 => true, + 71932 => true, + 71933 => true, + 71934 => true, + 71943 => true, + 71944 => true, + 71946 => true, + 71947 => true, + 71956 => true, + 71959 => true, + 71990 => true, + 71993 => true, + 71994 => true, + 72007 => true, + 72008 => true, + 72009 => true, + 72010 => true, + 72011 => true, + 72012 => true, + 72013 => true, + 72014 => true, + 72015 => true, + 72104 => true, + 72105 => true, + 72152 => true, + 72153 => true, + 72165 => true, + 72166 => true, + 72167 => true, + 72168 => true, + 72169 => true, + 72170 => true, + 72171 => true, + 72172 => true, + 72173 => true, + 72174 => true, + 72175 => true, + 72176 => true, + 72177 => true, + 72178 => true, + 72179 => true, + 72180 => true, + 72181 => true, + 72182 => true, + 72183 => true, + 72184 => true, + 72185 => true, + 72186 => true, + 72187 => true, + 72188 => true, + 72189 => true, + 72190 => true, + 72191 => true, + 72264 => true, + 72265 => true, + 72266 => true, + 72267 => true, + 72268 => true, + 72269 => true, + 72270 => true, + 72271 => true, + 72355 => true, + 72356 => true, + 72357 => true, + 72358 => true, + 72359 => true, + 72360 => true, + 72361 => true, + 72362 => true, + 72363 => true, + 72364 => true, + 72365 => true, + 72366 => true, + 72367 => true, + 72368 => true, + 72369 => true, + 72370 => true, + 72371 => true, + 72372 => true, + 72373 => true, + 72374 => true, + 72375 => true, + 72376 => true, + 72377 => true, + 72378 => true, + 72379 => true, + 72380 => true, + 72381 => true, + 72382 => true, + 72383 => true, + 72713 => true, + 72759 => true, + 72774 => true, + 72775 => true, + 72776 => true, + 72777 => true, + 72778 => true, + 72779 => true, + 72780 => true, + 72781 => true, + 72782 => true, + 72783 => true, + 72813 => true, + 72814 => true, + 72815 => true, + 72848 => true, + 72849 => true, + 72872 => true, + 72967 => true, + 72970 => true, + 73015 => true, + 73016 => true, + 73017 => true, + 73019 => true, + 73022 => true, + 73032 => true, + 73033 => true, + 73034 => true, + 73035 => true, + 73036 => true, + 73037 => true, + 73038 => true, + 73039 => true, + 73050 => true, + 73051 => true, + 73052 => true, + 73053 => true, + 73054 => true, + 73055 => true, + 73062 => true, + 73065 => true, + 73103 => true, + 73106 => true, + 73113 => true, + 73114 => true, + 73115 => true, + 73116 => true, + 73117 => true, + 73118 => true, + 73119 => true, + 73649 => true, + 73650 => true, + 73651 => true, + 73652 => true, + 73653 => true, + 73654 => true, + 73655 => true, + 73656 => true, + 73657 => true, + 73658 => true, + 73659 => true, + 73660 => true, + 73661 => true, + 73662 => true, + 73663 => true, + 73714 => true, + 73715 => true, + 73716 => true, + 73717 => true, + 73718 => true, + 73719 => true, + 73720 => true, + 73721 => true, + 73722 => true, + 73723 => true, + 73724 => true, + 73725 => true, + 73726 => true, + 74863 => true, + 74869 => true, + 74870 => true, + 74871 => true, + 74872 => true, + 74873 => true, + 74874 => true, + 74875 => true, + 74876 => true, + 74877 => true, + 74878 => true, + 74879 => true, + 78895 => true, + 78896 => true, + 78897 => true, + 78898 => true, + 78899 => true, + 78900 => true, + 78901 => true, + 78902 => true, + 78903 => true, + 78904 => true, + 92729 => true, + 92730 => true, + 92731 => true, + 92732 => true, + 92733 => true, + 92734 => true, + 92735 => true, + 92767 => true, + 92778 => true, + 92779 => true, + 92780 => true, + 92781 => true, + 92910 => true, + 92911 => true, + 92918 => true, + 92919 => true, + 92920 => true, + 92921 => true, + 92922 => true, + 92923 => true, + 92924 => true, + 92925 => true, + 92926 => true, + 92927 => true, + 92998 => true, + 92999 => true, + 93000 => true, + 93001 => true, + 93002 => true, + 93003 => true, + 93004 => true, + 93005 => true, + 93006 => true, + 93007 => true, + 93018 => true, + 93026 => true, + 93048 => true, + 93049 => true, + 93050 => true, + 93051 => true, + 93052 => true, + 94027 => true, + 94028 => true, + 94029 => true, + 94030 => true, + 94088 => true, + 94089 => true, + 94090 => true, + 94091 => true, + 94092 => true, + 94093 => true, + 94094 => true, + 94181 => true, + 94182 => true, + 94183 => true, + 94184 => true, + 94185 => true, + 94186 => true, + 94187 => true, + 94188 => true, + 94189 => true, + 94190 => true, + 94191 => true, + 94194 => true, + 94195 => true, + 94196 => true, + 94197 => true, + 94198 => true, + 94199 => true, + 94200 => true, + 94201 => true, + 94202 => true, + 94203 => true, + 94204 => true, + 94205 => true, + 94206 => true, + 94207 => true, + 100344 => true, + 100345 => true, + 100346 => true, + 100347 => true, + 100348 => true, + 100349 => true, + 100350 => true, + 100351 => true, + 110931 => true, + 110932 => true, + 110933 => true, + 110934 => true, + 110935 => true, + 110936 => true, + 110937 => true, + 110938 => true, + 110939 => true, + 110940 => true, + 110941 => true, + 110942 => true, + 110943 => true, + 110944 => true, + 110945 => true, + 110946 => true, + 110947 => true, + 110952 => true, + 110953 => true, + 110954 => true, + 110955 => true, + 110956 => true, + 110957 => true, + 110958 => true, + 110959 => true, + 113771 => true, + 113772 => true, + 113773 => true, + 113774 => true, + 113775 => true, + 113789 => true, + 113790 => true, + 113791 => true, + 113801 => true, + 113802 => true, + 113803 => true, + 113804 => true, + 113805 => true, + 113806 => true, + 113807 => true, + 113818 => true, + 113819 => true, + 119030 => true, + 119031 => true, + 119032 => true, + 119033 => true, + 119034 => true, + 119035 => true, + 119036 => true, + 119037 => true, + 119038 => true, + 119039 => true, + 119079 => true, + 119080 => true, + 119155 => true, + 119156 => true, + 119157 => true, + 119158 => true, + 119159 => true, + 119160 => true, + 119161 => true, + 119162 => true, + 119273 => true, + 119274 => true, + 119275 => true, + 119276 => true, + 119277 => true, + 119278 => true, + 119279 => true, + 119280 => true, + 119281 => true, + 119282 => true, + 119283 => true, + 119284 => true, + 119285 => true, + 119286 => true, + 119287 => true, + 119288 => true, + 119289 => true, + 119290 => true, + 119291 => true, + 119292 => true, + 119293 => true, + 119294 => true, + 119295 => true, + 119540 => true, + 119541 => true, + 119542 => true, + 119543 => true, + 119544 => true, + 119545 => true, + 119546 => true, + 119547 => true, + 119548 => true, + 119549 => true, + 119550 => true, + 119551 => true, + 119639 => true, + 119640 => true, + 119641 => true, + 119642 => true, + 119643 => true, + 119644 => true, + 119645 => true, + 119646 => true, + 119647 => true, + 119893 => true, + 119965 => true, + 119968 => true, + 119969 => true, + 119971 => true, + 119972 => true, + 119975 => true, + 119976 => true, + 119981 => true, + 119994 => true, + 119996 => true, + 120004 => true, + 120070 => true, + 120075 => true, + 120076 => true, + 120085 => true, + 120093 => true, + 120122 => true, + 120127 => true, + 120133 => true, + 120135 => true, + 120136 => true, + 120137 => true, + 120145 => true, + 120486 => true, + 120487 => true, + 120780 => true, + 120781 => true, + 121484 => true, + 121485 => true, + 121486 => true, + 121487 => true, + 121488 => true, + 121489 => true, + 121490 => true, + 121491 => true, + 121492 => true, + 121493 => true, + 121494 => true, + 121495 => true, + 121496 => true, + 121497 => true, + 121498 => true, + 121504 => true, + 122887 => true, + 122905 => true, + 122906 => true, + 122914 => true, + 122917 => true, + 123181 => true, + 123182 => true, + 123183 => true, + 123198 => true, + 123199 => true, + 123210 => true, + 123211 => true, + 123212 => true, + 123213 => true, + 123642 => true, + 123643 => true, + 123644 => true, + 123645 => true, + 123646 => true, + 125125 => true, + 125126 => true, + 125260 => true, + 125261 => true, + 125262 => true, + 125263 => true, + 125274 => true, + 125275 => true, + 125276 => true, + 125277 => true, + 126468 => true, + 126496 => true, + 126499 => true, + 126501 => true, + 126502 => true, + 126504 => true, + 126515 => true, + 126520 => true, + 126522 => true, + 126524 => true, + 126525 => true, + 126526 => true, + 126527 => true, + 126528 => true, + 126529 => true, + 126531 => true, + 126532 => true, + 126533 => true, + 126534 => true, + 126536 => true, + 126538 => true, + 126540 => true, + 126544 => true, + 126547 => true, + 126549 => true, + 126550 => true, + 126552 => true, + 126554 => true, + 126556 => true, + 126558 => true, + 126560 => true, + 126563 => true, + 126565 => true, + 126566 => true, + 126571 => true, + 126579 => true, + 126584 => true, + 126589 => true, + 126591 => true, + 126602 => true, + 126620 => true, + 126621 => true, + 126622 => true, + 126623 => true, + 126624 => true, + 126628 => true, + 126634 => true, + 127020 => true, + 127021 => true, + 127022 => true, + 127023 => true, + 127124 => true, + 127125 => true, + 127126 => true, + 127127 => true, + 127128 => true, + 127129 => true, + 127130 => true, + 127131 => true, + 127132 => true, + 127133 => true, + 127134 => true, + 127135 => true, + 127151 => true, + 127152 => true, + 127168 => true, + 127184 => true, + 127222 => true, + 127223 => true, + 127224 => true, + 127225 => true, + 127226 => true, + 127227 => true, + 127228 => true, + 127229 => true, + 127230 => true, + 127231 => true, + 127232 => true, + 127491 => true, + 127492 => true, + 127493 => true, + 127494 => true, + 127495 => true, + 127496 => true, + 127497 => true, + 127498 => true, + 127499 => true, + 127500 => true, + 127501 => true, + 127502 => true, + 127503 => true, + 127548 => true, + 127549 => true, + 127550 => true, + 127551 => true, + 127561 => true, + 127562 => true, + 127563 => true, + 127564 => true, + 127565 => true, + 127566 => true, + 127567 => true, + 127570 => true, + 127571 => true, + 127572 => true, + 127573 => true, + 127574 => true, + 127575 => true, + 127576 => true, + 127577 => true, + 127578 => true, + 127579 => true, + 127580 => true, + 127581 => true, + 127582 => true, + 127583 => true, + 128728 => true, + 128729 => true, + 128730 => true, + 128731 => true, + 128732 => true, + 128733 => true, + 128734 => true, + 128735 => true, + 128749 => true, + 128750 => true, + 128751 => true, + 128765 => true, + 128766 => true, + 128767 => true, + 128884 => true, + 128885 => true, + 128886 => true, + 128887 => true, + 128888 => true, + 128889 => true, + 128890 => true, + 128891 => true, + 128892 => true, + 128893 => true, + 128894 => true, + 128895 => true, + 128985 => true, + 128986 => true, + 128987 => true, + 128988 => true, + 128989 => true, + 128990 => true, + 128991 => true, + 129004 => true, + 129005 => true, + 129006 => true, + 129007 => true, + 129008 => true, + 129009 => true, + 129010 => true, + 129011 => true, + 129012 => true, + 129013 => true, + 129014 => true, + 129015 => true, + 129016 => true, + 129017 => true, + 129018 => true, + 129019 => true, + 129020 => true, + 129021 => true, + 129022 => true, + 129023 => true, + 129036 => true, + 129037 => true, + 129038 => true, + 129039 => true, + 129096 => true, + 129097 => true, + 129098 => true, + 129099 => true, + 129100 => true, + 129101 => true, + 129102 => true, + 129103 => true, + 129114 => true, + 129115 => true, + 129116 => true, + 129117 => true, + 129118 => true, + 129119 => true, + 129160 => true, + 129161 => true, + 129162 => true, + 129163 => true, + 129164 => true, + 129165 => true, + 129166 => true, + 129167 => true, + 129198 => true, + 129199 => true, + 129401 => true, + 129484 => true, + 129620 => true, + 129621 => true, + 129622 => true, + 129623 => true, + 129624 => true, + 129625 => true, + 129626 => true, + 129627 => true, + 129628 => true, + 129629 => true, + 129630 => true, + 129631 => true, + 129646 => true, + 129647 => true, + 129653 => true, + 129654 => true, + 129655 => true, + 129659 => true, + 129660 => true, + 129661 => true, + 129662 => true, + 129663 => true, + 129671 => true, + 129672 => true, + 129673 => true, + 129674 => true, + 129675 => true, + 129676 => true, + 129677 => true, + 129678 => true, + 129679 => true, + 129705 => true, + 129706 => true, + 129707 => true, + 129708 => true, + 129709 => true, + 129710 => true, + 129711 => true, + 129719 => true, + 129720 => true, + 129721 => true, + 129722 => true, + 129723 => true, + 129724 => true, + 129725 => true, + 129726 => true, + 129727 => true, + 129731 => true, + 129732 => true, + 129733 => true, + 129734 => true, + 129735 => true, + 129736 => true, + 129737 => true, + 129738 => true, + 129739 => true, + 129740 => true, + 129741 => true, + 129742 => true, + 129743 => true, + 129939 => true, + 131070 => true, + 131071 => true, + 177973 => true, + 177974 => true, + 177975 => true, + 177976 => true, + 177977 => true, + 177978 => true, + 177979 => true, + 177980 => true, + 177981 => true, + 177982 => true, + 177983 => true, + 178206 => true, + 178207 => true, + 183970 => true, + 183971 => true, + 183972 => true, + 183973 => true, + 183974 => true, + 183975 => true, + 183976 => true, + 183977 => true, + 183978 => true, + 183979 => true, + 183980 => true, + 183981 => true, + 183982 => true, + 183983 => true, + 194664 => true, + 194676 => true, + 194847 => true, + 194911 => true, + 195007 => true, + 196606 => true, + 196607 => true, + 262142 => true, + 262143 => true, + 327678 => true, + 327679 => true, + 393214 => true, + 393215 => true, + 458750 => true, + 458751 => true, + 524286 => true, + 524287 => true, + 589822 => true, + 589823 => true, + 655358 => true, + 655359 => true, + 720894 => true, + 720895 => true, + 786430 => true, + 786431 => true, + 851966 => true, + 851967 => true, + 917502 => true, + 917503 => true, + 917504 => true, + 917505 => true, + 917506 => true, + 917507 => true, + 917508 => true, + 917509 => true, + 917510 => true, + 917511 => true, + 917512 => true, + 917513 => true, + 917514 => true, + 917515 => true, + 917516 => true, + 917517 => true, + 917518 => true, + 917519 => true, + 917520 => true, + 917521 => true, + 917522 => true, + 917523 => true, + 917524 => true, + 917525 => true, + 917526 => true, + 917527 => true, + 917528 => true, + 917529 => true, + 917530 => true, + 917531 => true, + 917532 => true, + 917533 => true, + 917534 => true, + 917535 => true, + 983038 => true, + 983039 => true, + 1048574 => true, + 1048575 => true, + 1114110 => true, + 1114111 => true, +); diff --git a/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php b/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php new file mode 100644 index 00000000..54f21cc0 --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php @@ -0,0 +1,308 @@ + ' ', + 168 => ' ̈', + 175 => ' ̄', + 180 => ' ́', + 184 => ' ̧', + 728 => ' ̆', + 729 => ' ̇', + 730 => ' ̊', + 731 => ' ̨', + 732 => ' ̃', + 733 => ' ̋', + 890 => ' ι', + 894 => ';', + 900 => ' ́', + 901 => ' ̈́', + 8125 => ' ̓', + 8127 => ' ̓', + 8128 => ' ͂', + 8129 => ' ̈͂', + 8141 => ' ̓̀', + 8142 => ' ̓́', + 8143 => ' ̓͂', + 8157 => ' ̔̀', + 8158 => ' ̔́', + 8159 => ' ̔͂', + 8173 => ' ̈̀', + 8174 => ' ̈́', + 8175 => '`', + 8189 => ' ́', + 8190 => ' ̔', + 8192 => ' ', + 8193 => ' ', + 8194 => ' ', + 8195 => ' ', + 8196 => ' ', + 8197 => ' ', + 8198 => ' ', + 8199 => ' ', + 8200 => ' ', + 8201 => ' ', + 8202 => ' ', + 8215 => ' ̳', + 8239 => ' ', + 8252 => '!!', + 8254 => ' ̅', + 8263 => '??', + 8264 => '?!', + 8265 => '!?', + 8287 => ' ', + 8314 => '+', + 8316 => '=', + 8317 => '(', + 8318 => ')', + 8330 => '+', + 8332 => '=', + 8333 => '(', + 8334 => ')', + 8448 => 'a/c', + 8449 => 'a/s', + 8453 => 'c/o', + 8454 => 'c/u', + 9332 => '(1)', + 9333 => '(2)', + 9334 => '(3)', + 9335 => '(4)', + 9336 => '(5)', + 9337 => '(6)', + 9338 => '(7)', + 9339 => '(8)', + 9340 => '(9)', + 9341 => '(10)', + 9342 => '(11)', + 9343 => '(12)', + 9344 => '(13)', + 9345 => '(14)', + 9346 => '(15)', + 9347 => '(16)', + 9348 => '(17)', + 9349 => '(18)', + 9350 => '(19)', + 9351 => '(20)', + 9372 => '(a)', + 9373 => '(b)', + 9374 => '(c)', + 9375 => '(d)', + 9376 => '(e)', + 9377 => '(f)', + 9378 => '(g)', + 9379 => '(h)', + 9380 => '(i)', + 9381 => '(j)', + 9382 => '(k)', + 9383 => '(l)', + 9384 => '(m)', + 9385 => '(n)', + 9386 => '(o)', + 9387 => '(p)', + 9388 => '(q)', + 9389 => '(r)', + 9390 => '(s)', + 9391 => '(t)', + 9392 => '(u)', + 9393 => '(v)', + 9394 => '(w)', + 9395 => '(x)', + 9396 => '(y)', + 9397 => '(z)', + 10868 => '::=', + 10869 => '==', + 10870 => '===', + 12288 => ' ', + 12443 => ' ゙', + 12444 => ' ゚', + 12800 => '(ᄀ)', + 12801 => '(ᄂ)', + 12802 => '(ᄃ)', + 12803 => '(ᄅ)', + 12804 => '(ᄆ)', + 12805 => '(ᄇ)', + 12806 => '(ᄉ)', + 12807 => '(ᄋ)', + 12808 => '(ᄌ)', + 12809 => '(ᄎ)', + 12810 => '(ᄏ)', + 12811 => '(ᄐ)', + 12812 => '(ᄑ)', + 12813 => '(ᄒ)', + 12814 => '(가)', + 12815 => '(나)', + 12816 => '(다)', + 12817 => '(라)', + 12818 => '(마)', + 12819 => '(바)', + 12820 => '(사)', + 12821 => '(아)', + 12822 => '(자)', + 12823 => '(차)', + 12824 => '(카)', + 12825 => '(타)', + 12826 => '(파)', + 12827 => '(하)', + 12828 => '(주)', + 12829 => '(오전)', + 12830 => '(오후)', + 12832 => '(一)', + 12833 => '(二)', + 12834 => '(三)', + 12835 => '(四)', + 12836 => '(五)', + 12837 => '(六)', + 12838 => '(七)', + 12839 => '(八)', + 12840 => '(九)', + 12841 => '(十)', + 12842 => '(月)', + 12843 => '(火)', + 12844 => '(水)', + 12845 => '(木)', + 12846 => '(金)', + 12847 => '(土)', + 12848 => '(日)', + 12849 => '(株)', + 12850 => '(有)', + 12851 => '(社)', + 12852 => '(名)', + 12853 => '(特)', + 12854 => '(財)', + 12855 => '(祝)', + 12856 => '(労)', + 12857 => '(代)', + 12858 => '(呼)', + 12859 => '(学)', + 12860 => '(監)', + 12861 => '(企)', + 12862 => '(資)', + 12863 => '(協)', + 12864 => '(祭)', + 12865 => '(休)', + 12866 => '(自)', + 12867 => '(至)', + 64297 => '+', + 64606 => ' ٌّ', + 64607 => ' ٍّ', + 64608 => ' َّ', + 64609 => ' ُّ', + 64610 => ' ِّ', + 64611 => ' ّٰ', + 65018 => 'صلى الله عليه وسلم', + 65019 => 'جل جلاله', + 65040 => ',', + 65043 => ':', + 65044 => ';', + 65045 => '!', + 65046 => '?', + 65075 => '_', + 65076 => '_', + 65077 => '(', + 65078 => ')', + 65079 => '{', + 65080 => '}', + 65095 => '[', + 65096 => ']', + 65097 => ' ̅', + 65098 => ' ̅', + 65099 => ' ̅', + 65100 => ' ̅', + 65101 => '_', + 65102 => '_', + 65103 => '_', + 65104 => ',', + 65108 => ';', + 65109 => ':', + 65110 => '?', + 65111 => '!', + 65113 => '(', + 65114 => ')', + 65115 => '{', + 65116 => '}', + 65119 => '#', + 65120 => '&', + 65121 => '*', + 65122 => '+', + 65124 => '<', + 65125 => '>', + 65126 => '=', + 65128 => '\\', + 65129 => '$', + 65130 => '%', + 65131 => '@', + 65136 => ' ً', + 65138 => ' ٌ', + 65140 => ' ٍ', + 65142 => ' َ', + 65144 => ' ُ', + 65146 => ' ِ', + 65148 => ' ّ', + 65150 => ' ْ', + 65281 => '!', + 65282 => '"', + 65283 => '#', + 65284 => '$', + 65285 => '%', + 65286 => '&', + 65287 => '\'', + 65288 => '(', + 65289 => ')', + 65290 => '*', + 65291 => '+', + 65292 => ',', + 65295 => '/', + 65306 => ':', + 65307 => ';', + 65308 => '<', + 65309 => '=', + 65310 => '>', + 65311 => '?', + 65312 => '@', + 65339 => '[', + 65340 => '\\', + 65341 => ']', + 65342 => '^', + 65343 => '_', + 65344 => '`', + 65371 => '{', + 65372 => '|', + 65373 => '}', + 65374 => '~', + 65507 => ' ̄', + 127233 => '0,', + 127234 => '1,', + 127235 => '2,', + 127236 => '3,', + 127237 => '4,', + 127238 => '5,', + 127239 => '6,', + 127240 => '7,', + 127241 => '8,', + 127242 => '9,', + 127248 => '(a)', + 127249 => '(b)', + 127250 => '(c)', + 127251 => '(d)', + 127252 => '(e)', + 127253 => '(f)', + 127254 => '(g)', + 127255 => '(h)', + 127256 => '(i)', + 127257 => '(j)', + 127258 => '(k)', + 127259 => '(l)', + 127260 => '(m)', + 127261 => '(n)', + 127262 => '(o)', + 127263 => '(p)', + 127264 => '(q)', + 127265 => '(r)', + 127266 => '(s)', + 127267 => '(t)', + 127268 => '(u)', + 127269 => '(v)', + 127270 => '(w)', + 127271 => '(x)', + 127272 => '(y)', + 127273 => '(z)', +); diff --git a/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php b/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php new file mode 100644 index 00000000..223396ec --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php @@ -0,0 +1,71 @@ + true, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + 9 => true, + 10 => true, + 11 => true, + 12 => true, + 13 => true, + 14 => true, + 15 => true, + 16 => true, + 17 => true, + 18 => true, + 19 => true, + 20 => true, + 21 => true, + 22 => true, + 23 => true, + 24 => true, + 25 => true, + 26 => true, + 27 => true, + 28 => true, + 29 => true, + 30 => true, + 31 => true, + 32 => true, + 33 => true, + 34 => true, + 35 => true, + 36 => true, + 37 => true, + 38 => true, + 39 => true, + 40 => true, + 41 => true, + 42 => true, + 43 => true, + 44 => true, + 47 => true, + 58 => true, + 59 => true, + 60 => true, + 61 => true, + 62 => true, + 63 => true, + 64 => true, + 91 => true, + 92 => true, + 93 => true, + 94 => true, + 95 => true, + 96 => true, + 123 => true, + 124 => true, + 125 => true, + 126 => true, + 127 => true, + 8800 => true, + 8814 => true, + 8815 => true, +); diff --git a/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/ignored.php b/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/ignored.php new file mode 100644 index 00000000..b3778441 --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/ignored.php @@ -0,0 +1,273 @@ + true, + 847 => true, + 6155 => true, + 6156 => true, + 6157 => true, + 8203 => true, + 8288 => true, + 8292 => true, + 65024 => true, + 65025 => true, + 65026 => true, + 65027 => true, + 65028 => true, + 65029 => true, + 65030 => true, + 65031 => true, + 65032 => true, + 65033 => true, + 65034 => true, + 65035 => true, + 65036 => true, + 65037 => true, + 65038 => true, + 65039 => true, + 65279 => true, + 113824 => true, + 113825 => true, + 113826 => true, + 113827 => true, + 917760 => true, + 917761 => true, + 917762 => true, + 917763 => true, + 917764 => true, + 917765 => true, + 917766 => true, + 917767 => true, + 917768 => true, + 917769 => true, + 917770 => true, + 917771 => true, + 917772 => true, + 917773 => true, + 917774 => true, + 917775 => true, + 917776 => true, + 917777 => true, + 917778 => true, + 917779 => true, + 917780 => true, + 917781 => true, + 917782 => true, + 917783 => true, + 917784 => true, + 917785 => true, + 917786 => true, + 917787 => true, + 917788 => true, + 917789 => true, + 917790 => true, + 917791 => true, + 917792 => true, + 917793 => true, + 917794 => true, + 917795 => true, + 917796 => true, + 917797 => true, + 917798 => true, + 917799 => true, + 917800 => true, + 917801 => true, + 917802 => true, + 917803 => true, + 917804 => true, + 917805 => true, + 917806 => true, + 917807 => true, + 917808 => true, + 917809 => true, + 917810 => true, + 917811 => true, + 917812 => true, + 917813 => true, + 917814 => true, + 917815 => true, + 917816 => true, + 917817 => true, + 917818 => true, + 917819 => true, + 917820 => true, + 917821 => true, + 917822 => true, + 917823 => true, + 917824 => true, + 917825 => true, + 917826 => true, + 917827 => true, + 917828 => true, + 917829 => true, + 917830 => true, + 917831 => true, + 917832 => true, + 917833 => true, + 917834 => true, + 917835 => true, + 917836 => true, + 917837 => true, + 917838 => true, + 917839 => true, + 917840 => true, + 917841 => true, + 917842 => true, + 917843 => true, + 917844 => true, + 917845 => true, + 917846 => true, + 917847 => true, + 917848 => true, + 917849 => true, + 917850 => true, + 917851 => true, + 917852 => true, + 917853 => true, + 917854 => true, + 917855 => true, + 917856 => true, + 917857 => true, + 917858 => true, + 917859 => true, + 917860 => true, + 917861 => true, + 917862 => true, + 917863 => true, + 917864 => true, + 917865 => true, + 917866 => true, + 917867 => true, + 917868 => true, + 917869 => true, + 917870 => true, + 917871 => true, + 917872 => true, + 917873 => true, + 917874 => true, + 917875 => true, + 917876 => true, + 917877 => true, + 917878 => true, + 917879 => true, + 917880 => true, + 917881 => true, + 917882 => true, + 917883 => true, + 917884 => true, + 917885 => true, + 917886 => true, + 917887 => true, + 917888 => true, + 917889 => true, + 917890 => true, + 917891 => true, + 917892 => true, + 917893 => true, + 917894 => true, + 917895 => true, + 917896 => true, + 917897 => true, + 917898 => true, + 917899 => true, + 917900 => true, + 917901 => true, + 917902 => true, + 917903 => true, + 917904 => true, + 917905 => true, + 917906 => true, + 917907 => true, + 917908 => true, + 917909 => true, + 917910 => true, + 917911 => true, + 917912 => true, + 917913 => true, + 917914 => true, + 917915 => true, + 917916 => true, + 917917 => true, + 917918 => true, + 917919 => true, + 917920 => true, + 917921 => true, + 917922 => true, + 917923 => true, + 917924 => true, + 917925 => true, + 917926 => true, + 917927 => true, + 917928 => true, + 917929 => true, + 917930 => true, + 917931 => true, + 917932 => true, + 917933 => true, + 917934 => true, + 917935 => true, + 917936 => true, + 917937 => true, + 917938 => true, + 917939 => true, + 917940 => true, + 917941 => true, + 917942 => true, + 917943 => true, + 917944 => true, + 917945 => true, + 917946 => true, + 917947 => true, + 917948 => true, + 917949 => true, + 917950 => true, + 917951 => true, + 917952 => true, + 917953 => true, + 917954 => true, + 917955 => true, + 917956 => true, + 917957 => true, + 917958 => true, + 917959 => true, + 917960 => true, + 917961 => true, + 917962 => true, + 917963 => true, + 917964 => true, + 917965 => true, + 917966 => true, + 917967 => true, + 917968 => true, + 917969 => true, + 917970 => true, + 917971 => true, + 917972 => true, + 917973 => true, + 917974 => true, + 917975 => true, + 917976 => true, + 917977 => true, + 917978 => true, + 917979 => true, + 917980 => true, + 917981 => true, + 917982 => true, + 917983 => true, + 917984 => true, + 917985 => true, + 917986 => true, + 917987 => true, + 917988 => true, + 917989 => true, + 917990 => true, + 917991 => true, + 917992 => true, + 917993 => true, + 917994 => true, + 917995 => true, + 917996 => true, + 917997 => true, + 917998 => true, + 917999 => true, +); diff --git a/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/mapped.php b/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/mapped.php new file mode 100644 index 00000000..9b85fe9d --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/mapped.php @@ -0,0 +1,5778 @@ + 'a', + 66 => 'b', + 67 => 'c', + 68 => 'd', + 69 => 'e', + 70 => 'f', + 71 => 'g', + 72 => 'h', + 73 => 'i', + 74 => 'j', + 75 => 'k', + 76 => 'l', + 77 => 'm', + 78 => 'n', + 79 => 'o', + 80 => 'p', + 81 => 'q', + 82 => 'r', + 83 => 's', + 84 => 't', + 85 => 'u', + 86 => 'v', + 87 => 'w', + 88 => 'x', + 89 => 'y', + 90 => 'z', + 170 => 'a', + 178 => '2', + 179 => '3', + 181 => 'μ', + 185 => '1', + 186 => 'o', + 188 => '1⁄4', + 189 => '1⁄2', + 190 => '3⁄4', + 192 => 'à', + 193 => 'á', + 194 => 'â', + 195 => 'ã', + 196 => 'ä', + 197 => 'å', + 198 => 'æ', + 199 => 'ç', + 200 => 'è', + 201 => 'é', + 202 => 'ê', + 203 => 'ë', + 204 => 'ì', + 205 => 'í', + 206 => 'î', + 207 => 'ï', + 208 => 'ð', + 209 => 'ñ', + 210 => 'ò', + 211 => 'ó', + 212 => 'ô', + 213 => 'õ', + 214 => 'ö', + 216 => 'ø', + 217 => 'ù', + 218 => 'ú', + 219 => 'û', + 220 => 'ü', + 221 => 'ý', + 222 => 'þ', + 256 => 'ā', + 258 => 'ă', + 260 => 'ą', + 262 => 'ć', + 264 => 'ĉ', + 266 => 'ċ', + 268 => 'č', + 270 => 'ď', + 272 => 'đ', + 274 => 'ē', + 276 => 'ĕ', + 278 => 'ė', + 280 => 'ę', + 282 => 'ě', + 284 => 'ĝ', + 286 => 'ğ', + 288 => 'ġ', + 290 => 'ģ', + 292 => 'ĥ', + 294 => 'ħ', + 296 => 'ĩ', + 298 => 'ī', + 300 => 'ĭ', + 302 => 'į', + 304 => 'i̇', + 306 => 'ij', + 307 => 'ij', + 308 => 'ĵ', + 310 => 'ķ', + 313 => 'ĺ', + 315 => 'ļ', + 317 => 'ľ', + 319 => 'l·', + 320 => 'l·', + 321 => 'ł', + 323 => 'ń', + 325 => 'ņ', + 327 => 'ň', + 329 => 'ʼn', + 330 => 'ŋ', + 332 => 'ō', + 334 => 'ŏ', + 336 => 'ő', + 338 => 'œ', + 340 => 'ŕ', + 342 => 'ŗ', + 344 => 'ř', + 346 => 'ś', + 348 => 'ŝ', + 350 => 'ş', + 352 => 'š', + 354 => 'ţ', + 356 => 'ť', + 358 => 'ŧ', + 360 => 'ũ', + 362 => 'ū', + 364 => 'ŭ', + 366 => 'ů', + 368 => 'ű', + 370 => 'ų', + 372 => 'ŵ', + 374 => 'ŷ', + 376 => 'ÿ', + 377 => 'ź', + 379 => 'ż', + 381 => 'ž', + 383 => 's', + 385 => 'ɓ', + 386 => 'ƃ', + 388 => 'ƅ', + 390 => 'ɔ', + 391 => 'ƈ', + 393 => 'ɖ', + 394 => 'ɗ', + 395 => 'ƌ', + 398 => 'ǝ', + 399 => 'ə', + 400 => 'ɛ', + 401 => 'ƒ', + 403 => 'ɠ', + 404 => 'ɣ', + 406 => 'ɩ', + 407 => 'ɨ', + 408 => 'ƙ', + 412 => 'ɯ', + 413 => 'ɲ', + 415 => 'ɵ', + 416 => 'ơ', + 418 => 'ƣ', + 420 => 'ƥ', + 422 => 'ʀ', + 423 => 'ƨ', + 425 => 'ʃ', + 428 => 'ƭ', + 430 => 'ʈ', + 431 => 'ư', + 433 => 'ʊ', + 434 => 'ʋ', + 435 => 'ƴ', + 437 => 'ƶ', + 439 => 'ʒ', + 440 => 'ƹ', + 444 => 'ƽ', + 452 => 'dž', + 453 => 'dž', + 454 => 'dž', + 455 => 'lj', + 456 => 'lj', + 457 => 'lj', + 458 => 'nj', + 459 => 'nj', + 460 => 'nj', + 461 => 'ǎ', + 463 => 'ǐ', + 465 => 'ǒ', + 467 => 'ǔ', + 469 => 'ǖ', + 471 => 'ǘ', + 473 => 'ǚ', + 475 => 'ǜ', + 478 => 'ǟ', + 480 => 'ǡ', + 482 => 'ǣ', + 484 => 'ǥ', + 486 => 'ǧ', + 488 => 'ǩ', + 490 => 'ǫ', + 492 => 'ǭ', + 494 => 'ǯ', + 497 => 'dz', + 498 => 'dz', + 499 => 'dz', + 500 => 'ǵ', + 502 => 'ƕ', + 503 => 'ƿ', + 504 => 'ǹ', + 506 => 'ǻ', + 508 => 'ǽ', + 510 => 'ǿ', + 512 => 'ȁ', + 514 => 'ȃ', + 516 => 'ȅ', + 518 => 'ȇ', + 520 => 'ȉ', + 522 => 'ȋ', + 524 => 'ȍ', + 526 => 'ȏ', + 528 => 'ȑ', + 530 => 'ȓ', + 532 => 'ȕ', + 534 => 'ȗ', + 536 => 'ș', + 538 => 'ț', + 540 => 'ȝ', + 542 => 'ȟ', + 544 => 'ƞ', + 546 => 'ȣ', + 548 => 'ȥ', + 550 => 'ȧ', + 552 => 'ȩ', + 554 => 'ȫ', + 556 => 'ȭ', + 558 => 'ȯ', + 560 => 'ȱ', + 562 => 'ȳ', + 570 => 'ⱥ', + 571 => 'ȼ', + 573 => 'ƚ', + 574 => 'ⱦ', + 577 => 'ɂ', + 579 => 'ƀ', + 580 => 'ʉ', + 581 => 'ʌ', + 582 => 'ɇ', + 584 => 'ɉ', + 586 => 'ɋ', + 588 => 'ɍ', + 590 => 'ɏ', + 688 => 'h', + 689 => 'ɦ', + 690 => 'j', + 691 => 'r', + 692 => 'ɹ', + 693 => 'ɻ', + 694 => 'ʁ', + 695 => 'w', + 696 => 'y', + 736 => 'ɣ', + 737 => 'l', + 738 => 's', + 739 => 'x', + 740 => 'ʕ', + 832 => '̀', + 833 => '́', + 835 => '̓', + 836 => '̈́', + 837 => 'ι', + 880 => 'ͱ', + 882 => 'ͳ', + 884 => 'ʹ', + 886 => 'ͷ', + 895 => 'ϳ', + 902 => 'ά', + 903 => '·', + 904 => 'έ', + 905 => 'ή', + 906 => 'ί', + 908 => 'ό', + 910 => 'ύ', + 911 => 'ώ', + 913 => 'α', + 914 => 'β', + 915 => 'γ', + 916 => 'δ', + 917 => 'ε', + 918 => 'ζ', + 919 => 'η', + 920 => 'θ', + 921 => 'ι', + 922 => 'κ', + 923 => 'λ', + 924 => 'μ', + 925 => 'ν', + 926 => 'ξ', + 927 => 'ο', + 928 => 'π', + 929 => 'ρ', + 931 => 'σ', + 932 => 'τ', + 933 => 'υ', + 934 => 'φ', + 935 => 'χ', + 936 => 'ψ', + 937 => 'ω', + 938 => 'ϊ', + 939 => 'ϋ', + 975 => 'ϗ', + 976 => 'β', + 977 => 'θ', + 978 => 'υ', + 979 => 'ύ', + 980 => 'ϋ', + 981 => 'φ', + 982 => 'π', + 984 => 'ϙ', + 986 => 'ϛ', + 988 => 'ϝ', + 990 => 'ϟ', + 992 => 'ϡ', + 994 => 'ϣ', + 996 => 'ϥ', + 998 => 'ϧ', + 1000 => 'ϩ', + 1002 => 'ϫ', + 1004 => 'ϭ', + 1006 => 'ϯ', + 1008 => 'κ', + 1009 => 'ρ', + 1010 => 'σ', + 1012 => 'θ', + 1013 => 'ε', + 1015 => 'ϸ', + 1017 => 'σ', + 1018 => 'ϻ', + 1021 => 'ͻ', + 1022 => 'ͼ', + 1023 => 'ͽ', + 1024 => 'ѐ', + 1025 => 'ё', + 1026 => 'ђ', + 1027 => 'ѓ', + 1028 => 'є', + 1029 => 'ѕ', + 1030 => 'і', + 1031 => 'ї', + 1032 => 'ј', + 1033 => 'љ', + 1034 => 'њ', + 1035 => 'ћ', + 1036 => 'ќ', + 1037 => 'ѝ', + 1038 => 'ў', + 1039 => 'џ', + 1040 => 'а', + 1041 => 'б', + 1042 => 'в', + 1043 => 'г', + 1044 => 'д', + 1045 => 'е', + 1046 => 'ж', + 1047 => 'з', + 1048 => 'и', + 1049 => 'й', + 1050 => 'к', + 1051 => 'л', + 1052 => 'м', + 1053 => 'н', + 1054 => 'о', + 1055 => 'п', + 1056 => 'р', + 1057 => 'с', + 1058 => 'т', + 1059 => 'у', + 1060 => 'ф', + 1061 => 'х', + 1062 => 'ц', + 1063 => 'ч', + 1064 => 'ш', + 1065 => 'щ', + 1066 => 'ъ', + 1067 => 'ы', + 1068 => 'ь', + 1069 => 'э', + 1070 => 'ю', + 1071 => 'я', + 1120 => 'ѡ', + 1122 => 'ѣ', + 1124 => 'ѥ', + 1126 => 'ѧ', + 1128 => 'ѩ', + 1130 => 'ѫ', + 1132 => 'ѭ', + 1134 => 'ѯ', + 1136 => 'ѱ', + 1138 => 'ѳ', + 1140 => 'ѵ', + 1142 => 'ѷ', + 1144 => 'ѹ', + 1146 => 'ѻ', + 1148 => 'ѽ', + 1150 => 'ѿ', + 1152 => 'ҁ', + 1162 => 'ҋ', + 1164 => 'ҍ', + 1166 => 'ҏ', + 1168 => 'ґ', + 1170 => 'ғ', + 1172 => 'ҕ', + 1174 => 'җ', + 1176 => 'ҙ', + 1178 => 'қ', + 1180 => 'ҝ', + 1182 => 'ҟ', + 1184 => 'ҡ', + 1186 => 'ң', + 1188 => 'ҥ', + 1190 => 'ҧ', + 1192 => 'ҩ', + 1194 => 'ҫ', + 1196 => 'ҭ', + 1198 => 'ү', + 1200 => 'ұ', + 1202 => 'ҳ', + 1204 => 'ҵ', + 1206 => 'ҷ', + 1208 => 'ҹ', + 1210 => 'һ', + 1212 => 'ҽ', + 1214 => 'ҿ', + 1217 => 'ӂ', + 1219 => 'ӄ', + 1221 => 'ӆ', + 1223 => 'ӈ', + 1225 => 'ӊ', + 1227 => 'ӌ', + 1229 => 'ӎ', + 1232 => 'ӑ', + 1234 => 'ӓ', + 1236 => 'ӕ', + 1238 => 'ӗ', + 1240 => 'ә', + 1242 => 'ӛ', + 1244 => 'ӝ', + 1246 => 'ӟ', + 1248 => 'ӡ', + 1250 => 'ӣ', + 1252 => 'ӥ', + 1254 => 'ӧ', + 1256 => 'ө', + 1258 => 'ӫ', + 1260 => 'ӭ', + 1262 => 'ӯ', + 1264 => 'ӱ', + 1266 => 'ӳ', + 1268 => 'ӵ', + 1270 => 'ӷ', + 1272 => 'ӹ', + 1274 => 'ӻ', + 1276 => 'ӽ', + 1278 => 'ӿ', + 1280 => 'ԁ', + 1282 => 'ԃ', + 1284 => 'ԅ', + 1286 => 'ԇ', + 1288 => 'ԉ', + 1290 => 'ԋ', + 1292 => 'ԍ', + 1294 => 'ԏ', + 1296 => 'ԑ', + 1298 => 'ԓ', + 1300 => 'ԕ', + 1302 => 'ԗ', + 1304 => 'ԙ', + 1306 => 'ԛ', + 1308 => 'ԝ', + 1310 => 'ԟ', + 1312 => 'ԡ', + 1314 => 'ԣ', + 1316 => 'ԥ', + 1318 => 'ԧ', + 1320 => 'ԩ', + 1322 => 'ԫ', + 1324 => 'ԭ', + 1326 => 'ԯ', + 1329 => 'ա', + 1330 => 'բ', + 1331 => 'գ', + 1332 => 'դ', + 1333 => 'ե', + 1334 => 'զ', + 1335 => 'է', + 1336 => 'ը', + 1337 => 'թ', + 1338 => 'ժ', + 1339 => 'ի', + 1340 => 'լ', + 1341 => 'խ', + 1342 => 'ծ', + 1343 => 'կ', + 1344 => 'հ', + 1345 => 'ձ', + 1346 => 'ղ', + 1347 => 'ճ', + 1348 => 'մ', + 1349 => 'յ', + 1350 => 'ն', + 1351 => 'շ', + 1352 => 'ո', + 1353 => 'չ', + 1354 => 'պ', + 1355 => 'ջ', + 1356 => 'ռ', + 1357 => 'ս', + 1358 => 'վ', + 1359 => 'տ', + 1360 => 'ր', + 1361 => 'ց', + 1362 => 'ւ', + 1363 => 'փ', + 1364 => 'ք', + 1365 => 'օ', + 1366 => 'ֆ', + 1415 => 'եւ', + 1653 => 'اٴ', + 1654 => 'وٴ', + 1655 => 'ۇٴ', + 1656 => 'يٴ', + 2392 => 'क़', + 2393 => 'ख़', + 2394 => 'ग़', + 2395 => 'ज़', + 2396 => 'ड़', + 2397 => 'ढ़', + 2398 => 'फ़', + 2399 => 'य़', + 2524 => 'ড়', + 2525 => 'ঢ়', + 2527 => 'য়', + 2611 => 'ਲ਼', + 2614 => 'ਸ਼', + 2649 => 'ਖ਼', + 2650 => 'ਗ਼', + 2651 => 'ਜ਼', + 2654 => 'ਫ਼', + 2908 => 'ଡ଼', + 2909 => 'ଢ଼', + 3635 => 'ํา', + 3763 => 'ໍາ', + 3804 => 'ຫນ', + 3805 => 'ຫມ', + 3852 => '་', + 3907 => 'གྷ', + 3917 => 'ཌྷ', + 3922 => 'དྷ', + 3927 => 'བྷ', + 3932 => 'ཛྷ', + 3945 => 'ཀྵ', + 3955 => 'ཱི', + 3957 => 'ཱུ', + 3958 => 'ྲྀ', + 3959 => 'ྲཱྀ', + 3960 => 'ླྀ', + 3961 => 'ླཱྀ', + 3969 => 'ཱྀ', + 3987 => 'ྒྷ', + 3997 => 'ྜྷ', + 4002 => 'ྡྷ', + 4007 => 'ྦྷ', + 4012 => 'ྫྷ', + 4025 => 'ྐྵ', + 4295 => 'ⴧ', + 4301 => 'ⴭ', + 4348 => 'ნ', + 5112 => 'Ᏸ', + 5113 => 'Ᏹ', + 5114 => 'Ᏺ', + 5115 => 'Ᏻ', + 5116 => 'Ᏼ', + 5117 => 'Ᏽ', + 7296 => 'в', + 7297 => 'д', + 7298 => 'о', + 7299 => 'с', + 7300 => 'т', + 7301 => 'т', + 7302 => 'ъ', + 7303 => 'ѣ', + 7304 => 'ꙋ', + 7312 => 'ა', + 7313 => 'ბ', + 7314 => 'გ', + 7315 => 'დ', + 7316 => 'ე', + 7317 => 'ვ', + 7318 => 'ზ', + 7319 => 'თ', + 7320 => 'ი', + 7321 => 'კ', + 7322 => 'ლ', + 7323 => 'მ', + 7324 => 'ნ', + 7325 => 'ო', + 7326 => 'პ', + 7327 => 'ჟ', + 7328 => 'რ', + 7329 => 'ს', + 7330 => 'ტ', + 7331 => 'უ', + 7332 => 'ფ', + 7333 => 'ქ', + 7334 => 'ღ', + 7335 => 'ყ', + 7336 => 'შ', + 7337 => 'ჩ', + 7338 => 'ც', + 7339 => 'ძ', + 7340 => 'წ', + 7341 => 'ჭ', + 7342 => 'ხ', + 7343 => 'ჯ', + 7344 => 'ჰ', + 7345 => 'ჱ', + 7346 => 'ჲ', + 7347 => 'ჳ', + 7348 => 'ჴ', + 7349 => 'ჵ', + 7350 => 'ჶ', + 7351 => 'ჷ', + 7352 => 'ჸ', + 7353 => 'ჹ', + 7354 => 'ჺ', + 7357 => 'ჽ', + 7358 => 'ჾ', + 7359 => 'ჿ', + 7468 => 'a', + 7469 => 'æ', + 7470 => 'b', + 7472 => 'd', + 7473 => 'e', + 7474 => 'ǝ', + 7475 => 'g', + 7476 => 'h', + 7477 => 'i', + 7478 => 'j', + 7479 => 'k', + 7480 => 'l', + 7481 => 'm', + 7482 => 'n', + 7484 => 'o', + 7485 => 'ȣ', + 7486 => 'p', + 7487 => 'r', + 7488 => 't', + 7489 => 'u', + 7490 => 'w', + 7491 => 'a', + 7492 => 'ɐ', + 7493 => 'ɑ', + 7494 => 'ᴂ', + 7495 => 'b', + 7496 => 'd', + 7497 => 'e', + 7498 => 'ə', + 7499 => 'ɛ', + 7500 => 'ɜ', + 7501 => 'g', + 7503 => 'k', + 7504 => 'm', + 7505 => 'ŋ', + 7506 => 'o', + 7507 => 'ɔ', + 7508 => 'ᴖ', + 7509 => 'ᴗ', + 7510 => 'p', + 7511 => 't', + 7512 => 'u', + 7513 => 'ᴝ', + 7514 => 'ɯ', + 7515 => 'v', + 7516 => 'ᴥ', + 7517 => 'β', + 7518 => 'γ', + 7519 => 'δ', + 7520 => 'φ', + 7521 => 'χ', + 7522 => 'i', + 7523 => 'r', + 7524 => 'u', + 7525 => 'v', + 7526 => 'β', + 7527 => 'γ', + 7528 => 'ρ', + 7529 => 'φ', + 7530 => 'χ', + 7544 => 'н', + 7579 => 'ɒ', + 7580 => 'c', + 7581 => 'ɕ', + 7582 => 'ð', + 7583 => 'ɜ', + 7584 => 'f', + 7585 => 'ɟ', + 7586 => 'ɡ', + 7587 => 'ɥ', + 7588 => 'ɨ', + 7589 => 'ɩ', + 7590 => 'ɪ', + 7591 => 'ᵻ', + 7592 => 'ʝ', + 7593 => 'ɭ', + 7594 => 'ᶅ', + 7595 => 'ʟ', + 7596 => 'ɱ', + 7597 => 'ɰ', + 7598 => 'ɲ', + 7599 => 'ɳ', + 7600 => 'ɴ', + 7601 => 'ɵ', + 7602 => 'ɸ', + 7603 => 'ʂ', + 7604 => 'ʃ', + 7605 => 'ƫ', + 7606 => 'ʉ', + 7607 => 'ʊ', + 7608 => 'ᴜ', + 7609 => 'ʋ', + 7610 => 'ʌ', + 7611 => 'z', + 7612 => 'ʐ', + 7613 => 'ʑ', + 7614 => 'ʒ', + 7615 => 'θ', + 7680 => 'ḁ', + 7682 => 'ḃ', + 7684 => 'ḅ', + 7686 => 'ḇ', + 7688 => 'ḉ', + 7690 => 'ḋ', + 7692 => 'ḍ', + 7694 => 'ḏ', + 7696 => 'ḑ', + 7698 => 'ḓ', + 7700 => 'ḕ', + 7702 => 'ḗ', + 7704 => 'ḙ', + 7706 => 'ḛ', + 7708 => 'ḝ', + 7710 => 'ḟ', + 7712 => 'ḡ', + 7714 => 'ḣ', + 7716 => 'ḥ', + 7718 => 'ḧ', + 7720 => 'ḩ', + 7722 => 'ḫ', + 7724 => 'ḭ', + 7726 => 'ḯ', + 7728 => 'ḱ', + 7730 => 'ḳ', + 7732 => 'ḵ', + 7734 => 'ḷ', + 7736 => 'ḹ', + 7738 => 'ḻ', + 7740 => 'ḽ', + 7742 => 'ḿ', + 7744 => 'ṁ', + 7746 => 'ṃ', + 7748 => 'ṅ', + 7750 => 'ṇ', + 7752 => 'ṉ', + 7754 => 'ṋ', + 7756 => 'ṍ', + 7758 => 'ṏ', + 7760 => 'ṑ', + 7762 => 'ṓ', + 7764 => 'ṕ', + 7766 => 'ṗ', + 7768 => 'ṙ', + 7770 => 'ṛ', + 7772 => 'ṝ', + 7774 => 'ṟ', + 7776 => 'ṡ', + 7778 => 'ṣ', + 7780 => 'ṥ', + 7782 => 'ṧ', + 7784 => 'ṩ', + 7786 => 'ṫ', + 7788 => 'ṭ', + 7790 => 'ṯ', + 7792 => 'ṱ', + 7794 => 'ṳ', + 7796 => 'ṵ', + 7798 => 'ṷ', + 7800 => 'ṹ', + 7802 => 'ṻ', + 7804 => 'ṽ', + 7806 => 'ṿ', + 7808 => 'ẁ', + 7810 => 'ẃ', + 7812 => 'ẅ', + 7814 => 'ẇ', + 7816 => 'ẉ', + 7818 => 'ẋ', + 7820 => 'ẍ', + 7822 => 'ẏ', + 7824 => 'ẑ', + 7826 => 'ẓ', + 7828 => 'ẕ', + 7834 => 'aʾ', + 7835 => 'ṡ', + 7838 => 'ss', + 7840 => 'ạ', + 7842 => 'ả', + 7844 => 'ấ', + 7846 => 'ầ', + 7848 => 'ẩ', + 7850 => 'ẫ', + 7852 => 'ậ', + 7854 => 'ắ', + 7856 => 'ằ', + 7858 => 'ẳ', + 7860 => 'ẵ', + 7862 => 'ặ', + 7864 => 'ẹ', + 7866 => 'ẻ', + 7868 => 'ẽ', + 7870 => 'ế', + 7872 => 'ề', + 7874 => 'ể', + 7876 => 'ễ', + 7878 => 'ệ', + 7880 => 'ỉ', + 7882 => 'ị', + 7884 => 'ọ', + 7886 => 'ỏ', + 7888 => 'ố', + 7890 => 'ồ', + 7892 => 'ổ', + 7894 => 'ỗ', + 7896 => 'ộ', + 7898 => 'ớ', + 7900 => 'ờ', + 7902 => 'ở', + 7904 => 'ỡ', + 7906 => 'ợ', + 7908 => 'ụ', + 7910 => 'ủ', + 7912 => 'ứ', + 7914 => 'ừ', + 7916 => 'ử', + 7918 => 'ữ', + 7920 => 'ự', + 7922 => 'ỳ', + 7924 => 'ỵ', + 7926 => 'ỷ', + 7928 => 'ỹ', + 7930 => 'ỻ', + 7932 => 'ỽ', + 7934 => 'ỿ', + 7944 => 'ἀ', + 7945 => 'ἁ', + 7946 => 'ἂ', + 7947 => 'ἃ', + 7948 => 'ἄ', + 7949 => 'ἅ', + 7950 => 'ἆ', + 7951 => 'ἇ', + 7960 => 'ἐ', + 7961 => 'ἑ', + 7962 => 'ἒ', + 7963 => 'ἓ', + 7964 => 'ἔ', + 7965 => 'ἕ', + 7976 => 'ἠ', + 7977 => 'ἡ', + 7978 => 'ἢ', + 7979 => 'ἣ', + 7980 => 'ἤ', + 7981 => 'ἥ', + 7982 => 'ἦ', + 7983 => 'ἧ', + 7992 => 'ἰ', + 7993 => 'ἱ', + 7994 => 'ἲ', + 7995 => 'ἳ', + 7996 => 'ἴ', + 7997 => 'ἵ', + 7998 => 'ἶ', + 7999 => 'ἷ', + 8008 => 'ὀ', + 8009 => 'ὁ', + 8010 => 'ὂ', + 8011 => 'ὃ', + 8012 => 'ὄ', + 8013 => 'ὅ', + 8025 => 'ὑ', + 8027 => 'ὓ', + 8029 => 'ὕ', + 8031 => 'ὗ', + 8040 => 'ὠ', + 8041 => 'ὡ', + 8042 => 'ὢ', + 8043 => 'ὣ', + 8044 => 'ὤ', + 8045 => 'ὥ', + 8046 => 'ὦ', + 8047 => 'ὧ', + 8049 => 'ά', + 8051 => 'έ', + 8053 => 'ή', + 8055 => 'ί', + 8057 => 'ό', + 8059 => 'ύ', + 8061 => 'ώ', + 8064 => 'ἀι', + 8065 => 'ἁι', + 8066 => 'ἂι', + 8067 => 'ἃι', + 8068 => 'ἄι', + 8069 => 'ἅι', + 8070 => 'ἆι', + 8071 => 'ἇι', + 8072 => 'ἀι', + 8073 => 'ἁι', + 8074 => 'ἂι', + 8075 => 'ἃι', + 8076 => 'ἄι', + 8077 => 'ἅι', + 8078 => 'ἆι', + 8079 => 'ἇι', + 8080 => 'ἠι', + 8081 => 'ἡι', + 8082 => 'ἢι', + 8083 => 'ἣι', + 8084 => 'ἤι', + 8085 => 'ἥι', + 8086 => 'ἦι', + 8087 => 'ἧι', + 8088 => 'ἠι', + 8089 => 'ἡι', + 8090 => 'ἢι', + 8091 => 'ἣι', + 8092 => 'ἤι', + 8093 => 'ἥι', + 8094 => 'ἦι', + 8095 => 'ἧι', + 8096 => 'ὠι', + 8097 => 'ὡι', + 8098 => 'ὢι', + 8099 => 'ὣι', + 8100 => 'ὤι', + 8101 => 'ὥι', + 8102 => 'ὦι', + 8103 => 'ὧι', + 8104 => 'ὠι', + 8105 => 'ὡι', + 8106 => 'ὢι', + 8107 => 'ὣι', + 8108 => 'ὤι', + 8109 => 'ὥι', + 8110 => 'ὦι', + 8111 => 'ὧι', + 8114 => 'ὰι', + 8115 => 'αι', + 8116 => 'άι', + 8119 => 'ᾶι', + 8120 => 'ᾰ', + 8121 => 'ᾱ', + 8122 => 'ὰ', + 8123 => 'ά', + 8124 => 'αι', + 8126 => 'ι', + 8130 => 'ὴι', + 8131 => 'ηι', + 8132 => 'ήι', + 8135 => 'ῆι', + 8136 => 'ὲ', + 8137 => 'έ', + 8138 => 'ὴ', + 8139 => 'ή', + 8140 => 'ηι', + 8147 => 'ΐ', + 8152 => 'ῐ', + 8153 => 'ῑ', + 8154 => 'ὶ', + 8155 => 'ί', + 8163 => 'ΰ', + 8168 => 'ῠ', + 8169 => 'ῡ', + 8170 => 'ὺ', + 8171 => 'ύ', + 8172 => 'ῥ', + 8178 => 'ὼι', + 8179 => 'ωι', + 8180 => 'ώι', + 8183 => 'ῶι', + 8184 => 'ὸ', + 8185 => 'ό', + 8186 => 'ὼ', + 8187 => 'ώ', + 8188 => 'ωι', + 8209 => '‐', + 8243 => '′′', + 8244 => '′′′', + 8246 => '‵‵', + 8247 => '‵‵‵', + 8279 => '′′′′', + 8304 => '0', + 8305 => 'i', + 8308 => '4', + 8309 => '5', + 8310 => '6', + 8311 => '7', + 8312 => '8', + 8313 => '9', + 8315 => '−', + 8319 => 'n', + 8320 => '0', + 8321 => '1', + 8322 => '2', + 8323 => '3', + 8324 => '4', + 8325 => '5', + 8326 => '6', + 8327 => '7', + 8328 => '8', + 8329 => '9', + 8331 => '−', + 8336 => 'a', + 8337 => 'e', + 8338 => 'o', + 8339 => 'x', + 8340 => 'ə', + 8341 => 'h', + 8342 => 'k', + 8343 => 'l', + 8344 => 'm', + 8345 => 'n', + 8346 => 'p', + 8347 => 's', + 8348 => 't', + 8360 => 'rs', + 8450 => 'c', + 8451 => '°c', + 8455 => 'ɛ', + 8457 => '°f', + 8458 => 'g', + 8459 => 'h', + 8460 => 'h', + 8461 => 'h', + 8462 => 'h', + 8463 => 'ħ', + 8464 => 'i', + 8465 => 'i', + 8466 => 'l', + 8467 => 'l', + 8469 => 'n', + 8470 => 'no', + 8473 => 'p', + 8474 => 'q', + 8475 => 'r', + 8476 => 'r', + 8477 => 'r', + 8480 => 'sm', + 8481 => 'tel', + 8482 => 'tm', + 8484 => 'z', + 8486 => 'ω', + 8488 => 'z', + 8490 => 'k', + 8491 => 'å', + 8492 => 'b', + 8493 => 'c', + 8495 => 'e', + 8496 => 'e', + 8497 => 'f', + 8499 => 'm', + 8500 => 'o', + 8501 => 'א', + 8502 => 'ב', + 8503 => 'ג', + 8504 => 'ד', + 8505 => 'i', + 8507 => 'fax', + 8508 => 'π', + 8509 => 'γ', + 8510 => 'γ', + 8511 => 'π', + 8512 => '∑', + 8517 => 'd', + 8518 => 'd', + 8519 => 'e', + 8520 => 'i', + 8521 => 'j', + 8528 => '1⁄7', + 8529 => '1⁄9', + 8530 => '1⁄10', + 8531 => '1⁄3', + 8532 => '2⁄3', + 8533 => '1⁄5', + 8534 => '2⁄5', + 8535 => '3⁄5', + 8536 => '4⁄5', + 8537 => '1⁄6', + 8538 => '5⁄6', + 8539 => '1⁄8', + 8540 => '3⁄8', + 8541 => '5⁄8', + 8542 => '7⁄8', + 8543 => '1⁄', + 8544 => 'i', + 8545 => 'ii', + 8546 => 'iii', + 8547 => 'iv', + 8548 => 'v', + 8549 => 'vi', + 8550 => 'vii', + 8551 => 'viii', + 8552 => 'ix', + 8553 => 'x', + 8554 => 'xi', + 8555 => 'xii', + 8556 => 'l', + 8557 => 'c', + 8558 => 'd', + 8559 => 'm', + 8560 => 'i', + 8561 => 'ii', + 8562 => 'iii', + 8563 => 'iv', + 8564 => 'v', + 8565 => 'vi', + 8566 => 'vii', + 8567 => 'viii', + 8568 => 'ix', + 8569 => 'x', + 8570 => 'xi', + 8571 => 'xii', + 8572 => 'l', + 8573 => 'c', + 8574 => 'd', + 8575 => 'm', + 8585 => '0⁄3', + 8748 => '∫∫', + 8749 => '∫∫∫', + 8751 => '∮∮', + 8752 => '∮∮∮', + 9001 => '〈', + 9002 => '〉', + 9312 => '1', + 9313 => '2', + 9314 => '3', + 9315 => '4', + 9316 => '5', + 9317 => '6', + 9318 => '7', + 9319 => '8', + 9320 => '9', + 9321 => '10', + 9322 => '11', + 9323 => '12', + 9324 => '13', + 9325 => '14', + 9326 => '15', + 9327 => '16', + 9328 => '17', + 9329 => '18', + 9330 => '19', + 9331 => '20', + 9398 => 'a', + 9399 => 'b', + 9400 => 'c', + 9401 => 'd', + 9402 => 'e', + 9403 => 'f', + 9404 => 'g', + 9405 => 'h', + 9406 => 'i', + 9407 => 'j', + 9408 => 'k', + 9409 => 'l', + 9410 => 'm', + 9411 => 'n', + 9412 => 'o', + 9413 => 'p', + 9414 => 'q', + 9415 => 'r', + 9416 => 's', + 9417 => 't', + 9418 => 'u', + 9419 => 'v', + 9420 => 'w', + 9421 => 'x', + 9422 => 'y', + 9423 => 'z', + 9424 => 'a', + 9425 => 'b', + 9426 => 'c', + 9427 => 'd', + 9428 => 'e', + 9429 => 'f', + 9430 => 'g', + 9431 => 'h', + 9432 => 'i', + 9433 => 'j', + 9434 => 'k', + 9435 => 'l', + 9436 => 'm', + 9437 => 'n', + 9438 => 'o', + 9439 => 'p', + 9440 => 'q', + 9441 => 'r', + 9442 => 's', + 9443 => 't', + 9444 => 'u', + 9445 => 'v', + 9446 => 'w', + 9447 => 'x', + 9448 => 'y', + 9449 => 'z', + 9450 => '0', + 10764 => '∫∫∫∫', + 10972 => '⫝̸', + 11264 => 'ⰰ', + 11265 => 'ⰱ', + 11266 => 'ⰲ', + 11267 => 'ⰳ', + 11268 => 'ⰴ', + 11269 => 'ⰵ', + 11270 => 'ⰶ', + 11271 => 'ⰷ', + 11272 => 'ⰸ', + 11273 => 'ⰹ', + 11274 => 'ⰺ', + 11275 => 'ⰻ', + 11276 => 'ⰼ', + 11277 => 'ⰽ', + 11278 => 'ⰾ', + 11279 => 'ⰿ', + 11280 => 'ⱀ', + 11281 => 'ⱁ', + 11282 => 'ⱂ', + 11283 => 'ⱃ', + 11284 => 'ⱄ', + 11285 => 'ⱅ', + 11286 => 'ⱆ', + 11287 => 'ⱇ', + 11288 => 'ⱈ', + 11289 => 'ⱉ', + 11290 => 'ⱊ', + 11291 => 'ⱋ', + 11292 => 'ⱌ', + 11293 => 'ⱍ', + 11294 => 'ⱎ', + 11295 => 'ⱏ', + 11296 => 'ⱐ', + 11297 => 'ⱑ', + 11298 => 'ⱒ', + 11299 => 'ⱓ', + 11300 => 'ⱔ', + 11301 => 'ⱕ', + 11302 => 'ⱖ', + 11303 => 'ⱗ', + 11304 => 'ⱘ', + 11305 => 'ⱙ', + 11306 => 'ⱚ', + 11307 => 'ⱛ', + 11308 => 'ⱜ', + 11309 => 'ⱝ', + 11310 => 'ⱞ', + 11360 => 'ⱡ', + 11362 => 'ɫ', + 11363 => 'ᵽ', + 11364 => 'ɽ', + 11367 => 'ⱨ', + 11369 => 'ⱪ', + 11371 => 'ⱬ', + 11373 => 'ɑ', + 11374 => 'ɱ', + 11375 => 'ɐ', + 11376 => 'ɒ', + 11378 => 'ⱳ', + 11381 => 'ⱶ', + 11388 => 'j', + 11389 => 'v', + 11390 => 'ȿ', + 11391 => 'ɀ', + 11392 => 'ⲁ', + 11394 => 'ⲃ', + 11396 => 'ⲅ', + 11398 => 'ⲇ', + 11400 => 'ⲉ', + 11402 => 'ⲋ', + 11404 => 'ⲍ', + 11406 => 'ⲏ', + 11408 => 'ⲑ', + 11410 => 'ⲓ', + 11412 => 'ⲕ', + 11414 => 'ⲗ', + 11416 => 'ⲙ', + 11418 => 'ⲛ', + 11420 => 'ⲝ', + 11422 => 'ⲟ', + 11424 => 'ⲡ', + 11426 => 'ⲣ', + 11428 => 'ⲥ', + 11430 => 'ⲧ', + 11432 => 'ⲩ', + 11434 => 'ⲫ', + 11436 => 'ⲭ', + 11438 => 'ⲯ', + 11440 => 'ⲱ', + 11442 => 'ⲳ', + 11444 => 'ⲵ', + 11446 => 'ⲷ', + 11448 => 'ⲹ', + 11450 => 'ⲻ', + 11452 => 'ⲽ', + 11454 => 'ⲿ', + 11456 => 'ⳁ', + 11458 => 'ⳃ', + 11460 => 'ⳅ', + 11462 => 'ⳇ', + 11464 => 'ⳉ', + 11466 => 'ⳋ', + 11468 => 'ⳍ', + 11470 => 'ⳏ', + 11472 => 'ⳑ', + 11474 => 'ⳓ', + 11476 => 'ⳕ', + 11478 => 'ⳗ', + 11480 => 'ⳙ', + 11482 => 'ⳛ', + 11484 => 'ⳝ', + 11486 => 'ⳟ', + 11488 => 'ⳡ', + 11490 => 'ⳣ', + 11499 => 'ⳬ', + 11501 => 'ⳮ', + 11506 => 'ⳳ', + 11631 => 'ⵡ', + 11935 => '母', + 12019 => '龟', + 12032 => '一', + 12033 => '丨', + 12034 => '丶', + 12035 => '丿', + 12036 => '乙', + 12037 => '亅', + 12038 => '二', + 12039 => '亠', + 12040 => '人', + 12041 => '儿', + 12042 => '入', + 12043 => '八', + 12044 => '冂', + 12045 => '冖', + 12046 => '冫', + 12047 => '几', + 12048 => '凵', + 12049 => '刀', + 12050 => '力', + 12051 => '勹', + 12052 => '匕', + 12053 => '匚', + 12054 => '匸', + 12055 => '十', + 12056 => '卜', + 12057 => '卩', + 12058 => '厂', + 12059 => '厶', + 12060 => '又', + 12061 => '口', + 12062 => '囗', + 12063 => '土', + 12064 => '士', + 12065 => '夂', + 12066 => '夊', + 12067 => '夕', + 12068 => '大', + 12069 => '女', + 12070 => '子', + 12071 => '宀', + 12072 => '寸', + 12073 => '小', + 12074 => '尢', + 12075 => '尸', + 12076 => '屮', + 12077 => '山', + 12078 => '巛', + 12079 => '工', + 12080 => '己', + 12081 => '巾', + 12082 => '干', + 12083 => '幺', + 12084 => '广', + 12085 => '廴', + 12086 => '廾', + 12087 => '弋', + 12088 => '弓', + 12089 => '彐', + 12090 => '彡', + 12091 => '彳', + 12092 => '心', + 12093 => '戈', + 12094 => '戶', + 12095 => '手', + 12096 => '支', + 12097 => '攴', + 12098 => '文', + 12099 => '斗', + 12100 => '斤', + 12101 => '方', + 12102 => '无', + 12103 => '日', + 12104 => '曰', + 12105 => '月', + 12106 => '木', + 12107 => '欠', + 12108 => '止', + 12109 => '歹', + 12110 => '殳', + 12111 => '毋', + 12112 => '比', + 12113 => '毛', + 12114 => '氏', + 12115 => '气', + 12116 => '水', + 12117 => '火', + 12118 => '爪', + 12119 => '父', + 12120 => '爻', + 12121 => '爿', + 12122 => '片', + 12123 => '牙', + 12124 => '牛', + 12125 => '犬', + 12126 => '玄', + 12127 => '玉', + 12128 => '瓜', + 12129 => '瓦', + 12130 => '甘', + 12131 => '生', + 12132 => '用', + 12133 => '田', + 12134 => '疋', + 12135 => '疒', + 12136 => '癶', + 12137 => '白', + 12138 => '皮', + 12139 => '皿', + 12140 => '目', + 12141 => '矛', + 12142 => '矢', + 12143 => '石', + 12144 => '示', + 12145 => '禸', + 12146 => '禾', + 12147 => '穴', + 12148 => '立', + 12149 => '竹', + 12150 => '米', + 12151 => '糸', + 12152 => '缶', + 12153 => '网', + 12154 => '羊', + 12155 => '羽', + 12156 => '老', + 12157 => '而', + 12158 => '耒', + 12159 => '耳', + 12160 => '聿', + 12161 => '肉', + 12162 => '臣', + 12163 => '自', + 12164 => '至', + 12165 => '臼', + 12166 => '舌', + 12167 => '舛', + 12168 => '舟', + 12169 => '艮', + 12170 => '色', + 12171 => '艸', + 12172 => '虍', + 12173 => '虫', + 12174 => '血', + 12175 => '行', + 12176 => '衣', + 12177 => '襾', + 12178 => '見', + 12179 => '角', + 12180 => '言', + 12181 => '谷', + 12182 => '豆', + 12183 => '豕', + 12184 => '豸', + 12185 => '貝', + 12186 => '赤', + 12187 => '走', + 12188 => '足', + 12189 => '身', + 12190 => '車', + 12191 => '辛', + 12192 => '辰', + 12193 => '辵', + 12194 => '邑', + 12195 => '酉', + 12196 => '釆', + 12197 => '里', + 12198 => '金', + 12199 => '長', + 12200 => '門', + 12201 => '阜', + 12202 => '隶', + 12203 => '隹', + 12204 => '雨', + 12205 => '靑', + 12206 => '非', + 12207 => '面', + 12208 => '革', + 12209 => '韋', + 12210 => '韭', + 12211 => '音', + 12212 => '頁', + 12213 => '風', + 12214 => '飛', + 12215 => '食', + 12216 => '首', + 12217 => '香', + 12218 => '馬', + 12219 => '骨', + 12220 => '高', + 12221 => '髟', + 12222 => '鬥', + 12223 => '鬯', + 12224 => '鬲', + 12225 => '鬼', + 12226 => '魚', + 12227 => '鳥', + 12228 => '鹵', + 12229 => '鹿', + 12230 => '麥', + 12231 => '麻', + 12232 => '黃', + 12233 => '黍', + 12234 => '黑', + 12235 => '黹', + 12236 => '黽', + 12237 => '鼎', + 12238 => '鼓', + 12239 => '鼠', + 12240 => '鼻', + 12241 => '齊', + 12242 => '齒', + 12243 => '龍', + 12244 => '龜', + 12245 => '龠', + 12290 => '.', + 12342 => '〒', + 12344 => '十', + 12345 => '卄', + 12346 => '卅', + 12447 => 'より', + 12543 => 'コト', + 12593 => 'ᄀ', + 12594 => 'ᄁ', + 12595 => 'ᆪ', + 12596 => 'ᄂ', + 12597 => 'ᆬ', + 12598 => 'ᆭ', + 12599 => 'ᄃ', + 12600 => 'ᄄ', + 12601 => 'ᄅ', + 12602 => 'ᆰ', + 12603 => 'ᆱ', + 12604 => 'ᆲ', + 12605 => 'ᆳ', + 12606 => 'ᆴ', + 12607 => 'ᆵ', + 12608 => 'ᄚ', + 12609 => 'ᄆ', + 12610 => 'ᄇ', + 12611 => 'ᄈ', + 12612 => 'ᄡ', + 12613 => 'ᄉ', + 12614 => 'ᄊ', + 12615 => 'ᄋ', + 12616 => 'ᄌ', + 12617 => 'ᄍ', + 12618 => 'ᄎ', + 12619 => 'ᄏ', + 12620 => 'ᄐ', + 12621 => 'ᄑ', + 12622 => 'ᄒ', + 12623 => 'ᅡ', + 12624 => 'ᅢ', + 12625 => 'ᅣ', + 12626 => 'ᅤ', + 12627 => 'ᅥ', + 12628 => 'ᅦ', + 12629 => 'ᅧ', + 12630 => 'ᅨ', + 12631 => 'ᅩ', + 12632 => 'ᅪ', + 12633 => 'ᅫ', + 12634 => 'ᅬ', + 12635 => 'ᅭ', + 12636 => 'ᅮ', + 12637 => 'ᅯ', + 12638 => 'ᅰ', + 12639 => 'ᅱ', + 12640 => 'ᅲ', + 12641 => 'ᅳ', + 12642 => 'ᅴ', + 12643 => 'ᅵ', + 12645 => 'ᄔ', + 12646 => 'ᄕ', + 12647 => 'ᇇ', + 12648 => 'ᇈ', + 12649 => 'ᇌ', + 12650 => 'ᇎ', + 12651 => 'ᇓ', + 12652 => 'ᇗ', + 12653 => 'ᇙ', + 12654 => 'ᄜ', + 12655 => 'ᇝ', + 12656 => 'ᇟ', + 12657 => 'ᄝ', + 12658 => 'ᄞ', + 12659 => 'ᄠ', + 12660 => 'ᄢ', + 12661 => 'ᄣ', + 12662 => 'ᄧ', + 12663 => 'ᄩ', + 12664 => 'ᄫ', + 12665 => 'ᄬ', + 12666 => 'ᄭ', + 12667 => 'ᄮ', + 12668 => 'ᄯ', + 12669 => 'ᄲ', + 12670 => 'ᄶ', + 12671 => 'ᅀ', + 12672 => 'ᅇ', + 12673 => 'ᅌ', + 12674 => 'ᇱ', + 12675 => 'ᇲ', + 12676 => 'ᅗ', + 12677 => 'ᅘ', + 12678 => 'ᅙ', + 12679 => 'ᆄ', + 12680 => 'ᆅ', + 12681 => 'ᆈ', + 12682 => 'ᆑ', + 12683 => 'ᆒ', + 12684 => 'ᆔ', + 12685 => 'ᆞ', + 12686 => 'ᆡ', + 12690 => '一', + 12691 => '二', + 12692 => '三', + 12693 => '四', + 12694 => '上', + 12695 => '中', + 12696 => '下', + 12697 => '甲', + 12698 => '乙', + 12699 => '丙', + 12700 => '丁', + 12701 => '天', + 12702 => '地', + 12703 => '人', + 12868 => '問', + 12869 => '幼', + 12870 => '文', + 12871 => '箏', + 12880 => 'pte', + 12881 => '21', + 12882 => '22', + 12883 => '23', + 12884 => '24', + 12885 => '25', + 12886 => '26', + 12887 => '27', + 12888 => '28', + 12889 => '29', + 12890 => '30', + 12891 => '31', + 12892 => '32', + 12893 => '33', + 12894 => '34', + 12895 => '35', + 12896 => 'ᄀ', + 12897 => 'ᄂ', + 12898 => 'ᄃ', + 12899 => 'ᄅ', + 12900 => 'ᄆ', + 12901 => 'ᄇ', + 12902 => 'ᄉ', + 12903 => 'ᄋ', + 12904 => 'ᄌ', + 12905 => 'ᄎ', + 12906 => 'ᄏ', + 12907 => 'ᄐ', + 12908 => 'ᄑ', + 12909 => 'ᄒ', + 12910 => '가', + 12911 => '나', + 12912 => '다', + 12913 => '라', + 12914 => '마', + 12915 => '바', + 12916 => '사', + 12917 => '아', + 12918 => '자', + 12919 => '차', + 12920 => '카', + 12921 => '타', + 12922 => '파', + 12923 => '하', + 12924 => '참고', + 12925 => '주의', + 12926 => '우', + 12928 => '一', + 12929 => '二', + 12930 => '三', + 12931 => '四', + 12932 => '五', + 12933 => '六', + 12934 => '七', + 12935 => '八', + 12936 => '九', + 12937 => '十', + 12938 => '月', + 12939 => '火', + 12940 => '水', + 12941 => '木', + 12942 => '金', + 12943 => '土', + 12944 => '日', + 12945 => '株', + 12946 => '有', + 12947 => '社', + 12948 => '名', + 12949 => '特', + 12950 => '財', + 12951 => '祝', + 12952 => '労', + 12953 => '秘', + 12954 => '男', + 12955 => '女', + 12956 => '適', + 12957 => '優', + 12958 => '印', + 12959 => '注', + 12960 => '項', + 12961 => '休', + 12962 => '写', + 12963 => '正', + 12964 => '上', + 12965 => '中', + 12966 => '下', + 12967 => '左', + 12968 => '右', + 12969 => '医', + 12970 => '宗', + 12971 => '学', + 12972 => '監', + 12973 => '企', + 12974 => '資', + 12975 => '協', + 12976 => '夜', + 12977 => '36', + 12978 => '37', + 12979 => '38', + 12980 => '39', + 12981 => '40', + 12982 => '41', + 12983 => '42', + 12984 => '43', + 12985 => '44', + 12986 => '45', + 12987 => '46', + 12988 => '47', + 12989 => '48', + 12990 => '49', + 12991 => '50', + 12992 => '1月', + 12993 => '2月', + 12994 => '3月', + 12995 => '4月', + 12996 => '5月', + 12997 => '6月', + 12998 => '7月', + 12999 => '8月', + 13000 => '9月', + 13001 => '10月', + 13002 => '11月', + 13003 => '12月', + 13004 => 'hg', + 13005 => 'erg', + 13006 => 'ev', + 13007 => 'ltd', + 13008 => 'ア', + 13009 => 'イ', + 13010 => 'ウ', + 13011 => 'エ', + 13012 => 'オ', + 13013 => 'カ', + 13014 => 'キ', + 13015 => 'ク', + 13016 => 'ケ', + 13017 => 'コ', + 13018 => 'サ', + 13019 => 'シ', + 13020 => 'ス', + 13021 => 'セ', + 13022 => 'ソ', + 13023 => 'タ', + 13024 => 'チ', + 13025 => 'ツ', + 13026 => 'テ', + 13027 => 'ト', + 13028 => 'ナ', + 13029 => 'ニ', + 13030 => 'ヌ', + 13031 => 'ネ', + 13032 => 'ノ', + 13033 => 'ハ', + 13034 => 'ヒ', + 13035 => 'フ', + 13036 => 'ヘ', + 13037 => 'ホ', + 13038 => 'マ', + 13039 => 'ミ', + 13040 => 'ム', + 13041 => 'メ', + 13042 => 'モ', + 13043 => 'ヤ', + 13044 => 'ユ', + 13045 => 'ヨ', + 13046 => 'ラ', + 13047 => 'リ', + 13048 => 'ル', + 13049 => 'レ', + 13050 => 'ロ', + 13051 => 'ワ', + 13052 => 'ヰ', + 13053 => 'ヱ', + 13054 => 'ヲ', + 13055 => '令和', + 13056 => 'アパート', + 13057 => 'アルファ', + 13058 => 'アンペア', + 13059 => 'アール', + 13060 => 'イニング', + 13061 => 'インチ', + 13062 => 'ウォン', + 13063 => 'エスクード', + 13064 => 'エーカー', + 13065 => 'オンス', + 13066 => 'オーム', + 13067 => 'カイリ', + 13068 => 'カラット', + 13069 => 'カロリー', + 13070 => 'ガロン', + 13071 => 'ガンマ', + 13072 => 'ギガ', + 13073 => 'ギニー', + 13074 => 'キュリー', + 13075 => 'ギルダー', + 13076 => 'キロ', + 13077 => 'キログラム', + 13078 => 'キロメートル', + 13079 => 'キロワット', + 13080 => 'グラム', + 13081 => 'グラムトン', + 13082 => 'クルゼイロ', + 13083 => 'クローネ', + 13084 => 'ケース', + 13085 => 'コルナ', + 13086 => 'コーポ', + 13087 => 'サイクル', + 13088 => 'サンチーム', + 13089 => 'シリング', + 13090 => 'センチ', + 13091 => 'セント', + 13092 => 'ダース', + 13093 => 'デシ', + 13094 => 'ドル', + 13095 => 'トン', + 13096 => 'ナノ', + 13097 => 'ノット', + 13098 => 'ハイツ', + 13099 => 'パーセント', + 13100 => 'パーツ', + 13101 => 'バーレル', + 13102 => 'ピアストル', + 13103 => 'ピクル', + 13104 => 'ピコ', + 13105 => 'ビル', + 13106 => 'ファラッド', + 13107 => 'フィート', + 13108 => 'ブッシェル', + 13109 => 'フラン', + 13110 => 'ヘクタール', + 13111 => 'ペソ', + 13112 => 'ペニヒ', + 13113 => 'ヘルツ', + 13114 => 'ペンス', + 13115 => 'ページ', + 13116 => 'ベータ', + 13117 => 'ポイント', + 13118 => 'ボルト', + 13119 => 'ホン', + 13120 => 'ポンド', + 13121 => 'ホール', + 13122 => 'ホーン', + 13123 => 'マイクロ', + 13124 => 'マイル', + 13125 => 'マッハ', + 13126 => 'マルク', + 13127 => 'マンション', + 13128 => 'ミクロン', + 13129 => 'ミリ', + 13130 => 'ミリバール', + 13131 => 'メガ', + 13132 => 'メガトン', + 13133 => 'メートル', + 13134 => 'ヤード', + 13135 => 'ヤール', + 13136 => 'ユアン', + 13137 => 'リットル', + 13138 => 'リラ', + 13139 => 'ルピー', + 13140 => 'ルーブル', + 13141 => 'レム', + 13142 => 'レントゲン', + 13143 => 'ワット', + 13144 => '0点', + 13145 => '1点', + 13146 => '2点', + 13147 => '3点', + 13148 => '4点', + 13149 => '5点', + 13150 => '6点', + 13151 => '7点', + 13152 => '8点', + 13153 => '9点', + 13154 => '10点', + 13155 => '11点', + 13156 => '12点', + 13157 => '13点', + 13158 => '14点', + 13159 => '15点', + 13160 => '16点', + 13161 => '17点', + 13162 => '18点', + 13163 => '19点', + 13164 => '20点', + 13165 => '21点', + 13166 => '22点', + 13167 => '23点', + 13168 => '24点', + 13169 => 'hpa', + 13170 => 'da', + 13171 => 'au', + 13172 => 'bar', + 13173 => 'ov', + 13174 => 'pc', + 13175 => 'dm', + 13176 => 'dm2', + 13177 => 'dm3', + 13178 => 'iu', + 13179 => '平成', + 13180 => '昭和', + 13181 => '大正', + 13182 => '明治', + 13183 => '株式会社', + 13184 => 'pa', + 13185 => 'na', + 13186 => 'μa', + 13187 => 'ma', + 13188 => 'ka', + 13189 => 'kb', + 13190 => 'mb', + 13191 => 'gb', + 13192 => 'cal', + 13193 => 'kcal', + 13194 => 'pf', + 13195 => 'nf', + 13196 => 'μf', + 13197 => 'μg', + 13198 => 'mg', + 13199 => 'kg', + 13200 => 'hz', + 13201 => 'khz', + 13202 => 'mhz', + 13203 => 'ghz', + 13204 => 'thz', + 13205 => 'μl', + 13206 => 'ml', + 13207 => 'dl', + 13208 => 'kl', + 13209 => 'fm', + 13210 => 'nm', + 13211 => 'μm', + 13212 => 'mm', + 13213 => 'cm', + 13214 => 'km', + 13215 => 'mm2', + 13216 => 'cm2', + 13217 => 'm2', + 13218 => 'km2', + 13219 => 'mm3', + 13220 => 'cm3', + 13221 => 'm3', + 13222 => 'km3', + 13223 => 'm∕s', + 13224 => 'm∕s2', + 13225 => 'pa', + 13226 => 'kpa', + 13227 => 'mpa', + 13228 => 'gpa', + 13229 => 'rad', + 13230 => 'rad∕s', + 13231 => 'rad∕s2', + 13232 => 'ps', + 13233 => 'ns', + 13234 => 'μs', + 13235 => 'ms', + 13236 => 'pv', + 13237 => 'nv', + 13238 => 'μv', + 13239 => 'mv', + 13240 => 'kv', + 13241 => 'mv', + 13242 => 'pw', + 13243 => 'nw', + 13244 => 'μw', + 13245 => 'mw', + 13246 => 'kw', + 13247 => 'mw', + 13248 => 'kω', + 13249 => 'mω', + 13251 => 'bq', + 13252 => 'cc', + 13253 => 'cd', + 13254 => 'c∕kg', + 13256 => 'db', + 13257 => 'gy', + 13258 => 'ha', + 13259 => 'hp', + 13260 => 'in', + 13261 => 'kk', + 13262 => 'km', + 13263 => 'kt', + 13264 => 'lm', + 13265 => 'ln', + 13266 => 'log', + 13267 => 'lx', + 13268 => 'mb', + 13269 => 'mil', + 13270 => 'mol', + 13271 => 'ph', + 13273 => 'ppm', + 13274 => 'pr', + 13275 => 'sr', + 13276 => 'sv', + 13277 => 'wb', + 13278 => 'v∕m', + 13279 => 'a∕m', + 13280 => '1日', + 13281 => '2日', + 13282 => '3日', + 13283 => '4日', + 13284 => '5日', + 13285 => '6日', + 13286 => '7日', + 13287 => '8日', + 13288 => '9日', + 13289 => '10日', + 13290 => '11日', + 13291 => '12日', + 13292 => '13日', + 13293 => '14日', + 13294 => '15日', + 13295 => '16日', + 13296 => '17日', + 13297 => '18日', + 13298 => '19日', + 13299 => '20日', + 13300 => '21日', + 13301 => '22日', + 13302 => '23日', + 13303 => '24日', + 13304 => '25日', + 13305 => '26日', + 13306 => '27日', + 13307 => '28日', + 13308 => '29日', + 13309 => '30日', + 13310 => '31日', + 13311 => 'gal', + 42560 => 'ꙁ', + 42562 => 'ꙃ', + 42564 => 'ꙅ', + 42566 => 'ꙇ', + 42568 => 'ꙉ', + 42570 => 'ꙋ', + 42572 => 'ꙍ', + 42574 => 'ꙏ', + 42576 => 'ꙑ', + 42578 => 'ꙓ', + 42580 => 'ꙕ', + 42582 => 'ꙗ', + 42584 => 'ꙙ', + 42586 => 'ꙛ', + 42588 => 'ꙝ', + 42590 => 'ꙟ', + 42592 => 'ꙡ', + 42594 => 'ꙣ', + 42596 => 'ꙥ', + 42598 => 'ꙧ', + 42600 => 'ꙩ', + 42602 => 'ꙫ', + 42604 => 'ꙭ', + 42624 => 'ꚁ', + 42626 => 'ꚃ', + 42628 => 'ꚅ', + 42630 => 'ꚇ', + 42632 => 'ꚉ', + 42634 => 'ꚋ', + 42636 => 'ꚍ', + 42638 => 'ꚏ', + 42640 => 'ꚑ', + 42642 => 'ꚓ', + 42644 => 'ꚕ', + 42646 => 'ꚗ', + 42648 => 'ꚙ', + 42650 => 'ꚛ', + 42652 => 'ъ', + 42653 => 'ь', + 42786 => 'ꜣ', + 42788 => 'ꜥ', + 42790 => 'ꜧ', + 42792 => 'ꜩ', + 42794 => 'ꜫ', + 42796 => 'ꜭ', + 42798 => 'ꜯ', + 42802 => 'ꜳ', + 42804 => 'ꜵ', + 42806 => 'ꜷ', + 42808 => 'ꜹ', + 42810 => 'ꜻ', + 42812 => 'ꜽ', + 42814 => 'ꜿ', + 42816 => 'ꝁ', + 42818 => 'ꝃ', + 42820 => 'ꝅ', + 42822 => 'ꝇ', + 42824 => 'ꝉ', + 42826 => 'ꝋ', + 42828 => 'ꝍ', + 42830 => 'ꝏ', + 42832 => 'ꝑ', + 42834 => 'ꝓ', + 42836 => 'ꝕ', + 42838 => 'ꝗ', + 42840 => 'ꝙ', + 42842 => 'ꝛ', + 42844 => 'ꝝ', + 42846 => 'ꝟ', + 42848 => 'ꝡ', + 42850 => 'ꝣ', + 42852 => 'ꝥ', + 42854 => 'ꝧ', + 42856 => 'ꝩ', + 42858 => 'ꝫ', + 42860 => 'ꝭ', + 42862 => 'ꝯ', + 42864 => 'ꝯ', + 42873 => 'ꝺ', + 42875 => 'ꝼ', + 42877 => 'ᵹ', + 42878 => 'ꝿ', + 42880 => 'ꞁ', + 42882 => 'ꞃ', + 42884 => 'ꞅ', + 42886 => 'ꞇ', + 42891 => 'ꞌ', + 42893 => 'ɥ', + 42896 => 'ꞑ', + 42898 => 'ꞓ', + 42902 => 'ꞗ', + 42904 => 'ꞙ', + 42906 => 'ꞛ', + 42908 => 'ꞝ', + 42910 => 'ꞟ', + 42912 => 'ꞡ', + 42914 => 'ꞣ', + 42916 => 'ꞥ', + 42918 => 'ꞧ', + 42920 => 'ꞩ', + 42922 => 'ɦ', + 42923 => 'ɜ', + 42924 => 'ɡ', + 42925 => 'ɬ', + 42926 => 'ɪ', + 42928 => 'ʞ', + 42929 => 'ʇ', + 42930 => 'ʝ', + 42931 => 'ꭓ', + 42932 => 'ꞵ', + 42934 => 'ꞷ', + 42936 => 'ꞹ', + 42938 => 'ꞻ', + 42940 => 'ꞽ', + 42942 => 'ꞿ', + 42946 => 'ꟃ', + 42948 => 'ꞔ', + 42949 => 'ʂ', + 42950 => 'ᶎ', + 42951 => 'ꟈ', + 42953 => 'ꟊ', + 42997 => 'ꟶ', + 43000 => 'ħ', + 43001 => 'œ', + 43868 => 'ꜧ', + 43869 => 'ꬷ', + 43870 => 'ɫ', + 43871 => 'ꭒ', + 43881 => 'ʍ', + 43888 => 'Ꭰ', + 43889 => 'Ꭱ', + 43890 => 'Ꭲ', + 43891 => 'Ꭳ', + 43892 => 'Ꭴ', + 43893 => 'Ꭵ', + 43894 => 'Ꭶ', + 43895 => 'Ꭷ', + 43896 => 'Ꭸ', + 43897 => 'Ꭹ', + 43898 => 'Ꭺ', + 43899 => 'Ꭻ', + 43900 => 'Ꭼ', + 43901 => 'Ꭽ', + 43902 => 'Ꭾ', + 43903 => 'Ꭿ', + 43904 => 'Ꮀ', + 43905 => 'Ꮁ', + 43906 => 'Ꮂ', + 43907 => 'Ꮃ', + 43908 => 'Ꮄ', + 43909 => 'Ꮅ', + 43910 => 'Ꮆ', + 43911 => 'Ꮇ', + 43912 => 'Ꮈ', + 43913 => 'Ꮉ', + 43914 => 'Ꮊ', + 43915 => 'Ꮋ', + 43916 => 'Ꮌ', + 43917 => 'Ꮍ', + 43918 => 'Ꮎ', + 43919 => 'Ꮏ', + 43920 => 'Ꮐ', + 43921 => 'Ꮑ', + 43922 => 'Ꮒ', + 43923 => 'Ꮓ', + 43924 => 'Ꮔ', + 43925 => 'Ꮕ', + 43926 => 'Ꮖ', + 43927 => 'Ꮗ', + 43928 => 'Ꮘ', + 43929 => 'Ꮙ', + 43930 => 'Ꮚ', + 43931 => 'Ꮛ', + 43932 => 'Ꮜ', + 43933 => 'Ꮝ', + 43934 => 'Ꮞ', + 43935 => 'Ꮟ', + 43936 => 'Ꮠ', + 43937 => 'Ꮡ', + 43938 => 'Ꮢ', + 43939 => 'Ꮣ', + 43940 => 'Ꮤ', + 43941 => 'Ꮥ', + 43942 => 'Ꮦ', + 43943 => 'Ꮧ', + 43944 => 'Ꮨ', + 43945 => 'Ꮩ', + 43946 => 'Ꮪ', + 43947 => 'Ꮫ', + 43948 => 'Ꮬ', + 43949 => 'Ꮭ', + 43950 => 'Ꮮ', + 43951 => 'Ꮯ', + 43952 => 'Ꮰ', + 43953 => 'Ꮱ', + 43954 => 'Ꮲ', + 43955 => 'Ꮳ', + 43956 => 'Ꮴ', + 43957 => 'Ꮵ', + 43958 => 'Ꮶ', + 43959 => 'Ꮷ', + 43960 => 'Ꮸ', + 43961 => 'Ꮹ', + 43962 => 'Ꮺ', + 43963 => 'Ꮻ', + 43964 => 'Ꮼ', + 43965 => 'Ꮽ', + 43966 => 'Ꮾ', + 43967 => 'Ꮿ', + 63744 => '豈', + 63745 => '更', + 63746 => '車', + 63747 => '賈', + 63748 => '滑', + 63749 => '串', + 63750 => '句', + 63751 => '龜', + 63752 => '龜', + 63753 => '契', + 63754 => '金', + 63755 => '喇', + 63756 => '奈', + 63757 => '懶', + 63758 => '癩', + 63759 => '羅', + 63760 => '蘿', + 63761 => '螺', + 63762 => '裸', + 63763 => '邏', + 63764 => '樂', + 63765 => '洛', + 63766 => '烙', + 63767 => '珞', + 63768 => '落', + 63769 => '酪', + 63770 => '駱', + 63771 => '亂', + 63772 => '卵', + 63773 => '欄', + 63774 => '爛', + 63775 => '蘭', + 63776 => '鸞', + 63777 => '嵐', + 63778 => '濫', + 63779 => '藍', + 63780 => '襤', + 63781 => '拉', + 63782 => '臘', + 63783 => '蠟', + 63784 => '廊', + 63785 => '朗', + 63786 => '浪', + 63787 => '狼', + 63788 => '郎', + 63789 => '來', + 63790 => '冷', + 63791 => '勞', + 63792 => '擄', + 63793 => '櫓', + 63794 => '爐', + 63795 => '盧', + 63796 => '老', + 63797 => '蘆', + 63798 => '虜', + 63799 => '路', + 63800 => '露', + 63801 => '魯', + 63802 => '鷺', + 63803 => '碌', + 63804 => '祿', + 63805 => '綠', + 63806 => '菉', + 63807 => '錄', + 63808 => '鹿', + 63809 => '論', + 63810 => '壟', + 63811 => '弄', + 63812 => '籠', + 63813 => '聾', + 63814 => '牢', + 63815 => '磊', + 63816 => '賂', + 63817 => '雷', + 63818 => '壘', + 63819 => '屢', + 63820 => '樓', + 63821 => '淚', + 63822 => '漏', + 63823 => '累', + 63824 => '縷', + 63825 => '陋', + 63826 => '勒', + 63827 => '肋', + 63828 => '凜', + 63829 => '凌', + 63830 => '稜', + 63831 => '綾', + 63832 => '菱', + 63833 => '陵', + 63834 => '讀', + 63835 => '拏', + 63836 => '樂', + 63837 => '諾', + 63838 => '丹', + 63839 => '寧', + 63840 => '怒', + 63841 => '率', + 63842 => '異', + 63843 => '北', + 63844 => '磻', + 63845 => '便', + 63846 => '復', + 63847 => '不', + 63848 => '泌', + 63849 => '數', + 63850 => '索', + 63851 => '參', + 63852 => '塞', + 63853 => '省', + 63854 => '葉', + 63855 => '說', + 63856 => '殺', + 63857 => '辰', + 63858 => '沈', + 63859 => '拾', + 63860 => '若', + 63861 => '掠', + 63862 => '略', + 63863 => '亮', + 63864 => '兩', + 63865 => '凉', + 63866 => '梁', + 63867 => '糧', + 63868 => '良', + 63869 => '諒', + 63870 => '量', + 63871 => '勵', + 63872 => '呂', + 63873 => '女', + 63874 => '廬', + 63875 => '旅', + 63876 => '濾', + 63877 => '礪', + 63878 => '閭', + 63879 => '驪', + 63880 => '麗', + 63881 => '黎', + 63882 => '力', + 63883 => '曆', + 63884 => '歷', + 63885 => '轢', + 63886 => '年', + 63887 => '憐', + 63888 => '戀', + 63889 => '撚', + 63890 => '漣', + 63891 => '煉', + 63892 => '璉', + 63893 => '秊', + 63894 => '練', + 63895 => '聯', + 63896 => '輦', + 63897 => '蓮', + 63898 => '連', + 63899 => '鍊', + 63900 => '列', + 63901 => '劣', + 63902 => '咽', + 63903 => '烈', + 63904 => '裂', + 63905 => '說', + 63906 => '廉', + 63907 => '念', + 63908 => '捻', + 63909 => '殮', + 63910 => '簾', + 63911 => '獵', + 63912 => '令', + 63913 => '囹', + 63914 => '寧', + 63915 => '嶺', + 63916 => '怜', + 63917 => '玲', + 63918 => '瑩', + 63919 => '羚', + 63920 => '聆', + 63921 => '鈴', + 63922 => '零', + 63923 => '靈', + 63924 => '領', + 63925 => '例', + 63926 => '禮', + 63927 => '醴', + 63928 => '隸', + 63929 => '惡', + 63930 => '了', + 63931 => '僚', + 63932 => '寮', + 63933 => '尿', + 63934 => '料', + 63935 => '樂', + 63936 => '燎', + 63937 => '療', + 63938 => '蓼', + 63939 => '遼', + 63940 => '龍', + 63941 => '暈', + 63942 => '阮', + 63943 => '劉', + 63944 => '杻', + 63945 => '柳', + 63946 => '流', + 63947 => '溜', + 63948 => '琉', + 63949 => '留', + 63950 => '硫', + 63951 => '紐', + 63952 => '類', + 63953 => '六', + 63954 => '戮', + 63955 => '陸', + 63956 => '倫', + 63957 => '崙', + 63958 => '淪', + 63959 => '輪', + 63960 => '律', + 63961 => '慄', + 63962 => '栗', + 63963 => '率', + 63964 => '隆', + 63965 => '利', + 63966 => '吏', + 63967 => '履', + 63968 => '易', + 63969 => '李', + 63970 => '梨', + 63971 => '泥', + 63972 => '理', + 63973 => '痢', + 63974 => '罹', + 63975 => '裏', + 63976 => '裡', + 63977 => '里', + 63978 => '離', + 63979 => '匿', + 63980 => '溺', + 63981 => '吝', + 63982 => '燐', + 63983 => '璘', + 63984 => '藺', + 63985 => '隣', + 63986 => '鱗', + 63987 => '麟', + 63988 => '林', + 63989 => '淋', + 63990 => '臨', + 63991 => '立', + 63992 => '笠', + 63993 => '粒', + 63994 => '狀', + 63995 => '炙', + 63996 => '識', + 63997 => '什', + 63998 => '茶', + 63999 => '刺', + 64000 => '切', + 64001 => '度', + 64002 => '拓', + 64003 => '糖', + 64004 => '宅', + 64005 => '洞', + 64006 => '暴', + 64007 => '輻', + 64008 => '行', + 64009 => '降', + 64010 => '見', + 64011 => '廓', + 64012 => '兀', + 64013 => '嗀', + 64016 => '塚', + 64018 => '晴', + 64021 => '凞', + 64022 => '猪', + 64023 => '益', + 64024 => '礼', + 64025 => '神', + 64026 => '祥', + 64027 => '福', + 64028 => '靖', + 64029 => '精', + 64030 => '羽', + 64032 => '蘒', + 64034 => '諸', + 64037 => '逸', + 64038 => '都', + 64042 => '飯', + 64043 => '飼', + 64044 => '館', + 64045 => '鶴', + 64046 => '郞', + 64047 => '隷', + 64048 => '侮', + 64049 => '僧', + 64050 => '免', + 64051 => '勉', + 64052 => '勤', + 64053 => '卑', + 64054 => '喝', + 64055 => '嘆', + 64056 => '器', + 64057 => '塀', + 64058 => '墨', + 64059 => '層', + 64060 => '屮', + 64061 => '悔', + 64062 => '慨', + 64063 => '憎', + 64064 => '懲', + 64065 => '敏', + 64066 => '既', + 64067 => '暑', + 64068 => '梅', + 64069 => '海', + 64070 => '渚', + 64071 => '漢', + 64072 => '煮', + 64073 => '爫', + 64074 => '琢', + 64075 => '碑', + 64076 => '社', + 64077 => '祉', + 64078 => '祈', + 64079 => '祐', + 64080 => '祖', + 64081 => '祝', + 64082 => '禍', + 64083 => '禎', + 64084 => '穀', + 64085 => '突', + 64086 => '節', + 64087 => '練', + 64088 => '縉', + 64089 => '繁', + 64090 => '署', + 64091 => '者', + 64092 => '臭', + 64093 => '艹', + 64094 => '艹', + 64095 => '著', + 64096 => '褐', + 64097 => '視', + 64098 => '謁', + 64099 => '謹', + 64100 => '賓', + 64101 => '贈', + 64102 => '辶', + 64103 => '逸', + 64104 => '難', + 64105 => '響', + 64106 => '頻', + 64107 => '恵', + 64108 => '𤋮', + 64109 => '舘', + 64112 => '並', + 64113 => '况', + 64114 => '全', + 64115 => '侀', + 64116 => '充', + 64117 => '冀', + 64118 => '勇', + 64119 => '勺', + 64120 => '喝', + 64121 => '啕', + 64122 => '喙', + 64123 => '嗢', + 64124 => '塚', + 64125 => '墳', + 64126 => '奄', + 64127 => '奔', + 64128 => '婢', + 64129 => '嬨', + 64130 => '廒', + 64131 => '廙', + 64132 => '彩', + 64133 => '徭', + 64134 => '惘', + 64135 => '慎', + 64136 => '愈', + 64137 => '憎', + 64138 => '慠', + 64139 => '懲', + 64140 => '戴', + 64141 => '揄', + 64142 => '搜', + 64143 => '摒', + 64144 => '敖', + 64145 => '晴', + 64146 => '朗', + 64147 => '望', + 64148 => '杖', + 64149 => '歹', + 64150 => '殺', + 64151 => '流', + 64152 => '滛', + 64153 => '滋', + 64154 => '漢', + 64155 => '瀞', + 64156 => '煮', + 64157 => '瞧', + 64158 => '爵', + 64159 => '犯', + 64160 => '猪', + 64161 => '瑱', + 64162 => '甆', + 64163 => '画', + 64164 => '瘝', + 64165 => '瘟', + 64166 => '益', + 64167 => '盛', + 64168 => '直', + 64169 => '睊', + 64170 => '着', + 64171 => '磌', + 64172 => '窱', + 64173 => '節', + 64174 => '类', + 64175 => '絛', + 64176 => '練', + 64177 => '缾', + 64178 => '者', + 64179 => '荒', + 64180 => '華', + 64181 => '蝹', + 64182 => '襁', + 64183 => '覆', + 64184 => '視', + 64185 => '調', + 64186 => '諸', + 64187 => '請', + 64188 => '謁', + 64189 => '諾', + 64190 => '諭', + 64191 => '謹', + 64192 => '變', + 64193 => '贈', + 64194 => '輸', + 64195 => '遲', + 64196 => '醙', + 64197 => '鉶', + 64198 => '陼', + 64199 => '難', + 64200 => '靖', + 64201 => '韛', + 64202 => '響', + 64203 => '頋', + 64204 => '頻', + 64205 => '鬒', + 64206 => '龜', + 64207 => '𢡊', + 64208 => '𢡄', + 64209 => '𣏕', + 64210 => '㮝', + 64211 => '䀘', + 64212 => '䀹', + 64213 => '𥉉', + 64214 => '𥳐', + 64215 => '𧻓', + 64216 => '齃', + 64217 => '龎', + 64256 => 'ff', + 64257 => 'fi', + 64258 => 'fl', + 64259 => 'ffi', + 64260 => 'ffl', + 64261 => 'st', + 64262 => 'st', + 64275 => 'մն', + 64276 => 'մե', + 64277 => 'մի', + 64278 => 'վն', + 64279 => 'մխ', + 64285 => 'יִ', + 64287 => 'ײַ', + 64288 => 'ע', + 64289 => 'א', + 64290 => 'ד', + 64291 => 'ה', + 64292 => 'כ', + 64293 => 'ל', + 64294 => 'ם', + 64295 => 'ר', + 64296 => 'ת', + 64298 => 'שׁ', + 64299 => 'שׂ', + 64300 => 'שּׁ', + 64301 => 'שּׂ', + 64302 => 'אַ', + 64303 => 'אָ', + 64304 => 'אּ', + 64305 => 'בּ', + 64306 => 'גּ', + 64307 => 'דּ', + 64308 => 'הּ', + 64309 => 'וּ', + 64310 => 'זּ', + 64312 => 'טּ', + 64313 => 'יּ', + 64314 => 'ךּ', + 64315 => 'כּ', + 64316 => 'לּ', + 64318 => 'מּ', + 64320 => 'נּ', + 64321 => 'סּ', + 64323 => 'ףּ', + 64324 => 'פּ', + 64326 => 'צּ', + 64327 => 'קּ', + 64328 => 'רּ', + 64329 => 'שּ', + 64330 => 'תּ', + 64331 => 'וֹ', + 64332 => 'בֿ', + 64333 => 'כֿ', + 64334 => 'פֿ', + 64335 => 'אל', + 64336 => 'ٱ', + 64337 => 'ٱ', + 64338 => 'ٻ', + 64339 => 'ٻ', + 64340 => 'ٻ', + 64341 => 'ٻ', + 64342 => 'پ', + 64343 => 'پ', + 64344 => 'پ', + 64345 => 'پ', + 64346 => 'ڀ', + 64347 => 'ڀ', + 64348 => 'ڀ', + 64349 => 'ڀ', + 64350 => 'ٺ', + 64351 => 'ٺ', + 64352 => 'ٺ', + 64353 => 'ٺ', + 64354 => 'ٿ', + 64355 => 'ٿ', + 64356 => 'ٿ', + 64357 => 'ٿ', + 64358 => 'ٹ', + 64359 => 'ٹ', + 64360 => 'ٹ', + 64361 => 'ٹ', + 64362 => 'ڤ', + 64363 => 'ڤ', + 64364 => 'ڤ', + 64365 => 'ڤ', + 64366 => 'ڦ', + 64367 => 'ڦ', + 64368 => 'ڦ', + 64369 => 'ڦ', + 64370 => 'ڄ', + 64371 => 'ڄ', + 64372 => 'ڄ', + 64373 => 'ڄ', + 64374 => 'ڃ', + 64375 => 'ڃ', + 64376 => 'ڃ', + 64377 => 'ڃ', + 64378 => 'چ', + 64379 => 'چ', + 64380 => 'چ', + 64381 => 'چ', + 64382 => 'ڇ', + 64383 => 'ڇ', + 64384 => 'ڇ', + 64385 => 'ڇ', + 64386 => 'ڍ', + 64387 => 'ڍ', + 64388 => 'ڌ', + 64389 => 'ڌ', + 64390 => 'ڎ', + 64391 => 'ڎ', + 64392 => 'ڈ', + 64393 => 'ڈ', + 64394 => 'ژ', + 64395 => 'ژ', + 64396 => 'ڑ', + 64397 => 'ڑ', + 64398 => 'ک', + 64399 => 'ک', + 64400 => 'ک', + 64401 => 'ک', + 64402 => 'گ', + 64403 => 'گ', + 64404 => 'گ', + 64405 => 'گ', + 64406 => 'ڳ', + 64407 => 'ڳ', + 64408 => 'ڳ', + 64409 => 'ڳ', + 64410 => 'ڱ', + 64411 => 'ڱ', + 64412 => 'ڱ', + 64413 => 'ڱ', + 64414 => 'ں', + 64415 => 'ں', + 64416 => 'ڻ', + 64417 => 'ڻ', + 64418 => 'ڻ', + 64419 => 'ڻ', + 64420 => 'ۀ', + 64421 => 'ۀ', + 64422 => 'ہ', + 64423 => 'ہ', + 64424 => 'ہ', + 64425 => 'ہ', + 64426 => 'ھ', + 64427 => 'ھ', + 64428 => 'ھ', + 64429 => 'ھ', + 64430 => 'ے', + 64431 => 'ے', + 64432 => 'ۓ', + 64433 => 'ۓ', + 64467 => 'ڭ', + 64468 => 'ڭ', + 64469 => 'ڭ', + 64470 => 'ڭ', + 64471 => 'ۇ', + 64472 => 'ۇ', + 64473 => 'ۆ', + 64474 => 'ۆ', + 64475 => 'ۈ', + 64476 => 'ۈ', + 64477 => 'ۇٴ', + 64478 => 'ۋ', + 64479 => 'ۋ', + 64480 => 'ۅ', + 64481 => 'ۅ', + 64482 => 'ۉ', + 64483 => 'ۉ', + 64484 => 'ې', + 64485 => 'ې', + 64486 => 'ې', + 64487 => 'ې', + 64488 => 'ى', + 64489 => 'ى', + 64490 => 'ئا', + 64491 => 'ئا', + 64492 => 'ئە', + 64493 => 'ئە', + 64494 => 'ئو', + 64495 => 'ئو', + 64496 => 'ئۇ', + 64497 => 'ئۇ', + 64498 => 'ئۆ', + 64499 => 'ئۆ', + 64500 => 'ئۈ', + 64501 => 'ئۈ', + 64502 => 'ئې', + 64503 => 'ئې', + 64504 => 'ئې', + 64505 => 'ئى', + 64506 => 'ئى', + 64507 => 'ئى', + 64508 => 'ی', + 64509 => 'ی', + 64510 => 'ی', + 64511 => 'ی', + 64512 => 'ئج', + 64513 => 'ئح', + 64514 => 'ئم', + 64515 => 'ئى', + 64516 => 'ئي', + 64517 => 'بج', + 64518 => 'بح', + 64519 => 'بخ', + 64520 => 'بم', + 64521 => 'بى', + 64522 => 'بي', + 64523 => 'تج', + 64524 => 'تح', + 64525 => 'تخ', + 64526 => 'تم', + 64527 => 'تى', + 64528 => 'تي', + 64529 => 'ثج', + 64530 => 'ثم', + 64531 => 'ثى', + 64532 => 'ثي', + 64533 => 'جح', + 64534 => 'جم', + 64535 => 'حج', + 64536 => 'حم', + 64537 => 'خج', + 64538 => 'خح', + 64539 => 'خم', + 64540 => 'سج', + 64541 => 'سح', + 64542 => 'سخ', + 64543 => 'سم', + 64544 => 'صح', + 64545 => 'صم', + 64546 => 'ضج', + 64547 => 'ضح', + 64548 => 'ضخ', + 64549 => 'ضم', + 64550 => 'طح', + 64551 => 'طم', + 64552 => 'ظم', + 64553 => 'عج', + 64554 => 'عم', + 64555 => 'غج', + 64556 => 'غم', + 64557 => 'فج', + 64558 => 'فح', + 64559 => 'فخ', + 64560 => 'فم', + 64561 => 'فى', + 64562 => 'في', + 64563 => 'قح', + 64564 => 'قم', + 64565 => 'قى', + 64566 => 'قي', + 64567 => 'كا', + 64568 => 'كج', + 64569 => 'كح', + 64570 => 'كخ', + 64571 => 'كل', + 64572 => 'كم', + 64573 => 'كى', + 64574 => 'كي', + 64575 => 'لج', + 64576 => 'لح', + 64577 => 'لخ', + 64578 => 'لم', + 64579 => 'لى', + 64580 => 'لي', + 64581 => 'مج', + 64582 => 'مح', + 64583 => 'مخ', + 64584 => 'مم', + 64585 => 'مى', + 64586 => 'مي', + 64587 => 'نج', + 64588 => 'نح', + 64589 => 'نخ', + 64590 => 'نم', + 64591 => 'نى', + 64592 => 'ني', + 64593 => 'هج', + 64594 => 'هم', + 64595 => 'هى', + 64596 => 'هي', + 64597 => 'يج', + 64598 => 'يح', + 64599 => 'يخ', + 64600 => 'يم', + 64601 => 'يى', + 64602 => 'يي', + 64603 => 'ذٰ', + 64604 => 'رٰ', + 64605 => 'ىٰ', + 64612 => 'ئر', + 64613 => 'ئز', + 64614 => 'ئم', + 64615 => 'ئن', + 64616 => 'ئى', + 64617 => 'ئي', + 64618 => 'بر', + 64619 => 'بز', + 64620 => 'بم', + 64621 => 'بن', + 64622 => 'بى', + 64623 => 'بي', + 64624 => 'تر', + 64625 => 'تز', + 64626 => 'تم', + 64627 => 'تن', + 64628 => 'تى', + 64629 => 'تي', + 64630 => 'ثر', + 64631 => 'ثز', + 64632 => 'ثم', + 64633 => 'ثن', + 64634 => 'ثى', + 64635 => 'ثي', + 64636 => 'فى', + 64637 => 'في', + 64638 => 'قى', + 64639 => 'قي', + 64640 => 'كا', + 64641 => 'كل', + 64642 => 'كم', + 64643 => 'كى', + 64644 => 'كي', + 64645 => 'لم', + 64646 => 'لى', + 64647 => 'لي', + 64648 => 'ما', + 64649 => 'مم', + 64650 => 'نر', + 64651 => 'نز', + 64652 => 'نم', + 64653 => 'نن', + 64654 => 'نى', + 64655 => 'ني', + 64656 => 'ىٰ', + 64657 => 'ير', + 64658 => 'يز', + 64659 => 'يم', + 64660 => 'ين', + 64661 => 'يى', + 64662 => 'يي', + 64663 => 'ئج', + 64664 => 'ئح', + 64665 => 'ئخ', + 64666 => 'ئم', + 64667 => 'ئه', + 64668 => 'بج', + 64669 => 'بح', + 64670 => 'بخ', + 64671 => 'بم', + 64672 => 'به', + 64673 => 'تج', + 64674 => 'تح', + 64675 => 'تخ', + 64676 => 'تم', + 64677 => 'ته', + 64678 => 'ثم', + 64679 => 'جح', + 64680 => 'جم', + 64681 => 'حج', + 64682 => 'حم', + 64683 => 'خج', + 64684 => 'خم', + 64685 => 'سج', + 64686 => 'سح', + 64687 => 'سخ', + 64688 => 'سم', + 64689 => 'صح', + 64690 => 'صخ', + 64691 => 'صم', + 64692 => 'ضج', + 64693 => 'ضح', + 64694 => 'ضخ', + 64695 => 'ضم', + 64696 => 'طح', + 64697 => 'ظم', + 64698 => 'عج', + 64699 => 'عم', + 64700 => 'غج', + 64701 => 'غم', + 64702 => 'فج', + 64703 => 'فح', + 64704 => 'فخ', + 64705 => 'فم', + 64706 => 'قح', + 64707 => 'قم', + 64708 => 'كج', + 64709 => 'كح', + 64710 => 'كخ', + 64711 => 'كل', + 64712 => 'كم', + 64713 => 'لج', + 64714 => 'لح', + 64715 => 'لخ', + 64716 => 'لم', + 64717 => 'له', + 64718 => 'مج', + 64719 => 'مح', + 64720 => 'مخ', + 64721 => 'مم', + 64722 => 'نج', + 64723 => 'نح', + 64724 => 'نخ', + 64725 => 'نم', + 64726 => 'نه', + 64727 => 'هج', + 64728 => 'هم', + 64729 => 'هٰ', + 64730 => 'يج', + 64731 => 'يح', + 64732 => 'يخ', + 64733 => 'يم', + 64734 => 'يه', + 64735 => 'ئم', + 64736 => 'ئه', + 64737 => 'بم', + 64738 => 'به', + 64739 => 'تم', + 64740 => 'ته', + 64741 => 'ثم', + 64742 => 'ثه', + 64743 => 'سم', + 64744 => 'سه', + 64745 => 'شم', + 64746 => 'شه', + 64747 => 'كل', + 64748 => 'كم', + 64749 => 'لم', + 64750 => 'نم', + 64751 => 'نه', + 64752 => 'يم', + 64753 => 'يه', + 64754 => 'ـَّ', + 64755 => 'ـُّ', + 64756 => 'ـِّ', + 64757 => 'طى', + 64758 => 'طي', + 64759 => 'عى', + 64760 => 'عي', + 64761 => 'غى', + 64762 => 'غي', + 64763 => 'سى', + 64764 => 'سي', + 64765 => 'شى', + 64766 => 'شي', + 64767 => 'حى', + 64768 => 'حي', + 64769 => 'جى', + 64770 => 'جي', + 64771 => 'خى', + 64772 => 'خي', + 64773 => 'صى', + 64774 => 'صي', + 64775 => 'ضى', + 64776 => 'ضي', + 64777 => 'شج', + 64778 => 'شح', + 64779 => 'شخ', + 64780 => 'شم', + 64781 => 'شر', + 64782 => 'سر', + 64783 => 'صر', + 64784 => 'ضر', + 64785 => 'طى', + 64786 => 'طي', + 64787 => 'عى', + 64788 => 'عي', + 64789 => 'غى', + 64790 => 'غي', + 64791 => 'سى', + 64792 => 'سي', + 64793 => 'شى', + 64794 => 'شي', + 64795 => 'حى', + 64796 => 'حي', + 64797 => 'جى', + 64798 => 'جي', + 64799 => 'خى', + 64800 => 'خي', + 64801 => 'صى', + 64802 => 'صي', + 64803 => 'ضى', + 64804 => 'ضي', + 64805 => 'شج', + 64806 => 'شح', + 64807 => 'شخ', + 64808 => 'شم', + 64809 => 'شر', + 64810 => 'سر', + 64811 => 'صر', + 64812 => 'ضر', + 64813 => 'شج', + 64814 => 'شح', + 64815 => 'شخ', + 64816 => 'شم', + 64817 => 'سه', + 64818 => 'شه', + 64819 => 'طم', + 64820 => 'سج', + 64821 => 'سح', + 64822 => 'سخ', + 64823 => 'شج', + 64824 => 'شح', + 64825 => 'شخ', + 64826 => 'طم', + 64827 => 'ظم', + 64828 => 'اً', + 64829 => 'اً', + 64848 => 'تجم', + 64849 => 'تحج', + 64850 => 'تحج', + 64851 => 'تحم', + 64852 => 'تخم', + 64853 => 'تمج', + 64854 => 'تمح', + 64855 => 'تمخ', + 64856 => 'جمح', + 64857 => 'جمح', + 64858 => 'حمي', + 64859 => 'حمى', + 64860 => 'سحج', + 64861 => 'سجح', + 64862 => 'سجى', + 64863 => 'سمح', + 64864 => 'سمح', + 64865 => 'سمج', + 64866 => 'سمم', + 64867 => 'سمم', + 64868 => 'صحح', + 64869 => 'صحح', + 64870 => 'صمم', + 64871 => 'شحم', + 64872 => 'شحم', + 64873 => 'شجي', + 64874 => 'شمخ', + 64875 => 'شمخ', + 64876 => 'شمم', + 64877 => 'شمم', + 64878 => 'ضحى', + 64879 => 'ضخم', + 64880 => 'ضخم', + 64881 => 'طمح', + 64882 => 'طمح', + 64883 => 'طمم', + 64884 => 'طمي', + 64885 => 'عجم', + 64886 => 'عمم', + 64887 => 'عمم', + 64888 => 'عمى', + 64889 => 'غمم', + 64890 => 'غمي', + 64891 => 'غمى', + 64892 => 'فخم', + 64893 => 'فخم', + 64894 => 'قمح', + 64895 => 'قمم', + 64896 => 'لحم', + 64897 => 'لحي', + 64898 => 'لحى', + 64899 => 'لجج', + 64900 => 'لجج', + 64901 => 'لخم', + 64902 => 'لخم', + 64903 => 'لمح', + 64904 => 'لمح', + 64905 => 'محج', + 64906 => 'محم', + 64907 => 'محي', + 64908 => 'مجح', + 64909 => 'مجم', + 64910 => 'مخج', + 64911 => 'مخم', + 64914 => 'مجخ', + 64915 => 'همج', + 64916 => 'همم', + 64917 => 'نحم', + 64918 => 'نحى', + 64919 => 'نجم', + 64920 => 'نجم', + 64921 => 'نجى', + 64922 => 'نمي', + 64923 => 'نمى', + 64924 => 'يمم', + 64925 => 'يمم', + 64926 => 'بخي', + 64927 => 'تجي', + 64928 => 'تجى', + 64929 => 'تخي', + 64930 => 'تخى', + 64931 => 'تمي', + 64932 => 'تمى', + 64933 => 'جمي', + 64934 => 'جحى', + 64935 => 'جمى', + 64936 => 'سخى', + 64937 => 'صحي', + 64938 => 'شحي', + 64939 => 'ضحي', + 64940 => 'لجي', + 64941 => 'لمي', + 64942 => 'يحي', + 64943 => 'يجي', + 64944 => 'يمي', + 64945 => 'ممي', + 64946 => 'قمي', + 64947 => 'نحي', + 64948 => 'قمح', + 64949 => 'لحم', + 64950 => 'عمي', + 64951 => 'كمي', + 64952 => 'نجح', + 64953 => 'مخي', + 64954 => 'لجم', + 64955 => 'كمم', + 64956 => 'لجم', + 64957 => 'نجح', + 64958 => 'جحي', + 64959 => 'حجي', + 64960 => 'مجي', + 64961 => 'فمي', + 64962 => 'بحي', + 64963 => 'كمم', + 64964 => 'عجم', + 64965 => 'صمم', + 64966 => 'سخي', + 64967 => 'نجي', + 65008 => 'صلے', + 65009 => 'قلے', + 65010 => 'الله', + 65011 => 'اكبر', + 65012 => 'محمد', + 65013 => 'صلعم', + 65014 => 'رسول', + 65015 => 'عليه', + 65016 => 'وسلم', + 65017 => 'صلى', + 65020 => 'ریال', + 65041 => '、', + 65047 => '〖', + 65048 => '〗', + 65073 => '—', + 65074 => '–', + 65081 => '〔', + 65082 => '〕', + 65083 => '【', + 65084 => '】', + 65085 => '《', + 65086 => '》', + 65087 => '〈', + 65088 => '〉', + 65089 => '「', + 65090 => '」', + 65091 => '『', + 65092 => '』', + 65105 => '、', + 65112 => '—', + 65117 => '〔', + 65118 => '〕', + 65123 => '-', + 65137 => 'ـً', + 65143 => 'ـَ', + 65145 => 'ـُ', + 65147 => 'ـِ', + 65149 => 'ـّ', + 65151 => 'ـْ', + 65152 => 'ء', + 65153 => 'آ', + 65154 => 'آ', + 65155 => 'أ', + 65156 => 'أ', + 65157 => 'ؤ', + 65158 => 'ؤ', + 65159 => 'إ', + 65160 => 'إ', + 65161 => 'ئ', + 65162 => 'ئ', + 65163 => 'ئ', + 65164 => 'ئ', + 65165 => 'ا', + 65166 => 'ا', + 65167 => 'ب', + 65168 => 'ب', + 65169 => 'ب', + 65170 => 'ب', + 65171 => 'ة', + 65172 => 'ة', + 65173 => 'ت', + 65174 => 'ت', + 65175 => 'ت', + 65176 => 'ت', + 65177 => 'ث', + 65178 => 'ث', + 65179 => 'ث', + 65180 => 'ث', + 65181 => 'ج', + 65182 => 'ج', + 65183 => 'ج', + 65184 => 'ج', + 65185 => 'ح', + 65186 => 'ح', + 65187 => 'ح', + 65188 => 'ح', + 65189 => 'خ', + 65190 => 'خ', + 65191 => 'خ', + 65192 => 'خ', + 65193 => 'د', + 65194 => 'د', + 65195 => 'ذ', + 65196 => 'ذ', + 65197 => 'ر', + 65198 => 'ر', + 65199 => 'ز', + 65200 => 'ز', + 65201 => 'س', + 65202 => 'س', + 65203 => 'س', + 65204 => 'س', + 65205 => 'ش', + 65206 => 'ش', + 65207 => 'ش', + 65208 => 'ش', + 65209 => 'ص', + 65210 => 'ص', + 65211 => 'ص', + 65212 => 'ص', + 65213 => 'ض', + 65214 => 'ض', + 65215 => 'ض', + 65216 => 'ض', + 65217 => 'ط', + 65218 => 'ط', + 65219 => 'ط', + 65220 => 'ط', + 65221 => 'ظ', + 65222 => 'ظ', + 65223 => 'ظ', + 65224 => 'ظ', + 65225 => 'ع', + 65226 => 'ع', + 65227 => 'ع', + 65228 => 'ع', + 65229 => 'غ', + 65230 => 'غ', + 65231 => 'غ', + 65232 => 'غ', + 65233 => 'ف', + 65234 => 'ف', + 65235 => 'ف', + 65236 => 'ف', + 65237 => 'ق', + 65238 => 'ق', + 65239 => 'ق', + 65240 => 'ق', + 65241 => 'ك', + 65242 => 'ك', + 65243 => 'ك', + 65244 => 'ك', + 65245 => 'ل', + 65246 => 'ل', + 65247 => 'ل', + 65248 => 'ل', + 65249 => 'م', + 65250 => 'م', + 65251 => 'م', + 65252 => 'م', + 65253 => 'ن', + 65254 => 'ن', + 65255 => 'ن', + 65256 => 'ن', + 65257 => 'ه', + 65258 => 'ه', + 65259 => 'ه', + 65260 => 'ه', + 65261 => 'و', + 65262 => 'و', + 65263 => 'ى', + 65264 => 'ى', + 65265 => 'ي', + 65266 => 'ي', + 65267 => 'ي', + 65268 => 'ي', + 65269 => 'لآ', + 65270 => 'لآ', + 65271 => 'لأ', + 65272 => 'لأ', + 65273 => 'لإ', + 65274 => 'لإ', + 65275 => 'لا', + 65276 => 'لا', + 65293 => '-', + 65294 => '.', + 65296 => '0', + 65297 => '1', + 65298 => '2', + 65299 => '3', + 65300 => '4', + 65301 => '5', + 65302 => '6', + 65303 => '7', + 65304 => '8', + 65305 => '9', + 65313 => 'a', + 65314 => 'b', + 65315 => 'c', + 65316 => 'd', + 65317 => 'e', + 65318 => 'f', + 65319 => 'g', + 65320 => 'h', + 65321 => 'i', + 65322 => 'j', + 65323 => 'k', + 65324 => 'l', + 65325 => 'm', + 65326 => 'n', + 65327 => 'o', + 65328 => 'p', + 65329 => 'q', + 65330 => 'r', + 65331 => 's', + 65332 => 't', + 65333 => 'u', + 65334 => 'v', + 65335 => 'w', + 65336 => 'x', + 65337 => 'y', + 65338 => 'z', + 65345 => 'a', + 65346 => 'b', + 65347 => 'c', + 65348 => 'd', + 65349 => 'e', + 65350 => 'f', + 65351 => 'g', + 65352 => 'h', + 65353 => 'i', + 65354 => 'j', + 65355 => 'k', + 65356 => 'l', + 65357 => 'm', + 65358 => 'n', + 65359 => 'o', + 65360 => 'p', + 65361 => 'q', + 65362 => 'r', + 65363 => 's', + 65364 => 't', + 65365 => 'u', + 65366 => 'v', + 65367 => 'w', + 65368 => 'x', + 65369 => 'y', + 65370 => 'z', + 65375 => '⦅', + 65376 => '⦆', + 65377 => '.', + 65378 => '「', + 65379 => '」', + 65380 => '、', + 65381 => '・', + 65382 => 'ヲ', + 65383 => 'ァ', + 65384 => 'ィ', + 65385 => 'ゥ', + 65386 => 'ェ', + 65387 => 'ォ', + 65388 => 'ャ', + 65389 => 'ュ', + 65390 => 'ョ', + 65391 => 'ッ', + 65392 => 'ー', + 65393 => 'ア', + 65394 => 'イ', + 65395 => 'ウ', + 65396 => 'エ', + 65397 => 'オ', + 65398 => 'カ', + 65399 => 'キ', + 65400 => 'ク', + 65401 => 'ケ', + 65402 => 'コ', + 65403 => 'サ', + 65404 => 'シ', + 65405 => 'ス', + 65406 => 'セ', + 65407 => 'ソ', + 65408 => 'タ', + 65409 => 'チ', + 65410 => 'ツ', + 65411 => 'テ', + 65412 => 'ト', + 65413 => 'ナ', + 65414 => 'ニ', + 65415 => 'ヌ', + 65416 => 'ネ', + 65417 => 'ノ', + 65418 => 'ハ', + 65419 => 'ヒ', + 65420 => 'フ', + 65421 => 'ヘ', + 65422 => 'ホ', + 65423 => 'マ', + 65424 => 'ミ', + 65425 => 'ム', + 65426 => 'メ', + 65427 => 'モ', + 65428 => 'ヤ', + 65429 => 'ユ', + 65430 => 'ヨ', + 65431 => 'ラ', + 65432 => 'リ', + 65433 => 'ル', + 65434 => 'レ', + 65435 => 'ロ', + 65436 => 'ワ', + 65437 => 'ン', + 65438 => '゙', + 65439 => '゚', + 65441 => 'ᄀ', + 65442 => 'ᄁ', + 65443 => 'ᆪ', + 65444 => 'ᄂ', + 65445 => 'ᆬ', + 65446 => 'ᆭ', + 65447 => 'ᄃ', + 65448 => 'ᄄ', + 65449 => 'ᄅ', + 65450 => 'ᆰ', + 65451 => 'ᆱ', + 65452 => 'ᆲ', + 65453 => 'ᆳ', + 65454 => 'ᆴ', + 65455 => 'ᆵ', + 65456 => 'ᄚ', + 65457 => 'ᄆ', + 65458 => 'ᄇ', + 65459 => 'ᄈ', + 65460 => 'ᄡ', + 65461 => 'ᄉ', + 65462 => 'ᄊ', + 65463 => 'ᄋ', + 65464 => 'ᄌ', + 65465 => 'ᄍ', + 65466 => 'ᄎ', + 65467 => 'ᄏ', + 65468 => 'ᄐ', + 65469 => 'ᄑ', + 65470 => 'ᄒ', + 65474 => 'ᅡ', + 65475 => 'ᅢ', + 65476 => 'ᅣ', + 65477 => 'ᅤ', + 65478 => 'ᅥ', + 65479 => 'ᅦ', + 65482 => 'ᅧ', + 65483 => 'ᅨ', + 65484 => 'ᅩ', + 65485 => 'ᅪ', + 65486 => 'ᅫ', + 65487 => 'ᅬ', + 65490 => 'ᅭ', + 65491 => 'ᅮ', + 65492 => 'ᅯ', + 65493 => 'ᅰ', + 65494 => 'ᅱ', + 65495 => 'ᅲ', + 65498 => 'ᅳ', + 65499 => 'ᅴ', + 65500 => 'ᅵ', + 65504 => '¢', + 65505 => '£', + 65506 => '¬', + 65508 => '¦', + 65509 => '¥', + 65510 => '₩', + 65512 => '│', + 65513 => '←', + 65514 => '↑', + 65515 => '→', + 65516 => '↓', + 65517 => '■', + 65518 => '○', + 66560 => '𐐨', + 66561 => '𐐩', + 66562 => '𐐪', + 66563 => '𐐫', + 66564 => '𐐬', + 66565 => '𐐭', + 66566 => '𐐮', + 66567 => '𐐯', + 66568 => '𐐰', + 66569 => '𐐱', + 66570 => '𐐲', + 66571 => '𐐳', + 66572 => '𐐴', + 66573 => '𐐵', + 66574 => '𐐶', + 66575 => '𐐷', + 66576 => '𐐸', + 66577 => '𐐹', + 66578 => '𐐺', + 66579 => '𐐻', + 66580 => '𐐼', + 66581 => '𐐽', + 66582 => '𐐾', + 66583 => '𐐿', + 66584 => '𐑀', + 66585 => '𐑁', + 66586 => '𐑂', + 66587 => '𐑃', + 66588 => '𐑄', + 66589 => '𐑅', + 66590 => '𐑆', + 66591 => '𐑇', + 66592 => '𐑈', + 66593 => '𐑉', + 66594 => '𐑊', + 66595 => '𐑋', + 66596 => '𐑌', + 66597 => '𐑍', + 66598 => '𐑎', + 66599 => '𐑏', + 66736 => '𐓘', + 66737 => '𐓙', + 66738 => '𐓚', + 66739 => '𐓛', + 66740 => '𐓜', + 66741 => '𐓝', + 66742 => '𐓞', + 66743 => '𐓟', + 66744 => '𐓠', + 66745 => '𐓡', + 66746 => '𐓢', + 66747 => '𐓣', + 66748 => '𐓤', + 66749 => '𐓥', + 66750 => '𐓦', + 66751 => '𐓧', + 66752 => '𐓨', + 66753 => '𐓩', + 66754 => '𐓪', + 66755 => '𐓫', + 66756 => '𐓬', + 66757 => '𐓭', + 66758 => '𐓮', + 66759 => '𐓯', + 66760 => '𐓰', + 66761 => '𐓱', + 66762 => '𐓲', + 66763 => '𐓳', + 66764 => '𐓴', + 66765 => '𐓵', + 66766 => '𐓶', + 66767 => '𐓷', + 66768 => '𐓸', + 66769 => '𐓹', + 66770 => '𐓺', + 66771 => '𐓻', + 68736 => '𐳀', + 68737 => '𐳁', + 68738 => '𐳂', + 68739 => '𐳃', + 68740 => '𐳄', + 68741 => '𐳅', + 68742 => '𐳆', + 68743 => '𐳇', + 68744 => '𐳈', + 68745 => '𐳉', + 68746 => '𐳊', + 68747 => '𐳋', + 68748 => '𐳌', + 68749 => '𐳍', + 68750 => '𐳎', + 68751 => '𐳏', + 68752 => '𐳐', + 68753 => '𐳑', + 68754 => '𐳒', + 68755 => '𐳓', + 68756 => '𐳔', + 68757 => '𐳕', + 68758 => '𐳖', + 68759 => '𐳗', + 68760 => '𐳘', + 68761 => '𐳙', + 68762 => '𐳚', + 68763 => '𐳛', + 68764 => '𐳜', + 68765 => '𐳝', + 68766 => '𐳞', + 68767 => '𐳟', + 68768 => '𐳠', + 68769 => '𐳡', + 68770 => '𐳢', + 68771 => '𐳣', + 68772 => '𐳤', + 68773 => '𐳥', + 68774 => '𐳦', + 68775 => '𐳧', + 68776 => '𐳨', + 68777 => '𐳩', + 68778 => '𐳪', + 68779 => '𐳫', + 68780 => '𐳬', + 68781 => '𐳭', + 68782 => '𐳮', + 68783 => '𐳯', + 68784 => '𐳰', + 68785 => '𐳱', + 68786 => '𐳲', + 71840 => '𑣀', + 71841 => '𑣁', + 71842 => '𑣂', + 71843 => '𑣃', + 71844 => '𑣄', + 71845 => '𑣅', + 71846 => '𑣆', + 71847 => '𑣇', + 71848 => '𑣈', + 71849 => '𑣉', + 71850 => '𑣊', + 71851 => '𑣋', + 71852 => '𑣌', + 71853 => '𑣍', + 71854 => '𑣎', + 71855 => '𑣏', + 71856 => '𑣐', + 71857 => '𑣑', + 71858 => '𑣒', + 71859 => '𑣓', + 71860 => '𑣔', + 71861 => '𑣕', + 71862 => '𑣖', + 71863 => '𑣗', + 71864 => '𑣘', + 71865 => '𑣙', + 71866 => '𑣚', + 71867 => '𑣛', + 71868 => '𑣜', + 71869 => '𑣝', + 71870 => '𑣞', + 71871 => '𑣟', + 93760 => '𖹠', + 93761 => '𖹡', + 93762 => '𖹢', + 93763 => '𖹣', + 93764 => '𖹤', + 93765 => '𖹥', + 93766 => '𖹦', + 93767 => '𖹧', + 93768 => '𖹨', + 93769 => '𖹩', + 93770 => '𖹪', + 93771 => '𖹫', + 93772 => '𖹬', + 93773 => '𖹭', + 93774 => '𖹮', + 93775 => '𖹯', + 93776 => '𖹰', + 93777 => '𖹱', + 93778 => '𖹲', + 93779 => '𖹳', + 93780 => '𖹴', + 93781 => '𖹵', + 93782 => '𖹶', + 93783 => '𖹷', + 93784 => '𖹸', + 93785 => '𖹹', + 93786 => '𖹺', + 93787 => '𖹻', + 93788 => '𖹼', + 93789 => '𖹽', + 93790 => '𖹾', + 93791 => '𖹿', + 119134 => '𝅗𝅥', + 119135 => '𝅘𝅥', + 119136 => '𝅘𝅥𝅮', + 119137 => '𝅘𝅥𝅯', + 119138 => '𝅘𝅥𝅰', + 119139 => '𝅘𝅥𝅱', + 119140 => '𝅘𝅥𝅲', + 119227 => '𝆹𝅥', + 119228 => '𝆺𝅥', + 119229 => '𝆹𝅥𝅮', + 119230 => '𝆺𝅥𝅮', + 119231 => '𝆹𝅥𝅯', + 119232 => '𝆺𝅥𝅯', + 119808 => 'a', + 119809 => 'b', + 119810 => 'c', + 119811 => 'd', + 119812 => 'e', + 119813 => 'f', + 119814 => 'g', + 119815 => 'h', + 119816 => 'i', + 119817 => 'j', + 119818 => 'k', + 119819 => 'l', + 119820 => 'm', + 119821 => 'n', + 119822 => 'o', + 119823 => 'p', + 119824 => 'q', + 119825 => 'r', + 119826 => 's', + 119827 => 't', + 119828 => 'u', + 119829 => 'v', + 119830 => 'w', + 119831 => 'x', + 119832 => 'y', + 119833 => 'z', + 119834 => 'a', + 119835 => 'b', + 119836 => 'c', + 119837 => 'd', + 119838 => 'e', + 119839 => 'f', + 119840 => 'g', + 119841 => 'h', + 119842 => 'i', + 119843 => 'j', + 119844 => 'k', + 119845 => 'l', + 119846 => 'm', + 119847 => 'n', + 119848 => 'o', + 119849 => 'p', + 119850 => 'q', + 119851 => 'r', + 119852 => 's', + 119853 => 't', + 119854 => 'u', + 119855 => 'v', + 119856 => 'w', + 119857 => 'x', + 119858 => 'y', + 119859 => 'z', + 119860 => 'a', + 119861 => 'b', + 119862 => 'c', + 119863 => 'd', + 119864 => 'e', + 119865 => 'f', + 119866 => 'g', + 119867 => 'h', + 119868 => 'i', + 119869 => 'j', + 119870 => 'k', + 119871 => 'l', + 119872 => 'm', + 119873 => 'n', + 119874 => 'o', + 119875 => 'p', + 119876 => 'q', + 119877 => 'r', + 119878 => 's', + 119879 => 't', + 119880 => 'u', + 119881 => 'v', + 119882 => 'w', + 119883 => 'x', + 119884 => 'y', + 119885 => 'z', + 119886 => 'a', + 119887 => 'b', + 119888 => 'c', + 119889 => 'd', + 119890 => 'e', + 119891 => 'f', + 119892 => 'g', + 119894 => 'i', + 119895 => 'j', + 119896 => 'k', + 119897 => 'l', + 119898 => 'm', + 119899 => 'n', + 119900 => 'o', + 119901 => 'p', + 119902 => 'q', + 119903 => 'r', + 119904 => 's', + 119905 => 't', + 119906 => 'u', + 119907 => 'v', + 119908 => 'w', + 119909 => 'x', + 119910 => 'y', + 119911 => 'z', + 119912 => 'a', + 119913 => 'b', + 119914 => 'c', + 119915 => 'd', + 119916 => 'e', + 119917 => 'f', + 119918 => 'g', + 119919 => 'h', + 119920 => 'i', + 119921 => 'j', + 119922 => 'k', + 119923 => 'l', + 119924 => 'm', + 119925 => 'n', + 119926 => 'o', + 119927 => 'p', + 119928 => 'q', + 119929 => 'r', + 119930 => 's', + 119931 => 't', + 119932 => 'u', + 119933 => 'v', + 119934 => 'w', + 119935 => 'x', + 119936 => 'y', + 119937 => 'z', + 119938 => 'a', + 119939 => 'b', + 119940 => 'c', + 119941 => 'd', + 119942 => 'e', + 119943 => 'f', + 119944 => 'g', + 119945 => 'h', + 119946 => 'i', + 119947 => 'j', + 119948 => 'k', + 119949 => 'l', + 119950 => 'm', + 119951 => 'n', + 119952 => 'o', + 119953 => 'p', + 119954 => 'q', + 119955 => 'r', + 119956 => 's', + 119957 => 't', + 119958 => 'u', + 119959 => 'v', + 119960 => 'w', + 119961 => 'x', + 119962 => 'y', + 119963 => 'z', + 119964 => 'a', + 119966 => 'c', + 119967 => 'd', + 119970 => 'g', + 119973 => 'j', + 119974 => 'k', + 119977 => 'n', + 119978 => 'o', + 119979 => 'p', + 119980 => 'q', + 119982 => 's', + 119983 => 't', + 119984 => 'u', + 119985 => 'v', + 119986 => 'w', + 119987 => 'x', + 119988 => 'y', + 119989 => 'z', + 119990 => 'a', + 119991 => 'b', + 119992 => 'c', + 119993 => 'd', + 119995 => 'f', + 119997 => 'h', + 119998 => 'i', + 119999 => 'j', + 120000 => 'k', + 120001 => 'l', + 120002 => 'm', + 120003 => 'n', + 120005 => 'p', + 120006 => 'q', + 120007 => 'r', + 120008 => 's', + 120009 => 't', + 120010 => 'u', + 120011 => 'v', + 120012 => 'w', + 120013 => 'x', + 120014 => 'y', + 120015 => 'z', + 120016 => 'a', + 120017 => 'b', + 120018 => 'c', + 120019 => 'd', + 120020 => 'e', + 120021 => 'f', + 120022 => 'g', + 120023 => 'h', + 120024 => 'i', + 120025 => 'j', + 120026 => 'k', + 120027 => 'l', + 120028 => 'm', + 120029 => 'n', + 120030 => 'o', + 120031 => 'p', + 120032 => 'q', + 120033 => 'r', + 120034 => 's', + 120035 => 't', + 120036 => 'u', + 120037 => 'v', + 120038 => 'w', + 120039 => 'x', + 120040 => 'y', + 120041 => 'z', + 120042 => 'a', + 120043 => 'b', + 120044 => 'c', + 120045 => 'd', + 120046 => 'e', + 120047 => 'f', + 120048 => 'g', + 120049 => 'h', + 120050 => 'i', + 120051 => 'j', + 120052 => 'k', + 120053 => 'l', + 120054 => 'm', + 120055 => 'n', + 120056 => 'o', + 120057 => 'p', + 120058 => 'q', + 120059 => 'r', + 120060 => 's', + 120061 => 't', + 120062 => 'u', + 120063 => 'v', + 120064 => 'w', + 120065 => 'x', + 120066 => 'y', + 120067 => 'z', + 120068 => 'a', + 120069 => 'b', + 120071 => 'd', + 120072 => 'e', + 120073 => 'f', + 120074 => 'g', + 120077 => 'j', + 120078 => 'k', + 120079 => 'l', + 120080 => 'm', + 120081 => 'n', + 120082 => 'o', + 120083 => 'p', + 120084 => 'q', + 120086 => 's', + 120087 => 't', + 120088 => 'u', + 120089 => 'v', + 120090 => 'w', + 120091 => 'x', + 120092 => 'y', + 120094 => 'a', + 120095 => 'b', + 120096 => 'c', + 120097 => 'd', + 120098 => 'e', + 120099 => 'f', + 120100 => 'g', + 120101 => 'h', + 120102 => 'i', + 120103 => 'j', + 120104 => 'k', + 120105 => 'l', + 120106 => 'm', + 120107 => 'n', + 120108 => 'o', + 120109 => 'p', + 120110 => 'q', + 120111 => 'r', + 120112 => 's', + 120113 => 't', + 120114 => 'u', + 120115 => 'v', + 120116 => 'w', + 120117 => 'x', + 120118 => 'y', + 120119 => 'z', + 120120 => 'a', + 120121 => 'b', + 120123 => 'd', + 120124 => 'e', + 120125 => 'f', + 120126 => 'g', + 120128 => 'i', + 120129 => 'j', + 120130 => 'k', + 120131 => 'l', + 120132 => 'm', + 120134 => 'o', + 120138 => 's', + 120139 => 't', + 120140 => 'u', + 120141 => 'v', + 120142 => 'w', + 120143 => 'x', + 120144 => 'y', + 120146 => 'a', + 120147 => 'b', + 120148 => 'c', + 120149 => 'd', + 120150 => 'e', + 120151 => 'f', + 120152 => 'g', + 120153 => 'h', + 120154 => 'i', + 120155 => 'j', + 120156 => 'k', + 120157 => 'l', + 120158 => 'm', + 120159 => 'n', + 120160 => 'o', + 120161 => 'p', + 120162 => 'q', + 120163 => 'r', + 120164 => 's', + 120165 => 't', + 120166 => 'u', + 120167 => 'v', + 120168 => 'w', + 120169 => 'x', + 120170 => 'y', + 120171 => 'z', + 120172 => 'a', + 120173 => 'b', + 120174 => 'c', + 120175 => 'd', + 120176 => 'e', + 120177 => 'f', + 120178 => 'g', + 120179 => 'h', + 120180 => 'i', + 120181 => 'j', + 120182 => 'k', + 120183 => 'l', + 120184 => 'm', + 120185 => 'n', + 120186 => 'o', + 120187 => 'p', + 120188 => 'q', + 120189 => 'r', + 120190 => 's', + 120191 => 't', + 120192 => 'u', + 120193 => 'v', + 120194 => 'w', + 120195 => 'x', + 120196 => 'y', + 120197 => 'z', + 120198 => 'a', + 120199 => 'b', + 120200 => 'c', + 120201 => 'd', + 120202 => 'e', + 120203 => 'f', + 120204 => 'g', + 120205 => 'h', + 120206 => 'i', + 120207 => 'j', + 120208 => 'k', + 120209 => 'l', + 120210 => 'm', + 120211 => 'n', + 120212 => 'o', + 120213 => 'p', + 120214 => 'q', + 120215 => 'r', + 120216 => 's', + 120217 => 't', + 120218 => 'u', + 120219 => 'v', + 120220 => 'w', + 120221 => 'x', + 120222 => 'y', + 120223 => 'z', + 120224 => 'a', + 120225 => 'b', + 120226 => 'c', + 120227 => 'd', + 120228 => 'e', + 120229 => 'f', + 120230 => 'g', + 120231 => 'h', + 120232 => 'i', + 120233 => 'j', + 120234 => 'k', + 120235 => 'l', + 120236 => 'm', + 120237 => 'n', + 120238 => 'o', + 120239 => 'p', + 120240 => 'q', + 120241 => 'r', + 120242 => 's', + 120243 => 't', + 120244 => 'u', + 120245 => 'v', + 120246 => 'w', + 120247 => 'x', + 120248 => 'y', + 120249 => 'z', + 120250 => 'a', + 120251 => 'b', + 120252 => 'c', + 120253 => 'd', + 120254 => 'e', + 120255 => 'f', + 120256 => 'g', + 120257 => 'h', + 120258 => 'i', + 120259 => 'j', + 120260 => 'k', + 120261 => 'l', + 120262 => 'm', + 120263 => 'n', + 120264 => 'o', + 120265 => 'p', + 120266 => 'q', + 120267 => 'r', + 120268 => 's', + 120269 => 't', + 120270 => 'u', + 120271 => 'v', + 120272 => 'w', + 120273 => 'x', + 120274 => 'y', + 120275 => 'z', + 120276 => 'a', + 120277 => 'b', + 120278 => 'c', + 120279 => 'd', + 120280 => 'e', + 120281 => 'f', + 120282 => 'g', + 120283 => 'h', + 120284 => 'i', + 120285 => 'j', + 120286 => 'k', + 120287 => 'l', + 120288 => 'm', + 120289 => 'n', + 120290 => 'o', + 120291 => 'p', + 120292 => 'q', + 120293 => 'r', + 120294 => 's', + 120295 => 't', + 120296 => 'u', + 120297 => 'v', + 120298 => 'w', + 120299 => 'x', + 120300 => 'y', + 120301 => 'z', + 120302 => 'a', + 120303 => 'b', + 120304 => 'c', + 120305 => 'd', + 120306 => 'e', + 120307 => 'f', + 120308 => 'g', + 120309 => 'h', + 120310 => 'i', + 120311 => 'j', + 120312 => 'k', + 120313 => 'l', + 120314 => 'm', + 120315 => 'n', + 120316 => 'o', + 120317 => 'p', + 120318 => 'q', + 120319 => 'r', + 120320 => 's', + 120321 => 't', + 120322 => 'u', + 120323 => 'v', + 120324 => 'w', + 120325 => 'x', + 120326 => 'y', + 120327 => 'z', + 120328 => 'a', + 120329 => 'b', + 120330 => 'c', + 120331 => 'd', + 120332 => 'e', + 120333 => 'f', + 120334 => 'g', + 120335 => 'h', + 120336 => 'i', + 120337 => 'j', + 120338 => 'k', + 120339 => 'l', + 120340 => 'm', + 120341 => 'n', + 120342 => 'o', + 120343 => 'p', + 120344 => 'q', + 120345 => 'r', + 120346 => 's', + 120347 => 't', + 120348 => 'u', + 120349 => 'v', + 120350 => 'w', + 120351 => 'x', + 120352 => 'y', + 120353 => 'z', + 120354 => 'a', + 120355 => 'b', + 120356 => 'c', + 120357 => 'd', + 120358 => 'e', + 120359 => 'f', + 120360 => 'g', + 120361 => 'h', + 120362 => 'i', + 120363 => 'j', + 120364 => 'k', + 120365 => 'l', + 120366 => 'm', + 120367 => 'n', + 120368 => 'o', + 120369 => 'p', + 120370 => 'q', + 120371 => 'r', + 120372 => 's', + 120373 => 't', + 120374 => 'u', + 120375 => 'v', + 120376 => 'w', + 120377 => 'x', + 120378 => 'y', + 120379 => 'z', + 120380 => 'a', + 120381 => 'b', + 120382 => 'c', + 120383 => 'd', + 120384 => 'e', + 120385 => 'f', + 120386 => 'g', + 120387 => 'h', + 120388 => 'i', + 120389 => 'j', + 120390 => 'k', + 120391 => 'l', + 120392 => 'm', + 120393 => 'n', + 120394 => 'o', + 120395 => 'p', + 120396 => 'q', + 120397 => 'r', + 120398 => 's', + 120399 => 't', + 120400 => 'u', + 120401 => 'v', + 120402 => 'w', + 120403 => 'x', + 120404 => 'y', + 120405 => 'z', + 120406 => 'a', + 120407 => 'b', + 120408 => 'c', + 120409 => 'd', + 120410 => 'e', + 120411 => 'f', + 120412 => 'g', + 120413 => 'h', + 120414 => 'i', + 120415 => 'j', + 120416 => 'k', + 120417 => 'l', + 120418 => 'm', + 120419 => 'n', + 120420 => 'o', + 120421 => 'p', + 120422 => 'q', + 120423 => 'r', + 120424 => 's', + 120425 => 't', + 120426 => 'u', + 120427 => 'v', + 120428 => 'w', + 120429 => 'x', + 120430 => 'y', + 120431 => 'z', + 120432 => 'a', + 120433 => 'b', + 120434 => 'c', + 120435 => 'd', + 120436 => 'e', + 120437 => 'f', + 120438 => 'g', + 120439 => 'h', + 120440 => 'i', + 120441 => 'j', + 120442 => 'k', + 120443 => 'l', + 120444 => 'm', + 120445 => 'n', + 120446 => 'o', + 120447 => 'p', + 120448 => 'q', + 120449 => 'r', + 120450 => 's', + 120451 => 't', + 120452 => 'u', + 120453 => 'v', + 120454 => 'w', + 120455 => 'x', + 120456 => 'y', + 120457 => 'z', + 120458 => 'a', + 120459 => 'b', + 120460 => 'c', + 120461 => 'd', + 120462 => 'e', + 120463 => 'f', + 120464 => 'g', + 120465 => 'h', + 120466 => 'i', + 120467 => 'j', + 120468 => 'k', + 120469 => 'l', + 120470 => 'm', + 120471 => 'n', + 120472 => 'o', + 120473 => 'p', + 120474 => 'q', + 120475 => 'r', + 120476 => 's', + 120477 => 't', + 120478 => 'u', + 120479 => 'v', + 120480 => 'w', + 120481 => 'x', + 120482 => 'y', + 120483 => 'z', + 120484 => 'ı', + 120485 => 'ȷ', + 120488 => 'α', + 120489 => 'β', + 120490 => 'γ', + 120491 => 'δ', + 120492 => 'ε', + 120493 => 'ζ', + 120494 => 'η', + 120495 => 'θ', + 120496 => 'ι', + 120497 => 'κ', + 120498 => 'λ', + 120499 => 'μ', + 120500 => 'ν', + 120501 => 'ξ', + 120502 => 'ο', + 120503 => 'π', + 120504 => 'ρ', + 120505 => 'θ', + 120506 => 'σ', + 120507 => 'τ', + 120508 => 'υ', + 120509 => 'φ', + 120510 => 'χ', + 120511 => 'ψ', + 120512 => 'ω', + 120513 => '∇', + 120514 => 'α', + 120515 => 'β', + 120516 => 'γ', + 120517 => 'δ', + 120518 => 'ε', + 120519 => 'ζ', + 120520 => 'η', + 120521 => 'θ', + 120522 => 'ι', + 120523 => 'κ', + 120524 => 'λ', + 120525 => 'μ', + 120526 => 'ν', + 120527 => 'ξ', + 120528 => 'ο', + 120529 => 'π', + 120530 => 'ρ', + 120531 => 'σ', + 120532 => 'σ', + 120533 => 'τ', + 120534 => 'υ', + 120535 => 'φ', + 120536 => 'χ', + 120537 => 'ψ', + 120538 => 'ω', + 120539 => '∂', + 120540 => 'ε', + 120541 => 'θ', + 120542 => 'κ', + 120543 => 'φ', + 120544 => 'ρ', + 120545 => 'π', + 120546 => 'α', + 120547 => 'β', + 120548 => 'γ', + 120549 => 'δ', + 120550 => 'ε', + 120551 => 'ζ', + 120552 => 'η', + 120553 => 'θ', + 120554 => 'ι', + 120555 => 'κ', + 120556 => 'λ', + 120557 => 'μ', + 120558 => 'ν', + 120559 => 'ξ', + 120560 => 'ο', + 120561 => 'π', + 120562 => 'ρ', + 120563 => 'θ', + 120564 => 'σ', + 120565 => 'τ', + 120566 => 'υ', + 120567 => 'φ', + 120568 => 'χ', + 120569 => 'ψ', + 120570 => 'ω', + 120571 => '∇', + 120572 => 'α', + 120573 => 'β', + 120574 => 'γ', + 120575 => 'δ', + 120576 => 'ε', + 120577 => 'ζ', + 120578 => 'η', + 120579 => 'θ', + 120580 => 'ι', + 120581 => 'κ', + 120582 => 'λ', + 120583 => 'μ', + 120584 => 'ν', + 120585 => 'ξ', + 120586 => 'ο', + 120587 => 'π', + 120588 => 'ρ', + 120589 => 'σ', + 120590 => 'σ', + 120591 => 'τ', + 120592 => 'υ', + 120593 => 'φ', + 120594 => 'χ', + 120595 => 'ψ', + 120596 => 'ω', + 120597 => '∂', + 120598 => 'ε', + 120599 => 'θ', + 120600 => 'κ', + 120601 => 'φ', + 120602 => 'ρ', + 120603 => 'π', + 120604 => 'α', + 120605 => 'β', + 120606 => 'γ', + 120607 => 'δ', + 120608 => 'ε', + 120609 => 'ζ', + 120610 => 'η', + 120611 => 'θ', + 120612 => 'ι', + 120613 => 'κ', + 120614 => 'λ', + 120615 => 'μ', + 120616 => 'ν', + 120617 => 'ξ', + 120618 => 'ο', + 120619 => 'π', + 120620 => 'ρ', + 120621 => 'θ', + 120622 => 'σ', + 120623 => 'τ', + 120624 => 'υ', + 120625 => 'φ', + 120626 => 'χ', + 120627 => 'ψ', + 120628 => 'ω', + 120629 => '∇', + 120630 => 'α', + 120631 => 'β', + 120632 => 'γ', + 120633 => 'δ', + 120634 => 'ε', + 120635 => 'ζ', + 120636 => 'η', + 120637 => 'θ', + 120638 => 'ι', + 120639 => 'κ', + 120640 => 'λ', + 120641 => 'μ', + 120642 => 'ν', + 120643 => 'ξ', + 120644 => 'ο', + 120645 => 'π', + 120646 => 'ρ', + 120647 => 'σ', + 120648 => 'σ', + 120649 => 'τ', + 120650 => 'υ', + 120651 => 'φ', + 120652 => 'χ', + 120653 => 'ψ', + 120654 => 'ω', + 120655 => '∂', + 120656 => 'ε', + 120657 => 'θ', + 120658 => 'κ', + 120659 => 'φ', + 120660 => 'ρ', + 120661 => 'π', + 120662 => 'α', + 120663 => 'β', + 120664 => 'γ', + 120665 => 'δ', + 120666 => 'ε', + 120667 => 'ζ', + 120668 => 'η', + 120669 => 'θ', + 120670 => 'ι', + 120671 => 'κ', + 120672 => 'λ', + 120673 => 'μ', + 120674 => 'ν', + 120675 => 'ξ', + 120676 => 'ο', + 120677 => 'π', + 120678 => 'ρ', + 120679 => 'θ', + 120680 => 'σ', + 120681 => 'τ', + 120682 => 'υ', + 120683 => 'φ', + 120684 => 'χ', + 120685 => 'ψ', + 120686 => 'ω', + 120687 => '∇', + 120688 => 'α', + 120689 => 'β', + 120690 => 'γ', + 120691 => 'δ', + 120692 => 'ε', + 120693 => 'ζ', + 120694 => 'η', + 120695 => 'θ', + 120696 => 'ι', + 120697 => 'κ', + 120698 => 'λ', + 120699 => 'μ', + 120700 => 'ν', + 120701 => 'ξ', + 120702 => 'ο', + 120703 => 'π', + 120704 => 'ρ', + 120705 => 'σ', + 120706 => 'σ', + 120707 => 'τ', + 120708 => 'υ', + 120709 => 'φ', + 120710 => 'χ', + 120711 => 'ψ', + 120712 => 'ω', + 120713 => '∂', + 120714 => 'ε', + 120715 => 'θ', + 120716 => 'κ', + 120717 => 'φ', + 120718 => 'ρ', + 120719 => 'π', + 120720 => 'α', + 120721 => 'β', + 120722 => 'γ', + 120723 => 'δ', + 120724 => 'ε', + 120725 => 'ζ', + 120726 => 'η', + 120727 => 'θ', + 120728 => 'ι', + 120729 => 'κ', + 120730 => 'λ', + 120731 => 'μ', + 120732 => 'ν', + 120733 => 'ξ', + 120734 => 'ο', + 120735 => 'π', + 120736 => 'ρ', + 120737 => 'θ', + 120738 => 'σ', + 120739 => 'τ', + 120740 => 'υ', + 120741 => 'φ', + 120742 => 'χ', + 120743 => 'ψ', + 120744 => 'ω', + 120745 => '∇', + 120746 => 'α', + 120747 => 'β', + 120748 => 'γ', + 120749 => 'δ', + 120750 => 'ε', + 120751 => 'ζ', + 120752 => 'η', + 120753 => 'θ', + 120754 => 'ι', + 120755 => 'κ', + 120756 => 'λ', + 120757 => 'μ', + 120758 => 'ν', + 120759 => 'ξ', + 120760 => 'ο', + 120761 => 'π', + 120762 => 'ρ', + 120763 => 'σ', + 120764 => 'σ', + 120765 => 'τ', + 120766 => 'υ', + 120767 => 'φ', + 120768 => 'χ', + 120769 => 'ψ', + 120770 => 'ω', + 120771 => '∂', + 120772 => 'ε', + 120773 => 'θ', + 120774 => 'κ', + 120775 => 'φ', + 120776 => 'ρ', + 120777 => 'π', + 120778 => 'ϝ', + 120779 => 'ϝ', + 120782 => '0', + 120783 => '1', + 120784 => '2', + 120785 => '3', + 120786 => '4', + 120787 => '5', + 120788 => '6', + 120789 => '7', + 120790 => '8', + 120791 => '9', + 120792 => '0', + 120793 => '1', + 120794 => '2', + 120795 => '3', + 120796 => '4', + 120797 => '5', + 120798 => '6', + 120799 => '7', + 120800 => '8', + 120801 => '9', + 120802 => '0', + 120803 => '1', + 120804 => '2', + 120805 => '3', + 120806 => '4', + 120807 => '5', + 120808 => '6', + 120809 => '7', + 120810 => '8', + 120811 => '9', + 120812 => '0', + 120813 => '1', + 120814 => '2', + 120815 => '3', + 120816 => '4', + 120817 => '5', + 120818 => '6', + 120819 => '7', + 120820 => '8', + 120821 => '9', + 120822 => '0', + 120823 => '1', + 120824 => '2', + 120825 => '3', + 120826 => '4', + 120827 => '5', + 120828 => '6', + 120829 => '7', + 120830 => '8', + 120831 => '9', + 125184 => '𞤢', + 125185 => '𞤣', + 125186 => '𞤤', + 125187 => '𞤥', + 125188 => '𞤦', + 125189 => '𞤧', + 125190 => '𞤨', + 125191 => '𞤩', + 125192 => '𞤪', + 125193 => '𞤫', + 125194 => '𞤬', + 125195 => '𞤭', + 125196 => '𞤮', + 125197 => '𞤯', + 125198 => '𞤰', + 125199 => '𞤱', + 125200 => '𞤲', + 125201 => '𞤳', + 125202 => '𞤴', + 125203 => '𞤵', + 125204 => '𞤶', + 125205 => '𞤷', + 125206 => '𞤸', + 125207 => '𞤹', + 125208 => '𞤺', + 125209 => '𞤻', + 125210 => '𞤼', + 125211 => '𞤽', + 125212 => '𞤾', + 125213 => '𞤿', + 125214 => '𞥀', + 125215 => '𞥁', + 125216 => '𞥂', + 125217 => '𞥃', + 126464 => 'ا', + 126465 => 'ب', + 126466 => 'ج', + 126467 => 'د', + 126469 => 'و', + 126470 => 'ز', + 126471 => 'ح', + 126472 => 'ط', + 126473 => 'ي', + 126474 => 'ك', + 126475 => 'ل', + 126476 => 'م', + 126477 => 'ن', + 126478 => 'س', + 126479 => 'ع', + 126480 => 'ف', + 126481 => 'ص', + 126482 => 'ق', + 126483 => 'ر', + 126484 => 'ش', + 126485 => 'ت', + 126486 => 'ث', + 126487 => 'خ', + 126488 => 'ذ', + 126489 => 'ض', + 126490 => 'ظ', + 126491 => 'غ', + 126492 => 'ٮ', + 126493 => 'ں', + 126494 => 'ڡ', + 126495 => 'ٯ', + 126497 => 'ب', + 126498 => 'ج', + 126500 => 'ه', + 126503 => 'ح', + 126505 => 'ي', + 126506 => 'ك', + 126507 => 'ل', + 126508 => 'م', + 126509 => 'ن', + 126510 => 'س', + 126511 => 'ع', + 126512 => 'ف', + 126513 => 'ص', + 126514 => 'ق', + 126516 => 'ش', + 126517 => 'ت', + 126518 => 'ث', + 126519 => 'خ', + 126521 => 'ض', + 126523 => 'غ', + 126530 => 'ج', + 126535 => 'ح', + 126537 => 'ي', + 126539 => 'ل', + 126541 => 'ن', + 126542 => 'س', + 126543 => 'ع', + 126545 => 'ص', + 126546 => 'ق', + 126548 => 'ش', + 126551 => 'خ', + 126553 => 'ض', + 126555 => 'غ', + 126557 => 'ں', + 126559 => 'ٯ', + 126561 => 'ب', + 126562 => 'ج', + 126564 => 'ه', + 126567 => 'ح', + 126568 => 'ط', + 126569 => 'ي', + 126570 => 'ك', + 126572 => 'م', + 126573 => 'ن', + 126574 => 'س', + 126575 => 'ع', + 126576 => 'ف', + 126577 => 'ص', + 126578 => 'ق', + 126580 => 'ش', + 126581 => 'ت', + 126582 => 'ث', + 126583 => 'خ', + 126585 => 'ض', + 126586 => 'ظ', + 126587 => 'غ', + 126588 => 'ٮ', + 126590 => 'ڡ', + 126592 => 'ا', + 126593 => 'ب', + 126594 => 'ج', + 126595 => 'د', + 126596 => 'ه', + 126597 => 'و', + 126598 => 'ز', + 126599 => 'ح', + 126600 => 'ط', + 126601 => 'ي', + 126603 => 'ل', + 126604 => 'م', + 126605 => 'ن', + 126606 => 'س', + 126607 => 'ع', + 126608 => 'ف', + 126609 => 'ص', + 126610 => 'ق', + 126611 => 'ر', + 126612 => 'ش', + 126613 => 'ت', + 126614 => 'ث', + 126615 => 'خ', + 126616 => 'ذ', + 126617 => 'ض', + 126618 => 'ظ', + 126619 => 'غ', + 126625 => 'ب', + 126626 => 'ج', + 126627 => 'د', + 126629 => 'و', + 126630 => 'ز', + 126631 => 'ح', + 126632 => 'ط', + 126633 => 'ي', + 126635 => 'ل', + 126636 => 'م', + 126637 => 'ن', + 126638 => 'س', + 126639 => 'ع', + 126640 => 'ف', + 126641 => 'ص', + 126642 => 'ق', + 126643 => 'ر', + 126644 => 'ش', + 126645 => 'ت', + 126646 => 'ث', + 126647 => 'خ', + 126648 => 'ذ', + 126649 => 'ض', + 126650 => 'ظ', + 126651 => 'غ', + 127274 => '〔s〕', + 127275 => 'c', + 127276 => 'r', + 127277 => 'cd', + 127278 => 'wz', + 127280 => 'a', + 127281 => 'b', + 127282 => 'c', + 127283 => 'd', + 127284 => 'e', + 127285 => 'f', + 127286 => 'g', + 127287 => 'h', + 127288 => 'i', + 127289 => 'j', + 127290 => 'k', + 127291 => 'l', + 127292 => 'm', + 127293 => 'n', + 127294 => 'o', + 127295 => 'p', + 127296 => 'q', + 127297 => 'r', + 127298 => 's', + 127299 => 't', + 127300 => 'u', + 127301 => 'v', + 127302 => 'w', + 127303 => 'x', + 127304 => 'y', + 127305 => 'z', + 127306 => 'hv', + 127307 => 'mv', + 127308 => 'sd', + 127309 => 'ss', + 127310 => 'ppv', + 127311 => 'wc', + 127338 => 'mc', + 127339 => 'md', + 127340 => 'mr', + 127376 => 'dj', + 127488 => 'ほか', + 127489 => 'ココ', + 127490 => 'サ', + 127504 => '手', + 127505 => '字', + 127506 => '双', + 127507 => 'デ', + 127508 => '二', + 127509 => '多', + 127510 => '解', + 127511 => '天', + 127512 => '交', + 127513 => '映', + 127514 => '無', + 127515 => '料', + 127516 => '前', + 127517 => '後', + 127518 => '再', + 127519 => '新', + 127520 => '初', + 127521 => '終', + 127522 => '生', + 127523 => '販', + 127524 => '声', + 127525 => '吹', + 127526 => '演', + 127527 => '投', + 127528 => '捕', + 127529 => '一', + 127530 => '三', + 127531 => '遊', + 127532 => '左', + 127533 => '中', + 127534 => '右', + 127535 => '指', + 127536 => '走', + 127537 => '打', + 127538 => '禁', + 127539 => '空', + 127540 => '合', + 127541 => '満', + 127542 => '有', + 127543 => '月', + 127544 => '申', + 127545 => '割', + 127546 => '営', + 127547 => '配', + 127552 => '〔本〕', + 127553 => '〔三〕', + 127554 => '〔二〕', + 127555 => '〔安〕', + 127556 => '〔点〕', + 127557 => '〔打〕', + 127558 => '〔盗〕', + 127559 => '〔勝〕', + 127560 => '〔敗〕', + 127568 => '得', + 127569 => '可', + 130032 => '0', + 130033 => '1', + 130034 => '2', + 130035 => '3', + 130036 => '4', + 130037 => '5', + 130038 => '6', + 130039 => '7', + 130040 => '8', + 130041 => '9', + 194560 => '丽', + 194561 => '丸', + 194562 => '乁', + 194563 => '𠄢', + 194564 => '你', + 194565 => '侮', + 194566 => '侻', + 194567 => '倂', + 194568 => '偺', + 194569 => '備', + 194570 => '僧', + 194571 => '像', + 194572 => '㒞', + 194573 => '𠘺', + 194574 => '免', + 194575 => '兔', + 194576 => '兤', + 194577 => '具', + 194578 => '𠔜', + 194579 => '㒹', + 194580 => '內', + 194581 => '再', + 194582 => '𠕋', + 194583 => '冗', + 194584 => '冤', + 194585 => '仌', + 194586 => '冬', + 194587 => '况', + 194588 => '𩇟', + 194589 => '凵', + 194590 => '刃', + 194591 => '㓟', + 194592 => '刻', + 194593 => '剆', + 194594 => '割', + 194595 => '剷', + 194596 => '㔕', + 194597 => '勇', + 194598 => '勉', + 194599 => '勤', + 194600 => '勺', + 194601 => '包', + 194602 => '匆', + 194603 => '北', + 194604 => '卉', + 194605 => '卑', + 194606 => '博', + 194607 => '即', + 194608 => '卽', + 194609 => '卿', + 194610 => '卿', + 194611 => '卿', + 194612 => '𠨬', + 194613 => '灰', + 194614 => '及', + 194615 => '叟', + 194616 => '𠭣', + 194617 => '叫', + 194618 => '叱', + 194619 => '吆', + 194620 => '咞', + 194621 => '吸', + 194622 => '呈', + 194623 => '周', + 194624 => '咢', + 194625 => '哶', + 194626 => '唐', + 194627 => '啓', + 194628 => '啣', + 194629 => '善', + 194630 => '善', + 194631 => '喙', + 194632 => '喫', + 194633 => '喳', + 194634 => '嗂', + 194635 => '圖', + 194636 => '嘆', + 194637 => '圗', + 194638 => '噑', + 194639 => '噴', + 194640 => '切', + 194641 => '壮', + 194642 => '城', + 194643 => '埴', + 194644 => '堍', + 194645 => '型', + 194646 => '堲', + 194647 => '報', + 194648 => '墬', + 194649 => '𡓤', + 194650 => '売', + 194651 => '壷', + 194652 => '夆', + 194653 => '多', + 194654 => '夢', + 194655 => '奢', + 194656 => '𡚨', + 194657 => '𡛪', + 194658 => '姬', + 194659 => '娛', + 194660 => '娧', + 194661 => '姘', + 194662 => '婦', + 194663 => '㛮', + 194665 => '嬈', + 194666 => '嬾', + 194667 => '嬾', + 194668 => '𡧈', + 194669 => '寃', + 194670 => '寘', + 194671 => '寧', + 194672 => '寳', + 194673 => '𡬘', + 194674 => '寿', + 194675 => '将', + 194677 => '尢', + 194678 => '㞁', + 194679 => '屠', + 194680 => '屮', + 194681 => '峀', + 194682 => '岍', + 194683 => '𡷤', + 194684 => '嵃', + 194685 => '𡷦', + 194686 => '嵮', + 194687 => '嵫', + 194688 => '嵼', + 194689 => '巡', + 194690 => '巢', + 194691 => '㠯', + 194692 => '巽', + 194693 => '帨', + 194694 => '帽', + 194695 => '幩', + 194696 => '㡢', + 194697 => '𢆃', + 194698 => '㡼', + 194699 => '庰', + 194700 => '庳', + 194701 => '庶', + 194702 => '廊', + 194703 => '𪎒', + 194704 => '廾', + 194705 => '𢌱', + 194706 => '𢌱', + 194707 => '舁', + 194708 => '弢', + 194709 => '弢', + 194710 => '㣇', + 194711 => '𣊸', + 194712 => '𦇚', + 194713 => '形', + 194714 => '彫', + 194715 => '㣣', + 194716 => '徚', + 194717 => '忍', + 194718 => '志', + 194719 => '忹', + 194720 => '悁', + 194721 => '㤺', + 194722 => '㤜', + 194723 => '悔', + 194724 => '𢛔', + 194725 => '惇', + 194726 => '慈', + 194727 => '慌', + 194728 => '慎', + 194729 => '慌', + 194730 => '慺', + 194731 => '憎', + 194732 => '憲', + 194733 => '憤', + 194734 => '憯', + 194735 => '懞', + 194736 => '懲', + 194737 => '懶', + 194738 => '成', + 194739 => '戛', + 194740 => '扝', + 194741 => '抱', + 194742 => '拔', + 194743 => '捐', + 194744 => '𢬌', + 194745 => '挽', + 194746 => '拼', + 194747 => '捨', + 194748 => '掃', + 194749 => '揤', + 194750 => '𢯱', + 194751 => '搢', + 194752 => '揅', + 194753 => '掩', + 194754 => '㨮', + 194755 => '摩', + 194756 => '摾', + 194757 => '撝', + 194758 => '摷', + 194759 => '㩬', + 194760 => '敏', + 194761 => '敬', + 194762 => '𣀊', + 194763 => '旣', + 194764 => '書', + 194765 => '晉', + 194766 => '㬙', + 194767 => '暑', + 194768 => '㬈', + 194769 => '㫤', + 194770 => '冒', + 194771 => '冕', + 194772 => '最', + 194773 => '暜', + 194774 => '肭', + 194775 => '䏙', + 194776 => '朗', + 194777 => '望', + 194778 => '朡', + 194779 => '杞', + 194780 => '杓', + 194781 => '𣏃', + 194782 => '㭉', + 194783 => '柺', + 194784 => '枅', + 194785 => '桒', + 194786 => '梅', + 194787 => '𣑭', + 194788 => '梎', + 194789 => '栟', + 194790 => '椔', + 194791 => '㮝', + 194792 => '楂', + 194793 => '榣', + 194794 => '槪', + 194795 => '檨', + 194796 => '𣚣', + 194797 => '櫛', + 194798 => '㰘', + 194799 => '次', + 194800 => '𣢧', + 194801 => '歔', + 194802 => '㱎', + 194803 => '歲', + 194804 => '殟', + 194805 => '殺', + 194806 => '殻', + 194807 => '𣪍', + 194808 => '𡴋', + 194809 => '𣫺', + 194810 => '汎', + 194811 => '𣲼', + 194812 => '沿', + 194813 => '泍', + 194814 => '汧', + 194815 => '洖', + 194816 => '派', + 194817 => '海', + 194818 => '流', + 194819 => '浩', + 194820 => '浸', + 194821 => '涅', + 194822 => '𣴞', + 194823 => '洴', + 194824 => '港', + 194825 => '湮', + 194826 => '㴳', + 194827 => '滋', + 194828 => '滇', + 194829 => '𣻑', + 194830 => '淹', + 194831 => '潮', + 194832 => '𣽞', + 194833 => '𣾎', + 194834 => '濆', + 194835 => '瀹', + 194836 => '瀞', + 194837 => '瀛', + 194838 => '㶖', + 194839 => '灊', + 194840 => '災', + 194841 => '灷', + 194842 => '炭', + 194843 => '𠔥', + 194844 => '煅', + 194845 => '𤉣', + 194846 => '熜', + 194848 => '爨', + 194849 => '爵', + 194850 => '牐', + 194851 => '𤘈', + 194852 => '犀', + 194853 => '犕', + 194854 => '𤜵', + 194855 => '𤠔', + 194856 => '獺', + 194857 => '王', + 194858 => '㺬', + 194859 => '玥', + 194860 => '㺸', + 194861 => '㺸', + 194862 => '瑇', + 194863 => '瑜', + 194864 => '瑱', + 194865 => '璅', + 194866 => '瓊', + 194867 => '㼛', + 194868 => '甤', + 194869 => '𤰶', + 194870 => '甾', + 194871 => '𤲒', + 194872 => '異', + 194873 => '𢆟', + 194874 => '瘐', + 194875 => '𤾡', + 194876 => '𤾸', + 194877 => '𥁄', + 194878 => '㿼', + 194879 => '䀈', + 194880 => '直', + 194881 => '𥃳', + 194882 => '𥃲', + 194883 => '𥄙', + 194884 => '𥄳', + 194885 => '眞', + 194886 => '真', + 194887 => '真', + 194888 => '睊', + 194889 => '䀹', + 194890 => '瞋', + 194891 => '䁆', + 194892 => '䂖', + 194893 => '𥐝', + 194894 => '硎', + 194895 => '碌', + 194896 => '磌', + 194897 => '䃣', + 194898 => '𥘦', + 194899 => '祖', + 194900 => '𥚚', + 194901 => '𥛅', + 194902 => '福', + 194903 => '秫', + 194904 => '䄯', + 194905 => '穀', + 194906 => '穊', + 194907 => '穏', + 194908 => '𥥼', + 194909 => '𥪧', + 194910 => '𥪧', + 194912 => '䈂', + 194913 => '𥮫', + 194914 => '篆', + 194915 => '築', + 194916 => '䈧', + 194917 => '𥲀', + 194918 => '糒', + 194919 => '䊠', + 194920 => '糨', + 194921 => '糣', + 194922 => '紀', + 194923 => '𥾆', + 194924 => '絣', + 194925 => '䌁', + 194926 => '緇', + 194927 => '縂', + 194928 => '繅', + 194929 => '䌴', + 194930 => '𦈨', + 194931 => '𦉇', + 194932 => '䍙', + 194933 => '𦋙', + 194934 => '罺', + 194935 => '𦌾', + 194936 => '羕', + 194937 => '翺', + 194938 => '者', + 194939 => '𦓚', + 194940 => '𦔣', + 194941 => '聠', + 194942 => '𦖨', + 194943 => '聰', + 194944 => '𣍟', + 194945 => '䏕', + 194946 => '育', + 194947 => '脃', + 194948 => '䐋', + 194949 => '脾', + 194950 => '媵', + 194951 => '𦞧', + 194952 => '𦞵', + 194953 => '𣎓', + 194954 => '𣎜', + 194955 => '舁', + 194956 => '舄', + 194957 => '辞', + 194958 => '䑫', + 194959 => '芑', + 194960 => '芋', + 194961 => '芝', + 194962 => '劳', + 194963 => '花', + 194964 => '芳', + 194965 => '芽', + 194966 => '苦', + 194967 => '𦬼', + 194968 => '若', + 194969 => '茝', + 194970 => '荣', + 194971 => '莭', + 194972 => '茣', + 194973 => '莽', + 194974 => '菧', + 194975 => '著', + 194976 => '荓', + 194977 => '菊', + 194978 => '菌', + 194979 => '菜', + 194980 => '𦰶', + 194981 => '𦵫', + 194982 => '𦳕', + 194983 => '䔫', + 194984 => '蓱', + 194985 => '蓳', + 194986 => '蔖', + 194987 => '𧏊', + 194988 => '蕤', + 194989 => '𦼬', + 194990 => '䕝', + 194991 => '䕡', + 194992 => '𦾱', + 194993 => '𧃒', + 194994 => '䕫', + 194995 => '虐', + 194996 => '虜', + 194997 => '虧', + 194998 => '虩', + 194999 => '蚩', + 195000 => '蚈', + 195001 => '蜎', + 195002 => '蛢', + 195003 => '蝹', + 195004 => '蜨', + 195005 => '蝫', + 195006 => '螆', + 195008 => '蟡', + 195009 => '蠁', + 195010 => '䗹', + 195011 => '衠', + 195012 => '衣', + 195013 => '𧙧', + 195014 => '裗', + 195015 => '裞', + 195016 => '䘵', + 195017 => '裺', + 195018 => '㒻', + 195019 => '𧢮', + 195020 => '𧥦', + 195021 => '䚾', + 195022 => '䛇', + 195023 => '誠', + 195024 => '諭', + 195025 => '變', + 195026 => '豕', + 195027 => '𧲨', + 195028 => '貫', + 195029 => '賁', + 195030 => '贛', + 195031 => '起', + 195032 => '𧼯', + 195033 => '𠠄', + 195034 => '跋', + 195035 => '趼', + 195036 => '跰', + 195037 => '𠣞', + 195038 => '軔', + 195039 => '輸', + 195040 => '𨗒', + 195041 => '𨗭', + 195042 => '邔', + 195043 => '郱', + 195044 => '鄑', + 195045 => '𨜮', + 195046 => '鄛', + 195047 => '鈸', + 195048 => '鋗', + 195049 => '鋘', + 195050 => '鉼', + 195051 => '鏹', + 195052 => '鐕', + 195053 => '𨯺', + 195054 => '開', + 195055 => '䦕', + 195056 => '閷', + 195057 => '𨵷', + 195058 => '䧦', + 195059 => '雃', + 195060 => '嶲', + 195061 => '霣', + 195062 => '𩅅', + 195063 => '𩈚', + 195064 => '䩮', + 195065 => '䩶', + 195066 => '韠', + 195067 => '𩐊', + 195068 => '䪲', + 195069 => '𩒖', + 195070 => '頋', + 195071 => '頋', + 195072 => '頩', + 195073 => '𩖶', + 195074 => '飢', + 195075 => '䬳', + 195076 => '餩', + 195077 => '馧', + 195078 => '駂', + 195079 => '駾', + 195080 => '䯎', + 195081 => '𩬰', + 195082 => '鬒', + 195083 => '鱀', + 195084 => '鳽', + 195085 => '䳎', + 195086 => '䳭', + 195087 => '鵧', + 195088 => '𪃎', + 195089 => '䳸', + 195090 => '𪄅', + 195091 => '𪈎', + 195092 => '𪊑', + 195093 => '麻', + 195094 => '䵖', + 195095 => '黹', + 195096 => '黾', + 195097 => '鼅', + 195098 => '鼏', + 195099 => '鼖', + 195100 => '鼻', + 195101 => '𪘀', +); diff --git a/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/virama.php b/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/virama.php new file mode 100644 index 00000000..1958e37e --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-idn/Resources/unidata/virama.php @@ -0,0 +1,65 @@ + 9, + 2509 => 9, + 2637 => 9, + 2765 => 9, + 2893 => 9, + 3021 => 9, + 3149 => 9, + 3277 => 9, + 3387 => 9, + 3388 => 9, + 3405 => 9, + 3530 => 9, + 3642 => 9, + 3770 => 9, + 3972 => 9, + 4153 => 9, + 4154 => 9, + 5908 => 9, + 5940 => 9, + 6098 => 9, + 6752 => 9, + 6980 => 9, + 7082 => 9, + 7083 => 9, + 7154 => 9, + 7155 => 9, + 11647 => 9, + 43014 => 9, + 43052 => 9, + 43204 => 9, + 43347 => 9, + 43456 => 9, + 43766 => 9, + 44013 => 9, + 68159 => 9, + 69702 => 9, + 69759 => 9, + 69817 => 9, + 69939 => 9, + 69940 => 9, + 70080 => 9, + 70197 => 9, + 70378 => 9, + 70477 => 9, + 70722 => 9, + 70850 => 9, + 71103 => 9, + 71231 => 9, + 71350 => 9, + 71467 => 9, + 71737 => 9, + 71997 => 9, + 71998 => 9, + 72160 => 9, + 72244 => 9, + 72263 => 9, + 72345 => 9, + 72767 => 9, + 73028 => 9, + 73029 => 9, + 73111 => 9, +); diff --git a/Server/vendor/symfony/polyfill-intl-idn/bootstrap.php b/Server/vendor/symfony/polyfill-intl-idn/bootstrap.php new file mode 100644 index 00000000..57c78356 --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-idn/bootstrap.php @@ -0,0 +1,145 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Intl\Idn as p; + +if (extension_loaded('intl')) { + return; +} + +if (\PHP_VERSION_ID >= 80000) { + return require __DIR__.'/bootstrap80.php'; +} + +if (!defined('U_IDNA_PROHIBITED_ERROR')) { + define('U_IDNA_PROHIBITED_ERROR', 66560); +} +if (!defined('U_IDNA_ERROR_START')) { + define('U_IDNA_ERROR_START', 66560); +} +if (!defined('U_IDNA_UNASSIGNED_ERROR')) { + define('U_IDNA_UNASSIGNED_ERROR', 66561); +} +if (!defined('U_IDNA_CHECK_BIDI_ERROR')) { + define('U_IDNA_CHECK_BIDI_ERROR', 66562); +} +if (!defined('U_IDNA_STD3_ASCII_RULES_ERROR')) { + define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563); +} +if (!defined('U_IDNA_ACE_PREFIX_ERROR')) { + define('U_IDNA_ACE_PREFIX_ERROR', 66564); +} +if (!defined('U_IDNA_VERIFICATION_ERROR')) { + define('U_IDNA_VERIFICATION_ERROR', 66565); +} +if (!defined('U_IDNA_LABEL_TOO_LONG_ERROR')) { + define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566); +} +if (!defined('U_IDNA_ZERO_LENGTH_LABEL_ERROR')) { + define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567); +} +if (!defined('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR')) { + define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568); +} +if (!defined('U_IDNA_ERROR_LIMIT')) { + define('U_IDNA_ERROR_LIMIT', 66569); +} +if (!defined('U_STRINGPREP_PROHIBITED_ERROR')) { + define('U_STRINGPREP_PROHIBITED_ERROR', 66560); +} +if (!defined('U_STRINGPREP_UNASSIGNED_ERROR')) { + define('U_STRINGPREP_UNASSIGNED_ERROR', 66561); +} +if (!defined('U_STRINGPREP_CHECK_BIDI_ERROR')) { + define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562); +} +if (!defined('IDNA_DEFAULT')) { + define('IDNA_DEFAULT', 0); +} +if (!defined('IDNA_ALLOW_UNASSIGNED')) { + define('IDNA_ALLOW_UNASSIGNED', 1); +} +if (!defined('IDNA_USE_STD3_RULES')) { + define('IDNA_USE_STD3_RULES', 2); +} +if (!defined('IDNA_CHECK_BIDI')) { + define('IDNA_CHECK_BIDI', 4); +} +if (!defined('IDNA_CHECK_CONTEXTJ')) { + define('IDNA_CHECK_CONTEXTJ', 8); +} +if (!defined('IDNA_NONTRANSITIONAL_TO_ASCII')) { + define('IDNA_NONTRANSITIONAL_TO_ASCII', 16); +} +if (!defined('IDNA_NONTRANSITIONAL_TO_UNICODE')) { + define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32); +} +if (!defined('INTL_IDNA_VARIANT_2003')) { + define('INTL_IDNA_VARIANT_2003', 0); +} +if (!defined('INTL_IDNA_VARIANT_UTS46')) { + define('INTL_IDNA_VARIANT_UTS46', 1); +} +if (!defined('IDNA_ERROR_EMPTY_LABEL')) { + define('IDNA_ERROR_EMPTY_LABEL', 1); +} +if (!defined('IDNA_ERROR_LABEL_TOO_LONG')) { + define('IDNA_ERROR_LABEL_TOO_LONG', 2); +} +if (!defined('IDNA_ERROR_DOMAIN_NAME_TOO_LONG')) { + define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4); +} +if (!defined('IDNA_ERROR_LEADING_HYPHEN')) { + define('IDNA_ERROR_LEADING_HYPHEN', 8); +} +if (!defined('IDNA_ERROR_TRAILING_HYPHEN')) { + define('IDNA_ERROR_TRAILING_HYPHEN', 16); +} +if (!defined('IDNA_ERROR_HYPHEN_3_4')) { + define('IDNA_ERROR_HYPHEN_3_4', 32); +} +if (!defined('IDNA_ERROR_LEADING_COMBINING_MARK')) { + define('IDNA_ERROR_LEADING_COMBINING_MARK', 64); +} +if (!defined('IDNA_ERROR_DISALLOWED')) { + define('IDNA_ERROR_DISALLOWED', 128); +} +if (!defined('IDNA_ERROR_PUNYCODE')) { + define('IDNA_ERROR_PUNYCODE', 256); +} +if (!defined('IDNA_ERROR_LABEL_HAS_DOT')) { + define('IDNA_ERROR_LABEL_HAS_DOT', 512); +} +if (!defined('IDNA_ERROR_INVALID_ACE_LABEL')) { + define('IDNA_ERROR_INVALID_ACE_LABEL', 1024); +} +if (!defined('IDNA_ERROR_BIDI')) { + define('IDNA_ERROR_BIDI', 2048); +} +if (!defined('IDNA_ERROR_CONTEXTJ')) { + define('IDNA_ERROR_CONTEXTJ', 4096); +} + +if (\PHP_VERSION_ID < 70400) { + if (!function_exists('idn_to_ascii')) { + function idn_to_ascii($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_2003, &$idna_info = null) { return p\Idn::idn_to_ascii($domain, $flags, $variant, $idna_info); } + } + if (!function_exists('idn_to_utf8')) { + function idn_to_utf8($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_2003, &$idna_info = null) { return p\Idn::idn_to_utf8($domain, $flags, $variant, $idna_info); } + } +} else { + if (!function_exists('idn_to_ascii')) { + function idn_to_ascii($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_UTS46, &$idna_info = null) { return p\Idn::idn_to_ascii($domain, $flags, $variant, $idna_info); } + } + if (!function_exists('idn_to_utf8')) { + function idn_to_utf8($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_UTS46, &$idna_info = null) { return p\Idn::idn_to_utf8($domain, $flags, $variant, $idna_info); } + } +} diff --git a/Server/vendor/symfony/polyfill-intl-idn/bootstrap80.php b/Server/vendor/symfony/polyfill-intl-idn/bootstrap80.php new file mode 100644 index 00000000..a62c2d69 --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-idn/bootstrap80.php @@ -0,0 +1,125 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Intl\Idn as p; + +if (!defined('U_IDNA_PROHIBITED_ERROR')) { + define('U_IDNA_PROHIBITED_ERROR', 66560); +} +if (!defined('U_IDNA_ERROR_START')) { + define('U_IDNA_ERROR_START', 66560); +} +if (!defined('U_IDNA_UNASSIGNED_ERROR')) { + define('U_IDNA_UNASSIGNED_ERROR', 66561); +} +if (!defined('U_IDNA_CHECK_BIDI_ERROR')) { + define('U_IDNA_CHECK_BIDI_ERROR', 66562); +} +if (!defined('U_IDNA_STD3_ASCII_RULES_ERROR')) { + define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563); +} +if (!defined('U_IDNA_ACE_PREFIX_ERROR')) { + define('U_IDNA_ACE_PREFIX_ERROR', 66564); +} +if (!defined('U_IDNA_VERIFICATION_ERROR')) { + define('U_IDNA_VERIFICATION_ERROR', 66565); +} +if (!defined('U_IDNA_LABEL_TOO_LONG_ERROR')) { + define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566); +} +if (!defined('U_IDNA_ZERO_LENGTH_LABEL_ERROR')) { + define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567); +} +if (!defined('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR')) { + define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568); +} +if (!defined('U_IDNA_ERROR_LIMIT')) { + define('U_IDNA_ERROR_LIMIT', 66569); +} +if (!defined('U_STRINGPREP_PROHIBITED_ERROR')) { + define('U_STRINGPREP_PROHIBITED_ERROR', 66560); +} +if (!defined('U_STRINGPREP_UNASSIGNED_ERROR')) { + define('U_STRINGPREP_UNASSIGNED_ERROR', 66561); +} +if (!defined('U_STRINGPREP_CHECK_BIDI_ERROR')) { + define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562); +} +if (!defined('IDNA_DEFAULT')) { + define('IDNA_DEFAULT', 0); +} +if (!defined('IDNA_ALLOW_UNASSIGNED')) { + define('IDNA_ALLOW_UNASSIGNED', 1); +} +if (!defined('IDNA_USE_STD3_RULES')) { + define('IDNA_USE_STD3_RULES', 2); +} +if (!defined('IDNA_CHECK_BIDI')) { + define('IDNA_CHECK_BIDI', 4); +} +if (!defined('IDNA_CHECK_CONTEXTJ')) { + define('IDNA_CHECK_CONTEXTJ', 8); +} +if (!defined('IDNA_NONTRANSITIONAL_TO_ASCII')) { + define('IDNA_NONTRANSITIONAL_TO_ASCII', 16); +} +if (!defined('IDNA_NONTRANSITIONAL_TO_UNICODE')) { + define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32); +} +if (!defined('INTL_IDNA_VARIANT_UTS46')) { + define('INTL_IDNA_VARIANT_UTS46', 1); +} +if (!defined('IDNA_ERROR_EMPTY_LABEL')) { + define('IDNA_ERROR_EMPTY_LABEL', 1); +} +if (!defined('IDNA_ERROR_LABEL_TOO_LONG')) { + define('IDNA_ERROR_LABEL_TOO_LONG', 2); +} +if (!defined('IDNA_ERROR_DOMAIN_NAME_TOO_LONG')) { + define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4); +} +if (!defined('IDNA_ERROR_LEADING_HYPHEN')) { + define('IDNA_ERROR_LEADING_HYPHEN', 8); +} +if (!defined('IDNA_ERROR_TRAILING_HYPHEN')) { + define('IDNA_ERROR_TRAILING_HYPHEN', 16); +} +if (!defined('IDNA_ERROR_HYPHEN_3_4')) { + define('IDNA_ERROR_HYPHEN_3_4', 32); +} +if (!defined('IDNA_ERROR_LEADING_COMBINING_MARK')) { + define('IDNA_ERROR_LEADING_COMBINING_MARK', 64); +} +if (!defined('IDNA_ERROR_DISALLOWED')) { + define('IDNA_ERROR_DISALLOWED', 128); +} +if (!defined('IDNA_ERROR_PUNYCODE')) { + define('IDNA_ERROR_PUNYCODE', 256); +} +if (!defined('IDNA_ERROR_LABEL_HAS_DOT')) { + define('IDNA_ERROR_LABEL_HAS_DOT', 512); +} +if (!defined('IDNA_ERROR_INVALID_ACE_LABEL')) { + define('IDNA_ERROR_INVALID_ACE_LABEL', 1024); +} +if (!defined('IDNA_ERROR_BIDI')) { + define('IDNA_ERROR_BIDI', 2048); +} +if (!defined('IDNA_ERROR_CONTEXTJ')) { + define('IDNA_ERROR_CONTEXTJ', 4096); +} + +if (!function_exists('idn_to_ascii')) { + function idn_to_ascii(?string $domain, ?int $flags = IDNA_DEFAULT, ?int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false { return p\Idn::idn_to_ascii((string) $domain, (int) $flags, (int) $variant, $idna_info); } +} +if (!function_exists('idn_to_utf8')) { + function idn_to_utf8(?string $domain, ?int $flags = IDNA_DEFAULT, ?int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false { return p\Idn::idn_to_utf8((string) $domain, (int) $flags, (int) $variant, $idna_info); } +} diff --git a/Server/vendor/symfony/polyfill-intl-idn/composer.json b/Server/vendor/symfony/polyfill-intl-idn/composer.json new file mode 100644 index 00000000..71030a2e --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-idn/composer.json @@ -0,0 +1,44 @@ +{ + "name": "symfony/polyfill-intl-idn", + "type": "library", + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "keywords": ["polyfill", "shim", "compatibility", "portable", "intl", "idn"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Intl\\Idn\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-intl": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/Server/vendor/symfony/deprecation-contracts/LICENSE b/Server/vendor/symfony/polyfill-intl-normalizer/LICENSE similarity index 95% rename from Server/vendor/symfony/deprecation-contracts/LICENSE rename to Server/vendor/symfony/polyfill-intl-normalizer/LICENSE index 0ed3a246..4cd8bdd3 100644 --- a/Server/vendor/symfony/deprecation-contracts/LICENSE +++ b/Server/vendor/symfony/polyfill-intl-normalizer/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2020-present Fabien Potencier +Copyright (c) 2015-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Server/vendor/symfony/polyfill-intl-normalizer/Normalizer.php b/Server/vendor/symfony/polyfill-intl-normalizer/Normalizer.php new file mode 100644 index 00000000..4443c232 --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-normalizer/Normalizer.php @@ -0,0 +1,310 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Intl\Normalizer; + +/** + * Normalizer is a PHP fallback implementation of the Normalizer class provided by the intl extension. + * + * It has been validated with Unicode 6.3 Normalization Conformance Test. + * See http://www.unicode.org/reports/tr15/ for detailed info about Unicode normalizations. + * + * @author Nicolas Grekas + * + * @internal + */ +class Normalizer +{ + public const FORM_D = \Normalizer::FORM_D; + public const FORM_KD = \Normalizer::FORM_KD; + public const FORM_C = \Normalizer::FORM_C; + public const FORM_KC = \Normalizer::FORM_KC; + public const NFD = \Normalizer::NFD; + public const NFKD = \Normalizer::NFKD; + public const NFC = \Normalizer::NFC; + public const NFKC = \Normalizer::NFKC; + + private static $C; + private static $D; + private static $KD; + private static $cC; + private static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; + private static $ASCII = "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"; + + public static function isNormalized(string $s, int $form = self::FORM_C) + { + if (!\in_array($form, [self::NFD, self::NFKD, self::NFC, self::NFKC])) { + return false; + } + if (!isset($s[strspn($s, self::$ASCII)])) { + return true; + } + if (self::NFC == $form && preg_match('//u', $s) && !preg_match('/[^\x00-\x{2FF}]/u', $s)) { + return true; + } + + return self::normalize($s, $form) === $s; + } + + public static function normalize(string $s, int $form = self::FORM_C) + { + if (!preg_match('//u', $s)) { + return false; + } + + switch ($form) { + case self::NFC: $C = true; $K = false; break; + case self::NFD: $C = false; $K = false; break; + case self::NFKC: $C = true; $K = true; break; + case self::NFKD: $C = false; $K = true; break; + default: + if (\defined('Normalizer::NONE') && \Normalizer::NONE == $form) { + return $s; + } + + if (80000 > \PHP_VERSION_ID) { + return false; + } + + throw new \ValueError('normalizer_normalize(): Argument #2 ($form) must be a a valid normalization form'); + } + + if ('' === $s) { + return ''; + } + + if ($K && null === self::$KD) { + self::$KD = self::getData('compatibilityDecomposition'); + } + + if (null === self::$D) { + self::$D = self::getData('canonicalDecomposition'); + self::$cC = self::getData('combiningClass'); + } + + if (null !== $mbEncoding = (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) ? mb_internal_encoding() : null) { + mb_internal_encoding('8bit'); + } + + $r = self::decompose($s, $K); + + if ($C) { + if (null === self::$C) { + self::$C = self::getData('canonicalComposition'); + } + + $r = self::recompose($r); + } + if (null !== $mbEncoding) { + mb_internal_encoding($mbEncoding); + } + + return $r; + } + + private static function recompose($s) + { + $ASCII = self::$ASCII; + $compMap = self::$C; + $combClass = self::$cC; + $ulenMask = self::$ulenMask; + + $result = $tail = ''; + + $i = $s[0] < "\x80" ? 1 : $ulenMask[$s[0] & "\xF0"]; + $len = \strlen($s); + + $lastUchr = substr($s, 0, $i); + $lastUcls = isset($combClass[$lastUchr]) ? 256 : 0; + + while ($i < $len) { + if ($s[$i] < "\x80") { + // ASCII chars + + if ($tail) { + $lastUchr .= $tail; + $tail = ''; + } + + if ($j = strspn($s, $ASCII, $i + 1)) { + $lastUchr .= substr($s, $i, $j); + $i += $j; + } + + $result .= $lastUchr; + $lastUchr = $s[$i]; + $lastUcls = 0; + ++$i; + continue; + } + + $ulen = $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + + if ($lastUchr < "\xE1\x84\x80" || "\xE1\x84\x92" < $lastUchr + || $uchr < "\xE1\x85\xA1" || "\xE1\x85\xB5" < $uchr + || $lastUcls) { + // Table lookup and combining chars composition + + $ucls = $combClass[$uchr] ?? 0; + + if (isset($compMap[$lastUchr.$uchr]) && (!$lastUcls || $lastUcls < $ucls)) { + $lastUchr = $compMap[$lastUchr.$uchr]; + } elseif ($lastUcls = $ucls) { + $tail .= $uchr; + } else { + if ($tail) { + $lastUchr .= $tail; + $tail = ''; + } + + $result .= $lastUchr; + $lastUchr = $uchr; + } + } else { + // Hangul chars + + $L = \ord($lastUchr[2]) - 0x80; + $V = \ord($uchr[2]) - 0xA1; + $T = 0; + + $uchr = substr($s, $i + $ulen, 3); + + if ("\xE1\x86\xA7" <= $uchr && $uchr <= "\xE1\x87\x82") { + $T = \ord($uchr[2]) - 0xA7; + 0 > $T && $T += 0x40; + $ulen += 3; + } + + $L = 0xAC00 + ($L * 21 + $V) * 28 + $T; + $lastUchr = \chr(0xE0 | $L >> 12).\chr(0x80 | $L >> 6 & 0x3F).\chr(0x80 | $L & 0x3F); + } + + $i += $ulen; + } + + return $result.$lastUchr.$tail; + } + + private static function decompose($s, $c) + { + $result = ''; + + $ASCII = self::$ASCII; + $decompMap = self::$D; + $combClass = self::$cC; + $ulenMask = self::$ulenMask; + if ($c) { + $compatMap = self::$KD; + } + + $c = []; + $i = 0; + $len = \strlen($s); + + while ($i < $len) { + if ($s[$i] < "\x80") { + // ASCII chars + + if ($c) { + ksort($c); + $result .= implode('', $c); + $c = []; + } + + $j = 1 + strspn($s, $ASCII, $i + 1); + $result .= substr($s, $i, $j); + $i += $j; + continue; + } + + $ulen = $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + + if ($uchr < "\xEA\xB0\x80" || "\xED\x9E\xA3" < $uchr) { + // Table lookup + + if ($uchr !== $j = $compatMap[$uchr] ?? ($decompMap[$uchr] ?? $uchr)) { + $uchr = $j; + + $j = \strlen($uchr); + $ulen = $uchr[0] < "\x80" ? 1 : $ulenMask[$uchr[0] & "\xF0"]; + + if ($ulen != $j) { + // Put trailing chars in $s + + $j -= $ulen; + $i -= $j; + + if (0 > $i) { + $s = str_repeat(' ', -$i).$s; + $len -= $i; + $i = 0; + } + + while ($j--) { + $s[$i + $j] = $uchr[$ulen + $j]; + } + + $uchr = substr($uchr, 0, $ulen); + } + } + if (isset($combClass[$uchr])) { + // Combining chars, for sorting + + if (!isset($c[$combClass[$uchr]])) { + $c[$combClass[$uchr]] = ''; + } + $c[$combClass[$uchr]] .= $uchr; + continue; + } + } else { + // Hangul chars + + $uchr = unpack('C*', $uchr); + $j = (($uchr[1] - 224) << 12) + (($uchr[2] - 128) << 6) + $uchr[3] - 0xAC80; + + $uchr = "\xE1\x84".\chr(0x80 + (int) ($j / 588)) + ."\xE1\x85".\chr(0xA1 + (int) (($j % 588) / 28)); + + if ($j %= 28) { + $uchr .= $j < 25 + ? ("\xE1\x86".\chr(0xA7 + $j)) + : ("\xE1\x87".\chr(0x67 + $j)); + } + } + if ($c) { + ksort($c); + $result .= implode('', $c); + $c = []; + } + + $result .= $uchr; + } + + if ($c) { + ksort($c); + $result .= implode('', $c); + } + + return $result; + } + + private static function getData($file) + { + if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { + return require $file; + } + + return false; + } +} diff --git a/Server/vendor/symfony/polyfill-intl-normalizer/README.md b/Server/vendor/symfony/polyfill-intl-normalizer/README.md new file mode 100644 index 00000000..b9b762e8 --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-normalizer/README.md @@ -0,0 +1,14 @@ +Symfony Polyfill / Intl: Normalizer +=================================== + +This component provides a fallback implementation for the +[`Normalizer`](https://php.net/Normalizer) class provided +by the [Intl](https://php.net/intl) extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/Server/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php b/Server/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php new file mode 100644 index 00000000..0fdfc890 --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php @@ -0,0 +1,17 @@ + 'À', + 'Á' => 'Á', + 'Â' => 'Â', + 'Ã' => 'Ã', + 'Ä' => 'Ä', + 'Å' => 'Å', + 'Ç' => 'Ç', + 'È' => 'È', + 'É' => 'É', + 'Ê' => 'Ê', + 'Ë' => 'Ë', + 'Ì' => 'Ì', + 'Í' => 'Í', + 'Î' => 'Î', + 'Ï' => 'Ï', + 'Ñ' => 'Ñ', + 'Ò' => 'Ò', + 'Ó' => 'Ó', + 'Ô' => 'Ô', + 'Õ' => 'Õ', + 'Ö' => 'Ö', + 'Ù' => 'Ù', + 'Ú' => 'Ú', + 'Û' => 'Û', + 'Ü' => 'Ü', + 'Ý' => 'Ý', + 'à' => 'à', + 'á' => 'á', + 'â' => 'â', + 'ã' => 'ã', + 'ä' => 'ä', + 'å' => 'å', + 'ç' => 'ç', + 'è' => 'è', + 'é' => 'é', + 'ê' => 'ê', + 'ë' => 'ë', + 'ì' => 'ì', + 'í' => 'í', + 'î' => 'î', + 'ï' => 'ï', + 'ñ' => 'ñ', + 'ò' => 'ò', + 'ó' => 'ó', + 'ô' => 'ô', + 'õ' => 'õ', + 'ö' => 'ö', + 'ù' => 'ù', + 'ú' => 'ú', + 'û' => 'û', + 'ü' => 'ü', + 'ý' => 'ý', + 'ÿ' => 'ÿ', + 'Ā' => 'Ā', + 'ā' => 'ā', + 'Ă' => 'Ă', + 'ă' => 'ă', + 'Ą' => 'Ą', + 'ą' => 'ą', + 'Ć' => 'Ć', + 'ć' => 'ć', + 'Ĉ' => 'Ĉ', + 'ĉ' => 'ĉ', + 'Ċ' => 'Ċ', + 'ċ' => 'ċ', + 'Č' => 'Č', + 'č' => 'č', + 'Ď' => 'Ď', + 'ď' => 'ď', + 'Ē' => 'Ē', + 'ē' => 'ē', + 'Ĕ' => 'Ĕ', + 'ĕ' => 'ĕ', + 'Ė' => 'Ė', + 'ė' => 'ė', + 'Ę' => 'Ę', + 'ę' => 'ę', + 'Ě' => 'Ě', + 'ě' => 'ě', + 'Ĝ' => 'Ĝ', + 'ĝ' => 'ĝ', + 'Ğ' => 'Ğ', + 'ğ' => 'ğ', + 'Ġ' => 'Ġ', + 'ġ' => 'ġ', + 'Ģ' => 'Ģ', + 'ģ' => 'ģ', + 'Ĥ' => 'Ĥ', + 'ĥ' => 'ĥ', + 'Ĩ' => 'Ĩ', + 'ĩ' => 'ĩ', + 'Ī' => 'Ī', + 'ī' => 'ī', + 'Ĭ' => 'Ĭ', + 'ĭ' => 'ĭ', + 'Į' => 'Į', + 'į' => 'į', + 'İ' => 'İ', + 'Ĵ' => 'Ĵ', + 'ĵ' => 'ĵ', + 'Ķ' => 'Ķ', + 'ķ' => 'ķ', + 'Ĺ' => 'Ĺ', + 'ĺ' => 'ĺ', + 'Ļ' => 'Ļ', + 'ļ' => 'ļ', + 'Ľ' => 'Ľ', + 'ľ' => 'ľ', + 'Ń' => 'Ń', + 'ń' => 'ń', + 'Ņ' => 'Ņ', + 'ņ' => 'ņ', + 'Ň' => 'Ň', + 'ň' => 'ň', + 'Ō' => 'Ō', + 'ō' => 'ō', + 'Ŏ' => 'Ŏ', + 'ŏ' => 'ŏ', + 'Ő' => 'Ő', + 'ő' => 'ő', + 'Ŕ' => 'Ŕ', + 'ŕ' => 'ŕ', + 'Ŗ' => 'Ŗ', + 'ŗ' => 'ŗ', + 'Ř' => 'Ř', + 'ř' => 'ř', + 'Ś' => 'Ś', + 'ś' => 'ś', + 'Ŝ' => 'Ŝ', + 'ŝ' => 'ŝ', + 'Ş' => 'Ş', + 'ş' => 'ş', + 'Š' => 'Š', + 'š' => 'š', + 'Ţ' => 'Ţ', + 'ţ' => 'ţ', + 'Ť' => 'Ť', + 'ť' => 'ť', + 'Ũ' => 'Ũ', + 'ũ' => 'ũ', + 'Ū' => 'Ū', + 'ū' => 'ū', + 'Ŭ' => 'Ŭ', + 'ŭ' => 'ŭ', + 'Ů' => 'Ů', + 'ů' => 'ů', + 'Ű' => 'Ű', + 'ű' => 'ű', + 'Ų' => 'Ų', + 'ų' => 'ų', + 'Ŵ' => 'Ŵ', + 'ŵ' => 'ŵ', + 'Ŷ' => 'Ŷ', + 'ŷ' => 'ŷ', + 'Ÿ' => 'Ÿ', + 'Ź' => 'Ź', + 'ź' => 'ź', + 'Ż' => 'Ż', + 'ż' => 'ż', + 'Ž' => 'Ž', + 'ž' => 'ž', + 'Ơ' => 'Ơ', + 'ơ' => 'ơ', + 'Ư' => 'Ư', + 'ư' => 'ư', + 'Ǎ' => 'Ǎ', + 'ǎ' => 'ǎ', + 'Ǐ' => 'Ǐ', + 'ǐ' => 'ǐ', + 'Ǒ' => 'Ǒ', + 'ǒ' => 'ǒ', + 'Ǔ' => 'Ǔ', + 'ǔ' => 'ǔ', + 'Ǖ' => 'Ǖ', + 'ǖ' => 'ǖ', + 'Ǘ' => 'Ǘ', + 'ǘ' => 'ǘ', + 'Ǚ' => 'Ǚ', + 'ǚ' => 'ǚ', + 'Ǜ' => 'Ǜ', + 'ǜ' => 'ǜ', + 'Ǟ' => 'Ǟ', + 'ǟ' => 'ǟ', + 'Ǡ' => 'Ǡ', + 'ǡ' => 'ǡ', + 'Ǣ' => 'Ǣ', + 'ǣ' => 'ǣ', + 'Ǧ' => 'Ǧ', + 'ǧ' => 'ǧ', + 'Ǩ' => 'Ǩ', + 'ǩ' => 'ǩ', + 'Ǫ' => 'Ǫ', + 'ǫ' => 'ǫ', + 'Ǭ' => 'Ǭ', + 'ǭ' => 'ǭ', + 'Ǯ' => 'Ǯ', + 'ǯ' => 'ǯ', + 'ǰ' => 'ǰ', + 'Ǵ' => 'Ǵ', + 'ǵ' => 'ǵ', + 'Ǹ' => 'Ǹ', + 'ǹ' => 'ǹ', + 'Ǻ' => 'Ǻ', + 'ǻ' => 'ǻ', + 'Ǽ' => 'Ǽ', + 'ǽ' => 'ǽ', + 'Ǿ' => 'Ǿ', + 'ǿ' => 'ǿ', + 'Ȁ' => 'Ȁ', + 'ȁ' => 'ȁ', + 'Ȃ' => 'Ȃ', + 'ȃ' => 'ȃ', + 'Ȅ' => 'Ȅ', + 'ȅ' => 'ȅ', + 'Ȇ' => 'Ȇ', + 'ȇ' => 'ȇ', + 'Ȉ' => 'Ȉ', + 'ȉ' => 'ȉ', + 'Ȋ' => 'Ȋ', + 'ȋ' => 'ȋ', + 'Ȍ' => 'Ȍ', + 'ȍ' => 'ȍ', + 'Ȏ' => 'Ȏ', + 'ȏ' => 'ȏ', + 'Ȑ' => 'Ȑ', + 'ȑ' => 'ȑ', + 'Ȓ' => 'Ȓ', + 'ȓ' => 'ȓ', + 'Ȕ' => 'Ȕ', + 'ȕ' => 'ȕ', + 'Ȗ' => 'Ȗ', + 'ȗ' => 'ȗ', + 'Ș' => 'Ș', + 'ș' => 'ș', + 'Ț' => 'Ț', + 'ț' => 'ț', + 'Ȟ' => 'Ȟ', + 'ȟ' => 'ȟ', + 'Ȧ' => 'Ȧ', + 'ȧ' => 'ȧ', + 'Ȩ' => 'Ȩ', + 'ȩ' => 'ȩ', + 'Ȫ' => 'Ȫ', + 'ȫ' => 'ȫ', + 'Ȭ' => 'Ȭ', + 'ȭ' => 'ȭ', + 'Ȯ' => 'Ȯ', + 'ȯ' => 'ȯ', + 'Ȱ' => 'Ȱ', + 'ȱ' => 'ȱ', + 'Ȳ' => 'Ȳ', + 'ȳ' => 'ȳ', + '΅' => '΅', + 'Ά' => 'Ά', + 'Έ' => 'Έ', + 'Ή' => 'Ή', + 'Ί' => 'Ί', + 'Ό' => 'Ό', + 'Ύ' => 'Ύ', + 'Ώ' => 'Ώ', + 'ΐ' => 'ΐ', + 'Ϊ' => 'Ϊ', + 'Ϋ' => 'Ϋ', + 'ά' => 'ά', + 'έ' => 'έ', + 'ή' => 'ή', + 'ί' => 'ί', + 'ΰ' => 'ΰ', + 'ϊ' => 'ϊ', + 'ϋ' => 'ϋ', + 'ό' => 'ό', + 'ύ' => 'ύ', + 'ώ' => 'ώ', + 'ϓ' => 'ϓ', + 'ϔ' => 'ϔ', + 'Ѐ' => 'Ѐ', + 'Ё' => 'Ё', + 'Ѓ' => 'Ѓ', + 'Ї' => 'Ї', + 'Ќ' => 'Ќ', + 'Ѝ' => 'Ѝ', + 'Ў' => 'Ў', + 'Й' => 'Й', + 'й' => 'й', + 'ѐ' => 'ѐ', + 'ё' => 'ё', + 'ѓ' => 'ѓ', + 'ї' => 'ї', + 'ќ' => 'ќ', + 'ѝ' => 'ѝ', + 'ў' => 'ў', + 'Ѷ' => 'Ѷ', + 'ѷ' => 'ѷ', + 'Ӂ' => 'Ӂ', + 'ӂ' => 'ӂ', + 'Ӑ' => 'Ӑ', + 'ӑ' => 'ӑ', + 'Ӓ' => 'Ӓ', + 'ӓ' => 'ӓ', + 'Ӗ' => 'Ӗ', + 'ӗ' => 'ӗ', + 'Ӛ' => 'Ӛ', + 'ӛ' => 'ӛ', + 'Ӝ' => 'Ӝ', + 'ӝ' => 'ӝ', + 'Ӟ' => 'Ӟ', + 'ӟ' => 'ӟ', + 'Ӣ' => 'Ӣ', + 'ӣ' => 'ӣ', + 'Ӥ' => 'Ӥ', + 'ӥ' => 'ӥ', + 'Ӧ' => 'Ӧ', + 'ӧ' => 'ӧ', + 'Ӫ' => 'Ӫ', + 'ӫ' => 'ӫ', + 'Ӭ' => 'Ӭ', + 'ӭ' => 'ӭ', + 'Ӯ' => 'Ӯ', + 'ӯ' => 'ӯ', + 'Ӱ' => 'Ӱ', + 'ӱ' => 'ӱ', + 'Ӳ' => 'Ӳ', + 'ӳ' => 'ӳ', + 'Ӵ' => 'Ӵ', + 'ӵ' => 'ӵ', + 'Ӹ' => 'Ӹ', + 'ӹ' => 'ӹ', + 'آ' => 'آ', + 'أ' => 'أ', + 'ؤ' => 'ؤ', + 'إ' => 'إ', + 'ئ' => 'ئ', + 'ۀ' => 'ۀ', + 'ۂ' => 'ۂ', + 'ۓ' => 'ۓ', + 'ऩ' => 'ऩ', + 'ऱ' => 'ऱ', + 'ऴ' => 'ऴ', + 'ো' => 'ো', + 'ৌ' => 'ৌ', + 'ୈ' => 'ୈ', + 'ୋ' => 'ୋ', + 'ୌ' => 'ୌ', + 'ஔ' => 'ஔ', + 'ொ' => 'ொ', + 'ோ' => 'ோ', + 'ௌ' => 'ௌ', + 'ై' => 'ై', + 'ೀ' => 'ೀ', + 'ೇ' => 'ೇ', + 'ೈ' => 'ೈ', + 'ೊ' => 'ೊ', + 'ೋ' => 'ೋ', + 'ൊ' => 'ൊ', + 'ോ' => 'ോ', + 'ൌ' => 'ൌ', + 'ේ' => 'ේ', + 'ො' => 'ො', + 'ෝ' => 'ෝ', + 'ෞ' => 'ෞ', + 'ဦ' => 'ဦ', + 'ᬆ' => 'ᬆ', + 'ᬈ' => 'ᬈ', + 'ᬊ' => 'ᬊ', + 'ᬌ' => 'ᬌ', + 'ᬎ' => 'ᬎ', + 'ᬒ' => 'ᬒ', + 'ᬻ' => 'ᬻ', + 'ᬽ' => 'ᬽ', + 'ᭀ' => 'ᭀ', + 'ᭁ' => 'ᭁ', + 'ᭃ' => 'ᭃ', + 'Ḁ' => 'Ḁ', + 'ḁ' => 'ḁ', + 'Ḃ' => 'Ḃ', + 'ḃ' => 'ḃ', + 'Ḅ' => 'Ḅ', + 'ḅ' => 'ḅ', + 'Ḇ' => 'Ḇ', + 'ḇ' => 'ḇ', + 'Ḉ' => 'Ḉ', + 'ḉ' => 'ḉ', + 'Ḋ' => 'Ḋ', + 'ḋ' => 'ḋ', + 'Ḍ' => 'Ḍ', + 'ḍ' => 'ḍ', + 'Ḏ' => 'Ḏ', + 'ḏ' => 'ḏ', + 'Ḑ' => 'Ḑ', + 'ḑ' => 'ḑ', + 'Ḓ' => 'Ḓ', + 'ḓ' => 'ḓ', + 'Ḕ' => 'Ḕ', + 'ḕ' => 'ḕ', + 'Ḗ' => 'Ḗ', + 'ḗ' => 'ḗ', + 'Ḙ' => 'Ḙ', + 'ḙ' => 'ḙ', + 'Ḛ' => 'Ḛ', + 'ḛ' => 'ḛ', + 'Ḝ' => 'Ḝ', + 'ḝ' => 'ḝ', + 'Ḟ' => 'Ḟ', + 'ḟ' => 'ḟ', + 'Ḡ' => 'Ḡ', + 'ḡ' => 'ḡ', + 'Ḣ' => 'Ḣ', + 'ḣ' => 'ḣ', + 'Ḥ' => 'Ḥ', + 'ḥ' => 'ḥ', + 'Ḧ' => 'Ḧ', + 'ḧ' => 'ḧ', + 'Ḩ' => 'Ḩ', + 'ḩ' => 'ḩ', + 'Ḫ' => 'Ḫ', + 'ḫ' => 'ḫ', + 'Ḭ' => 'Ḭ', + 'ḭ' => 'ḭ', + 'Ḯ' => 'Ḯ', + 'ḯ' => 'ḯ', + 'Ḱ' => 'Ḱ', + 'ḱ' => 'ḱ', + 'Ḳ' => 'Ḳ', + 'ḳ' => 'ḳ', + 'Ḵ' => 'Ḵ', + 'ḵ' => 'ḵ', + 'Ḷ' => 'Ḷ', + 'ḷ' => 'ḷ', + 'Ḹ' => 'Ḹ', + 'ḹ' => 'ḹ', + 'Ḻ' => 'Ḻ', + 'ḻ' => 'ḻ', + 'Ḽ' => 'Ḽ', + 'ḽ' => 'ḽ', + 'Ḿ' => 'Ḿ', + 'ḿ' => 'ḿ', + 'Ṁ' => 'Ṁ', + 'ṁ' => 'ṁ', + 'Ṃ' => 'Ṃ', + 'ṃ' => 'ṃ', + 'Ṅ' => 'Ṅ', + 'ṅ' => 'ṅ', + 'Ṇ' => 'Ṇ', + 'ṇ' => 'ṇ', + 'Ṉ' => 'Ṉ', + 'ṉ' => 'ṉ', + 'Ṋ' => 'Ṋ', + 'ṋ' => 'ṋ', + 'Ṍ' => 'Ṍ', + 'ṍ' => 'ṍ', + 'Ṏ' => 'Ṏ', + 'ṏ' => 'ṏ', + 'Ṑ' => 'Ṑ', + 'ṑ' => 'ṑ', + 'Ṓ' => 'Ṓ', + 'ṓ' => 'ṓ', + 'Ṕ' => 'Ṕ', + 'ṕ' => 'ṕ', + 'Ṗ' => 'Ṗ', + 'ṗ' => 'ṗ', + 'Ṙ' => 'Ṙ', + 'ṙ' => 'ṙ', + 'Ṛ' => 'Ṛ', + 'ṛ' => 'ṛ', + 'Ṝ' => 'Ṝ', + 'ṝ' => 'ṝ', + 'Ṟ' => 'Ṟ', + 'ṟ' => 'ṟ', + 'Ṡ' => 'Ṡ', + 'ṡ' => 'ṡ', + 'Ṣ' => 'Ṣ', + 'ṣ' => 'ṣ', + 'Ṥ' => 'Ṥ', + 'ṥ' => 'ṥ', + 'Ṧ' => 'Ṧ', + 'ṧ' => 'ṧ', + 'Ṩ' => 'Ṩ', + 'ṩ' => 'ṩ', + 'Ṫ' => 'Ṫ', + 'ṫ' => 'ṫ', + 'Ṭ' => 'Ṭ', + 'ṭ' => 'ṭ', + 'Ṯ' => 'Ṯ', + 'ṯ' => 'ṯ', + 'Ṱ' => 'Ṱ', + 'ṱ' => 'ṱ', + 'Ṳ' => 'Ṳ', + 'ṳ' => 'ṳ', + 'Ṵ' => 'Ṵ', + 'ṵ' => 'ṵ', + 'Ṷ' => 'Ṷ', + 'ṷ' => 'ṷ', + 'Ṹ' => 'Ṹ', + 'ṹ' => 'ṹ', + 'Ṻ' => 'Ṻ', + 'ṻ' => 'ṻ', + 'Ṽ' => 'Ṽ', + 'ṽ' => 'ṽ', + 'Ṿ' => 'Ṿ', + 'ṿ' => 'ṿ', + 'Ẁ' => 'Ẁ', + 'ẁ' => 'ẁ', + 'Ẃ' => 'Ẃ', + 'ẃ' => 'ẃ', + 'Ẅ' => 'Ẅ', + 'ẅ' => 'ẅ', + 'Ẇ' => 'Ẇ', + 'ẇ' => 'ẇ', + 'Ẉ' => 'Ẉ', + 'ẉ' => 'ẉ', + 'Ẋ' => 'Ẋ', + 'ẋ' => 'ẋ', + 'Ẍ' => 'Ẍ', + 'ẍ' => 'ẍ', + 'Ẏ' => 'Ẏ', + 'ẏ' => 'ẏ', + 'Ẑ' => 'Ẑ', + 'ẑ' => 'ẑ', + 'Ẓ' => 'Ẓ', + 'ẓ' => 'ẓ', + 'Ẕ' => 'Ẕ', + 'ẕ' => 'ẕ', + 'ẖ' => 'ẖ', + 'ẗ' => 'ẗ', + 'ẘ' => 'ẘ', + 'ẙ' => 'ẙ', + 'ẛ' => 'ẛ', + 'Ạ' => 'Ạ', + 'ạ' => 'ạ', + 'Ả' => 'Ả', + 'ả' => 'ả', + 'Ấ' => 'Ấ', + 'ấ' => 'ấ', + 'Ầ' => 'Ầ', + 'ầ' => 'ầ', + 'Ẩ' => 'Ẩ', + 'ẩ' => 'ẩ', + 'Ẫ' => 'Ẫ', + 'ẫ' => 'ẫ', + 'Ậ' => 'Ậ', + 'ậ' => 'ậ', + 'Ắ' => 'Ắ', + 'ắ' => 'ắ', + 'Ằ' => 'Ằ', + 'ằ' => 'ằ', + 'Ẳ' => 'Ẳ', + 'ẳ' => 'ẳ', + 'Ẵ' => 'Ẵ', + 'ẵ' => 'ẵ', + 'Ặ' => 'Ặ', + 'ặ' => 'ặ', + 'Ẹ' => 'Ẹ', + 'ẹ' => 'ẹ', + 'Ẻ' => 'Ẻ', + 'ẻ' => 'ẻ', + 'Ẽ' => 'Ẽ', + 'ẽ' => 'ẽ', + 'Ế' => 'Ế', + 'ế' => 'ế', + 'Ề' => 'Ề', + 'ề' => 'ề', + 'Ể' => 'Ể', + 'ể' => 'ể', + 'Ễ' => 'Ễ', + 'ễ' => 'ễ', + 'Ệ' => 'Ệ', + 'ệ' => 'ệ', + 'Ỉ' => 'Ỉ', + 'ỉ' => 'ỉ', + 'Ị' => 'Ị', + 'ị' => 'ị', + 'Ọ' => 'Ọ', + 'ọ' => 'ọ', + 'Ỏ' => 'Ỏ', + 'ỏ' => 'ỏ', + 'Ố' => 'Ố', + 'ố' => 'ố', + 'Ồ' => 'Ồ', + 'ồ' => 'ồ', + 'Ổ' => 'Ổ', + 'ổ' => 'ổ', + 'Ỗ' => 'Ỗ', + 'ỗ' => 'ỗ', + 'Ộ' => 'Ộ', + 'ộ' => 'ộ', + 'Ớ' => 'Ớ', + 'ớ' => 'ớ', + 'Ờ' => 'Ờ', + 'ờ' => 'ờ', + 'Ở' => 'Ở', + 'ở' => 'ở', + 'Ỡ' => 'Ỡ', + 'ỡ' => 'ỡ', + 'Ợ' => 'Ợ', + 'ợ' => 'ợ', + 'Ụ' => 'Ụ', + 'ụ' => 'ụ', + 'Ủ' => 'Ủ', + 'ủ' => 'ủ', + 'Ứ' => 'Ứ', + 'ứ' => 'ứ', + 'Ừ' => 'Ừ', + 'ừ' => 'ừ', + 'Ử' => 'Ử', + 'ử' => 'ử', + 'Ữ' => 'Ữ', + 'ữ' => 'ữ', + 'Ự' => 'Ự', + 'ự' => 'ự', + 'Ỳ' => 'Ỳ', + 'ỳ' => 'ỳ', + 'Ỵ' => 'Ỵ', + 'ỵ' => 'ỵ', + 'Ỷ' => 'Ỷ', + 'ỷ' => 'ỷ', + 'Ỹ' => 'Ỹ', + 'ỹ' => 'ỹ', + 'ἀ' => 'ἀ', + 'ἁ' => 'ἁ', + 'ἂ' => 'ἂ', + 'ἃ' => 'ἃ', + 'ἄ' => 'ἄ', + 'ἅ' => 'ἅ', + 'ἆ' => 'ἆ', + 'ἇ' => 'ἇ', + 'Ἀ' => 'Ἀ', + 'Ἁ' => 'Ἁ', + 'Ἂ' => 'Ἂ', + 'Ἃ' => 'Ἃ', + 'Ἄ' => 'Ἄ', + 'Ἅ' => 'Ἅ', + 'Ἆ' => 'Ἆ', + 'Ἇ' => 'Ἇ', + 'ἐ' => 'ἐ', + 'ἑ' => 'ἑ', + 'ἒ' => 'ἒ', + 'ἓ' => 'ἓ', + 'ἔ' => 'ἔ', + 'ἕ' => 'ἕ', + 'Ἐ' => 'Ἐ', + 'Ἑ' => 'Ἑ', + 'Ἒ' => 'Ἒ', + 'Ἓ' => 'Ἓ', + 'Ἔ' => 'Ἔ', + 'Ἕ' => 'Ἕ', + 'ἠ' => 'ἠ', + 'ἡ' => 'ἡ', + 'ἢ' => 'ἢ', + 'ἣ' => 'ἣ', + 'ἤ' => 'ἤ', + 'ἥ' => 'ἥ', + 'ἦ' => 'ἦ', + 'ἧ' => 'ἧ', + 'Ἠ' => 'Ἠ', + 'Ἡ' => 'Ἡ', + 'Ἢ' => 'Ἢ', + 'Ἣ' => 'Ἣ', + 'Ἤ' => 'Ἤ', + 'Ἥ' => 'Ἥ', + 'Ἦ' => 'Ἦ', + 'Ἧ' => 'Ἧ', + 'ἰ' => 'ἰ', + 'ἱ' => 'ἱ', + 'ἲ' => 'ἲ', + 'ἳ' => 'ἳ', + 'ἴ' => 'ἴ', + 'ἵ' => 'ἵ', + 'ἶ' => 'ἶ', + 'ἷ' => 'ἷ', + 'Ἰ' => 'Ἰ', + 'Ἱ' => 'Ἱ', + 'Ἲ' => 'Ἲ', + 'Ἳ' => 'Ἳ', + 'Ἴ' => 'Ἴ', + 'Ἵ' => 'Ἵ', + 'Ἶ' => 'Ἶ', + 'Ἷ' => 'Ἷ', + 'ὀ' => 'ὀ', + 'ὁ' => 'ὁ', + 'ὂ' => 'ὂ', + 'ὃ' => 'ὃ', + 'ὄ' => 'ὄ', + 'ὅ' => 'ὅ', + 'Ὀ' => 'Ὀ', + 'Ὁ' => 'Ὁ', + 'Ὂ' => 'Ὂ', + 'Ὃ' => 'Ὃ', + 'Ὄ' => 'Ὄ', + 'Ὅ' => 'Ὅ', + 'ὐ' => 'ὐ', + 'ὑ' => 'ὑ', + 'ὒ' => 'ὒ', + 'ὓ' => 'ὓ', + 'ὔ' => 'ὔ', + 'ὕ' => 'ὕ', + 'ὖ' => 'ὖ', + 'ὗ' => 'ὗ', + 'Ὑ' => 'Ὑ', + 'Ὓ' => 'Ὓ', + 'Ὕ' => 'Ὕ', + 'Ὗ' => 'Ὗ', + 'ὠ' => 'ὠ', + 'ὡ' => 'ὡ', + 'ὢ' => 'ὢ', + 'ὣ' => 'ὣ', + 'ὤ' => 'ὤ', + 'ὥ' => 'ὥ', + 'ὦ' => 'ὦ', + 'ὧ' => 'ὧ', + 'Ὠ' => 'Ὠ', + 'Ὡ' => 'Ὡ', + 'Ὢ' => 'Ὢ', + 'Ὣ' => 'Ὣ', + 'Ὤ' => 'Ὤ', + 'Ὥ' => 'Ὥ', + 'Ὦ' => 'Ὦ', + 'Ὧ' => 'Ὧ', + 'ὰ' => 'ὰ', + 'ὲ' => 'ὲ', + 'ὴ' => 'ὴ', + 'ὶ' => 'ὶ', + 'ὸ' => 'ὸ', + 'ὺ' => 'ὺ', + 'ὼ' => 'ὼ', + 'ᾀ' => 'ᾀ', + 'ᾁ' => 'ᾁ', + 'ᾂ' => 'ᾂ', + 'ᾃ' => 'ᾃ', + 'ᾄ' => 'ᾄ', + 'ᾅ' => 'ᾅ', + 'ᾆ' => 'ᾆ', + 'ᾇ' => 'ᾇ', + 'ᾈ' => 'ᾈ', + 'ᾉ' => 'ᾉ', + 'ᾊ' => 'ᾊ', + 'ᾋ' => 'ᾋ', + 'ᾌ' => 'ᾌ', + 'ᾍ' => 'ᾍ', + 'ᾎ' => 'ᾎ', + 'ᾏ' => 'ᾏ', + 'ᾐ' => 'ᾐ', + 'ᾑ' => 'ᾑ', + 'ᾒ' => 'ᾒ', + 'ᾓ' => 'ᾓ', + 'ᾔ' => 'ᾔ', + 'ᾕ' => 'ᾕ', + 'ᾖ' => 'ᾖ', + 'ᾗ' => 'ᾗ', + 'ᾘ' => 'ᾘ', + 'ᾙ' => 'ᾙ', + 'ᾚ' => 'ᾚ', + 'ᾛ' => 'ᾛ', + 'ᾜ' => 'ᾜ', + 'ᾝ' => 'ᾝ', + 'ᾞ' => 'ᾞ', + 'ᾟ' => 'ᾟ', + 'ᾠ' => 'ᾠ', + 'ᾡ' => 'ᾡ', + 'ᾢ' => 'ᾢ', + 'ᾣ' => 'ᾣ', + 'ᾤ' => 'ᾤ', + 'ᾥ' => 'ᾥ', + 'ᾦ' => 'ᾦ', + 'ᾧ' => 'ᾧ', + 'ᾨ' => 'ᾨ', + 'ᾩ' => 'ᾩ', + 'ᾪ' => 'ᾪ', + 'ᾫ' => 'ᾫ', + 'ᾬ' => 'ᾬ', + 'ᾭ' => 'ᾭ', + 'ᾮ' => 'ᾮ', + 'ᾯ' => 'ᾯ', + 'ᾰ' => 'ᾰ', + 'ᾱ' => 'ᾱ', + 'ᾲ' => 'ᾲ', + 'ᾳ' => 'ᾳ', + 'ᾴ' => 'ᾴ', + 'ᾶ' => 'ᾶ', + 'ᾷ' => 'ᾷ', + 'Ᾰ' => 'Ᾰ', + 'Ᾱ' => 'Ᾱ', + 'Ὰ' => 'Ὰ', + 'ᾼ' => 'ᾼ', + '῁' => '῁', + 'ῂ' => 'ῂ', + 'ῃ' => 'ῃ', + 'ῄ' => 'ῄ', + 'ῆ' => 'ῆ', + 'ῇ' => 'ῇ', + 'Ὲ' => 'Ὲ', + 'Ὴ' => 'Ὴ', + 'ῌ' => 'ῌ', + '῍' => '῍', + '῎' => '῎', + '῏' => '῏', + 'ῐ' => 'ῐ', + 'ῑ' => 'ῑ', + 'ῒ' => 'ῒ', + 'ῖ' => 'ῖ', + 'ῗ' => 'ῗ', + 'Ῐ' => 'Ῐ', + 'Ῑ' => 'Ῑ', + 'Ὶ' => 'Ὶ', + '῝' => '῝', + '῞' => '῞', + '῟' => '῟', + 'ῠ' => 'ῠ', + 'ῡ' => 'ῡ', + 'ῢ' => 'ῢ', + 'ῤ' => 'ῤ', + 'ῥ' => 'ῥ', + 'ῦ' => 'ῦ', + 'ῧ' => 'ῧ', + 'Ῠ' => 'Ῠ', + 'Ῡ' => 'Ῡ', + 'Ὺ' => 'Ὺ', + 'Ῥ' => 'Ῥ', + '῭' => '῭', + 'ῲ' => 'ῲ', + 'ῳ' => 'ῳ', + 'ῴ' => 'ῴ', + 'ῶ' => 'ῶ', + 'ῷ' => 'ῷ', + 'Ὸ' => 'Ὸ', + 'Ὼ' => 'Ὼ', + 'ῼ' => 'ῼ', + '↚' => '↚', + '↛' => '↛', + '↮' => '↮', + '⇍' => '⇍', + '⇎' => '⇎', + '⇏' => '⇏', + '∄' => '∄', + '∉' => '∉', + '∌' => '∌', + '∤' => '∤', + '∦' => '∦', + '≁' => '≁', + '≄' => '≄', + '≇' => '≇', + '≉' => '≉', + '≠' => '≠', + '≢' => '≢', + '≭' => '≭', + '≮' => '≮', + '≯' => '≯', + '≰' => '≰', + '≱' => '≱', + '≴' => '≴', + '≵' => '≵', + '≸' => '≸', + '≹' => '≹', + '⊀' => '⊀', + '⊁' => '⊁', + '⊄' => '⊄', + '⊅' => '⊅', + '⊈' => '⊈', + '⊉' => '⊉', + '⊬' => '⊬', + '⊭' => '⊭', + '⊮' => '⊮', + '⊯' => '⊯', + '⋠' => '⋠', + '⋡' => '⋡', + '⋢' => '⋢', + '⋣' => '⋣', + '⋪' => '⋪', + '⋫' => '⋫', + '⋬' => '⋬', + '⋭' => '⋭', + 'が' => 'が', + 'ぎ' => 'ぎ', + 'ぐ' => 'ぐ', + 'げ' => 'げ', + 'ご' => 'ご', + 'ざ' => 'ざ', + 'じ' => 'じ', + 'ず' => 'ず', + 'ぜ' => 'ぜ', + 'ぞ' => 'ぞ', + 'だ' => 'だ', + 'ぢ' => 'ぢ', + 'づ' => 'づ', + 'で' => 'で', + 'ど' => 'ど', + 'ば' => 'ば', + 'ぱ' => 'ぱ', + 'び' => 'び', + 'ぴ' => 'ぴ', + 'ぶ' => 'ぶ', + 'ぷ' => 'ぷ', + 'べ' => 'べ', + 'ぺ' => 'ぺ', + 'ぼ' => 'ぼ', + 'ぽ' => 'ぽ', + 'ゔ' => 'ゔ', + 'ゞ' => 'ゞ', + 'ガ' => 'ガ', + 'ギ' => 'ギ', + 'グ' => 'グ', + 'ゲ' => 'ゲ', + 'ゴ' => 'ゴ', + 'ザ' => 'ザ', + 'ジ' => 'ジ', + 'ズ' => 'ズ', + 'ゼ' => 'ゼ', + 'ゾ' => 'ゾ', + 'ダ' => 'ダ', + 'ヂ' => 'ヂ', + 'ヅ' => 'ヅ', + 'デ' => 'デ', + 'ド' => 'ド', + 'バ' => 'バ', + 'パ' => 'パ', + 'ビ' => 'ビ', + 'ピ' => 'ピ', + 'ブ' => 'ブ', + 'プ' => 'プ', + 'ベ' => 'ベ', + 'ペ' => 'ペ', + 'ボ' => 'ボ', + 'ポ' => 'ポ', + 'ヴ' => 'ヴ', + 'ヷ' => 'ヷ', + 'ヸ' => 'ヸ', + 'ヹ' => 'ヹ', + 'ヺ' => 'ヺ', + 'ヾ' => 'ヾ', + '𑂚' => '𑂚', + '𑂜' => '𑂜', + '𑂫' => '𑂫', + '𑄮' => '𑄮', + '𑄯' => '𑄯', + '𑍋' => '𑍋', + '𑍌' => '𑍌', + '𑒻' => '𑒻', + '𑒼' => '𑒼', + '𑒾' => '𑒾', + '𑖺' => '𑖺', + '𑖻' => '𑖻', + '𑤸' => '𑤸', +); diff --git a/Server/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php b/Server/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php new file mode 100644 index 00000000..5a3e8e09 --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php @@ -0,0 +1,2065 @@ + 'À', + 'Á' => 'Á', + 'Â' => 'Â', + 'Ã' => 'Ã', + 'Ä' => 'Ä', + 'Å' => 'Å', + 'Ç' => 'Ç', + 'È' => 'È', + 'É' => 'É', + 'Ê' => 'Ê', + 'Ë' => 'Ë', + 'Ì' => 'Ì', + 'Í' => 'Í', + 'Î' => 'Î', + 'Ï' => 'Ï', + 'Ñ' => 'Ñ', + 'Ò' => 'Ò', + 'Ó' => 'Ó', + 'Ô' => 'Ô', + 'Õ' => 'Õ', + 'Ö' => 'Ö', + 'Ù' => 'Ù', + 'Ú' => 'Ú', + 'Û' => 'Û', + 'Ü' => 'Ü', + 'Ý' => 'Ý', + 'à' => 'à', + 'á' => 'á', + 'â' => 'â', + 'ã' => 'ã', + 'ä' => 'ä', + 'å' => 'å', + 'ç' => 'ç', + 'è' => 'è', + 'é' => 'é', + 'ê' => 'ê', + 'ë' => 'ë', + 'ì' => 'ì', + 'í' => 'í', + 'î' => 'î', + 'ï' => 'ï', + 'ñ' => 'ñ', + 'ò' => 'ò', + 'ó' => 'ó', + 'ô' => 'ô', + 'õ' => 'õ', + 'ö' => 'ö', + 'ù' => 'ù', + 'ú' => 'ú', + 'û' => 'û', + 'ü' => 'ü', + 'ý' => 'ý', + 'ÿ' => 'ÿ', + 'Ā' => 'Ā', + 'ā' => 'ā', + 'Ă' => 'Ă', + 'ă' => 'ă', + 'Ą' => 'Ą', + 'ą' => 'ą', + 'Ć' => 'Ć', + 'ć' => 'ć', + 'Ĉ' => 'Ĉ', + 'ĉ' => 'ĉ', + 'Ċ' => 'Ċ', + 'ċ' => 'ċ', + 'Č' => 'Č', + 'č' => 'č', + 'Ď' => 'Ď', + 'ď' => 'ď', + 'Ē' => 'Ē', + 'ē' => 'ē', + 'Ĕ' => 'Ĕ', + 'ĕ' => 'ĕ', + 'Ė' => 'Ė', + 'ė' => 'ė', + 'Ę' => 'Ę', + 'ę' => 'ę', + 'Ě' => 'Ě', + 'ě' => 'ě', + 'Ĝ' => 'Ĝ', + 'ĝ' => 'ĝ', + 'Ğ' => 'Ğ', + 'ğ' => 'ğ', + 'Ġ' => 'Ġ', + 'ġ' => 'ġ', + 'Ģ' => 'Ģ', + 'ģ' => 'ģ', + 'Ĥ' => 'Ĥ', + 'ĥ' => 'ĥ', + 'Ĩ' => 'Ĩ', + 'ĩ' => 'ĩ', + 'Ī' => 'Ī', + 'ī' => 'ī', + 'Ĭ' => 'Ĭ', + 'ĭ' => 'ĭ', + 'Į' => 'Į', + 'į' => 'į', + 'İ' => 'İ', + 'Ĵ' => 'Ĵ', + 'ĵ' => 'ĵ', + 'Ķ' => 'Ķ', + 'ķ' => 'ķ', + 'Ĺ' => 'Ĺ', + 'ĺ' => 'ĺ', + 'Ļ' => 'Ļ', + 'ļ' => 'ļ', + 'Ľ' => 'Ľ', + 'ľ' => 'ľ', + 'Ń' => 'Ń', + 'ń' => 'ń', + 'Ņ' => 'Ņ', + 'ņ' => 'ņ', + 'Ň' => 'Ň', + 'ň' => 'ň', + 'Ō' => 'Ō', + 'ō' => 'ō', + 'Ŏ' => 'Ŏ', + 'ŏ' => 'ŏ', + 'Ő' => 'Ő', + 'ő' => 'ő', + 'Ŕ' => 'Ŕ', + 'ŕ' => 'ŕ', + 'Ŗ' => 'Ŗ', + 'ŗ' => 'ŗ', + 'Ř' => 'Ř', + 'ř' => 'ř', + 'Ś' => 'Ś', + 'ś' => 'ś', + 'Ŝ' => 'Ŝ', + 'ŝ' => 'ŝ', + 'Ş' => 'Ş', + 'ş' => 'ş', + 'Š' => 'Š', + 'š' => 'š', + 'Ţ' => 'Ţ', + 'ţ' => 'ţ', + 'Ť' => 'Ť', + 'ť' => 'ť', + 'Ũ' => 'Ũ', + 'ũ' => 'ũ', + 'Ū' => 'Ū', + 'ū' => 'ū', + 'Ŭ' => 'Ŭ', + 'ŭ' => 'ŭ', + 'Ů' => 'Ů', + 'ů' => 'ů', + 'Ű' => 'Ű', + 'ű' => 'ű', + 'Ų' => 'Ų', + 'ų' => 'ų', + 'Ŵ' => 'Ŵ', + 'ŵ' => 'ŵ', + 'Ŷ' => 'Ŷ', + 'ŷ' => 'ŷ', + 'Ÿ' => 'Ÿ', + 'Ź' => 'Ź', + 'ź' => 'ź', + 'Ż' => 'Ż', + 'ż' => 'ż', + 'Ž' => 'Ž', + 'ž' => 'ž', + 'Ơ' => 'Ơ', + 'ơ' => 'ơ', + 'Ư' => 'Ư', + 'ư' => 'ư', + 'Ǎ' => 'Ǎ', + 'ǎ' => 'ǎ', + 'Ǐ' => 'Ǐ', + 'ǐ' => 'ǐ', + 'Ǒ' => 'Ǒ', + 'ǒ' => 'ǒ', + 'Ǔ' => 'Ǔ', + 'ǔ' => 'ǔ', + 'Ǖ' => 'Ǖ', + 'ǖ' => 'ǖ', + 'Ǘ' => 'Ǘ', + 'ǘ' => 'ǘ', + 'Ǚ' => 'Ǚ', + 'ǚ' => 'ǚ', + 'Ǜ' => 'Ǜ', + 'ǜ' => 'ǜ', + 'Ǟ' => 'Ǟ', + 'ǟ' => 'ǟ', + 'Ǡ' => 'Ǡ', + 'ǡ' => 'ǡ', + 'Ǣ' => 'Ǣ', + 'ǣ' => 'ǣ', + 'Ǧ' => 'Ǧ', + 'ǧ' => 'ǧ', + 'Ǩ' => 'Ǩ', + 'ǩ' => 'ǩ', + 'Ǫ' => 'Ǫ', + 'ǫ' => 'ǫ', + 'Ǭ' => 'Ǭ', + 'ǭ' => 'ǭ', + 'Ǯ' => 'Ǯ', + 'ǯ' => 'ǯ', + 'ǰ' => 'ǰ', + 'Ǵ' => 'Ǵ', + 'ǵ' => 'ǵ', + 'Ǹ' => 'Ǹ', + 'ǹ' => 'ǹ', + 'Ǻ' => 'Ǻ', + 'ǻ' => 'ǻ', + 'Ǽ' => 'Ǽ', + 'ǽ' => 'ǽ', + 'Ǿ' => 'Ǿ', + 'ǿ' => 'ǿ', + 'Ȁ' => 'Ȁ', + 'ȁ' => 'ȁ', + 'Ȃ' => 'Ȃ', + 'ȃ' => 'ȃ', + 'Ȅ' => 'Ȅ', + 'ȅ' => 'ȅ', + 'Ȇ' => 'Ȇ', + 'ȇ' => 'ȇ', + 'Ȉ' => 'Ȉ', + 'ȉ' => 'ȉ', + 'Ȋ' => 'Ȋ', + 'ȋ' => 'ȋ', + 'Ȍ' => 'Ȍ', + 'ȍ' => 'ȍ', + 'Ȏ' => 'Ȏ', + 'ȏ' => 'ȏ', + 'Ȑ' => 'Ȑ', + 'ȑ' => 'ȑ', + 'Ȓ' => 'Ȓ', + 'ȓ' => 'ȓ', + 'Ȕ' => 'Ȕ', + 'ȕ' => 'ȕ', + 'Ȗ' => 'Ȗ', + 'ȗ' => 'ȗ', + 'Ș' => 'Ș', + 'ș' => 'ș', + 'Ț' => 'Ț', + 'ț' => 'ț', + 'Ȟ' => 'Ȟ', + 'ȟ' => 'ȟ', + 'Ȧ' => 'Ȧ', + 'ȧ' => 'ȧ', + 'Ȩ' => 'Ȩ', + 'ȩ' => 'ȩ', + 'Ȫ' => 'Ȫ', + 'ȫ' => 'ȫ', + 'Ȭ' => 'Ȭ', + 'ȭ' => 'ȭ', + 'Ȯ' => 'Ȯ', + 'ȯ' => 'ȯ', + 'Ȱ' => 'Ȱ', + 'ȱ' => 'ȱ', + 'Ȳ' => 'Ȳ', + 'ȳ' => 'ȳ', + '̀' => '̀', + '́' => '́', + '̓' => '̓', + '̈́' => '̈́', + 'ʹ' => 'ʹ', + ';' => ';', + '΅' => '΅', + 'Ά' => 'Ά', + '·' => '·', + 'Έ' => 'Έ', + 'Ή' => 'Ή', + 'Ί' => 'Ί', + 'Ό' => 'Ό', + 'Ύ' => 'Ύ', + 'Ώ' => 'Ώ', + 'ΐ' => 'ΐ', + 'Ϊ' => 'Ϊ', + 'Ϋ' => 'Ϋ', + 'ά' => 'ά', + 'έ' => 'έ', + 'ή' => 'ή', + 'ί' => 'ί', + 'ΰ' => 'ΰ', + 'ϊ' => 'ϊ', + 'ϋ' => 'ϋ', + 'ό' => 'ό', + 'ύ' => 'ύ', + 'ώ' => 'ώ', + 'ϓ' => 'ϓ', + 'ϔ' => 'ϔ', + 'Ѐ' => 'Ѐ', + 'Ё' => 'Ё', + 'Ѓ' => 'Ѓ', + 'Ї' => 'Ї', + 'Ќ' => 'Ќ', + 'Ѝ' => 'Ѝ', + 'Ў' => 'Ў', + 'Й' => 'Й', + 'й' => 'й', + 'ѐ' => 'ѐ', + 'ё' => 'ё', + 'ѓ' => 'ѓ', + 'ї' => 'ї', + 'ќ' => 'ќ', + 'ѝ' => 'ѝ', + 'ў' => 'ў', + 'Ѷ' => 'Ѷ', + 'ѷ' => 'ѷ', + 'Ӂ' => 'Ӂ', + 'ӂ' => 'ӂ', + 'Ӑ' => 'Ӑ', + 'ӑ' => 'ӑ', + 'Ӓ' => 'Ӓ', + 'ӓ' => 'ӓ', + 'Ӗ' => 'Ӗ', + 'ӗ' => 'ӗ', + 'Ӛ' => 'Ӛ', + 'ӛ' => 'ӛ', + 'Ӝ' => 'Ӝ', + 'ӝ' => 'ӝ', + 'Ӟ' => 'Ӟ', + 'ӟ' => 'ӟ', + 'Ӣ' => 'Ӣ', + 'ӣ' => 'ӣ', + 'Ӥ' => 'Ӥ', + 'ӥ' => 'ӥ', + 'Ӧ' => 'Ӧ', + 'ӧ' => 'ӧ', + 'Ӫ' => 'Ӫ', + 'ӫ' => 'ӫ', + 'Ӭ' => 'Ӭ', + 'ӭ' => 'ӭ', + 'Ӯ' => 'Ӯ', + 'ӯ' => 'ӯ', + 'Ӱ' => 'Ӱ', + 'ӱ' => 'ӱ', + 'Ӳ' => 'Ӳ', + 'ӳ' => 'ӳ', + 'Ӵ' => 'Ӵ', + 'ӵ' => 'ӵ', + 'Ӹ' => 'Ӹ', + 'ӹ' => 'ӹ', + 'آ' => 'آ', + 'أ' => 'أ', + 'ؤ' => 'ؤ', + 'إ' => 'إ', + 'ئ' => 'ئ', + 'ۀ' => 'ۀ', + 'ۂ' => 'ۂ', + 'ۓ' => 'ۓ', + 'ऩ' => 'ऩ', + 'ऱ' => 'ऱ', + 'ऴ' => 'ऴ', + 'क़' => 'क़', + 'ख़' => 'ख़', + 'ग़' => 'ग़', + 'ज़' => 'ज़', + 'ड़' => 'ड़', + 'ढ़' => 'ढ़', + 'फ़' => 'फ़', + 'य़' => 'य़', + 'ো' => 'ো', + 'ৌ' => 'ৌ', + 'ড়' => 'ড়', + 'ঢ়' => 'ঢ়', + 'য়' => 'য়', + 'ਲ਼' => 'ਲ਼', + 'ਸ਼' => 'ਸ਼', + 'ਖ਼' => 'ਖ਼', + 'ਗ਼' => 'ਗ਼', + 'ਜ਼' => 'ਜ਼', + 'ਫ਼' => 'ਫ਼', + 'ୈ' => 'ୈ', + 'ୋ' => 'ୋ', + 'ୌ' => 'ୌ', + 'ଡ଼' => 'ଡ଼', + 'ଢ଼' => 'ଢ଼', + 'ஔ' => 'ஔ', + 'ொ' => 'ொ', + 'ோ' => 'ோ', + 'ௌ' => 'ௌ', + 'ై' => 'ై', + 'ೀ' => 'ೀ', + 'ೇ' => 'ೇ', + 'ೈ' => 'ೈ', + 'ೊ' => 'ೊ', + 'ೋ' => 'ೋ', + 'ൊ' => 'ൊ', + 'ോ' => 'ോ', + 'ൌ' => 'ൌ', + 'ේ' => 'ේ', + 'ො' => 'ො', + 'ෝ' => 'ෝ', + 'ෞ' => 'ෞ', + 'གྷ' => 'གྷ', + 'ཌྷ' => 'ཌྷ', + 'དྷ' => 'དྷ', + 'བྷ' => 'བྷ', + 'ཛྷ' => 'ཛྷ', + 'ཀྵ' => 'ཀྵ', + 'ཱི' => 'ཱི', + 'ཱུ' => 'ཱུ', + 'ྲྀ' => 'ྲྀ', + 'ླྀ' => 'ླྀ', + 'ཱྀ' => 'ཱྀ', + 'ྒྷ' => 'ྒྷ', + 'ྜྷ' => 'ྜྷ', + 'ྡྷ' => 'ྡྷ', + 'ྦྷ' => 'ྦྷ', + 'ྫྷ' => 'ྫྷ', + 'ྐྵ' => 'ྐྵ', + 'ဦ' => 'ဦ', + 'ᬆ' => 'ᬆ', + 'ᬈ' => 'ᬈ', + 'ᬊ' => 'ᬊ', + 'ᬌ' => 'ᬌ', + 'ᬎ' => 'ᬎ', + 'ᬒ' => 'ᬒ', + 'ᬻ' => 'ᬻ', + 'ᬽ' => 'ᬽ', + 'ᭀ' => 'ᭀ', + 'ᭁ' => 'ᭁ', + 'ᭃ' => 'ᭃ', + 'Ḁ' => 'Ḁ', + 'ḁ' => 'ḁ', + 'Ḃ' => 'Ḃ', + 'ḃ' => 'ḃ', + 'Ḅ' => 'Ḅ', + 'ḅ' => 'ḅ', + 'Ḇ' => 'Ḇ', + 'ḇ' => 'ḇ', + 'Ḉ' => 'Ḉ', + 'ḉ' => 'ḉ', + 'Ḋ' => 'Ḋ', + 'ḋ' => 'ḋ', + 'Ḍ' => 'Ḍ', + 'ḍ' => 'ḍ', + 'Ḏ' => 'Ḏ', + 'ḏ' => 'ḏ', + 'Ḑ' => 'Ḑ', + 'ḑ' => 'ḑ', + 'Ḓ' => 'Ḓ', + 'ḓ' => 'ḓ', + 'Ḕ' => 'Ḕ', + 'ḕ' => 'ḕ', + 'Ḗ' => 'Ḗ', + 'ḗ' => 'ḗ', + 'Ḙ' => 'Ḙ', + 'ḙ' => 'ḙ', + 'Ḛ' => 'Ḛ', + 'ḛ' => 'ḛ', + 'Ḝ' => 'Ḝ', + 'ḝ' => 'ḝ', + 'Ḟ' => 'Ḟ', + 'ḟ' => 'ḟ', + 'Ḡ' => 'Ḡ', + 'ḡ' => 'ḡ', + 'Ḣ' => 'Ḣ', + 'ḣ' => 'ḣ', + 'Ḥ' => 'Ḥ', + 'ḥ' => 'ḥ', + 'Ḧ' => 'Ḧ', + 'ḧ' => 'ḧ', + 'Ḩ' => 'Ḩ', + 'ḩ' => 'ḩ', + 'Ḫ' => 'Ḫ', + 'ḫ' => 'ḫ', + 'Ḭ' => 'Ḭ', + 'ḭ' => 'ḭ', + 'Ḯ' => 'Ḯ', + 'ḯ' => 'ḯ', + 'Ḱ' => 'Ḱ', + 'ḱ' => 'ḱ', + 'Ḳ' => 'Ḳ', + 'ḳ' => 'ḳ', + 'Ḵ' => 'Ḵ', + 'ḵ' => 'ḵ', + 'Ḷ' => 'Ḷ', + 'ḷ' => 'ḷ', + 'Ḹ' => 'Ḹ', + 'ḹ' => 'ḹ', + 'Ḻ' => 'Ḻ', + 'ḻ' => 'ḻ', + 'Ḽ' => 'Ḽ', + 'ḽ' => 'ḽ', + 'Ḿ' => 'Ḿ', + 'ḿ' => 'ḿ', + 'Ṁ' => 'Ṁ', + 'ṁ' => 'ṁ', + 'Ṃ' => 'Ṃ', + 'ṃ' => 'ṃ', + 'Ṅ' => 'Ṅ', + 'ṅ' => 'ṅ', + 'Ṇ' => 'Ṇ', + 'ṇ' => 'ṇ', + 'Ṉ' => 'Ṉ', + 'ṉ' => 'ṉ', + 'Ṋ' => 'Ṋ', + 'ṋ' => 'ṋ', + 'Ṍ' => 'Ṍ', + 'ṍ' => 'ṍ', + 'Ṏ' => 'Ṏ', + 'ṏ' => 'ṏ', + 'Ṑ' => 'Ṑ', + 'ṑ' => 'ṑ', + 'Ṓ' => 'Ṓ', + 'ṓ' => 'ṓ', + 'Ṕ' => 'Ṕ', + 'ṕ' => 'ṕ', + 'Ṗ' => 'Ṗ', + 'ṗ' => 'ṗ', + 'Ṙ' => 'Ṙ', + 'ṙ' => 'ṙ', + 'Ṛ' => 'Ṛ', + 'ṛ' => 'ṛ', + 'Ṝ' => 'Ṝ', + 'ṝ' => 'ṝ', + 'Ṟ' => 'Ṟ', + 'ṟ' => 'ṟ', + 'Ṡ' => 'Ṡ', + 'ṡ' => 'ṡ', + 'Ṣ' => 'Ṣ', + 'ṣ' => 'ṣ', + 'Ṥ' => 'Ṥ', + 'ṥ' => 'ṥ', + 'Ṧ' => 'Ṧ', + 'ṧ' => 'ṧ', + 'Ṩ' => 'Ṩ', + 'ṩ' => 'ṩ', + 'Ṫ' => 'Ṫ', + 'ṫ' => 'ṫ', + 'Ṭ' => 'Ṭ', + 'ṭ' => 'ṭ', + 'Ṯ' => 'Ṯ', + 'ṯ' => 'ṯ', + 'Ṱ' => 'Ṱ', + 'ṱ' => 'ṱ', + 'Ṳ' => 'Ṳ', + 'ṳ' => 'ṳ', + 'Ṵ' => 'Ṵ', + 'ṵ' => 'ṵ', + 'Ṷ' => 'Ṷ', + 'ṷ' => 'ṷ', + 'Ṹ' => 'Ṹ', + 'ṹ' => 'ṹ', + 'Ṻ' => 'Ṻ', + 'ṻ' => 'ṻ', + 'Ṽ' => 'Ṽ', + 'ṽ' => 'ṽ', + 'Ṿ' => 'Ṿ', + 'ṿ' => 'ṿ', + 'Ẁ' => 'Ẁ', + 'ẁ' => 'ẁ', + 'Ẃ' => 'Ẃ', + 'ẃ' => 'ẃ', + 'Ẅ' => 'Ẅ', + 'ẅ' => 'ẅ', + 'Ẇ' => 'Ẇ', + 'ẇ' => 'ẇ', + 'Ẉ' => 'Ẉ', + 'ẉ' => 'ẉ', + 'Ẋ' => 'Ẋ', + 'ẋ' => 'ẋ', + 'Ẍ' => 'Ẍ', + 'ẍ' => 'ẍ', + 'Ẏ' => 'Ẏ', + 'ẏ' => 'ẏ', + 'Ẑ' => 'Ẑ', + 'ẑ' => 'ẑ', + 'Ẓ' => 'Ẓ', + 'ẓ' => 'ẓ', + 'Ẕ' => 'Ẕ', + 'ẕ' => 'ẕ', + 'ẖ' => 'ẖ', + 'ẗ' => 'ẗ', + 'ẘ' => 'ẘ', + 'ẙ' => 'ẙ', + 'ẛ' => 'ẛ', + 'Ạ' => 'Ạ', + 'ạ' => 'ạ', + 'Ả' => 'Ả', + 'ả' => 'ả', + 'Ấ' => 'Ấ', + 'ấ' => 'ấ', + 'Ầ' => 'Ầ', + 'ầ' => 'ầ', + 'Ẩ' => 'Ẩ', + 'ẩ' => 'ẩ', + 'Ẫ' => 'Ẫ', + 'ẫ' => 'ẫ', + 'Ậ' => 'Ậ', + 'ậ' => 'ậ', + 'Ắ' => 'Ắ', + 'ắ' => 'ắ', + 'Ằ' => 'Ằ', + 'ằ' => 'ằ', + 'Ẳ' => 'Ẳ', + 'ẳ' => 'ẳ', + 'Ẵ' => 'Ẵ', + 'ẵ' => 'ẵ', + 'Ặ' => 'Ặ', + 'ặ' => 'ặ', + 'Ẹ' => 'Ẹ', + 'ẹ' => 'ẹ', + 'Ẻ' => 'Ẻ', + 'ẻ' => 'ẻ', + 'Ẽ' => 'Ẽ', + 'ẽ' => 'ẽ', + 'Ế' => 'Ế', + 'ế' => 'ế', + 'Ề' => 'Ề', + 'ề' => 'ề', + 'Ể' => 'Ể', + 'ể' => 'ể', + 'Ễ' => 'Ễ', + 'ễ' => 'ễ', + 'Ệ' => 'Ệ', + 'ệ' => 'ệ', + 'Ỉ' => 'Ỉ', + 'ỉ' => 'ỉ', + 'Ị' => 'Ị', + 'ị' => 'ị', + 'Ọ' => 'Ọ', + 'ọ' => 'ọ', + 'Ỏ' => 'Ỏ', + 'ỏ' => 'ỏ', + 'Ố' => 'Ố', + 'ố' => 'ố', + 'Ồ' => 'Ồ', + 'ồ' => 'ồ', + 'Ổ' => 'Ổ', + 'ổ' => 'ổ', + 'Ỗ' => 'Ỗ', + 'ỗ' => 'ỗ', + 'Ộ' => 'Ộ', + 'ộ' => 'ộ', + 'Ớ' => 'Ớ', + 'ớ' => 'ớ', + 'Ờ' => 'Ờ', + 'ờ' => 'ờ', + 'Ở' => 'Ở', + 'ở' => 'ở', + 'Ỡ' => 'Ỡ', + 'ỡ' => 'ỡ', + 'Ợ' => 'Ợ', + 'ợ' => 'ợ', + 'Ụ' => 'Ụ', + 'ụ' => 'ụ', + 'Ủ' => 'Ủ', + 'ủ' => 'ủ', + 'Ứ' => 'Ứ', + 'ứ' => 'ứ', + 'Ừ' => 'Ừ', + 'ừ' => 'ừ', + 'Ử' => 'Ử', + 'ử' => 'ử', + 'Ữ' => 'Ữ', + 'ữ' => 'ữ', + 'Ự' => 'Ự', + 'ự' => 'ự', + 'Ỳ' => 'Ỳ', + 'ỳ' => 'ỳ', + 'Ỵ' => 'Ỵ', + 'ỵ' => 'ỵ', + 'Ỷ' => 'Ỷ', + 'ỷ' => 'ỷ', + 'Ỹ' => 'Ỹ', + 'ỹ' => 'ỹ', + 'ἀ' => 'ἀ', + 'ἁ' => 'ἁ', + 'ἂ' => 'ἂ', + 'ἃ' => 'ἃ', + 'ἄ' => 'ἄ', + 'ἅ' => 'ἅ', + 'ἆ' => 'ἆ', + 'ἇ' => 'ἇ', + 'Ἀ' => 'Ἀ', + 'Ἁ' => 'Ἁ', + 'Ἂ' => 'Ἂ', + 'Ἃ' => 'Ἃ', + 'Ἄ' => 'Ἄ', + 'Ἅ' => 'Ἅ', + 'Ἆ' => 'Ἆ', + 'Ἇ' => 'Ἇ', + 'ἐ' => 'ἐ', + 'ἑ' => 'ἑ', + 'ἒ' => 'ἒ', + 'ἓ' => 'ἓ', + 'ἔ' => 'ἔ', + 'ἕ' => 'ἕ', + 'Ἐ' => 'Ἐ', + 'Ἑ' => 'Ἑ', + 'Ἒ' => 'Ἒ', + 'Ἓ' => 'Ἓ', + 'Ἔ' => 'Ἔ', + 'Ἕ' => 'Ἕ', + 'ἠ' => 'ἠ', + 'ἡ' => 'ἡ', + 'ἢ' => 'ἢ', + 'ἣ' => 'ἣ', + 'ἤ' => 'ἤ', + 'ἥ' => 'ἥ', + 'ἦ' => 'ἦ', + 'ἧ' => 'ἧ', + 'Ἠ' => 'Ἠ', + 'Ἡ' => 'Ἡ', + 'Ἢ' => 'Ἢ', + 'Ἣ' => 'Ἣ', + 'Ἤ' => 'Ἤ', + 'Ἥ' => 'Ἥ', + 'Ἦ' => 'Ἦ', + 'Ἧ' => 'Ἧ', + 'ἰ' => 'ἰ', + 'ἱ' => 'ἱ', + 'ἲ' => 'ἲ', + 'ἳ' => 'ἳ', + 'ἴ' => 'ἴ', + 'ἵ' => 'ἵ', + 'ἶ' => 'ἶ', + 'ἷ' => 'ἷ', + 'Ἰ' => 'Ἰ', + 'Ἱ' => 'Ἱ', + 'Ἲ' => 'Ἲ', + 'Ἳ' => 'Ἳ', + 'Ἴ' => 'Ἴ', + 'Ἵ' => 'Ἵ', + 'Ἶ' => 'Ἶ', + 'Ἷ' => 'Ἷ', + 'ὀ' => 'ὀ', + 'ὁ' => 'ὁ', + 'ὂ' => 'ὂ', + 'ὃ' => 'ὃ', + 'ὄ' => 'ὄ', + 'ὅ' => 'ὅ', + 'Ὀ' => 'Ὀ', + 'Ὁ' => 'Ὁ', + 'Ὂ' => 'Ὂ', + 'Ὃ' => 'Ὃ', + 'Ὄ' => 'Ὄ', + 'Ὅ' => 'Ὅ', + 'ὐ' => 'ὐ', + 'ὑ' => 'ὑ', + 'ὒ' => 'ὒ', + 'ὓ' => 'ὓ', + 'ὔ' => 'ὔ', + 'ὕ' => 'ὕ', + 'ὖ' => 'ὖ', + 'ὗ' => 'ὗ', + 'Ὑ' => 'Ὑ', + 'Ὓ' => 'Ὓ', + 'Ὕ' => 'Ὕ', + 'Ὗ' => 'Ὗ', + 'ὠ' => 'ὠ', + 'ὡ' => 'ὡ', + 'ὢ' => 'ὢ', + 'ὣ' => 'ὣ', + 'ὤ' => 'ὤ', + 'ὥ' => 'ὥ', + 'ὦ' => 'ὦ', + 'ὧ' => 'ὧ', + 'Ὠ' => 'Ὠ', + 'Ὡ' => 'Ὡ', + 'Ὢ' => 'Ὢ', + 'Ὣ' => 'Ὣ', + 'Ὤ' => 'Ὤ', + 'Ὥ' => 'Ὥ', + 'Ὦ' => 'Ὦ', + 'Ὧ' => 'Ὧ', + 'ὰ' => 'ὰ', + 'ά' => 'ά', + 'ὲ' => 'ὲ', + 'έ' => 'έ', + 'ὴ' => 'ὴ', + 'ή' => 'ή', + 'ὶ' => 'ὶ', + 'ί' => 'ί', + 'ὸ' => 'ὸ', + 'ό' => 'ό', + 'ὺ' => 'ὺ', + 'ύ' => 'ύ', + 'ὼ' => 'ὼ', + 'ώ' => 'ώ', + 'ᾀ' => 'ᾀ', + 'ᾁ' => 'ᾁ', + 'ᾂ' => 'ᾂ', + 'ᾃ' => 'ᾃ', + 'ᾄ' => 'ᾄ', + 'ᾅ' => 'ᾅ', + 'ᾆ' => 'ᾆ', + 'ᾇ' => 'ᾇ', + 'ᾈ' => 'ᾈ', + 'ᾉ' => 'ᾉ', + 'ᾊ' => 'ᾊ', + 'ᾋ' => 'ᾋ', + 'ᾌ' => 'ᾌ', + 'ᾍ' => 'ᾍ', + 'ᾎ' => 'ᾎ', + 'ᾏ' => 'ᾏ', + 'ᾐ' => 'ᾐ', + 'ᾑ' => 'ᾑ', + 'ᾒ' => 'ᾒ', + 'ᾓ' => 'ᾓ', + 'ᾔ' => 'ᾔ', + 'ᾕ' => 'ᾕ', + 'ᾖ' => 'ᾖ', + 'ᾗ' => 'ᾗ', + 'ᾘ' => 'ᾘ', + 'ᾙ' => 'ᾙ', + 'ᾚ' => 'ᾚ', + 'ᾛ' => 'ᾛ', + 'ᾜ' => 'ᾜ', + 'ᾝ' => 'ᾝ', + 'ᾞ' => 'ᾞ', + 'ᾟ' => 'ᾟ', + 'ᾠ' => 'ᾠ', + 'ᾡ' => 'ᾡ', + 'ᾢ' => 'ᾢ', + 'ᾣ' => 'ᾣ', + 'ᾤ' => 'ᾤ', + 'ᾥ' => 'ᾥ', + 'ᾦ' => 'ᾦ', + 'ᾧ' => 'ᾧ', + 'ᾨ' => 'ᾨ', + 'ᾩ' => 'ᾩ', + 'ᾪ' => 'ᾪ', + 'ᾫ' => 'ᾫ', + 'ᾬ' => 'ᾬ', + 'ᾭ' => 'ᾭ', + 'ᾮ' => 'ᾮ', + 'ᾯ' => 'ᾯ', + 'ᾰ' => 'ᾰ', + 'ᾱ' => 'ᾱ', + 'ᾲ' => 'ᾲ', + 'ᾳ' => 'ᾳ', + 'ᾴ' => 'ᾴ', + 'ᾶ' => 'ᾶ', + 'ᾷ' => 'ᾷ', + 'Ᾰ' => 'Ᾰ', + 'Ᾱ' => 'Ᾱ', + 'Ὰ' => 'Ὰ', + 'Ά' => 'Ά', + 'ᾼ' => 'ᾼ', + 'ι' => 'ι', + '῁' => '῁', + 'ῂ' => 'ῂ', + 'ῃ' => 'ῃ', + 'ῄ' => 'ῄ', + 'ῆ' => 'ῆ', + 'ῇ' => 'ῇ', + 'Ὲ' => 'Ὲ', + 'Έ' => 'Έ', + 'Ὴ' => 'Ὴ', + 'Ή' => 'Ή', + 'ῌ' => 'ῌ', + '῍' => '῍', + '῎' => '῎', + '῏' => '῏', + 'ῐ' => 'ῐ', + 'ῑ' => 'ῑ', + 'ῒ' => 'ῒ', + 'ΐ' => 'ΐ', + 'ῖ' => 'ῖ', + 'ῗ' => 'ῗ', + 'Ῐ' => 'Ῐ', + 'Ῑ' => 'Ῑ', + 'Ὶ' => 'Ὶ', + 'Ί' => 'Ί', + '῝' => '῝', + '῞' => '῞', + '῟' => '῟', + 'ῠ' => 'ῠ', + 'ῡ' => 'ῡ', + 'ῢ' => 'ῢ', + 'ΰ' => 'ΰ', + 'ῤ' => 'ῤ', + 'ῥ' => 'ῥ', + 'ῦ' => 'ῦ', + 'ῧ' => 'ῧ', + 'Ῠ' => 'Ῠ', + 'Ῡ' => 'Ῡ', + 'Ὺ' => 'Ὺ', + 'Ύ' => 'Ύ', + 'Ῥ' => 'Ῥ', + '῭' => '῭', + '΅' => '΅', + '`' => '`', + 'ῲ' => 'ῲ', + 'ῳ' => 'ῳ', + 'ῴ' => 'ῴ', + 'ῶ' => 'ῶ', + 'ῷ' => 'ῷ', + 'Ὸ' => 'Ὸ', + 'Ό' => 'Ό', + 'Ὼ' => 'Ὼ', + 'Ώ' => 'Ώ', + 'ῼ' => 'ῼ', + '´' => '´', + ' ' => ' ', + ' ' => ' ', + 'Ω' => 'Ω', + 'K' => 'K', + 'Å' => 'Å', + '↚' => '↚', + '↛' => '↛', + '↮' => '↮', + '⇍' => '⇍', + '⇎' => '⇎', + '⇏' => '⇏', + '∄' => '∄', + '∉' => '∉', + '∌' => '∌', + '∤' => '∤', + '∦' => '∦', + '≁' => '≁', + '≄' => '≄', + '≇' => '≇', + '≉' => '≉', + '≠' => '≠', + '≢' => '≢', + '≭' => '≭', + '≮' => '≮', + '≯' => '≯', + '≰' => '≰', + '≱' => '≱', + '≴' => '≴', + '≵' => '≵', + '≸' => '≸', + '≹' => '≹', + '⊀' => '⊀', + '⊁' => '⊁', + '⊄' => '⊄', + '⊅' => '⊅', + '⊈' => '⊈', + '⊉' => '⊉', + '⊬' => '⊬', + '⊭' => '⊭', + '⊮' => '⊮', + '⊯' => '⊯', + '⋠' => '⋠', + '⋡' => '⋡', + '⋢' => '⋢', + '⋣' => '⋣', + '⋪' => '⋪', + '⋫' => '⋫', + '⋬' => '⋬', + '⋭' => '⋭', + '〈' => '〈', + '〉' => '〉', + '⫝̸' => '⫝̸', + 'が' => 'が', + 'ぎ' => 'ぎ', + 'ぐ' => 'ぐ', + 'げ' => 'げ', + 'ご' => 'ご', + 'ざ' => 'ざ', + 'じ' => 'じ', + 'ず' => 'ず', + 'ぜ' => 'ぜ', + 'ぞ' => 'ぞ', + 'だ' => 'だ', + 'ぢ' => 'ぢ', + 'づ' => 'づ', + 'で' => 'で', + 'ど' => 'ど', + 'ば' => 'ば', + 'ぱ' => 'ぱ', + 'び' => 'び', + 'ぴ' => 'ぴ', + 'ぶ' => 'ぶ', + 'ぷ' => 'ぷ', + 'べ' => 'べ', + 'ぺ' => 'ぺ', + 'ぼ' => 'ぼ', + 'ぽ' => 'ぽ', + 'ゔ' => 'ゔ', + 'ゞ' => 'ゞ', + 'ガ' => 'ガ', + 'ギ' => 'ギ', + 'グ' => 'グ', + 'ゲ' => 'ゲ', + 'ゴ' => 'ゴ', + 'ザ' => 'ザ', + 'ジ' => 'ジ', + 'ズ' => 'ズ', + 'ゼ' => 'ゼ', + 'ゾ' => 'ゾ', + 'ダ' => 'ダ', + 'ヂ' => 'ヂ', + 'ヅ' => 'ヅ', + 'デ' => 'デ', + 'ド' => 'ド', + 'バ' => 'バ', + 'パ' => 'パ', + 'ビ' => 'ビ', + 'ピ' => 'ピ', + 'ブ' => 'ブ', + 'プ' => 'プ', + 'ベ' => 'ベ', + 'ペ' => 'ペ', + 'ボ' => 'ボ', + 'ポ' => 'ポ', + 'ヴ' => 'ヴ', + 'ヷ' => 'ヷ', + 'ヸ' => 'ヸ', + 'ヹ' => 'ヹ', + 'ヺ' => 'ヺ', + 'ヾ' => 'ヾ', + '豈' => '豈', + '更' => '更', + '車' => '車', + '賈' => '賈', + '滑' => '滑', + '串' => '串', + '句' => '句', + '龜' => '龜', + '龜' => '龜', + '契' => '契', + '金' => '金', + '喇' => '喇', + '奈' => '奈', + '懶' => '懶', + '癩' => '癩', + '羅' => '羅', + '蘿' => '蘿', + '螺' => '螺', + '裸' => '裸', + '邏' => '邏', + '樂' => '樂', + '洛' => '洛', + '烙' => '烙', + '珞' => '珞', + '落' => '落', + '酪' => '酪', + '駱' => '駱', + '亂' => '亂', + '卵' => '卵', + '欄' => '欄', + '爛' => '爛', + '蘭' => '蘭', + '鸞' => '鸞', + '嵐' => '嵐', + '濫' => '濫', + '藍' => '藍', + '襤' => '襤', + '拉' => '拉', + '臘' => '臘', + '蠟' => '蠟', + '廊' => '廊', + '朗' => '朗', + '浪' => '浪', + '狼' => '狼', + '郎' => '郎', + '來' => '來', + '冷' => '冷', + '勞' => '勞', + '擄' => '擄', + '櫓' => '櫓', + '爐' => '爐', + '盧' => '盧', + '老' => '老', + '蘆' => '蘆', + '虜' => '虜', + '路' => '路', + '露' => '露', + '魯' => '魯', + '鷺' => '鷺', + '碌' => '碌', + '祿' => '祿', + '綠' => '綠', + '菉' => '菉', + '錄' => '錄', + '鹿' => '鹿', + '論' => '論', + '壟' => '壟', + '弄' => '弄', + '籠' => '籠', + '聾' => '聾', + '牢' => '牢', + '磊' => '磊', + '賂' => '賂', + '雷' => '雷', + '壘' => '壘', + '屢' => '屢', + '樓' => '樓', + '淚' => '淚', + '漏' => '漏', + '累' => '累', + '縷' => '縷', + '陋' => '陋', + '勒' => '勒', + '肋' => '肋', + '凜' => '凜', + '凌' => '凌', + '稜' => '稜', + '綾' => '綾', + '菱' => '菱', + '陵' => '陵', + '讀' => '讀', + '拏' => '拏', + '樂' => '樂', + '諾' => '諾', + '丹' => '丹', + '寧' => '寧', + '怒' => '怒', + '率' => '率', + '異' => '異', + '北' => '北', + '磻' => '磻', + '便' => '便', + '復' => '復', + '不' => '不', + '泌' => '泌', + '數' => '數', + '索' => '索', + '參' => '參', + '塞' => '塞', + '省' => '省', + '葉' => '葉', + '說' => '說', + '殺' => '殺', + '辰' => '辰', + '沈' => '沈', + '拾' => '拾', + '若' => '若', + '掠' => '掠', + '略' => '略', + '亮' => '亮', + '兩' => '兩', + '凉' => '凉', + '梁' => '梁', + '糧' => '糧', + '良' => '良', + '諒' => '諒', + '量' => '量', + '勵' => '勵', + '呂' => '呂', + '女' => '女', + '廬' => '廬', + '旅' => '旅', + '濾' => '濾', + '礪' => '礪', + '閭' => '閭', + '驪' => '驪', + '麗' => '麗', + '黎' => '黎', + '力' => '力', + '曆' => '曆', + '歷' => '歷', + '轢' => '轢', + '年' => '年', + '憐' => '憐', + '戀' => '戀', + '撚' => '撚', + '漣' => '漣', + '煉' => '煉', + '璉' => '璉', + '秊' => '秊', + '練' => '練', + '聯' => '聯', + '輦' => '輦', + '蓮' => '蓮', + '連' => '連', + '鍊' => '鍊', + '列' => '列', + '劣' => '劣', + '咽' => '咽', + '烈' => '烈', + '裂' => '裂', + '說' => '說', + '廉' => '廉', + '念' => '念', + '捻' => '捻', + '殮' => '殮', + '簾' => '簾', + '獵' => '獵', + '令' => '令', + '囹' => '囹', + '寧' => '寧', + '嶺' => '嶺', + '怜' => '怜', + '玲' => '玲', + '瑩' => '瑩', + '羚' => '羚', + '聆' => '聆', + '鈴' => '鈴', + '零' => '零', + '靈' => '靈', + '領' => '領', + '例' => '例', + '禮' => '禮', + '醴' => '醴', + '隸' => '隸', + '惡' => '惡', + '了' => '了', + '僚' => '僚', + '寮' => '寮', + '尿' => '尿', + '料' => '料', + '樂' => '樂', + '燎' => '燎', + '療' => '療', + '蓼' => '蓼', + '遼' => '遼', + '龍' => '龍', + '暈' => '暈', + '阮' => '阮', + '劉' => '劉', + '杻' => '杻', + '柳' => '柳', + '流' => '流', + '溜' => '溜', + '琉' => '琉', + '留' => '留', + '硫' => '硫', + '紐' => '紐', + '類' => '類', + '六' => '六', + '戮' => '戮', + '陸' => '陸', + '倫' => '倫', + '崙' => '崙', + '淪' => '淪', + '輪' => '輪', + '律' => '律', + '慄' => '慄', + '栗' => '栗', + '率' => '率', + '隆' => '隆', + '利' => '利', + '吏' => '吏', + '履' => '履', + '易' => '易', + '李' => '李', + '梨' => '梨', + '泥' => '泥', + '理' => '理', + '痢' => '痢', + '罹' => '罹', + '裏' => '裏', + '裡' => '裡', + '里' => '里', + '離' => '離', + '匿' => '匿', + '溺' => '溺', + '吝' => '吝', + '燐' => '燐', + '璘' => '璘', + '藺' => '藺', + '隣' => '隣', + '鱗' => '鱗', + '麟' => '麟', + '林' => '林', + '淋' => '淋', + '臨' => '臨', + '立' => '立', + '笠' => '笠', + '粒' => '粒', + '狀' => '狀', + '炙' => '炙', + '識' => '識', + '什' => '什', + '茶' => '茶', + '刺' => '刺', + '切' => '切', + '度' => '度', + '拓' => '拓', + '糖' => '糖', + '宅' => '宅', + '洞' => '洞', + '暴' => '暴', + '輻' => '輻', + '行' => '行', + '降' => '降', + '見' => '見', + '廓' => '廓', + '兀' => '兀', + '嗀' => '嗀', + '塚' => '塚', + '晴' => '晴', + '凞' => '凞', + '猪' => '猪', + '益' => '益', + '礼' => '礼', + '神' => '神', + '祥' => '祥', + '福' => '福', + '靖' => '靖', + '精' => '精', + '羽' => '羽', + '蘒' => '蘒', + '諸' => '諸', + '逸' => '逸', + '都' => '都', + '飯' => '飯', + '飼' => '飼', + '館' => '館', + '鶴' => '鶴', + '郞' => '郞', + '隷' => '隷', + '侮' => '侮', + '僧' => '僧', + '免' => '免', + '勉' => '勉', + '勤' => '勤', + '卑' => '卑', + '喝' => '喝', + '嘆' => '嘆', + '器' => '器', + '塀' => '塀', + '墨' => '墨', + '層' => '層', + '屮' => '屮', + '悔' => '悔', + '慨' => '慨', + '憎' => '憎', + '懲' => '懲', + '敏' => '敏', + '既' => '既', + '暑' => '暑', + '梅' => '梅', + '海' => '海', + '渚' => '渚', + '漢' => '漢', + '煮' => '煮', + '爫' => '爫', + '琢' => '琢', + '碑' => '碑', + '社' => '社', + '祉' => '祉', + '祈' => '祈', + '祐' => '祐', + '祖' => '祖', + '祝' => '祝', + '禍' => '禍', + '禎' => '禎', + '穀' => '穀', + '突' => '突', + '節' => '節', + '練' => '練', + '縉' => '縉', + '繁' => '繁', + '署' => '署', + '者' => '者', + '臭' => '臭', + '艹' => '艹', + '艹' => '艹', + '著' => '著', + '褐' => '褐', + '視' => '視', + '謁' => '謁', + '謹' => '謹', + '賓' => '賓', + '贈' => '贈', + '辶' => '辶', + '逸' => '逸', + '難' => '難', + '響' => '響', + '頻' => '頻', + '恵' => '恵', + '𤋮' => '𤋮', + '舘' => '舘', + '並' => '並', + '况' => '况', + '全' => '全', + '侀' => '侀', + '充' => '充', + '冀' => '冀', + '勇' => '勇', + '勺' => '勺', + '喝' => '喝', + '啕' => '啕', + '喙' => '喙', + '嗢' => '嗢', + '塚' => '塚', + '墳' => '墳', + '奄' => '奄', + '奔' => '奔', + '婢' => '婢', + '嬨' => '嬨', + '廒' => '廒', + '廙' => '廙', + '彩' => '彩', + '徭' => '徭', + '惘' => '惘', + '慎' => '慎', + '愈' => '愈', + '憎' => '憎', + '慠' => '慠', + '懲' => '懲', + '戴' => '戴', + '揄' => '揄', + '搜' => '搜', + '摒' => '摒', + '敖' => '敖', + '晴' => '晴', + '朗' => '朗', + '望' => '望', + '杖' => '杖', + '歹' => '歹', + '殺' => '殺', + '流' => '流', + '滛' => '滛', + '滋' => '滋', + '漢' => '漢', + '瀞' => '瀞', + '煮' => '煮', + '瞧' => '瞧', + '爵' => '爵', + '犯' => '犯', + '猪' => '猪', + '瑱' => '瑱', + '甆' => '甆', + '画' => '画', + '瘝' => '瘝', + '瘟' => '瘟', + '益' => '益', + '盛' => '盛', + '直' => '直', + '睊' => '睊', + '着' => '着', + '磌' => '磌', + '窱' => '窱', + '節' => '節', + '类' => '类', + '絛' => '絛', + '練' => '練', + '缾' => '缾', + '者' => '者', + '荒' => '荒', + '華' => '華', + '蝹' => '蝹', + '襁' => '襁', + '覆' => '覆', + '視' => '視', + '調' => '調', + '諸' => '諸', + '請' => '請', + '謁' => '謁', + '諾' => '諾', + '諭' => '諭', + '謹' => '謹', + '變' => '變', + '贈' => '贈', + '輸' => '輸', + '遲' => '遲', + '醙' => '醙', + '鉶' => '鉶', + '陼' => '陼', + '難' => '難', + '靖' => '靖', + '韛' => '韛', + '響' => '響', + '頋' => '頋', + '頻' => '頻', + '鬒' => '鬒', + '龜' => '龜', + '𢡊' => '𢡊', + '𢡄' => '𢡄', + '𣏕' => '𣏕', + '㮝' => '㮝', + '䀘' => '䀘', + '䀹' => '䀹', + '𥉉' => '𥉉', + '𥳐' => '𥳐', + '𧻓' => '𧻓', + '齃' => '齃', + '龎' => '龎', + 'יִ' => 'יִ', + 'ײַ' => 'ײַ', + 'שׁ' => 'שׁ', + 'שׂ' => 'שׂ', + 'שּׁ' => 'שּׁ', + 'שּׂ' => 'שּׂ', + 'אַ' => 'אַ', + 'אָ' => 'אָ', + 'אּ' => 'אּ', + 'בּ' => 'בּ', + 'גּ' => 'גּ', + 'דּ' => 'דּ', + 'הּ' => 'הּ', + 'וּ' => 'וּ', + 'זּ' => 'זּ', + 'טּ' => 'טּ', + 'יּ' => 'יּ', + 'ךּ' => 'ךּ', + 'כּ' => 'כּ', + 'לּ' => 'לּ', + 'מּ' => 'מּ', + 'נּ' => 'נּ', + 'סּ' => 'סּ', + 'ףּ' => 'ףּ', + 'פּ' => 'פּ', + 'צּ' => 'צּ', + 'קּ' => 'קּ', + 'רּ' => 'רּ', + 'שּ' => 'שּ', + 'תּ' => 'תּ', + 'וֹ' => 'וֹ', + 'בֿ' => 'בֿ', + 'כֿ' => 'כֿ', + 'פֿ' => 'פֿ', + '𑂚' => '𑂚', + '𑂜' => '𑂜', + '𑂫' => '𑂫', + '𑄮' => '𑄮', + '𑄯' => '𑄯', + '𑍋' => '𑍋', + '𑍌' => '𑍌', + '𑒻' => '𑒻', + '𑒼' => '𑒼', + '𑒾' => '𑒾', + '𑖺' => '𑖺', + '𑖻' => '𑖻', + '𑤸' => '𑤸', + '𝅗𝅥' => '𝅗𝅥', + '𝅘𝅥' => '𝅘𝅥', + '𝅘𝅥𝅮' => '𝅘𝅥𝅮', + '𝅘𝅥𝅯' => '𝅘𝅥𝅯', + '𝅘𝅥𝅰' => '𝅘𝅥𝅰', + '𝅘𝅥𝅱' => '𝅘𝅥𝅱', + '𝅘𝅥𝅲' => '𝅘𝅥𝅲', + '𝆹𝅥' => '𝆹𝅥', + '𝆺𝅥' => '𝆺𝅥', + '𝆹𝅥𝅮' => '𝆹𝅥𝅮', + '𝆺𝅥𝅮' => '𝆺𝅥𝅮', + '𝆹𝅥𝅯' => '𝆹𝅥𝅯', + '𝆺𝅥𝅯' => '𝆺𝅥𝅯', + '丽' => '丽', + '丸' => '丸', + '乁' => '乁', + '𠄢' => '𠄢', + '你' => '你', + '侮' => '侮', + '侻' => '侻', + '倂' => '倂', + '偺' => '偺', + '備' => '備', + '僧' => '僧', + '像' => '像', + '㒞' => '㒞', + '𠘺' => '𠘺', + '免' => '免', + '兔' => '兔', + '兤' => '兤', + '具' => '具', + '𠔜' => '𠔜', + '㒹' => '㒹', + '內' => '內', + '再' => '再', + '𠕋' => '𠕋', + '冗' => '冗', + '冤' => '冤', + '仌' => '仌', + '冬' => '冬', + '况' => '况', + '𩇟' => '𩇟', + '凵' => '凵', + '刃' => '刃', + '㓟' => '㓟', + '刻' => '刻', + '剆' => '剆', + '割' => '割', + '剷' => '剷', + '㔕' => '㔕', + '勇' => '勇', + '勉' => '勉', + '勤' => '勤', + '勺' => '勺', + '包' => '包', + '匆' => '匆', + '北' => '北', + '卉' => '卉', + '卑' => '卑', + '博' => '博', + '即' => '即', + '卽' => '卽', + '卿' => '卿', + '卿' => '卿', + '卿' => '卿', + '𠨬' => '𠨬', + '灰' => '灰', + '及' => '及', + '叟' => '叟', + '𠭣' => '𠭣', + '叫' => '叫', + '叱' => '叱', + '吆' => '吆', + '咞' => '咞', + '吸' => '吸', + '呈' => '呈', + '周' => '周', + '咢' => '咢', + '哶' => '哶', + '唐' => '唐', + '啓' => '啓', + '啣' => '啣', + '善' => '善', + '善' => '善', + '喙' => '喙', + '喫' => '喫', + '喳' => '喳', + '嗂' => '嗂', + '圖' => '圖', + '嘆' => '嘆', + '圗' => '圗', + '噑' => '噑', + '噴' => '噴', + '切' => '切', + '壮' => '壮', + '城' => '城', + '埴' => '埴', + '堍' => '堍', + '型' => '型', + '堲' => '堲', + '報' => '報', + '墬' => '墬', + '𡓤' => '𡓤', + '売' => '売', + '壷' => '壷', + '夆' => '夆', + '多' => '多', + '夢' => '夢', + '奢' => '奢', + '𡚨' => '𡚨', + '𡛪' => '𡛪', + '姬' => '姬', + '娛' => '娛', + '娧' => '娧', + '姘' => '姘', + '婦' => '婦', + '㛮' => '㛮', + '㛼' => '㛼', + '嬈' => '嬈', + '嬾' => '嬾', + '嬾' => '嬾', + '𡧈' => '𡧈', + '寃' => '寃', + '寘' => '寘', + '寧' => '寧', + '寳' => '寳', + '𡬘' => '𡬘', + '寿' => '寿', + '将' => '将', + '当' => '当', + '尢' => '尢', + '㞁' => '㞁', + '屠' => '屠', + '屮' => '屮', + '峀' => '峀', + '岍' => '岍', + '𡷤' => '𡷤', + '嵃' => '嵃', + '𡷦' => '𡷦', + '嵮' => '嵮', + '嵫' => '嵫', + '嵼' => '嵼', + '巡' => '巡', + '巢' => '巢', + '㠯' => '㠯', + '巽' => '巽', + '帨' => '帨', + '帽' => '帽', + '幩' => '幩', + '㡢' => '㡢', + '𢆃' => '𢆃', + '㡼' => '㡼', + '庰' => '庰', + '庳' => '庳', + '庶' => '庶', + '廊' => '廊', + '𪎒' => '𪎒', + '廾' => '廾', + '𢌱' => '𢌱', + '𢌱' => '𢌱', + '舁' => '舁', + '弢' => '弢', + '弢' => '弢', + '㣇' => '㣇', + '𣊸' => '𣊸', + '𦇚' => '𦇚', + '形' => '形', + '彫' => '彫', + '㣣' => '㣣', + '徚' => '徚', + '忍' => '忍', + '志' => '志', + '忹' => '忹', + '悁' => '悁', + '㤺' => '㤺', + '㤜' => '㤜', + '悔' => '悔', + '𢛔' => '𢛔', + '惇' => '惇', + '慈' => '慈', + '慌' => '慌', + '慎' => '慎', + '慌' => '慌', + '慺' => '慺', + '憎' => '憎', + '憲' => '憲', + '憤' => '憤', + '憯' => '憯', + '懞' => '懞', + '懲' => '懲', + '懶' => '懶', + '成' => '成', + '戛' => '戛', + '扝' => '扝', + '抱' => '抱', + '拔' => '拔', + '捐' => '捐', + '𢬌' => '𢬌', + '挽' => '挽', + '拼' => '拼', + '捨' => '捨', + '掃' => '掃', + '揤' => '揤', + '𢯱' => '𢯱', + '搢' => '搢', + '揅' => '揅', + '掩' => '掩', + '㨮' => '㨮', + '摩' => '摩', + '摾' => '摾', + '撝' => '撝', + '摷' => '摷', + '㩬' => '㩬', + '敏' => '敏', + '敬' => '敬', + '𣀊' => '𣀊', + '旣' => '旣', + '書' => '書', + '晉' => '晉', + '㬙' => '㬙', + '暑' => '暑', + '㬈' => '㬈', + '㫤' => '㫤', + '冒' => '冒', + '冕' => '冕', + '最' => '最', + '暜' => '暜', + '肭' => '肭', + '䏙' => '䏙', + '朗' => '朗', + '望' => '望', + '朡' => '朡', + '杞' => '杞', + '杓' => '杓', + '𣏃' => '𣏃', + '㭉' => '㭉', + '柺' => '柺', + '枅' => '枅', + '桒' => '桒', + '梅' => '梅', + '𣑭' => '𣑭', + '梎' => '梎', + '栟' => '栟', + '椔' => '椔', + '㮝' => '㮝', + '楂' => '楂', + '榣' => '榣', + '槪' => '槪', + '檨' => '檨', + '𣚣' => '𣚣', + '櫛' => '櫛', + '㰘' => '㰘', + '次' => '次', + '𣢧' => '𣢧', + '歔' => '歔', + '㱎' => '㱎', + '歲' => '歲', + '殟' => '殟', + '殺' => '殺', + '殻' => '殻', + '𣪍' => '𣪍', + '𡴋' => '𡴋', + '𣫺' => '𣫺', + '汎' => '汎', + '𣲼' => '𣲼', + '沿' => '沿', + '泍' => '泍', + '汧' => '汧', + '洖' => '洖', + '派' => '派', + '海' => '海', + '流' => '流', + '浩' => '浩', + '浸' => '浸', + '涅' => '涅', + '𣴞' => '𣴞', + '洴' => '洴', + '港' => '港', + '湮' => '湮', + '㴳' => '㴳', + '滋' => '滋', + '滇' => '滇', + '𣻑' => '𣻑', + '淹' => '淹', + '潮' => '潮', + '𣽞' => '𣽞', + '𣾎' => '𣾎', + '濆' => '濆', + '瀹' => '瀹', + '瀞' => '瀞', + '瀛' => '瀛', + '㶖' => '㶖', + '灊' => '灊', + '災' => '災', + '灷' => '灷', + '炭' => '炭', + '𠔥' => '𠔥', + '煅' => '煅', + '𤉣' => '𤉣', + '熜' => '熜', + '𤎫' => '𤎫', + '爨' => '爨', + '爵' => '爵', + '牐' => '牐', + '𤘈' => '𤘈', + '犀' => '犀', + '犕' => '犕', + '𤜵' => '𤜵', + '𤠔' => '𤠔', + '獺' => '獺', + '王' => '王', + '㺬' => '㺬', + '玥' => '玥', + '㺸' => '㺸', + '㺸' => '㺸', + '瑇' => '瑇', + '瑜' => '瑜', + '瑱' => '瑱', + '璅' => '璅', + '瓊' => '瓊', + '㼛' => '㼛', + '甤' => '甤', + '𤰶' => '𤰶', + '甾' => '甾', + '𤲒' => '𤲒', + '異' => '異', + '𢆟' => '𢆟', + '瘐' => '瘐', + '𤾡' => '𤾡', + '𤾸' => '𤾸', + '𥁄' => '𥁄', + '㿼' => '㿼', + '䀈' => '䀈', + '直' => '直', + '𥃳' => '𥃳', + '𥃲' => '𥃲', + '𥄙' => '𥄙', + '𥄳' => '𥄳', + '眞' => '眞', + '真' => '真', + '真' => '真', + '睊' => '睊', + '䀹' => '䀹', + '瞋' => '瞋', + '䁆' => '䁆', + '䂖' => '䂖', + '𥐝' => '𥐝', + '硎' => '硎', + '碌' => '碌', + '磌' => '磌', + '䃣' => '䃣', + '𥘦' => '𥘦', + '祖' => '祖', + '𥚚' => '𥚚', + '𥛅' => '𥛅', + '福' => '福', + '秫' => '秫', + '䄯' => '䄯', + '穀' => '穀', + '穊' => '穊', + '穏' => '穏', + '𥥼' => '𥥼', + '𥪧' => '𥪧', + '𥪧' => '𥪧', + '竮' => '竮', + '䈂' => '䈂', + '𥮫' => '𥮫', + '篆' => '篆', + '築' => '築', + '䈧' => '䈧', + '𥲀' => '𥲀', + '糒' => '糒', + '䊠' => '䊠', + '糨' => '糨', + '糣' => '糣', + '紀' => '紀', + '𥾆' => '𥾆', + '絣' => '絣', + '䌁' => '䌁', + '緇' => '緇', + '縂' => '縂', + '繅' => '繅', + '䌴' => '䌴', + '𦈨' => '𦈨', + '𦉇' => '𦉇', + '䍙' => '䍙', + '𦋙' => '𦋙', + '罺' => '罺', + '𦌾' => '𦌾', + '羕' => '羕', + '翺' => '翺', + '者' => '者', + '𦓚' => '𦓚', + '𦔣' => '𦔣', + '聠' => '聠', + '𦖨' => '𦖨', + '聰' => '聰', + '𣍟' => '𣍟', + '䏕' => '䏕', + '育' => '育', + '脃' => '脃', + '䐋' => '䐋', + '脾' => '脾', + '媵' => '媵', + '𦞧' => '𦞧', + '𦞵' => '𦞵', + '𣎓' => '𣎓', + '𣎜' => '𣎜', + '舁' => '舁', + '舄' => '舄', + '辞' => '辞', + '䑫' => '䑫', + '芑' => '芑', + '芋' => '芋', + '芝' => '芝', + '劳' => '劳', + '花' => '花', + '芳' => '芳', + '芽' => '芽', + '苦' => '苦', + '𦬼' => '𦬼', + '若' => '若', + '茝' => '茝', + '荣' => '荣', + '莭' => '莭', + '茣' => '茣', + '莽' => '莽', + '菧' => '菧', + '著' => '著', + '荓' => '荓', + '菊' => '菊', + '菌' => '菌', + '菜' => '菜', + '𦰶' => '𦰶', + '𦵫' => '𦵫', + '𦳕' => '𦳕', + '䔫' => '䔫', + '蓱' => '蓱', + '蓳' => '蓳', + '蔖' => '蔖', + '𧏊' => '𧏊', + '蕤' => '蕤', + '𦼬' => '𦼬', + '䕝' => '䕝', + '䕡' => '䕡', + '𦾱' => '𦾱', + '𧃒' => '𧃒', + '䕫' => '䕫', + '虐' => '虐', + '虜' => '虜', + '虧' => '虧', + '虩' => '虩', + '蚩' => '蚩', + '蚈' => '蚈', + '蜎' => '蜎', + '蛢' => '蛢', + '蝹' => '蝹', + '蜨' => '蜨', + '蝫' => '蝫', + '螆' => '螆', + '䗗' => '䗗', + '蟡' => '蟡', + '蠁' => '蠁', + '䗹' => '䗹', + '衠' => '衠', + '衣' => '衣', + '𧙧' => '𧙧', + '裗' => '裗', + '裞' => '裞', + '䘵' => '䘵', + '裺' => '裺', + '㒻' => '㒻', + '𧢮' => '𧢮', + '𧥦' => '𧥦', + '䚾' => '䚾', + '䛇' => '䛇', + '誠' => '誠', + '諭' => '諭', + '變' => '變', + '豕' => '豕', + '𧲨' => '𧲨', + '貫' => '貫', + '賁' => '賁', + '贛' => '贛', + '起' => '起', + '𧼯' => '𧼯', + '𠠄' => '𠠄', + '跋' => '跋', + '趼' => '趼', + '跰' => '跰', + '𠣞' => '𠣞', + '軔' => '軔', + '輸' => '輸', + '𨗒' => '𨗒', + '𨗭' => '𨗭', + '邔' => '邔', + '郱' => '郱', + '鄑' => '鄑', + '𨜮' => '𨜮', + '鄛' => '鄛', + '鈸' => '鈸', + '鋗' => '鋗', + '鋘' => '鋘', + '鉼' => '鉼', + '鏹' => '鏹', + '鐕' => '鐕', + '𨯺' => '𨯺', + '開' => '開', + '䦕' => '䦕', + '閷' => '閷', + '𨵷' => '𨵷', + '䧦' => '䧦', + '雃' => '雃', + '嶲' => '嶲', + '霣' => '霣', + '𩅅' => '𩅅', + '𩈚' => '𩈚', + '䩮' => '䩮', + '䩶' => '䩶', + '韠' => '韠', + '𩐊' => '𩐊', + '䪲' => '䪲', + '𩒖' => '𩒖', + '頋' => '頋', + '頋' => '頋', + '頩' => '頩', + '𩖶' => '𩖶', + '飢' => '飢', + '䬳' => '䬳', + '餩' => '餩', + '馧' => '馧', + '駂' => '駂', + '駾' => '駾', + '䯎' => '䯎', + '𩬰' => '𩬰', + '鬒' => '鬒', + '鱀' => '鱀', + '鳽' => '鳽', + '䳎' => '䳎', + '䳭' => '䳭', + '鵧' => '鵧', + '𪃎' => '𪃎', + '䳸' => '䳸', + '𪄅' => '𪄅', + '𪈎' => '𪈎', + '𪊑' => '𪊑', + '麻' => '麻', + '䵖' => '䵖', + '黹' => '黹', + '黾' => '黾', + '鼅' => '鼅', + '鼏' => '鼏', + '鼖' => '鼖', + '鼻' => '鼻', + '𪘀' => '𪘀', +); diff --git a/Server/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php b/Server/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php new file mode 100644 index 00000000..ec90f36e --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php @@ -0,0 +1,876 @@ + 230, + '́' => 230, + '̂' => 230, + '̃' => 230, + '̄' => 230, + '̅' => 230, + '̆' => 230, + '̇' => 230, + '̈' => 230, + '̉' => 230, + '̊' => 230, + '̋' => 230, + '̌' => 230, + '̍' => 230, + '̎' => 230, + '̏' => 230, + '̐' => 230, + '̑' => 230, + '̒' => 230, + '̓' => 230, + '̔' => 230, + '̕' => 232, + '̖' => 220, + '̗' => 220, + '̘' => 220, + '̙' => 220, + '̚' => 232, + '̛' => 216, + '̜' => 220, + '̝' => 220, + '̞' => 220, + '̟' => 220, + '̠' => 220, + '̡' => 202, + '̢' => 202, + '̣' => 220, + '̤' => 220, + '̥' => 220, + '̦' => 220, + '̧' => 202, + '̨' => 202, + '̩' => 220, + '̪' => 220, + '̫' => 220, + '̬' => 220, + '̭' => 220, + '̮' => 220, + '̯' => 220, + '̰' => 220, + '̱' => 220, + '̲' => 220, + '̳' => 220, + '̴' => 1, + '̵' => 1, + '̶' => 1, + '̷' => 1, + '̸' => 1, + '̹' => 220, + '̺' => 220, + '̻' => 220, + '̼' => 220, + '̽' => 230, + '̾' => 230, + '̿' => 230, + '̀' => 230, + '́' => 230, + '͂' => 230, + '̓' => 230, + '̈́' => 230, + 'ͅ' => 240, + '͆' => 230, + '͇' => 220, + '͈' => 220, + '͉' => 220, + '͊' => 230, + '͋' => 230, + '͌' => 230, + '͍' => 220, + '͎' => 220, + '͐' => 230, + '͑' => 230, + '͒' => 230, + '͓' => 220, + '͔' => 220, + '͕' => 220, + '͖' => 220, + '͗' => 230, + '͘' => 232, + '͙' => 220, + '͚' => 220, + '͛' => 230, + '͜' => 233, + '͝' => 234, + '͞' => 234, + '͟' => 233, + '͠' => 234, + '͡' => 234, + '͢' => 233, + 'ͣ' => 230, + 'ͤ' => 230, + 'ͥ' => 230, + 'ͦ' => 230, + 'ͧ' => 230, + 'ͨ' => 230, + 'ͩ' => 230, + 'ͪ' => 230, + 'ͫ' => 230, + 'ͬ' => 230, + 'ͭ' => 230, + 'ͮ' => 230, + 'ͯ' => 230, + '҃' => 230, + '҄' => 230, + '҅' => 230, + '҆' => 230, + '҇' => 230, + '֑' => 220, + '֒' => 230, + '֓' => 230, + '֔' => 230, + '֕' => 230, + '֖' => 220, + '֗' => 230, + '֘' => 230, + '֙' => 230, + '֚' => 222, + '֛' => 220, + '֜' => 230, + '֝' => 230, + '֞' => 230, + '֟' => 230, + '֠' => 230, + '֡' => 230, + '֢' => 220, + '֣' => 220, + '֤' => 220, + '֥' => 220, + '֦' => 220, + '֧' => 220, + '֨' => 230, + '֩' => 230, + '֪' => 220, + '֫' => 230, + '֬' => 230, + '֭' => 222, + '֮' => 228, + '֯' => 230, + 'ְ' => 10, + 'ֱ' => 11, + 'ֲ' => 12, + 'ֳ' => 13, + 'ִ' => 14, + 'ֵ' => 15, + 'ֶ' => 16, + 'ַ' => 17, + 'ָ' => 18, + 'ֹ' => 19, + 'ֺ' => 19, + 'ֻ' => 20, + 'ּ' => 21, + 'ֽ' => 22, + 'ֿ' => 23, + 'ׁ' => 24, + 'ׂ' => 25, + 'ׄ' => 230, + 'ׅ' => 220, + 'ׇ' => 18, + 'ؐ' => 230, + 'ؑ' => 230, + 'ؒ' => 230, + 'ؓ' => 230, + 'ؔ' => 230, + 'ؕ' => 230, + 'ؖ' => 230, + 'ؗ' => 230, + 'ؘ' => 30, + 'ؙ' => 31, + 'ؚ' => 32, + 'ً' => 27, + 'ٌ' => 28, + 'ٍ' => 29, + 'َ' => 30, + 'ُ' => 31, + 'ِ' => 32, + 'ّ' => 33, + 'ْ' => 34, + 'ٓ' => 230, + 'ٔ' => 230, + 'ٕ' => 220, + 'ٖ' => 220, + 'ٗ' => 230, + '٘' => 230, + 'ٙ' => 230, + 'ٚ' => 230, + 'ٛ' => 230, + 'ٜ' => 220, + 'ٝ' => 230, + 'ٞ' => 230, + 'ٟ' => 220, + 'ٰ' => 35, + 'ۖ' => 230, + 'ۗ' => 230, + 'ۘ' => 230, + 'ۙ' => 230, + 'ۚ' => 230, + 'ۛ' => 230, + 'ۜ' => 230, + '۟' => 230, + '۠' => 230, + 'ۡ' => 230, + 'ۢ' => 230, + 'ۣ' => 220, + 'ۤ' => 230, + 'ۧ' => 230, + 'ۨ' => 230, + '۪' => 220, + '۫' => 230, + '۬' => 230, + 'ۭ' => 220, + 'ܑ' => 36, + 'ܰ' => 230, + 'ܱ' => 220, + 'ܲ' => 230, + 'ܳ' => 230, + 'ܴ' => 220, + 'ܵ' => 230, + 'ܶ' => 230, + 'ܷ' => 220, + 'ܸ' => 220, + 'ܹ' => 220, + 'ܺ' => 230, + 'ܻ' => 220, + 'ܼ' => 220, + 'ܽ' => 230, + 'ܾ' => 220, + 'ܿ' => 230, + '݀' => 230, + '݁' => 230, + '݂' => 220, + '݃' => 230, + '݄' => 220, + '݅' => 230, + '݆' => 220, + '݇' => 230, + '݈' => 220, + '݉' => 230, + '݊' => 230, + '߫' => 230, + '߬' => 230, + '߭' => 230, + '߮' => 230, + '߯' => 230, + '߰' => 230, + '߱' => 230, + '߲' => 220, + '߳' => 230, + '߽' => 220, + 'ࠖ' => 230, + 'ࠗ' => 230, + '࠘' => 230, + '࠙' => 230, + 'ࠛ' => 230, + 'ࠜ' => 230, + 'ࠝ' => 230, + 'ࠞ' => 230, + 'ࠟ' => 230, + 'ࠠ' => 230, + 'ࠡ' => 230, + 'ࠢ' => 230, + 'ࠣ' => 230, + 'ࠥ' => 230, + 'ࠦ' => 230, + 'ࠧ' => 230, + 'ࠩ' => 230, + 'ࠪ' => 230, + 'ࠫ' => 230, + 'ࠬ' => 230, + '࠭' => 230, + '࡙' => 220, + '࡚' => 220, + '࡛' => 220, + '࣓' => 220, + 'ࣔ' => 230, + 'ࣕ' => 230, + 'ࣖ' => 230, + 'ࣗ' => 230, + 'ࣘ' => 230, + 'ࣙ' => 230, + 'ࣚ' => 230, + 'ࣛ' => 230, + 'ࣜ' => 230, + 'ࣝ' => 230, + 'ࣞ' => 230, + 'ࣟ' => 230, + '࣠' => 230, + '࣡' => 230, + 'ࣣ' => 220, + 'ࣤ' => 230, + 'ࣥ' => 230, + 'ࣦ' => 220, + 'ࣧ' => 230, + 'ࣨ' => 230, + 'ࣩ' => 220, + '࣪' => 230, + '࣫' => 230, + '࣬' => 230, + '࣭' => 220, + '࣮' => 220, + '࣯' => 220, + 'ࣰ' => 27, + 'ࣱ' => 28, + 'ࣲ' => 29, + 'ࣳ' => 230, + 'ࣴ' => 230, + 'ࣵ' => 230, + 'ࣶ' => 220, + 'ࣷ' => 230, + 'ࣸ' => 230, + 'ࣹ' => 220, + 'ࣺ' => 220, + 'ࣻ' => 230, + 'ࣼ' => 230, + 'ࣽ' => 230, + 'ࣾ' => 230, + 'ࣿ' => 230, + '़' => 7, + '्' => 9, + '॑' => 230, + '॒' => 220, + '॓' => 230, + '॔' => 230, + '়' => 7, + '্' => 9, + '৾' => 230, + '਼' => 7, + '੍' => 9, + '઼' => 7, + '્' => 9, + '଼' => 7, + '୍' => 9, + '்' => 9, + '్' => 9, + 'ౕ' => 84, + 'ౖ' => 91, + '಼' => 7, + '್' => 9, + '഻' => 9, + '഼' => 9, + '്' => 9, + '්' => 9, + 'ุ' => 103, + 'ู' => 103, + 'ฺ' => 9, + '่' => 107, + '้' => 107, + '๊' => 107, + '๋' => 107, + 'ຸ' => 118, + 'ູ' => 118, + '຺' => 9, + '່' => 122, + '້' => 122, + '໊' => 122, + '໋' => 122, + '༘' => 220, + '༙' => 220, + '༵' => 220, + '༷' => 220, + '༹' => 216, + 'ཱ' => 129, + 'ི' => 130, + 'ུ' => 132, + 'ེ' => 130, + 'ཻ' => 130, + 'ོ' => 130, + 'ཽ' => 130, + 'ྀ' => 130, + 'ྂ' => 230, + 'ྃ' => 230, + '྄' => 9, + '྆' => 230, + '྇' => 230, + '࿆' => 220, + '့' => 7, + '္' => 9, + '်' => 9, + 'ႍ' => 220, + '፝' => 230, + '፞' => 230, + '፟' => 230, + '᜔' => 9, + '᜴' => 9, + '្' => 9, + '៝' => 230, + 'ᢩ' => 228, + '᤹' => 222, + '᤺' => 230, + '᤻' => 220, + 'ᨗ' => 230, + 'ᨘ' => 220, + '᩠' => 9, + '᩵' => 230, + '᩶' => 230, + '᩷' => 230, + '᩸' => 230, + '᩹' => 230, + '᩺' => 230, + '᩻' => 230, + '᩼' => 230, + '᩿' => 220, + '᪰' => 230, + '᪱' => 230, + '᪲' => 230, + '᪳' => 230, + '᪴' => 230, + '᪵' => 220, + '᪶' => 220, + '᪷' => 220, + '᪸' => 220, + '᪹' => 220, + '᪺' => 220, + '᪻' => 230, + '᪼' => 230, + '᪽' => 220, + 'ᪿ' => 220, + 'ᫀ' => 220, + '᬴' => 7, + '᭄' => 9, + '᭫' => 230, + '᭬' => 220, + '᭭' => 230, + '᭮' => 230, + '᭯' => 230, + '᭰' => 230, + '᭱' => 230, + '᭲' => 230, + '᭳' => 230, + '᮪' => 9, + '᮫' => 9, + '᯦' => 7, + '᯲' => 9, + '᯳' => 9, + '᰷' => 7, + '᳐' => 230, + '᳑' => 230, + '᳒' => 230, + '᳔' => 1, + '᳕' => 220, + '᳖' => 220, + '᳗' => 220, + '᳘' => 220, + '᳙' => 220, + '᳚' => 230, + '᳛' => 230, + '᳜' => 220, + '᳝' => 220, + '᳞' => 220, + '᳟' => 220, + '᳠' => 230, + '᳢' => 1, + '᳣' => 1, + '᳤' => 1, + '᳥' => 1, + '᳦' => 1, + '᳧' => 1, + '᳨' => 1, + '᳭' => 220, + '᳴' => 230, + '᳸' => 230, + '᳹' => 230, + '᷀' => 230, + '᷁' => 230, + '᷂' => 220, + '᷃' => 230, + '᷄' => 230, + '᷅' => 230, + '᷆' => 230, + '᷇' => 230, + '᷈' => 230, + '᷉' => 230, + '᷊' => 220, + '᷋' => 230, + '᷌' => 230, + '᷍' => 234, + '᷎' => 214, + '᷏' => 220, + '᷐' => 202, + '᷑' => 230, + '᷒' => 230, + 'ᷓ' => 230, + 'ᷔ' => 230, + 'ᷕ' => 230, + 'ᷖ' => 230, + 'ᷗ' => 230, + 'ᷘ' => 230, + 'ᷙ' => 230, + 'ᷚ' => 230, + 'ᷛ' => 230, + 'ᷜ' => 230, + 'ᷝ' => 230, + 'ᷞ' => 230, + 'ᷟ' => 230, + 'ᷠ' => 230, + 'ᷡ' => 230, + 'ᷢ' => 230, + 'ᷣ' => 230, + 'ᷤ' => 230, + 'ᷥ' => 230, + 'ᷦ' => 230, + 'ᷧ' => 230, + 'ᷨ' => 230, + 'ᷩ' => 230, + 'ᷪ' => 230, + 'ᷫ' => 230, + 'ᷬ' => 230, + 'ᷭ' => 230, + 'ᷮ' => 230, + 'ᷯ' => 230, + 'ᷰ' => 230, + 'ᷱ' => 230, + 'ᷲ' => 230, + 'ᷳ' => 230, + 'ᷴ' => 230, + '᷵' => 230, + '᷶' => 232, + '᷷' => 228, + '᷸' => 228, + '᷹' => 220, + '᷻' => 230, + '᷼' => 233, + '᷽' => 220, + '᷾' => 230, + '᷿' => 220, + '⃐' => 230, + '⃑' => 230, + '⃒' => 1, + '⃓' => 1, + '⃔' => 230, + '⃕' => 230, + '⃖' => 230, + '⃗' => 230, + '⃘' => 1, + '⃙' => 1, + '⃚' => 1, + '⃛' => 230, + '⃜' => 230, + '⃡' => 230, + '⃥' => 1, + '⃦' => 1, + '⃧' => 230, + '⃨' => 220, + '⃩' => 230, + '⃪' => 1, + '⃫' => 1, + '⃬' => 220, + '⃭' => 220, + '⃮' => 220, + '⃯' => 220, + '⃰' => 230, + '⳯' => 230, + '⳰' => 230, + '⳱' => 230, + '⵿' => 9, + 'ⷠ' => 230, + 'ⷡ' => 230, + 'ⷢ' => 230, + 'ⷣ' => 230, + 'ⷤ' => 230, + 'ⷥ' => 230, + 'ⷦ' => 230, + 'ⷧ' => 230, + 'ⷨ' => 230, + 'ⷩ' => 230, + 'ⷪ' => 230, + 'ⷫ' => 230, + 'ⷬ' => 230, + 'ⷭ' => 230, + 'ⷮ' => 230, + 'ⷯ' => 230, + 'ⷰ' => 230, + 'ⷱ' => 230, + 'ⷲ' => 230, + 'ⷳ' => 230, + 'ⷴ' => 230, + 'ⷵ' => 230, + 'ⷶ' => 230, + 'ⷷ' => 230, + 'ⷸ' => 230, + 'ⷹ' => 230, + 'ⷺ' => 230, + 'ⷻ' => 230, + 'ⷼ' => 230, + 'ⷽ' => 230, + 'ⷾ' => 230, + 'ⷿ' => 230, + '〪' => 218, + '〫' => 228, + '〬' => 232, + '〭' => 222, + '〮' => 224, + '〯' => 224, + '゙' => 8, + '゚' => 8, + '꙯' => 230, + 'ꙴ' => 230, + 'ꙵ' => 230, + 'ꙶ' => 230, + 'ꙷ' => 230, + 'ꙸ' => 230, + 'ꙹ' => 230, + 'ꙺ' => 230, + 'ꙻ' => 230, + '꙼' => 230, + '꙽' => 230, + 'ꚞ' => 230, + 'ꚟ' => 230, + '꛰' => 230, + '꛱' => 230, + '꠆' => 9, + '꠬' => 9, + '꣄' => 9, + '꣠' => 230, + '꣡' => 230, + '꣢' => 230, + '꣣' => 230, + '꣤' => 230, + '꣥' => 230, + '꣦' => 230, + '꣧' => 230, + '꣨' => 230, + '꣩' => 230, + '꣪' => 230, + '꣫' => 230, + '꣬' => 230, + '꣭' => 230, + '꣮' => 230, + '꣯' => 230, + '꣰' => 230, + '꣱' => 230, + '꤫' => 220, + '꤬' => 220, + '꤭' => 220, + '꥓' => 9, + '꦳' => 7, + '꧀' => 9, + 'ꪰ' => 230, + 'ꪲ' => 230, + 'ꪳ' => 230, + 'ꪴ' => 220, + 'ꪷ' => 230, + 'ꪸ' => 230, + 'ꪾ' => 230, + '꪿' => 230, + '꫁' => 230, + '꫶' => 9, + '꯭' => 9, + 'ﬞ' => 26, + '︠' => 230, + '︡' => 230, + '︢' => 230, + '︣' => 230, + '︤' => 230, + '︥' => 230, + '︦' => 230, + '︧' => 220, + '︨' => 220, + '︩' => 220, + '︪' => 220, + '︫' => 220, + '︬' => 220, + '︭' => 220, + '︮' => 230, + '︯' => 230, + '𐇽' => 220, + '𐋠' => 220, + '𐍶' => 230, + '𐍷' => 230, + '𐍸' => 230, + '𐍹' => 230, + '𐍺' => 230, + '𐨍' => 220, + '𐨏' => 230, + '𐨸' => 230, + '𐨹' => 1, + '𐨺' => 220, + '𐨿' => 9, + '𐫥' => 230, + '𐫦' => 220, + '𐴤' => 230, + '𐴥' => 230, + '𐴦' => 230, + '𐴧' => 230, + '𐺫' => 230, + '𐺬' => 230, + '𐽆' => 220, + '𐽇' => 220, + '𐽈' => 230, + '𐽉' => 230, + '𐽊' => 230, + '𐽋' => 220, + '𐽌' => 230, + '𐽍' => 220, + '𐽎' => 220, + '𐽏' => 220, + '𐽐' => 220, + '𑁆' => 9, + '𑁿' => 9, + '𑂹' => 9, + '𑂺' => 7, + '𑄀' => 230, + '𑄁' => 230, + '𑄂' => 230, + '𑄳' => 9, + '𑄴' => 9, + '𑅳' => 7, + '𑇀' => 9, + '𑇊' => 7, + '𑈵' => 9, + '𑈶' => 7, + '𑋩' => 7, + '𑋪' => 9, + '𑌻' => 7, + '𑌼' => 7, + '𑍍' => 9, + '𑍦' => 230, + '𑍧' => 230, + '𑍨' => 230, + '𑍩' => 230, + '𑍪' => 230, + '𑍫' => 230, + '𑍬' => 230, + '𑍰' => 230, + '𑍱' => 230, + '𑍲' => 230, + '𑍳' => 230, + '𑍴' => 230, + '𑑂' => 9, + '𑑆' => 7, + '𑑞' => 230, + '𑓂' => 9, + '𑓃' => 7, + '𑖿' => 9, + '𑗀' => 7, + '𑘿' => 9, + '𑚶' => 9, + '𑚷' => 7, + '𑜫' => 9, + '𑠹' => 9, + '𑠺' => 7, + '𑤽' => 9, + '𑤾' => 9, + '𑥃' => 7, + '𑧠' => 9, + '𑨴' => 9, + '𑩇' => 9, + '𑪙' => 9, + '𑰿' => 9, + '𑵂' => 7, + '𑵄' => 9, + '𑵅' => 9, + '𑶗' => 9, + '𖫰' => 1, + '𖫱' => 1, + '𖫲' => 1, + '𖫳' => 1, + '𖫴' => 1, + '𖬰' => 230, + '𖬱' => 230, + '𖬲' => 230, + '𖬳' => 230, + '𖬴' => 230, + '𖬵' => 230, + '𖬶' => 230, + '𖿰' => 6, + '𖿱' => 6, + '𛲞' => 1, + '𝅥' => 216, + '𝅦' => 216, + '𝅧' => 1, + '𝅨' => 1, + '𝅩' => 1, + '𝅭' => 226, + '𝅮' => 216, + '𝅯' => 216, + '𝅰' => 216, + '𝅱' => 216, + '𝅲' => 216, + '𝅻' => 220, + '𝅼' => 220, + '𝅽' => 220, + '𝅾' => 220, + '𝅿' => 220, + '𝆀' => 220, + '𝆁' => 220, + '𝆂' => 220, + '𝆅' => 230, + '𝆆' => 230, + '𝆇' => 230, + '𝆈' => 230, + '𝆉' => 230, + '𝆊' => 220, + '𝆋' => 220, + '𝆪' => 230, + '𝆫' => 230, + '𝆬' => 230, + '𝆭' => 230, + '𝉂' => 230, + '𝉃' => 230, + '𝉄' => 230, + '𞀀' => 230, + '𞀁' => 230, + '𞀂' => 230, + '𞀃' => 230, + '𞀄' => 230, + '𞀅' => 230, + '𞀆' => 230, + '𞀈' => 230, + '𞀉' => 230, + '𞀊' => 230, + '𞀋' => 230, + '𞀌' => 230, + '𞀍' => 230, + '𞀎' => 230, + '𞀏' => 230, + '𞀐' => 230, + '𞀑' => 230, + '𞀒' => 230, + '𞀓' => 230, + '𞀔' => 230, + '𞀕' => 230, + '𞀖' => 230, + '𞀗' => 230, + '𞀘' => 230, + '𞀛' => 230, + '𞀜' => 230, + '𞀝' => 230, + '𞀞' => 230, + '𞀟' => 230, + '𞀠' => 230, + '𞀡' => 230, + '𞀣' => 230, + '𞀤' => 230, + '𞀦' => 230, + '𞀧' => 230, + '𞀨' => 230, + '𞀩' => 230, + '𞀪' => 230, + '𞄰' => 230, + '𞄱' => 230, + '𞄲' => 230, + '𞄳' => 230, + '𞄴' => 230, + '𞄵' => 230, + '𞄶' => 230, + '𞋬' => 230, + '𞋭' => 230, + '𞋮' => 230, + '𞋯' => 230, + '𞣐' => 220, + '𞣑' => 220, + '𞣒' => 220, + '𞣓' => 220, + '𞣔' => 220, + '𞣕' => 220, + '𞣖' => 220, + '𞥄' => 230, + '𞥅' => 230, + '𞥆' => 230, + '𞥇' => 230, + '𞥈' => 230, + '𞥉' => 230, + '𞥊' => 7, +); diff --git a/Server/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php b/Server/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php new file mode 100644 index 00000000..15749028 --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php @@ -0,0 +1,3695 @@ + ' ', + '¨' => ' ̈', + 'ª' => 'a', + '¯' => ' ̄', + '²' => '2', + '³' => '3', + '´' => ' ́', + 'µ' => 'μ', + '¸' => ' ̧', + '¹' => '1', + 'º' => 'o', + '¼' => '1⁄4', + '½' => '1⁄2', + '¾' => '3⁄4', + 'IJ' => 'IJ', + 'ij' => 'ij', + 'Ŀ' => 'L·', + 'ŀ' => 'l·', + 'ʼn' => 'ʼn', + 'ſ' => 's', + 'DŽ' => 'DŽ', + 'Dž' => 'Dž', + 'dž' => 'dž', + 'LJ' => 'LJ', + 'Lj' => 'Lj', + 'lj' => 'lj', + 'NJ' => 'NJ', + 'Nj' => 'Nj', + 'nj' => 'nj', + 'DZ' => 'DZ', + 'Dz' => 'Dz', + 'dz' => 'dz', + 'ʰ' => 'h', + 'ʱ' => 'ɦ', + 'ʲ' => 'j', + 'ʳ' => 'r', + 'ʴ' => 'ɹ', + 'ʵ' => 'ɻ', + 'ʶ' => 'ʁ', + 'ʷ' => 'w', + 'ʸ' => 'y', + '˘' => ' ̆', + '˙' => ' ̇', + '˚' => ' ̊', + '˛' => ' ̨', + '˜' => ' ̃', + '˝' => ' ̋', + 'ˠ' => 'ɣ', + 'ˡ' => 'l', + 'ˢ' => 's', + 'ˣ' => 'x', + 'ˤ' => 'ʕ', + 'ͺ' => ' ͅ', + '΄' => ' ́', + '΅' => ' ̈́', + 'ϐ' => 'β', + 'ϑ' => 'θ', + 'ϒ' => 'Υ', + 'ϓ' => 'Ύ', + 'ϔ' => 'Ϋ', + 'ϕ' => 'φ', + 'ϖ' => 'π', + 'ϰ' => 'κ', + 'ϱ' => 'ρ', + 'ϲ' => 'ς', + 'ϴ' => 'Θ', + 'ϵ' => 'ε', + 'Ϲ' => 'Σ', + 'և' => 'եւ', + 'ٵ' => 'اٴ', + 'ٶ' => 'وٴ', + 'ٷ' => 'ۇٴ', + 'ٸ' => 'يٴ', + 'ำ' => 'ํา', + 'ຳ' => 'ໍາ', + 'ໜ' => 'ຫນ', + 'ໝ' => 'ຫມ', + '༌' => '་', + 'ཷ' => 'ྲཱྀ', + 'ཹ' => 'ླཱྀ', + 'ჼ' => 'ნ', + 'ᴬ' => 'A', + 'ᴭ' => 'Æ', + 'ᴮ' => 'B', + 'ᴰ' => 'D', + 'ᴱ' => 'E', + 'ᴲ' => 'Ǝ', + 'ᴳ' => 'G', + 'ᴴ' => 'H', + 'ᴵ' => 'I', + 'ᴶ' => 'J', + 'ᴷ' => 'K', + 'ᴸ' => 'L', + 'ᴹ' => 'M', + 'ᴺ' => 'N', + 'ᴼ' => 'O', + 'ᴽ' => 'Ȣ', + 'ᴾ' => 'P', + 'ᴿ' => 'R', + 'ᵀ' => 'T', + 'ᵁ' => 'U', + 'ᵂ' => 'W', + 'ᵃ' => 'a', + 'ᵄ' => 'ɐ', + 'ᵅ' => 'ɑ', + 'ᵆ' => 'ᴂ', + 'ᵇ' => 'b', + 'ᵈ' => 'd', + 'ᵉ' => 'e', + 'ᵊ' => 'ə', + 'ᵋ' => 'ɛ', + 'ᵌ' => 'ɜ', + 'ᵍ' => 'g', + 'ᵏ' => 'k', + 'ᵐ' => 'm', + 'ᵑ' => 'ŋ', + 'ᵒ' => 'o', + 'ᵓ' => 'ɔ', + 'ᵔ' => 'ᴖ', + 'ᵕ' => 'ᴗ', + 'ᵖ' => 'p', + 'ᵗ' => 't', + 'ᵘ' => 'u', + 'ᵙ' => 'ᴝ', + 'ᵚ' => 'ɯ', + 'ᵛ' => 'v', + 'ᵜ' => 'ᴥ', + 'ᵝ' => 'β', + 'ᵞ' => 'γ', + 'ᵟ' => 'δ', + 'ᵠ' => 'φ', + 'ᵡ' => 'χ', + 'ᵢ' => 'i', + 'ᵣ' => 'r', + 'ᵤ' => 'u', + 'ᵥ' => 'v', + 'ᵦ' => 'β', + 'ᵧ' => 'γ', + 'ᵨ' => 'ρ', + 'ᵩ' => 'φ', + 'ᵪ' => 'χ', + 'ᵸ' => 'н', + 'ᶛ' => 'ɒ', + 'ᶜ' => 'c', + 'ᶝ' => 'ɕ', + 'ᶞ' => 'ð', + 'ᶟ' => 'ɜ', + 'ᶠ' => 'f', + 'ᶡ' => 'ɟ', + 'ᶢ' => 'ɡ', + 'ᶣ' => 'ɥ', + 'ᶤ' => 'ɨ', + 'ᶥ' => 'ɩ', + 'ᶦ' => 'ɪ', + 'ᶧ' => 'ᵻ', + 'ᶨ' => 'ʝ', + 'ᶩ' => 'ɭ', + 'ᶪ' => 'ᶅ', + 'ᶫ' => 'ʟ', + 'ᶬ' => 'ɱ', + 'ᶭ' => 'ɰ', + 'ᶮ' => 'ɲ', + 'ᶯ' => 'ɳ', + 'ᶰ' => 'ɴ', + 'ᶱ' => 'ɵ', + 'ᶲ' => 'ɸ', + 'ᶳ' => 'ʂ', + 'ᶴ' => 'ʃ', + 'ᶵ' => 'ƫ', + 'ᶶ' => 'ʉ', + 'ᶷ' => 'ʊ', + 'ᶸ' => 'ᴜ', + 'ᶹ' => 'ʋ', + 'ᶺ' => 'ʌ', + 'ᶻ' => 'z', + 'ᶼ' => 'ʐ', + 'ᶽ' => 'ʑ', + 'ᶾ' => 'ʒ', + 'ᶿ' => 'θ', + 'ẚ' => 'aʾ', + 'ẛ' => 'ṡ', + '᾽' => ' ̓', + '᾿' => ' ̓', + '῀' => ' ͂', + '῁' => ' ̈͂', + '῍' => ' ̓̀', + '῎' => ' ̓́', + '῏' => ' ̓͂', + '῝' => ' ̔̀', + '῞' => ' ̔́', + '῟' => ' ̔͂', + '῭' => ' ̈̀', + '΅' => ' ̈́', + '´' => ' ́', + '῾' => ' ̔', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + '‑' => '‐', + '‗' => ' ̳', + '․' => '.', + '‥' => '..', + '…' => '...', + ' ' => ' ', + '″' => '′′', + '‴' => '′′′', + '‶' => '‵‵', + '‷' => '‵‵‵', + '‼' => '!!', + '‾' => ' ̅', + '⁇' => '??', + '⁈' => '?!', + '⁉' => '!?', + '⁗' => '′′′′', + ' ' => ' ', + '⁰' => '0', + 'ⁱ' => 'i', + '⁴' => '4', + '⁵' => '5', + '⁶' => '6', + '⁷' => '7', + '⁸' => '8', + '⁹' => '9', + '⁺' => '+', + '⁻' => '−', + '⁼' => '=', + '⁽' => '(', + '⁾' => ')', + 'ⁿ' => 'n', + '₀' => '0', + '₁' => '1', + '₂' => '2', + '₃' => '3', + '₄' => '4', + '₅' => '5', + '₆' => '6', + '₇' => '7', + '₈' => '8', + '₉' => '9', + '₊' => '+', + '₋' => '−', + '₌' => '=', + '₍' => '(', + '₎' => ')', + 'ₐ' => 'a', + 'ₑ' => 'e', + 'ₒ' => 'o', + 'ₓ' => 'x', + 'ₔ' => 'ə', + 'ₕ' => 'h', + 'ₖ' => 'k', + 'ₗ' => 'l', + 'ₘ' => 'm', + 'ₙ' => 'n', + 'ₚ' => 'p', + 'ₛ' => 's', + 'ₜ' => 't', + '₨' => 'Rs', + '℀' => 'a/c', + '℁' => 'a/s', + 'ℂ' => 'C', + '℃' => '°C', + '℅' => 'c/o', + '℆' => 'c/u', + 'ℇ' => 'Ɛ', + '℉' => '°F', + 'ℊ' => 'g', + 'ℋ' => 'H', + 'ℌ' => 'H', + 'ℍ' => 'H', + 'ℎ' => 'h', + 'ℏ' => 'ħ', + 'ℐ' => 'I', + 'ℑ' => 'I', + 'ℒ' => 'L', + 'ℓ' => 'l', + 'ℕ' => 'N', + '№' => 'No', + 'ℙ' => 'P', + 'ℚ' => 'Q', + 'ℛ' => 'R', + 'ℜ' => 'R', + 'ℝ' => 'R', + '℠' => 'SM', + '℡' => 'TEL', + '™' => 'TM', + 'ℤ' => 'Z', + 'ℨ' => 'Z', + 'ℬ' => 'B', + 'ℭ' => 'C', + 'ℯ' => 'e', + 'ℰ' => 'E', + 'ℱ' => 'F', + 'ℳ' => 'M', + 'ℴ' => 'o', + 'ℵ' => 'א', + 'ℶ' => 'ב', + 'ℷ' => 'ג', + 'ℸ' => 'ד', + 'ℹ' => 'i', + '℻' => 'FAX', + 'ℼ' => 'π', + 'ℽ' => 'γ', + 'ℾ' => 'Γ', + 'ℿ' => 'Π', + '⅀' => '∑', + 'ⅅ' => 'D', + 'ⅆ' => 'd', + 'ⅇ' => 'e', + 'ⅈ' => 'i', + 'ⅉ' => 'j', + '⅐' => '1⁄7', + '⅑' => '1⁄9', + '⅒' => '1⁄10', + '⅓' => '1⁄3', + '⅔' => '2⁄3', + '⅕' => '1⁄5', + '⅖' => '2⁄5', + '⅗' => '3⁄5', + '⅘' => '4⁄5', + '⅙' => '1⁄6', + '⅚' => '5⁄6', + '⅛' => '1⁄8', + '⅜' => '3⁄8', + '⅝' => '5⁄8', + '⅞' => '7⁄8', + '⅟' => '1⁄', + 'Ⅰ' => 'I', + 'Ⅱ' => 'II', + 'Ⅲ' => 'III', + 'Ⅳ' => 'IV', + 'Ⅴ' => 'V', + 'Ⅵ' => 'VI', + 'Ⅶ' => 'VII', + 'Ⅷ' => 'VIII', + 'Ⅸ' => 'IX', + 'Ⅹ' => 'X', + 'Ⅺ' => 'XI', + 'Ⅻ' => 'XII', + 'Ⅼ' => 'L', + 'Ⅽ' => 'C', + 'Ⅾ' => 'D', + 'Ⅿ' => 'M', + 'ⅰ' => 'i', + 'ⅱ' => 'ii', + 'ⅲ' => 'iii', + 'ⅳ' => 'iv', + 'ⅴ' => 'v', + 'ⅵ' => 'vi', + 'ⅶ' => 'vii', + 'ⅷ' => 'viii', + 'ⅸ' => 'ix', + 'ⅹ' => 'x', + 'ⅺ' => 'xi', + 'ⅻ' => 'xii', + 'ⅼ' => 'l', + 'ⅽ' => 'c', + 'ⅾ' => 'd', + 'ⅿ' => 'm', + '↉' => '0⁄3', + '∬' => '∫∫', + '∭' => '∫∫∫', + '∯' => '∮∮', + '∰' => '∮∮∮', + '①' => '1', + '②' => '2', + '③' => '3', + '④' => '4', + '⑤' => '5', + '⑥' => '6', + '⑦' => '7', + '⑧' => '8', + '⑨' => '9', + '⑩' => '10', + '⑪' => '11', + '⑫' => '12', + '⑬' => '13', + '⑭' => '14', + '⑮' => '15', + '⑯' => '16', + '⑰' => '17', + '⑱' => '18', + '⑲' => '19', + '⑳' => '20', + '⑴' => '(1)', + '⑵' => '(2)', + '⑶' => '(3)', + '⑷' => '(4)', + '⑸' => '(5)', + '⑹' => '(6)', + '⑺' => '(7)', + '⑻' => '(8)', + '⑼' => '(9)', + '⑽' => '(10)', + '⑾' => '(11)', + '⑿' => '(12)', + '⒀' => '(13)', + '⒁' => '(14)', + '⒂' => '(15)', + '⒃' => '(16)', + '⒄' => '(17)', + '⒅' => '(18)', + '⒆' => '(19)', + '⒇' => '(20)', + '⒈' => '1.', + '⒉' => '2.', + '⒊' => '3.', + '⒋' => '4.', + '⒌' => '5.', + '⒍' => '6.', + '⒎' => '7.', + '⒏' => '8.', + '⒐' => '9.', + '⒑' => '10.', + '⒒' => '11.', + '⒓' => '12.', + '⒔' => '13.', + '⒕' => '14.', + '⒖' => '15.', + '⒗' => '16.', + '⒘' => '17.', + '⒙' => '18.', + '⒚' => '19.', + '⒛' => '20.', + '⒜' => '(a)', + '⒝' => '(b)', + '⒞' => '(c)', + '⒟' => '(d)', + '⒠' => '(e)', + '⒡' => '(f)', + '⒢' => '(g)', + '⒣' => '(h)', + '⒤' => '(i)', + '⒥' => '(j)', + '⒦' => '(k)', + '⒧' => '(l)', + '⒨' => '(m)', + '⒩' => '(n)', + '⒪' => '(o)', + '⒫' => '(p)', + '⒬' => '(q)', + '⒭' => '(r)', + '⒮' => '(s)', + '⒯' => '(t)', + '⒰' => '(u)', + '⒱' => '(v)', + '⒲' => '(w)', + '⒳' => '(x)', + '⒴' => '(y)', + '⒵' => '(z)', + 'Ⓐ' => 'A', + 'Ⓑ' => 'B', + 'Ⓒ' => 'C', + 'Ⓓ' => 'D', + 'Ⓔ' => 'E', + 'Ⓕ' => 'F', + 'Ⓖ' => 'G', + 'Ⓗ' => 'H', + 'Ⓘ' => 'I', + 'Ⓙ' => 'J', + 'Ⓚ' => 'K', + 'Ⓛ' => 'L', + 'Ⓜ' => 'M', + 'Ⓝ' => 'N', + 'Ⓞ' => 'O', + 'Ⓟ' => 'P', + 'Ⓠ' => 'Q', + 'Ⓡ' => 'R', + 'Ⓢ' => 'S', + 'Ⓣ' => 'T', + 'Ⓤ' => 'U', + 'Ⓥ' => 'V', + 'Ⓦ' => 'W', + 'Ⓧ' => 'X', + 'Ⓨ' => 'Y', + 'Ⓩ' => 'Z', + 'ⓐ' => 'a', + 'ⓑ' => 'b', + 'ⓒ' => 'c', + 'ⓓ' => 'd', + 'ⓔ' => 'e', + 'ⓕ' => 'f', + 'ⓖ' => 'g', + 'ⓗ' => 'h', + 'ⓘ' => 'i', + 'ⓙ' => 'j', + 'ⓚ' => 'k', + 'ⓛ' => 'l', + 'ⓜ' => 'm', + 'ⓝ' => 'n', + 'ⓞ' => 'o', + 'ⓟ' => 'p', + 'ⓠ' => 'q', + 'ⓡ' => 'r', + 'ⓢ' => 's', + 'ⓣ' => 't', + 'ⓤ' => 'u', + 'ⓥ' => 'v', + 'ⓦ' => 'w', + 'ⓧ' => 'x', + 'ⓨ' => 'y', + 'ⓩ' => 'z', + '⓪' => '0', + '⨌' => '∫∫∫∫', + '⩴' => '::=', + '⩵' => '==', + '⩶' => '===', + 'ⱼ' => 'j', + 'ⱽ' => 'V', + 'ⵯ' => 'ⵡ', + '⺟' => '母', + '⻳' => '龟', + '⼀' => '一', + '⼁' => '丨', + '⼂' => '丶', + '⼃' => '丿', + '⼄' => '乙', + '⼅' => '亅', + '⼆' => '二', + '⼇' => '亠', + '⼈' => '人', + '⼉' => '儿', + '⼊' => '入', + '⼋' => '八', + '⼌' => '冂', + '⼍' => '冖', + '⼎' => '冫', + '⼏' => '几', + '⼐' => '凵', + '⼑' => '刀', + '⼒' => '力', + '⼓' => '勹', + '⼔' => '匕', + '⼕' => '匚', + '⼖' => '匸', + '⼗' => '十', + '⼘' => '卜', + '⼙' => '卩', + '⼚' => '厂', + '⼛' => '厶', + '⼜' => '又', + '⼝' => '口', + '⼞' => '囗', + '⼟' => '土', + '⼠' => '士', + '⼡' => '夂', + '⼢' => '夊', + '⼣' => '夕', + '⼤' => '大', + '⼥' => '女', + '⼦' => '子', + '⼧' => '宀', + '⼨' => '寸', + '⼩' => '小', + '⼪' => '尢', + '⼫' => '尸', + '⼬' => '屮', + '⼭' => '山', + '⼮' => '巛', + '⼯' => '工', + '⼰' => '己', + '⼱' => '巾', + '⼲' => '干', + '⼳' => '幺', + '⼴' => '广', + '⼵' => '廴', + '⼶' => '廾', + '⼷' => '弋', + '⼸' => '弓', + '⼹' => '彐', + '⼺' => '彡', + '⼻' => '彳', + '⼼' => '心', + '⼽' => '戈', + '⼾' => '戶', + '⼿' => '手', + '⽀' => '支', + '⽁' => '攴', + '⽂' => '文', + '⽃' => '斗', + '⽄' => '斤', + '⽅' => '方', + '⽆' => '无', + '⽇' => '日', + '⽈' => '曰', + '⽉' => '月', + '⽊' => '木', + '⽋' => '欠', + '⽌' => '止', + '⽍' => '歹', + '⽎' => '殳', + '⽏' => '毋', + '⽐' => '比', + '⽑' => '毛', + '⽒' => '氏', + '⽓' => '气', + '⽔' => '水', + '⽕' => '火', + '⽖' => '爪', + '⽗' => '父', + '⽘' => '爻', + '⽙' => '爿', + '⽚' => '片', + '⽛' => '牙', + '⽜' => '牛', + '⽝' => '犬', + '⽞' => '玄', + '⽟' => '玉', + '⽠' => '瓜', + '⽡' => '瓦', + '⽢' => '甘', + '⽣' => '生', + '⽤' => '用', + '⽥' => '田', + '⽦' => '疋', + '⽧' => '疒', + '⽨' => '癶', + '⽩' => '白', + '⽪' => '皮', + '⽫' => '皿', + '⽬' => '目', + '⽭' => '矛', + '⽮' => '矢', + '⽯' => '石', + '⽰' => '示', + '⽱' => '禸', + '⽲' => '禾', + '⽳' => '穴', + '⽴' => '立', + '⽵' => '竹', + '⽶' => '米', + '⽷' => '糸', + '⽸' => '缶', + '⽹' => '网', + '⽺' => '羊', + '⽻' => '羽', + '⽼' => '老', + '⽽' => '而', + '⽾' => '耒', + '⽿' => '耳', + '⾀' => '聿', + '⾁' => '肉', + '⾂' => '臣', + '⾃' => '自', + '⾄' => '至', + '⾅' => '臼', + '⾆' => '舌', + '⾇' => '舛', + '⾈' => '舟', + '⾉' => '艮', + '⾊' => '色', + '⾋' => '艸', + '⾌' => '虍', + '⾍' => '虫', + '⾎' => '血', + '⾏' => '行', + '⾐' => '衣', + '⾑' => '襾', + '⾒' => '見', + '⾓' => '角', + '⾔' => '言', + '⾕' => '谷', + '⾖' => '豆', + '⾗' => '豕', + '⾘' => '豸', + '⾙' => '貝', + '⾚' => '赤', + '⾛' => '走', + '⾜' => '足', + '⾝' => '身', + '⾞' => '車', + '⾟' => '辛', + '⾠' => '辰', + '⾡' => '辵', + '⾢' => '邑', + '⾣' => '酉', + '⾤' => '釆', + '⾥' => '里', + '⾦' => '金', + '⾧' => '長', + '⾨' => '門', + '⾩' => '阜', + '⾪' => '隶', + '⾫' => '隹', + '⾬' => '雨', + '⾭' => '靑', + '⾮' => '非', + '⾯' => '面', + '⾰' => '革', + '⾱' => '韋', + '⾲' => '韭', + '⾳' => '音', + '⾴' => '頁', + '⾵' => '風', + '⾶' => '飛', + '⾷' => '食', + '⾸' => '首', + '⾹' => '香', + '⾺' => '馬', + '⾻' => '骨', + '⾼' => '高', + '⾽' => '髟', + '⾾' => '鬥', + '⾿' => '鬯', + '⿀' => '鬲', + '⿁' => '鬼', + '⿂' => '魚', + '⿃' => '鳥', + '⿄' => '鹵', + '⿅' => '鹿', + '⿆' => '麥', + '⿇' => '麻', + '⿈' => '黃', + '⿉' => '黍', + '⿊' => '黑', + '⿋' => '黹', + '⿌' => '黽', + '⿍' => '鼎', + '⿎' => '鼓', + '⿏' => '鼠', + '⿐' => '鼻', + '⿑' => '齊', + '⿒' => '齒', + '⿓' => '龍', + '⿔' => '龜', + '⿕' => '龠', + ' ' => ' ', + '〶' => '〒', + '〸' => '十', + '〹' => '卄', + '〺' => '卅', + '゛' => ' ゙', + '゜' => ' ゚', + 'ゟ' => 'より', + 'ヿ' => 'コト', + 'ㄱ' => 'ᄀ', + 'ㄲ' => 'ᄁ', + 'ㄳ' => 'ᆪ', + 'ㄴ' => 'ᄂ', + 'ㄵ' => 'ᆬ', + 'ㄶ' => 'ᆭ', + 'ㄷ' => 'ᄃ', + 'ㄸ' => 'ᄄ', + 'ㄹ' => 'ᄅ', + 'ㄺ' => 'ᆰ', + 'ㄻ' => 'ᆱ', + 'ㄼ' => 'ᆲ', + 'ㄽ' => 'ᆳ', + 'ㄾ' => 'ᆴ', + 'ㄿ' => 'ᆵ', + 'ㅀ' => 'ᄚ', + 'ㅁ' => 'ᄆ', + 'ㅂ' => 'ᄇ', + 'ㅃ' => 'ᄈ', + 'ㅄ' => 'ᄡ', + 'ㅅ' => 'ᄉ', + 'ㅆ' => 'ᄊ', + 'ㅇ' => 'ᄋ', + 'ㅈ' => 'ᄌ', + 'ㅉ' => 'ᄍ', + 'ㅊ' => 'ᄎ', + 'ㅋ' => 'ᄏ', + 'ㅌ' => 'ᄐ', + 'ㅍ' => 'ᄑ', + 'ㅎ' => 'ᄒ', + 'ㅏ' => 'ᅡ', + 'ㅐ' => 'ᅢ', + 'ㅑ' => 'ᅣ', + 'ㅒ' => 'ᅤ', + 'ㅓ' => 'ᅥ', + 'ㅔ' => 'ᅦ', + 'ㅕ' => 'ᅧ', + 'ㅖ' => 'ᅨ', + 'ㅗ' => 'ᅩ', + 'ㅘ' => 'ᅪ', + 'ㅙ' => 'ᅫ', + 'ㅚ' => 'ᅬ', + 'ㅛ' => 'ᅭ', + 'ㅜ' => 'ᅮ', + 'ㅝ' => 'ᅯ', + 'ㅞ' => 'ᅰ', + 'ㅟ' => 'ᅱ', + 'ㅠ' => 'ᅲ', + 'ㅡ' => 'ᅳ', + 'ㅢ' => 'ᅴ', + 'ㅣ' => 'ᅵ', + 'ㅤ' => 'ᅠ', + 'ㅥ' => 'ᄔ', + 'ㅦ' => 'ᄕ', + 'ㅧ' => 'ᇇ', + 'ㅨ' => 'ᇈ', + 'ㅩ' => 'ᇌ', + 'ㅪ' => 'ᇎ', + 'ㅫ' => 'ᇓ', + 'ㅬ' => 'ᇗ', + 'ㅭ' => 'ᇙ', + 'ㅮ' => 'ᄜ', + 'ㅯ' => 'ᇝ', + 'ㅰ' => 'ᇟ', + 'ㅱ' => 'ᄝ', + 'ㅲ' => 'ᄞ', + 'ㅳ' => 'ᄠ', + 'ㅴ' => 'ᄢ', + 'ㅵ' => 'ᄣ', + 'ㅶ' => 'ᄧ', + 'ㅷ' => 'ᄩ', + 'ㅸ' => 'ᄫ', + 'ㅹ' => 'ᄬ', + 'ㅺ' => 'ᄭ', + 'ㅻ' => 'ᄮ', + 'ㅼ' => 'ᄯ', + 'ㅽ' => 'ᄲ', + 'ㅾ' => 'ᄶ', + 'ㅿ' => 'ᅀ', + 'ㆀ' => 'ᅇ', + 'ㆁ' => 'ᅌ', + 'ㆂ' => 'ᇱ', + 'ㆃ' => 'ᇲ', + 'ㆄ' => 'ᅗ', + 'ㆅ' => 'ᅘ', + 'ㆆ' => 'ᅙ', + 'ㆇ' => 'ᆄ', + 'ㆈ' => 'ᆅ', + 'ㆉ' => 'ᆈ', + 'ㆊ' => 'ᆑ', + 'ㆋ' => 'ᆒ', + 'ㆌ' => 'ᆔ', + 'ㆍ' => 'ᆞ', + 'ㆎ' => 'ᆡ', + '㆒' => '一', + '㆓' => '二', + '㆔' => '三', + '㆕' => '四', + '㆖' => '上', + '㆗' => '中', + '㆘' => '下', + '㆙' => '甲', + '㆚' => '乙', + '㆛' => '丙', + '㆜' => '丁', + '㆝' => '天', + '㆞' => '地', + '㆟' => '人', + '㈀' => '(ᄀ)', + '㈁' => '(ᄂ)', + '㈂' => '(ᄃ)', + '㈃' => '(ᄅ)', + '㈄' => '(ᄆ)', + '㈅' => '(ᄇ)', + '㈆' => '(ᄉ)', + '㈇' => '(ᄋ)', + '㈈' => '(ᄌ)', + '㈉' => '(ᄎ)', + '㈊' => '(ᄏ)', + '㈋' => '(ᄐ)', + '㈌' => '(ᄑ)', + '㈍' => '(ᄒ)', + '㈎' => '(가)', + '㈏' => '(나)', + '㈐' => '(다)', + '㈑' => '(라)', + '㈒' => '(마)', + '㈓' => '(바)', + '㈔' => '(사)', + '㈕' => '(아)', + '㈖' => '(자)', + '㈗' => '(차)', + '㈘' => '(카)', + '㈙' => '(타)', + '㈚' => '(파)', + '㈛' => '(하)', + '㈜' => '(주)', + '㈝' => '(오전)', + '㈞' => '(오후)', + '㈠' => '(一)', + '㈡' => '(二)', + '㈢' => '(三)', + '㈣' => '(四)', + '㈤' => '(五)', + '㈥' => '(六)', + '㈦' => '(七)', + '㈧' => '(八)', + '㈨' => '(九)', + '㈩' => '(十)', + '㈪' => '(月)', + '㈫' => '(火)', + '㈬' => '(水)', + '㈭' => '(木)', + '㈮' => '(金)', + '㈯' => '(土)', + '㈰' => '(日)', + '㈱' => '(株)', + '㈲' => '(有)', + '㈳' => '(社)', + '㈴' => '(名)', + '㈵' => '(特)', + '㈶' => '(財)', + '㈷' => '(祝)', + '㈸' => '(労)', + '㈹' => '(代)', + '㈺' => '(呼)', + '㈻' => '(学)', + '㈼' => '(監)', + '㈽' => '(企)', + '㈾' => '(資)', + '㈿' => '(協)', + '㉀' => '(祭)', + '㉁' => '(休)', + '㉂' => '(自)', + '㉃' => '(至)', + '㉄' => '問', + '㉅' => '幼', + '㉆' => '文', + '㉇' => '箏', + '㉐' => 'PTE', + '㉑' => '21', + '㉒' => '22', + '㉓' => '23', + '㉔' => '24', + '㉕' => '25', + '㉖' => '26', + '㉗' => '27', + '㉘' => '28', + '㉙' => '29', + '㉚' => '30', + '㉛' => '31', + '㉜' => '32', + '㉝' => '33', + '㉞' => '34', + '㉟' => '35', + '㉠' => 'ᄀ', + '㉡' => 'ᄂ', + '㉢' => 'ᄃ', + '㉣' => 'ᄅ', + '㉤' => 'ᄆ', + '㉥' => 'ᄇ', + '㉦' => 'ᄉ', + '㉧' => 'ᄋ', + '㉨' => 'ᄌ', + '㉩' => 'ᄎ', + '㉪' => 'ᄏ', + '㉫' => 'ᄐ', + '㉬' => 'ᄑ', + '㉭' => 'ᄒ', + '㉮' => '가', + '㉯' => '나', + '㉰' => '다', + '㉱' => '라', + '㉲' => '마', + '㉳' => '바', + '㉴' => '사', + '㉵' => '아', + '㉶' => '자', + '㉷' => '차', + '㉸' => '카', + '㉹' => '타', + '㉺' => '파', + '㉻' => '하', + '㉼' => '참고', + '㉽' => '주의', + '㉾' => '우', + '㊀' => '一', + '㊁' => '二', + '㊂' => '三', + '㊃' => '四', + '㊄' => '五', + '㊅' => '六', + '㊆' => '七', + '㊇' => '八', + '㊈' => '九', + '㊉' => '十', + '㊊' => '月', + '㊋' => '火', + '㊌' => '水', + '㊍' => '木', + '㊎' => '金', + '㊏' => '土', + '㊐' => '日', + '㊑' => '株', + '㊒' => '有', + '㊓' => '社', + '㊔' => '名', + '㊕' => '特', + '㊖' => '財', + '㊗' => '祝', + '㊘' => '労', + '㊙' => '秘', + '㊚' => '男', + '㊛' => '女', + '㊜' => '適', + '㊝' => '優', + '㊞' => '印', + '㊟' => '注', + '㊠' => '項', + '㊡' => '休', + '㊢' => '写', + '㊣' => '正', + '㊤' => '上', + '㊥' => '中', + '㊦' => '下', + '㊧' => '左', + '㊨' => '右', + '㊩' => '医', + '㊪' => '宗', + '㊫' => '学', + '㊬' => '監', + '㊭' => '企', + '㊮' => '資', + '㊯' => '協', + '㊰' => '夜', + '㊱' => '36', + '㊲' => '37', + '㊳' => '38', + '㊴' => '39', + '㊵' => '40', + '㊶' => '41', + '㊷' => '42', + '㊸' => '43', + '㊹' => '44', + '㊺' => '45', + '㊻' => '46', + '㊼' => '47', + '㊽' => '48', + '㊾' => '49', + '㊿' => '50', + '㋀' => '1月', + '㋁' => '2月', + '㋂' => '3月', + '㋃' => '4月', + '㋄' => '5月', + '㋅' => '6月', + '㋆' => '7月', + '㋇' => '8月', + '㋈' => '9月', + '㋉' => '10月', + '㋊' => '11月', + '㋋' => '12月', + '㋌' => 'Hg', + '㋍' => 'erg', + '㋎' => 'eV', + '㋏' => 'LTD', + '㋐' => 'ア', + '㋑' => 'イ', + '㋒' => 'ウ', + '㋓' => 'エ', + '㋔' => 'オ', + '㋕' => 'カ', + '㋖' => 'キ', + '㋗' => 'ク', + '㋘' => 'ケ', + '㋙' => 'コ', + '㋚' => 'サ', + '㋛' => 'シ', + '㋜' => 'ス', + '㋝' => 'セ', + '㋞' => 'ソ', + '㋟' => 'タ', + '㋠' => 'チ', + '㋡' => 'ツ', + '㋢' => 'テ', + '㋣' => 'ト', + '㋤' => 'ナ', + '㋥' => 'ニ', + '㋦' => 'ヌ', + '㋧' => 'ネ', + '㋨' => 'ノ', + '㋩' => 'ハ', + '㋪' => 'ヒ', + '㋫' => 'フ', + '㋬' => 'ヘ', + '㋭' => 'ホ', + '㋮' => 'マ', + '㋯' => 'ミ', + '㋰' => 'ム', + '㋱' => 'メ', + '㋲' => 'モ', + '㋳' => 'ヤ', + '㋴' => 'ユ', + '㋵' => 'ヨ', + '㋶' => 'ラ', + '㋷' => 'リ', + '㋸' => 'ル', + '㋹' => 'レ', + '㋺' => 'ロ', + '㋻' => 'ワ', + '㋼' => 'ヰ', + '㋽' => 'ヱ', + '㋾' => 'ヲ', + '㋿' => '令和', + '㌀' => 'アパート', + '㌁' => 'アルファ', + '㌂' => 'アンペア', + '㌃' => 'アール', + '㌄' => 'イニング', + '㌅' => 'インチ', + '㌆' => 'ウォン', + '㌇' => 'エスクード', + '㌈' => 'エーカー', + '㌉' => 'オンス', + '㌊' => 'オーム', + '㌋' => 'カイリ', + '㌌' => 'カラット', + '㌍' => 'カロリー', + '㌎' => 'ガロン', + '㌏' => 'ガンマ', + '㌐' => 'ギガ', + '㌑' => 'ギニー', + '㌒' => 'キュリー', + '㌓' => 'ギルダー', + '㌔' => 'キロ', + '㌕' => 'キログラム', + '㌖' => 'キロメートル', + '㌗' => 'キロワット', + '㌘' => 'グラム', + '㌙' => 'グラムトン', + '㌚' => 'クルゼイロ', + '㌛' => 'クローネ', + '㌜' => 'ケース', + '㌝' => 'コルナ', + '㌞' => 'コーポ', + '㌟' => 'サイクル', + '㌠' => 'サンチーム', + '㌡' => 'シリング', + '㌢' => 'センチ', + '㌣' => 'セント', + '㌤' => 'ダース', + '㌥' => 'デシ', + '㌦' => 'ドル', + '㌧' => 'トン', + '㌨' => 'ナノ', + '㌩' => 'ノット', + '㌪' => 'ハイツ', + '㌫' => 'パーセント', + '㌬' => 'パーツ', + '㌭' => 'バーレル', + '㌮' => 'ピアストル', + '㌯' => 'ピクル', + '㌰' => 'ピコ', + '㌱' => 'ビル', + '㌲' => 'ファラッド', + '㌳' => 'フィート', + '㌴' => 'ブッシェル', + '㌵' => 'フラン', + '㌶' => 'ヘクタール', + '㌷' => 'ペソ', + '㌸' => 'ペニヒ', + '㌹' => 'ヘルツ', + '㌺' => 'ペンス', + '㌻' => 'ページ', + '㌼' => 'ベータ', + '㌽' => 'ポイント', + '㌾' => 'ボルト', + '㌿' => 'ホン', + '㍀' => 'ポンド', + '㍁' => 'ホール', + '㍂' => 'ホーン', + '㍃' => 'マイクロ', + '㍄' => 'マイル', + '㍅' => 'マッハ', + '㍆' => 'マルク', + '㍇' => 'マンション', + '㍈' => 'ミクロン', + '㍉' => 'ミリ', + '㍊' => 'ミリバール', + '㍋' => 'メガ', + '㍌' => 'メガトン', + '㍍' => 'メートル', + '㍎' => 'ヤード', + '㍏' => 'ヤール', + '㍐' => 'ユアン', + '㍑' => 'リットル', + '㍒' => 'リラ', + '㍓' => 'ルピー', + '㍔' => 'ルーブル', + '㍕' => 'レム', + '㍖' => 'レントゲン', + '㍗' => 'ワット', + '㍘' => '0点', + '㍙' => '1点', + '㍚' => '2点', + '㍛' => '3点', + '㍜' => '4点', + '㍝' => '5点', + '㍞' => '6点', + '㍟' => '7点', + '㍠' => '8点', + '㍡' => '9点', + '㍢' => '10点', + '㍣' => '11点', + '㍤' => '12点', + '㍥' => '13点', + '㍦' => '14点', + '㍧' => '15点', + '㍨' => '16点', + '㍩' => '17点', + '㍪' => '18点', + '㍫' => '19点', + '㍬' => '20点', + '㍭' => '21点', + '㍮' => '22点', + '㍯' => '23点', + '㍰' => '24点', + '㍱' => 'hPa', + '㍲' => 'da', + '㍳' => 'AU', + '㍴' => 'bar', + '㍵' => 'oV', + '㍶' => 'pc', + '㍷' => 'dm', + '㍸' => 'dm2', + '㍹' => 'dm3', + '㍺' => 'IU', + '㍻' => '平成', + '㍼' => '昭和', + '㍽' => '大正', + '㍾' => '明治', + '㍿' => '株式会社', + '㎀' => 'pA', + '㎁' => 'nA', + '㎂' => 'μA', + '㎃' => 'mA', + '㎄' => 'kA', + '㎅' => 'KB', + '㎆' => 'MB', + '㎇' => 'GB', + '㎈' => 'cal', + '㎉' => 'kcal', + '㎊' => 'pF', + '㎋' => 'nF', + '㎌' => 'μF', + '㎍' => 'μg', + '㎎' => 'mg', + '㎏' => 'kg', + '㎐' => 'Hz', + '㎑' => 'kHz', + '㎒' => 'MHz', + '㎓' => 'GHz', + '㎔' => 'THz', + '㎕' => 'μl', + '㎖' => 'ml', + '㎗' => 'dl', + '㎘' => 'kl', + '㎙' => 'fm', + '㎚' => 'nm', + '㎛' => 'μm', + '㎜' => 'mm', + '㎝' => 'cm', + '㎞' => 'km', + '㎟' => 'mm2', + '㎠' => 'cm2', + '㎡' => 'm2', + '㎢' => 'km2', + '㎣' => 'mm3', + '㎤' => 'cm3', + '㎥' => 'm3', + '㎦' => 'km3', + '㎧' => 'm∕s', + '㎨' => 'm∕s2', + '㎩' => 'Pa', + '㎪' => 'kPa', + '㎫' => 'MPa', + '㎬' => 'GPa', + '㎭' => 'rad', + '㎮' => 'rad∕s', + '㎯' => 'rad∕s2', + '㎰' => 'ps', + '㎱' => 'ns', + '㎲' => 'μs', + '㎳' => 'ms', + '㎴' => 'pV', + '㎵' => 'nV', + '㎶' => 'μV', + '㎷' => 'mV', + '㎸' => 'kV', + '㎹' => 'MV', + '㎺' => 'pW', + '㎻' => 'nW', + '㎼' => 'μW', + '㎽' => 'mW', + '㎾' => 'kW', + '㎿' => 'MW', + '㏀' => 'kΩ', + '㏁' => 'MΩ', + '㏂' => 'a.m.', + '㏃' => 'Bq', + '㏄' => 'cc', + '㏅' => 'cd', + '㏆' => 'C∕kg', + '㏇' => 'Co.', + '㏈' => 'dB', + '㏉' => 'Gy', + '㏊' => 'ha', + '㏋' => 'HP', + '㏌' => 'in', + '㏍' => 'KK', + '㏎' => 'KM', + '㏏' => 'kt', + '㏐' => 'lm', + '㏑' => 'ln', + '㏒' => 'log', + '㏓' => 'lx', + '㏔' => 'mb', + '㏕' => 'mil', + '㏖' => 'mol', + '㏗' => 'PH', + '㏘' => 'p.m.', + '㏙' => 'PPM', + '㏚' => 'PR', + '㏛' => 'sr', + '㏜' => 'Sv', + '㏝' => 'Wb', + '㏞' => 'V∕m', + '㏟' => 'A∕m', + '㏠' => '1日', + '㏡' => '2日', + '㏢' => '3日', + '㏣' => '4日', + '㏤' => '5日', + '㏥' => '6日', + '㏦' => '7日', + '㏧' => '8日', + '㏨' => '9日', + '㏩' => '10日', + '㏪' => '11日', + '㏫' => '12日', + '㏬' => '13日', + '㏭' => '14日', + '㏮' => '15日', + '㏯' => '16日', + '㏰' => '17日', + '㏱' => '18日', + '㏲' => '19日', + '㏳' => '20日', + '㏴' => '21日', + '㏵' => '22日', + '㏶' => '23日', + '㏷' => '24日', + '㏸' => '25日', + '㏹' => '26日', + '㏺' => '27日', + '㏻' => '28日', + '㏼' => '29日', + '㏽' => '30日', + '㏾' => '31日', + '㏿' => 'gal', + 'ꚜ' => 'ъ', + 'ꚝ' => 'ь', + 'ꝰ' => 'ꝯ', + 'ꟸ' => 'Ħ', + 'ꟹ' => 'œ', + 'ꭜ' => 'ꜧ', + 'ꭝ' => 'ꬷ', + 'ꭞ' => 'ɫ', + 'ꭟ' => 'ꭒ', + 'ꭩ' => 'ʍ', + 'ff' => 'ff', + 'fi' => 'fi', + 'fl' => 'fl', + 'ffi' => 'ffi', + 'ffl' => 'ffl', + 'ſt' => 'st', + 'st' => 'st', + 'ﬓ' => 'մն', + 'ﬔ' => 'մե', + 'ﬕ' => 'մի', + 'ﬖ' => 'վն', + 'ﬗ' => 'մխ', + 'ﬠ' => 'ע', + 'ﬡ' => 'א', + 'ﬢ' => 'ד', + 'ﬣ' => 'ה', + 'ﬤ' => 'כ', + 'ﬥ' => 'ל', + 'ﬦ' => 'ם', + 'ﬧ' => 'ר', + 'ﬨ' => 'ת', + '﬩' => '+', + 'ﭏ' => 'אל', + 'ﭐ' => 'ٱ', + 'ﭑ' => 'ٱ', + 'ﭒ' => 'ٻ', + 'ﭓ' => 'ٻ', + 'ﭔ' => 'ٻ', + 'ﭕ' => 'ٻ', + 'ﭖ' => 'پ', + 'ﭗ' => 'پ', + 'ﭘ' => 'پ', + 'ﭙ' => 'پ', + 'ﭚ' => 'ڀ', + 'ﭛ' => 'ڀ', + 'ﭜ' => 'ڀ', + 'ﭝ' => 'ڀ', + 'ﭞ' => 'ٺ', + 'ﭟ' => 'ٺ', + 'ﭠ' => 'ٺ', + 'ﭡ' => 'ٺ', + 'ﭢ' => 'ٿ', + 'ﭣ' => 'ٿ', + 'ﭤ' => 'ٿ', + 'ﭥ' => 'ٿ', + 'ﭦ' => 'ٹ', + 'ﭧ' => 'ٹ', + 'ﭨ' => 'ٹ', + 'ﭩ' => 'ٹ', + 'ﭪ' => 'ڤ', + 'ﭫ' => 'ڤ', + 'ﭬ' => 'ڤ', + 'ﭭ' => 'ڤ', + 'ﭮ' => 'ڦ', + 'ﭯ' => 'ڦ', + 'ﭰ' => 'ڦ', + 'ﭱ' => 'ڦ', + 'ﭲ' => 'ڄ', + 'ﭳ' => 'ڄ', + 'ﭴ' => 'ڄ', + 'ﭵ' => 'ڄ', + 'ﭶ' => 'ڃ', + 'ﭷ' => 'ڃ', + 'ﭸ' => 'ڃ', + 'ﭹ' => 'ڃ', + 'ﭺ' => 'چ', + 'ﭻ' => 'چ', + 'ﭼ' => 'چ', + 'ﭽ' => 'چ', + 'ﭾ' => 'ڇ', + 'ﭿ' => 'ڇ', + 'ﮀ' => 'ڇ', + 'ﮁ' => 'ڇ', + 'ﮂ' => 'ڍ', + 'ﮃ' => 'ڍ', + 'ﮄ' => 'ڌ', + 'ﮅ' => 'ڌ', + 'ﮆ' => 'ڎ', + 'ﮇ' => 'ڎ', + 'ﮈ' => 'ڈ', + 'ﮉ' => 'ڈ', + 'ﮊ' => 'ژ', + 'ﮋ' => 'ژ', + 'ﮌ' => 'ڑ', + 'ﮍ' => 'ڑ', + 'ﮎ' => 'ک', + 'ﮏ' => 'ک', + 'ﮐ' => 'ک', + 'ﮑ' => 'ک', + 'ﮒ' => 'گ', + 'ﮓ' => 'گ', + 'ﮔ' => 'گ', + 'ﮕ' => 'گ', + 'ﮖ' => 'ڳ', + 'ﮗ' => 'ڳ', + 'ﮘ' => 'ڳ', + 'ﮙ' => 'ڳ', + 'ﮚ' => 'ڱ', + 'ﮛ' => 'ڱ', + 'ﮜ' => 'ڱ', + 'ﮝ' => 'ڱ', + 'ﮞ' => 'ں', + 'ﮟ' => 'ں', + 'ﮠ' => 'ڻ', + 'ﮡ' => 'ڻ', + 'ﮢ' => 'ڻ', + 'ﮣ' => 'ڻ', + 'ﮤ' => 'ۀ', + 'ﮥ' => 'ۀ', + 'ﮦ' => 'ہ', + 'ﮧ' => 'ہ', + 'ﮨ' => 'ہ', + 'ﮩ' => 'ہ', + 'ﮪ' => 'ھ', + 'ﮫ' => 'ھ', + 'ﮬ' => 'ھ', + 'ﮭ' => 'ھ', + 'ﮮ' => 'ے', + 'ﮯ' => 'ے', + 'ﮰ' => 'ۓ', + 'ﮱ' => 'ۓ', + 'ﯓ' => 'ڭ', + 'ﯔ' => 'ڭ', + 'ﯕ' => 'ڭ', + 'ﯖ' => 'ڭ', + 'ﯗ' => 'ۇ', + 'ﯘ' => 'ۇ', + 'ﯙ' => 'ۆ', + 'ﯚ' => 'ۆ', + 'ﯛ' => 'ۈ', + 'ﯜ' => 'ۈ', + 'ﯝ' => 'ۇٴ', + 'ﯞ' => 'ۋ', + 'ﯟ' => 'ۋ', + 'ﯠ' => 'ۅ', + 'ﯡ' => 'ۅ', + 'ﯢ' => 'ۉ', + 'ﯣ' => 'ۉ', + 'ﯤ' => 'ې', + 'ﯥ' => 'ې', + 'ﯦ' => 'ې', + 'ﯧ' => 'ې', + 'ﯨ' => 'ى', + 'ﯩ' => 'ى', + 'ﯪ' => 'ئا', + 'ﯫ' => 'ئا', + 'ﯬ' => 'ئە', + 'ﯭ' => 'ئە', + 'ﯮ' => 'ئو', + 'ﯯ' => 'ئو', + 'ﯰ' => 'ئۇ', + 'ﯱ' => 'ئۇ', + 'ﯲ' => 'ئۆ', + 'ﯳ' => 'ئۆ', + 'ﯴ' => 'ئۈ', + 'ﯵ' => 'ئۈ', + 'ﯶ' => 'ئې', + 'ﯷ' => 'ئې', + 'ﯸ' => 'ئې', + 'ﯹ' => 'ئى', + 'ﯺ' => 'ئى', + 'ﯻ' => 'ئى', + 'ﯼ' => 'ی', + 'ﯽ' => 'ی', + 'ﯾ' => 'ی', + 'ﯿ' => 'ی', + 'ﰀ' => 'ئج', + 'ﰁ' => 'ئح', + 'ﰂ' => 'ئم', + 'ﰃ' => 'ئى', + 'ﰄ' => 'ئي', + 'ﰅ' => 'بج', + 'ﰆ' => 'بح', + 'ﰇ' => 'بخ', + 'ﰈ' => 'بم', + 'ﰉ' => 'بى', + 'ﰊ' => 'بي', + 'ﰋ' => 'تج', + 'ﰌ' => 'تح', + 'ﰍ' => 'تخ', + 'ﰎ' => 'تم', + 'ﰏ' => 'تى', + 'ﰐ' => 'تي', + 'ﰑ' => 'ثج', + 'ﰒ' => 'ثم', + 'ﰓ' => 'ثى', + 'ﰔ' => 'ثي', + 'ﰕ' => 'جح', + 'ﰖ' => 'جم', + 'ﰗ' => 'حج', + 'ﰘ' => 'حم', + 'ﰙ' => 'خج', + 'ﰚ' => 'خح', + 'ﰛ' => 'خم', + 'ﰜ' => 'سج', + 'ﰝ' => 'سح', + 'ﰞ' => 'سخ', + 'ﰟ' => 'سم', + 'ﰠ' => 'صح', + 'ﰡ' => 'صم', + 'ﰢ' => 'ضج', + 'ﰣ' => 'ضح', + 'ﰤ' => 'ضخ', + 'ﰥ' => 'ضم', + 'ﰦ' => 'طح', + 'ﰧ' => 'طم', + 'ﰨ' => 'ظم', + 'ﰩ' => 'عج', + 'ﰪ' => 'عم', + 'ﰫ' => 'غج', + 'ﰬ' => 'غم', + 'ﰭ' => 'فج', + 'ﰮ' => 'فح', + 'ﰯ' => 'فخ', + 'ﰰ' => 'فم', + 'ﰱ' => 'فى', + 'ﰲ' => 'في', + 'ﰳ' => 'قح', + 'ﰴ' => 'قم', + 'ﰵ' => 'قى', + 'ﰶ' => 'قي', + 'ﰷ' => 'كا', + 'ﰸ' => 'كج', + 'ﰹ' => 'كح', + 'ﰺ' => 'كخ', + 'ﰻ' => 'كل', + 'ﰼ' => 'كم', + 'ﰽ' => 'كى', + 'ﰾ' => 'كي', + 'ﰿ' => 'لج', + 'ﱀ' => 'لح', + 'ﱁ' => 'لخ', + 'ﱂ' => 'لم', + 'ﱃ' => 'لى', + 'ﱄ' => 'لي', + 'ﱅ' => 'مج', + 'ﱆ' => 'مح', + 'ﱇ' => 'مخ', + 'ﱈ' => 'مم', + 'ﱉ' => 'مى', + 'ﱊ' => 'مي', + 'ﱋ' => 'نج', + 'ﱌ' => 'نح', + 'ﱍ' => 'نخ', + 'ﱎ' => 'نم', + 'ﱏ' => 'نى', + 'ﱐ' => 'ني', + 'ﱑ' => 'هج', + 'ﱒ' => 'هم', + 'ﱓ' => 'هى', + 'ﱔ' => 'هي', + 'ﱕ' => 'يج', + 'ﱖ' => 'يح', + 'ﱗ' => 'يخ', + 'ﱘ' => 'يم', + 'ﱙ' => 'يى', + 'ﱚ' => 'يي', + 'ﱛ' => 'ذٰ', + 'ﱜ' => 'رٰ', + 'ﱝ' => 'ىٰ', + 'ﱞ' => ' ٌّ', + 'ﱟ' => ' ٍّ', + 'ﱠ' => ' َّ', + 'ﱡ' => ' ُّ', + 'ﱢ' => ' ِّ', + 'ﱣ' => ' ّٰ', + 'ﱤ' => 'ئر', + 'ﱥ' => 'ئز', + 'ﱦ' => 'ئم', + 'ﱧ' => 'ئن', + 'ﱨ' => 'ئى', + 'ﱩ' => 'ئي', + 'ﱪ' => 'بر', + 'ﱫ' => 'بز', + 'ﱬ' => 'بم', + 'ﱭ' => 'بن', + 'ﱮ' => 'بى', + 'ﱯ' => 'بي', + 'ﱰ' => 'تر', + 'ﱱ' => 'تز', + 'ﱲ' => 'تم', + 'ﱳ' => 'تن', + 'ﱴ' => 'تى', + 'ﱵ' => 'تي', + 'ﱶ' => 'ثر', + 'ﱷ' => 'ثز', + 'ﱸ' => 'ثم', + 'ﱹ' => 'ثن', + 'ﱺ' => 'ثى', + 'ﱻ' => 'ثي', + 'ﱼ' => 'فى', + 'ﱽ' => 'في', + 'ﱾ' => 'قى', + 'ﱿ' => 'قي', + 'ﲀ' => 'كا', + 'ﲁ' => 'كل', + 'ﲂ' => 'كم', + 'ﲃ' => 'كى', + 'ﲄ' => 'كي', + 'ﲅ' => 'لم', + 'ﲆ' => 'لى', + 'ﲇ' => 'لي', + 'ﲈ' => 'ما', + 'ﲉ' => 'مم', + 'ﲊ' => 'نر', + 'ﲋ' => 'نز', + 'ﲌ' => 'نم', + 'ﲍ' => 'نن', + 'ﲎ' => 'نى', + 'ﲏ' => 'ني', + 'ﲐ' => 'ىٰ', + 'ﲑ' => 'ير', + 'ﲒ' => 'يز', + 'ﲓ' => 'يم', + 'ﲔ' => 'ين', + 'ﲕ' => 'يى', + 'ﲖ' => 'يي', + 'ﲗ' => 'ئج', + 'ﲘ' => 'ئح', + 'ﲙ' => 'ئخ', + 'ﲚ' => 'ئم', + 'ﲛ' => 'ئه', + 'ﲜ' => 'بج', + 'ﲝ' => 'بح', + 'ﲞ' => 'بخ', + 'ﲟ' => 'بم', + 'ﲠ' => 'به', + 'ﲡ' => 'تج', + 'ﲢ' => 'تح', + 'ﲣ' => 'تخ', + 'ﲤ' => 'تم', + 'ﲥ' => 'ته', + 'ﲦ' => 'ثم', + 'ﲧ' => 'جح', + 'ﲨ' => 'جم', + 'ﲩ' => 'حج', + 'ﲪ' => 'حم', + 'ﲫ' => 'خج', + 'ﲬ' => 'خم', + 'ﲭ' => 'سج', + 'ﲮ' => 'سح', + 'ﲯ' => 'سخ', + 'ﲰ' => 'سم', + 'ﲱ' => 'صح', + 'ﲲ' => 'صخ', + 'ﲳ' => 'صم', + 'ﲴ' => 'ضج', + 'ﲵ' => 'ضح', + 'ﲶ' => 'ضخ', + 'ﲷ' => 'ضم', + 'ﲸ' => 'طح', + 'ﲹ' => 'ظم', + 'ﲺ' => 'عج', + 'ﲻ' => 'عم', + 'ﲼ' => 'غج', + 'ﲽ' => 'غم', + 'ﲾ' => 'فج', + 'ﲿ' => 'فح', + 'ﳀ' => 'فخ', + 'ﳁ' => 'فم', + 'ﳂ' => 'قح', + 'ﳃ' => 'قم', + 'ﳄ' => 'كج', + 'ﳅ' => 'كح', + 'ﳆ' => 'كخ', + 'ﳇ' => 'كل', + 'ﳈ' => 'كم', + 'ﳉ' => 'لج', + 'ﳊ' => 'لح', + 'ﳋ' => 'لخ', + 'ﳌ' => 'لم', + 'ﳍ' => 'له', + 'ﳎ' => 'مج', + 'ﳏ' => 'مح', + 'ﳐ' => 'مخ', + 'ﳑ' => 'مم', + 'ﳒ' => 'نج', + 'ﳓ' => 'نح', + 'ﳔ' => 'نخ', + 'ﳕ' => 'نم', + 'ﳖ' => 'نه', + 'ﳗ' => 'هج', + 'ﳘ' => 'هم', + 'ﳙ' => 'هٰ', + 'ﳚ' => 'يج', + 'ﳛ' => 'يح', + 'ﳜ' => 'يخ', + 'ﳝ' => 'يم', + 'ﳞ' => 'يه', + 'ﳟ' => 'ئم', + 'ﳠ' => 'ئه', + 'ﳡ' => 'بم', + 'ﳢ' => 'به', + 'ﳣ' => 'تم', + 'ﳤ' => 'ته', + 'ﳥ' => 'ثم', + 'ﳦ' => 'ثه', + 'ﳧ' => 'سم', + 'ﳨ' => 'سه', + 'ﳩ' => 'شم', + 'ﳪ' => 'شه', + 'ﳫ' => 'كل', + 'ﳬ' => 'كم', + 'ﳭ' => 'لم', + 'ﳮ' => 'نم', + 'ﳯ' => 'نه', + 'ﳰ' => 'يم', + 'ﳱ' => 'يه', + 'ﳲ' => 'ـَّ', + 'ﳳ' => 'ـُّ', + 'ﳴ' => 'ـِّ', + 'ﳵ' => 'طى', + 'ﳶ' => 'طي', + 'ﳷ' => 'عى', + 'ﳸ' => 'عي', + 'ﳹ' => 'غى', + 'ﳺ' => 'غي', + 'ﳻ' => 'سى', + 'ﳼ' => 'سي', + 'ﳽ' => 'شى', + 'ﳾ' => 'شي', + 'ﳿ' => 'حى', + 'ﴀ' => 'حي', + 'ﴁ' => 'جى', + 'ﴂ' => 'جي', + 'ﴃ' => 'خى', + 'ﴄ' => 'خي', + 'ﴅ' => 'صى', + 'ﴆ' => 'صي', + 'ﴇ' => 'ضى', + 'ﴈ' => 'ضي', + 'ﴉ' => 'شج', + 'ﴊ' => 'شح', + 'ﴋ' => 'شخ', + 'ﴌ' => 'شم', + 'ﴍ' => 'شر', + 'ﴎ' => 'سر', + 'ﴏ' => 'صر', + 'ﴐ' => 'ضر', + 'ﴑ' => 'طى', + 'ﴒ' => 'طي', + 'ﴓ' => 'عى', + 'ﴔ' => 'عي', + 'ﴕ' => 'غى', + 'ﴖ' => 'غي', + 'ﴗ' => 'سى', + 'ﴘ' => 'سي', + 'ﴙ' => 'شى', + 'ﴚ' => 'شي', + 'ﴛ' => 'حى', + 'ﴜ' => 'حي', + 'ﴝ' => 'جى', + 'ﴞ' => 'جي', + 'ﴟ' => 'خى', + 'ﴠ' => 'خي', + 'ﴡ' => 'صى', + 'ﴢ' => 'صي', + 'ﴣ' => 'ضى', + 'ﴤ' => 'ضي', + 'ﴥ' => 'شج', + 'ﴦ' => 'شح', + 'ﴧ' => 'شخ', + 'ﴨ' => 'شم', + 'ﴩ' => 'شر', + 'ﴪ' => 'سر', + 'ﴫ' => 'صر', + 'ﴬ' => 'ضر', + 'ﴭ' => 'شج', + 'ﴮ' => 'شح', + 'ﴯ' => 'شخ', + 'ﴰ' => 'شم', + 'ﴱ' => 'سه', + 'ﴲ' => 'شه', + 'ﴳ' => 'طم', + 'ﴴ' => 'سج', + 'ﴵ' => 'سح', + 'ﴶ' => 'سخ', + 'ﴷ' => 'شج', + 'ﴸ' => 'شح', + 'ﴹ' => 'شخ', + 'ﴺ' => 'طم', + 'ﴻ' => 'ظم', + 'ﴼ' => 'اً', + 'ﴽ' => 'اً', + 'ﵐ' => 'تجم', + 'ﵑ' => 'تحج', + 'ﵒ' => 'تحج', + 'ﵓ' => 'تحم', + 'ﵔ' => 'تخم', + 'ﵕ' => 'تمج', + 'ﵖ' => 'تمح', + 'ﵗ' => 'تمخ', + 'ﵘ' => 'جمح', + 'ﵙ' => 'جمح', + 'ﵚ' => 'حمي', + 'ﵛ' => 'حمى', + 'ﵜ' => 'سحج', + 'ﵝ' => 'سجح', + 'ﵞ' => 'سجى', + 'ﵟ' => 'سمح', + 'ﵠ' => 'سمح', + 'ﵡ' => 'سمج', + 'ﵢ' => 'سمم', + 'ﵣ' => 'سمم', + 'ﵤ' => 'صحح', + 'ﵥ' => 'صحح', + 'ﵦ' => 'صمم', + 'ﵧ' => 'شحم', + 'ﵨ' => 'شحم', + 'ﵩ' => 'شجي', + 'ﵪ' => 'شمخ', + 'ﵫ' => 'شمخ', + 'ﵬ' => 'شمم', + 'ﵭ' => 'شمم', + 'ﵮ' => 'ضحى', + 'ﵯ' => 'ضخم', + 'ﵰ' => 'ضخم', + 'ﵱ' => 'طمح', + 'ﵲ' => 'طمح', + 'ﵳ' => 'طمم', + 'ﵴ' => 'طمي', + 'ﵵ' => 'عجم', + 'ﵶ' => 'عمم', + 'ﵷ' => 'عمم', + 'ﵸ' => 'عمى', + 'ﵹ' => 'غمم', + 'ﵺ' => 'غمي', + 'ﵻ' => 'غمى', + 'ﵼ' => 'فخم', + 'ﵽ' => 'فخم', + 'ﵾ' => 'قمح', + 'ﵿ' => 'قمم', + 'ﶀ' => 'لحم', + 'ﶁ' => 'لحي', + 'ﶂ' => 'لحى', + 'ﶃ' => 'لجج', + 'ﶄ' => 'لجج', + 'ﶅ' => 'لخم', + 'ﶆ' => 'لخم', + 'ﶇ' => 'لمح', + 'ﶈ' => 'لمح', + 'ﶉ' => 'محج', + 'ﶊ' => 'محم', + 'ﶋ' => 'محي', + 'ﶌ' => 'مجح', + 'ﶍ' => 'مجم', + 'ﶎ' => 'مخج', + 'ﶏ' => 'مخم', + 'ﶒ' => 'مجخ', + 'ﶓ' => 'همج', + 'ﶔ' => 'همم', + 'ﶕ' => 'نحم', + 'ﶖ' => 'نحى', + 'ﶗ' => 'نجم', + 'ﶘ' => 'نجم', + 'ﶙ' => 'نجى', + 'ﶚ' => 'نمي', + 'ﶛ' => 'نمى', + 'ﶜ' => 'يمم', + 'ﶝ' => 'يمم', + 'ﶞ' => 'بخي', + 'ﶟ' => 'تجي', + 'ﶠ' => 'تجى', + 'ﶡ' => 'تخي', + 'ﶢ' => 'تخى', + 'ﶣ' => 'تمي', + 'ﶤ' => 'تمى', + 'ﶥ' => 'جمي', + 'ﶦ' => 'جحى', + 'ﶧ' => 'جمى', + 'ﶨ' => 'سخى', + 'ﶩ' => 'صحي', + 'ﶪ' => 'شحي', + 'ﶫ' => 'ضحي', + 'ﶬ' => 'لجي', + 'ﶭ' => 'لمي', + 'ﶮ' => 'يحي', + 'ﶯ' => 'يجي', + 'ﶰ' => 'يمي', + 'ﶱ' => 'ممي', + 'ﶲ' => 'قمي', + 'ﶳ' => 'نحي', + 'ﶴ' => 'قمح', + 'ﶵ' => 'لحم', + 'ﶶ' => 'عمي', + 'ﶷ' => 'كمي', + 'ﶸ' => 'نجح', + 'ﶹ' => 'مخي', + 'ﶺ' => 'لجم', + 'ﶻ' => 'كمم', + 'ﶼ' => 'لجم', + 'ﶽ' => 'نجح', + 'ﶾ' => 'جحي', + 'ﶿ' => 'حجي', + 'ﷀ' => 'مجي', + 'ﷁ' => 'فمي', + 'ﷂ' => 'بحي', + 'ﷃ' => 'كمم', + 'ﷄ' => 'عجم', + 'ﷅ' => 'صمم', + 'ﷆ' => 'سخي', + 'ﷇ' => 'نجي', + 'ﷰ' => 'صلے', + 'ﷱ' => 'قلے', + 'ﷲ' => 'الله', + 'ﷳ' => 'اكبر', + 'ﷴ' => 'محمد', + 'ﷵ' => 'صلعم', + 'ﷶ' => 'رسول', + 'ﷷ' => 'عليه', + 'ﷸ' => 'وسلم', + 'ﷹ' => 'صلى', + 'ﷺ' => 'صلى الله عليه وسلم', + 'ﷻ' => 'جل جلاله', + '﷼' => 'ریال', + '︐' => ',', + '︑' => '、', + '︒' => '。', + '︓' => ':', + '︔' => ';', + '︕' => '!', + '︖' => '?', + '︗' => '〖', + '︘' => '〗', + '︙' => '...', + '︰' => '..', + '︱' => '—', + '︲' => '–', + '︳' => '_', + '︴' => '_', + '︵' => '(', + '︶' => ')', + '︷' => '{', + '︸' => '}', + '︹' => '〔', + '︺' => '〕', + '︻' => '【', + '︼' => '】', + '︽' => '《', + '︾' => '》', + '︿' => '〈', + '﹀' => '〉', + '﹁' => '「', + '﹂' => '」', + '﹃' => '『', + '﹄' => '』', + '﹇' => '[', + '﹈' => ']', + '﹉' => ' ̅', + '﹊' => ' ̅', + '﹋' => ' ̅', + '﹌' => ' ̅', + '﹍' => '_', + '﹎' => '_', + '﹏' => '_', + '﹐' => ',', + '﹑' => '、', + '﹒' => '.', + '﹔' => ';', + '﹕' => ':', + '﹖' => '?', + '﹗' => '!', + '﹘' => '—', + '﹙' => '(', + '﹚' => ')', + '﹛' => '{', + '﹜' => '}', + '﹝' => '〔', + '﹞' => '〕', + '﹟' => '#', + '﹠' => '&', + '﹡' => '*', + '﹢' => '+', + '﹣' => '-', + '﹤' => '<', + '﹥' => '>', + '﹦' => '=', + '﹨' => '\\', + '﹩' => '$', + '﹪' => '%', + '﹫' => '@', + 'ﹰ' => ' ً', + 'ﹱ' => 'ـً', + 'ﹲ' => ' ٌ', + 'ﹴ' => ' ٍ', + 'ﹶ' => ' َ', + 'ﹷ' => 'ـَ', + 'ﹸ' => ' ُ', + 'ﹹ' => 'ـُ', + 'ﹺ' => ' ِ', + 'ﹻ' => 'ـِ', + 'ﹼ' => ' ّ', + 'ﹽ' => 'ـّ', + 'ﹾ' => ' ْ', + 'ﹿ' => 'ـْ', + 'ﺀ' => 'ء', + 'ﺁ' => 'آ', + 'ﺂ' => 'آ', + 'ﺃ' => 'أ', + 'ﺄ' => 'أ', + 'ﺅ' => 'ؤ', + 'ﺆ' => 'ؤ', + 'ﺇ' => 'إ', + 'ﺈ' => 'إ', + 'ﺉ' => 'ئ', + 'ﺊ' => 'ئ', + 'ﺋ' => 'ئ', + 'ﺌ' => 'ئ', + 'ﺍ' => 'ا', + 'ﺎ' => 'ا', + 'ﺏ' => 'ب', + 'ﺐ' => 'ب', + 'ﺑ' => 'ب', + 'ﺒ' => 'ب', + 'ﺓ' => 'ة', + 'ﺔ' => 'ة', + 'ﺕ' => 'ت', + 'ﺖ' => 'ت', + 'ﺗ' => 'ت', + 'ﺘ' => 'ت', + 'ﺙ' => 'ث', + 'ﺚ' => 'ث', + 'ﺛ' => 'ث', + 'ﺜ' => 'ث', + 'ﺝ' => 'ج', + 'ﺞ' => 'ج', + 'ﺟ' => 'ج', + 'ﺠ' => 'ج', + 'ﺡ' => 'ح', + 'ﺢ' => 'ح', + 'ﺣ' => 'ح', + 'ﺤ' => 'ح', + 'ﺥ' => 'خ', + 'ﺦ' => 'خ', + 'ﺧ' => 'خ', + 'ﺨ' => 'خ', + 'ﺩ' => 'د', + 'ﺪ' => 'د', + 'ﺫ' => 'ذ', + 'ﺬ' => 'ذ', + 'ﺭ' => 'ر', + 'ﺮ' => 'ر', + 'ﺯ' => 'ز', + 'ﺰ' => 'ز', + 'ﺱ' => 'س', + 'ﺲ' => 'س', + 'ﺳ' => 'س', + 'ﺴ' => 'س', + 'ﺵ' => 'ش', + 'ﺶ' => 'ش', + 'ﺷ' => 'ش', + 'ﺸ' => 'ش', + 'ﺹ' => 'ص', + 'ﺺ' => 'ص', + 'ﺻ' => 'ص', + 'ﺼ' => 'ص', + 'ﺽ' => 'ض', + 'ﺾ' => 'ض', + 'ﺿ' => 'ض', + 'ﻀ' => 'ض', + 'ﻁ' => 'ط', + 'ﻂ' => 'ط', + 'ﻃ' => 'ط', + 'ﻄ' => 'ط', + 'ﻅ' => 'ظ', + 'ﻆ' => 'ظ', + 'ﻇ' => 'ظ', + 'ﻈ' => 'ظ', + 'ﻉ' => 'ع', + 'ﻊ' => 'ع', + 'ﻋ' => 'ع', + 'ﻌ' => 'ع', + 'ﻍ' => 'غ', + 'ﻎ' => 'غ', + 'ﻏ' => 'غ', + 'ﻐ' => 'غ', + 'ﻑ' => 'ف', + 'ﻒ' => 'ف', + 'ﻓ' => 'ف', + 'ﻔ' => 'ف', + 'ﻕ' => 'ق', + 'ﻖ' => 'ق', + 'ﻗ' => 'ق', + 'ﻘ' => 'ق', + 'ﻙ' => 'ك', + 'ﻚ' => 'ك', + 'ﻛ' => 'ك', + 'ﻜ' => 'ك', + 'ﻝ' => 'ل', + 'ﻞ' => 'ل', + 'ﻟ' => 'ل', + 'ﻠ' => 'ل', + 'ﻡ' => 'م', + 'ﻢ' => 'م', + 'ﻣ' => 'م', + 'ﻤ' => 'م', + 'ﻥ' => 'ن', + 'ﻦ' => 'ن', + 'ﻧ' => 'ن', + 'ﻨ' => 'ن', + 'ﻩ' => 'ه', + 'ﻪ' => 'ه', + 'ﻫ' => 'ه', + 'ﻬ' => 'ه', + 'ﻭ' => 'و', + 'ﻮ' => 'و', + 'ﻯ' => 'ى', + 'ﻰ' => 'ى', + 'ﻱ' => 'ي', + 'ﻲ' => 'ي', + 'ﻳ' => 'ي', + 'ﻴ' => 'ي', + 'ﻵ' => 'لآ', + 'ﻶ' => 'لآ', + 'ﻷ' => 'لأ', + 'ﻸ' => 'لأ', + 'ﻹ' => 'لإ', + 'ﻺ' => 'لإ', + 'ﻻ' => 'لا', + 'ﻼ' => 'لا', + '!' => '!', + '"' => '"', + '#' => '#', + '$' => '$', + '%' => '%', + '&' => '&', + ''' => '\'', + '(' => '(', + ')' => ')', + '*' => '*', + '+' => '+', + ',' => ',', + '-' => '-', + '.' => '.', + '/' => '/', + '0' => '0', + '1' => '1', + '2' => '2', + '3' => '3', + '4' => '4', + '5' => '5', + '6' => '6', + '7' => '7', + '8' => '8', + '9' => '9', + ':' => ':', + ';' => ';', + '<' => '<', + '=' => '=', + '>' => '>', + '?' => '?', + '@' => '@', + 'A' => 'A', + 'B' => 'B', + 'C' => 'C', + 'D' => 'D', + 'E' => 'E', + 'F' => 'F', + 'G' => 'G', + 'H' => 'H', + 'I' => 'I', + 'J' => 'J', + 'K' => 'K', + 'L' => 'L', + 'M' => 'M', + 'N' => 'N', + 'O' => 'O', + 'P' => 'P', + 'Q' => 'Q', + 'R' => 'R', + 'S' => 'S', + 'T' => 'T', + 'U' => 'U', + 'V' => 'V', + 'W' => 'W', + 'X' => 'X', + 'Y' => 'Y', + 'Z' => 'Z', + '[' => '[', + '\' => '\\', + ']' => ']', + '^' => '^', + '_' => '_', + '`' => '`', + 'a' => 'a', + 'b' => 'b', + 'c' => 'c', + 'd' => 'd', + 'e' => 'e', + 'f' => 'f', + 'g' => 'g', + 'h' => 'h', + 'i' => 'i', + 'j' => 'j', + 'k' => 'k', + 'l' => 'l', + 'm' => 'm', + 'n' => 'n', + 'o' => 'o', + 'p' => 'p', + 'q' => 'q', + 'r' => 'r', + 's' => 's', + 't' => 't', + 'u' => 'u', + 'v' => 'v', + 'w' => 'w', + 'x' => 'x', + 'y' => 'y', + 'z' => 'z', + '{' => '{', + '|' => '|', + '}' => '}', + '~' => '~', + '⦅' => '⦅', + '⦆' => '⦆', + '。' => '。', + '「' => '「', + '」' => '」', + '、' => '、', + '・' => '・', + 'ヲ' => 'ヲ', + 'ァ' => 'ァ', + 'ィ' => 'ィ', + 'ゥ' => 'ゥ', + 'ェ' => 'ェ', + 'ォ' => 'ォ', + 'ャ' => 'ャ', + 'ュ' => 'ュ', + 'ョ' => 'ョ', + 'ッ' => 'ッ', + 'ー' => 'ー', + 'ア' => 'ア', + 'イ' => 'イ', + 'ウ' => 'ウ', + 'エ' => 'エ', + 'オ' => 'オ', + 'カ' => 'カ', + 'キ' => 'キ', + 'ク' => 'ク', + 'ケ' => 'ケ', + 'コ' => 'コ', + 'サ' => 'サ', + 'シ' => 'シ', + 'ス' => 'ス', + 'セ' => 'セ', + 'ソ' => 'ソ', + 'タ' => 'タ', + 'チ' => 'チ', + 'ツ' => 'ツ', + 'テ' => 'テ', + 'ト' => 'ト', + 'ナ' => 'ナ', + 'ニ' => 'ニ', + 'ヌ' => 'ヌ', + 'ネ' => 'ネ', + 'ノ' => 'ノ', + 'ハ' => 'ハ', + 'ヒ' => 'ヒ', + 'フ' => 'フ', + 'ヘ' => 'ヘ', + 'ホ' => 'ホ', + 'マ' => 'マ', + 'ミ' => 'ミ', + 'ム' => 'ム', + 'メ' => 'メ', + 'モ' => 'モ', + 'ヤ' => 'ヤ', + 'ユ' => 'ユ', + 'ヨ' => 'ヨ', + 'ラ' => 'ラ', + 'リ' => 'リ', + 'ル' => 'ル', + 'レ' => 'レ', + 'ロ' => 'ロ', + 'ワ' => 'ワ', + 'ン' => 'ン', + '゙' => '゙', + '゚' => '゚', + 'ᅠ' => 'ᅠ', + 'ᄀ' => 'ᄀ', + 'ᄁ' => 'ᄁ', + 'ᆪ' => 'ᆪ', + 'ᄂ' => 'ᄂ', + 'ᆬ' => 'ᆬ', + 'ᆭ' => 'ᆭ', + 'ᄃ' => 'ᄃ', + 'ᄄ' => 'ᄄ', + 'ᄅ' => 'ᄅ', + 'ᆰ' => 'ᆰ', + 'ᆱ' => 'ᆱ', + 'ᆲ' => 'ᆲ', + 'ᆳ' => 'ᆳ', + 'ᆴ' => 'ᆴ', + 'ᆵ' => 'ᆵ', + 'ᄚ' => 'ᄚ', + 'ᄆ' => 'ᄆ', + 'ᄇ' => 'ᄇ', + 'ᄈ' => 'ᄈ', + 'ᄡ' => 'ᄡ', + 'ᄉ' => 'ᄉ', + 'ᄊ' => 'ᄊ', + 'ᄋ' => 'ᄋ', + 'ᄌ' => 'ᄌ', + 'ᄍ' => 'ᄍ', + 'ᄎ' => 'ᄎ', + 'ᄏ' => 'ᄏ', + 'ᄐ' => 'ᄐ', + 'ᄑ' => 'ᄑ', + 'ᄒ' => 'ᄒ', + 'ᅡ' => 'ᅡ', + 'ᅢ' => 'ᅢ', + 'ᅣ' => 'ᅣ', + 'ᅤ' => 'ᅤ', + 'ᅥ' => 'ᅥ', + 'ᅦ' => 'ᅦ', + 'ᅧ' => 'ᅧ', + 'ᅨ' => 'ᅨ', + 'ᅩ' => 'ᅩ', + 'ᅪ' => 'ᅪ', + 'ᅫ' => 'ᅫ', + 'ᅬ' => 'ᅬ', + 'ᅭ' => 'ᅭ', + 'ᅮ' => 'ᅮ', + 'ᅯ' => 'ᅯ', + 'ᅰ' => 'ᅰ', + 'ᅱ' => 'ᅱ', + 'ᅲ' => 'ᅲ', + 'ᅳ' => 'ᅳ', + 'ᅴ' => 'ᅴ', + 'ᅵ' => 'ᅵ', + '¢' => '¢', + '£' => '£', + '¬' => '¬', + ' ̄' => ' ̄', + '¦' => '¦', + '¥' => '¥', + '₩' => '₩', + '│' => '│', + '←' => '←', + '↑' => '↑', + '→' => '→', + '↓' => '↓', + '■' => '■', + '○' => '○', + '𝐀' => 'A', + '𝐁' => 'B', + '𝐂' => 'C', + '𝐃' => 'D', + '𝐄' => 'E', + '𝐅' => 'F', + '𝐆' => 'G', + '𝐇' => 'H', + '𝐈' => 'I', + '𝐉' => 'J', + '𝐊' => 'K', + '𝐋' => 'L', + '𝐌' => 'M', + '𝐍' => 'N', + '𝐎' => 'O', + '𝐏' => 'P', + '𝐐' => 'Q', + '𝐑' => 'R', + '𝐒' => 'S', + '𝐓' => 'T', + '𝐔' => 'U', + '𝐕' => 'V', + '𝐖' => 'W', + '𝐗' => 'X', + '𝐘' => 'Y', + '𝐙' => 'Z', + '𝐚' => 'a', + '𝐛' => 'b', + '𝐜' => 'c', + '𝐝' => 'd', + '𝐞' => 'e', + '𝐟' => 'f', + '𝐠' => 'g', + '𝐡' => 'h', + '𝐢' => 'i', + '𝐣' => 'j', + '𝐤' => 'k', + '𝐥' => 'l', + '𝐦' => 'm', + '𝐧' => 'n', + '𝐨' => 'o', + '𝐩' => 'p', + '𝐪' => 'q', + '𝐫' => 'r', + '𝐬' => 's', + '𝐭' => 't', + '𝐮' => 'u', + '𝐯' => 'v', + '𝐰' => 'w', + '𝐱' => 'x', + '𝐲' => 'y', + '𝐳' => 'z', + '𝐴' => 'A', + '𝐵' => 'B', + '𝐶' => 'C', + '𝐷' => 'D', + '𝐸' => 'E', + '𝐹' => 'F', + '𝐺' => 'G', + '𝐻' => 'H', + '𝐼' => 'I', + '𝐽' => 'J', + '𝐾' => 'K', + '𝐿' => 'L', + '𝑀' => 'M', + '𝑁' => 'N', + '𝑂' => 'O', + '𝑃' => 'P', + '𝑄' => 'Q', + '𝑅' => 'R', + '𝑆' => 'S', + '𝑇' => 'T', + '𝑈' => 'U', + '𝑉' => 'V', + '𝑊' => 'W', + '𝑋' => 'X', + '𝑌' => 'Y', + '𝑍' => 'Z', + '𝑎' => 'a', + '𝑏' => 'b', + '𝑐' => 'c', + '𝑑' => 'd', + '𝑒' => 'e', + '𝑓' => 'f', + '𝑔' => 'g', + '𝑖' => 'i', + '𝑗' => 'j', + '𝑘' => 'k', + '𝑙' => 'l', + '𝑚' => 'm', + '𝑛' => 'n', + '𝑜' => 'o', + '𝑝' => 'p', + '𝑞' => 'q', + '𝑟' => 'r', + '𝑠' => 's', + '𝑡' => 't', + '𝑢' => 'u', + '𝑣' => 'v', + '𝑤' => 'w', + '𝑥' => 'x', + '𝑦' => 'y', + '𝑧' => 'z', + '𝑨' => 'A', + '𝑩' => 'B', + '𝑪' => 'C', + '𝑫' => 'D', + '𝑬' => 'E', + '𝑭' => 'F', + '𝑮' => 'G', + '𝑯' => 'H', + '𝑰' => 'I', + '𝑱' => 'J', + '𝑲' => 'K', + '𝑳' => 'L', + '𝑴' => 'M', + '𝑵' => 'N', + '𝑶' => 'O', + '𝑷' => 'P', + '𝑸' => 'Q', + '𝑹' => 'R', + '𝑺' => 'S', + '𝑻' => 'T', + '𝑼' => 'U', + '𝑽' => 'V', + '𝑾' => 'W', + '𝑿' => 'X', + '𝒀' => 'Y', + '𝒁' => 'Z', + '𝒂' => 'a', + '𝒃' => 'b', + '𝒄' => 'c', + '𝒅' => 'd', + '𝒆' => 'e', + '𝒇' => 'f', + '𝒈' => 'g', + '𝒉' => 'h', + '𝒊' => 'i', + '𝒋' => 'j', + '𝒌' => 'k', + '𝒍' => 'l', + '𝒎' => 'm', + '𝒏' => 'n', + '𝒐' => 'o', + '𝒑' => 'p', + '𝒒' => 'q', + '𝒓' => 'r', + '𝒔' => 's', + '𝒕' => 't', + '𝒖' => 'u', + '𝒗' => 'v', + '𝒘' => 'w', + '𝒙' => 'x', + '𝒚' => 'y', + '𝒛' => 'z', + '𝒜' => 'A', + '𝒞' => 'C', + '𝒟' => 'D', + '𝒢' => 'G', + '𝒥' => 'J', + '𝒦' => 'K', + '𝒩' => 'N', + '𝒪' => 'O', + '𝒫' => 'P', + '𝒬' => 'Q', + '𝒮' => 'S', + '𝒯' => 'T', + '𝒰' => 'U', + '𝒱' => 'V', + '𝒲' => 'W', + '𝒳' => 'X', + '𝒴' => 'Y', + '𝒵' => 'Z', + '𝒶' => 'a', + '𝒷' => 'b', + '𝒸' => 'c', + '𝒹' => 'd', + '𝒻' => 'f', + '𝒽' => 'h', + '𝒾' => 'i', + '𝒿' => 'j', + '𝓀' => 'k', + '𝓁' => 'l', + '𝓂' => 'm', + '𝓃' => 'n', + '𝓅' => 'p', + '𝓆' => 'q', + '𝓇' => 'r', + '𝓈' => 's', + '𝓉' => 't', + '𝓊' => 'u', + '𝓋' => 'v', + '𝓌' => 'w', + '𝓍' => 'x', + '𝓎' => 'y', + '𝓏' => 'z', + '𝓐' => 'A', + '𝓑' => 'B', + '𝓒' => 'C', + '𝓓' => 'D', + '𝓔' => 'E', + '𝓕' => 'F', + '𝓖' => 'G', + '𝓗' => 'H', + '𝓘' => 'I', + '𝓙' => 'J', + '𝓚' => 'K', + '𝓛' => 'L', + '𝓜' => 'M', + '𝓝' => 'N', + '𝓞' => 'O', + '𝓟' => 'P', + '𝓠' => 'Q', + '𝓡' => 'R', + '𝓢' => 'S', + '𝓣' => 'T', + '𝓤' => 'U', + '𝓥' => 'V', + '𝓦' => 'W', + '𝓧' => 'X', + '𝓨' => 'Y', + '𝓩' => 'Z', + '𝓪' => 'a', + '𝓫' => 'b', + '𝓬' => 'c', + '𝓭' => 'd', + '𝓮' => 'e', + '𝓯' => 'f', + '𝓰' => 'g', + '𝓱' => 'h', + '𝓲' => 'i', + '𝓳' => 'j', + '𝓴' => 'k', + '𝓵' => 'l', + '𝓶' => 'm', + '𝓷' => 'n', + '𝓸' => 'o', + '𝓹' => 'p', + '𝓺' => 'q', + '𝓻' => 'r', + '𝓼' => 's', + '𝓽' => 't', + '𝓾' => 'u', + '𝓿' => 'v', + '𝔀' => 'w', + '𝔁' => 'x', + '𝔂' => 'y', + '𝔃' => 'z', + '𝔄' => 'A', + '𝔅' => 'B', + '𝔇' => 'D', + '𝔈' => 'E', + '𝔉' => 'F', + '𝔊' => 'G', + '𝔍' => 'J', + '𝔎' => 'K', + '𝔏' => 'L', + '𝔐' => 'M', + '𝔑' => 'N', + '𝔒' => 'O', + '𝔓' => 'P', + '𝔔' => 'Q', + '𝔖' => 'S', + '𝔗' => 'T', + '𝔘' => 'U', + '𝔙' => 'V', + '𝔚' => 'W', + '𝔛' => 'X', + '𝔜' => 'Y', + '𝔞' => 'a', + '𝔟' => 'b', + '𝔠' => 'c', + '𝔡' => 'd', + '𝔢' => 'e', + '𝔣' => 'f', + '𝔤' => 'g', + '𝔥' => 'h', + '𝔦' => 'i', + '𝔧' => 'j', + '𝔨' => 'k', + '𝔩' => 'l', + '𝔪' => 'm', + '𝔫' => 'n', + '𝔬' => 'o', + '𝔭' => 'p', + '𝔮' => 'q', + '𝔯' => 'r', + '𝔰' => 's', + '𝔱' => 't', + '𝔲' => 'u', + '𝔳' => 'v', + '𝔴' => 'w', + '𝔵' => 'x', + '𝔶' => 'y', + '𝔷' => 'z', + '𝔸' => 'A', + '𝔹' => 'B', + '𝔻' => 'D', + '𝔼' => 'E', + '𝔽' => 'F', + '𝔾' => 'G', + '𝕀' => 'I', + '𝕁' => 'J', + '𝕂' => 'K', + '𝕃' => 'L', + '𝕄' => 'M', + '𝕆' => 'O', + '𝕊' => 'S', + '𝕋' => 'T', + '𝕌' => 'U', + '𝕍' => 'V', + '𝕎' => 'W', + '𝕏' => 'X', + '𝕐' => 'Y', + '𝕒' => 'a', + '𝕓' => 'b', + '𝕔' => 'c', + '𝕕' => 'd', + '𝕖' => 'e', + '𝕗' => 'f', + '𝕘' => 'g', + '𝕙' => 'h', + '𝕚' => 'i', + '𝕛' => 'j', + '𝕜' => 'k', + '𝕝' => 'l', + '𝕞' => 'm', + '𝕟' => 'n', + '𝕠' => 'o', + '𝕡' => 'p', + '𝕢' => 'q', + '𝕣' => 'r', + '𝕤' => 's', + '𝕥' => 't', + '𝕦' => 'u', + '𝕧' => 'v', + '𝕨' => 'w', + '𝕩' => 'x', + '𝕪' => 'y', + '𝕫' => 'z', + '𝕬' => 'A', + '𝕭' => 'B', + '𝕮' => 'C', + '𝕯' => 'D', + '𝕰' => 'E', + '𝕱' => 'F', + '𝕲' => 'G', + '𝕳' => 'H', + '𝕴' => 'I', + '𝕵' => 'J', + '𝕶' => 'K', + '𝕷' => 'L', + '𝕸' => 'M', + '𝕹' => 'N', + '𝕺' => 'O', + '𝕻' => 'P', + '𝕼' => 'Q', + '𝕽' => 'R', + '𝕾' => 'S', + '𝕿' => 'T', + '𝖀' => 'U', + '𝖁' => 'V', + '𝖂' => 'W', + '𝖃' => 'X', + '𝖄' => 'Y', + '𝖅' => 'Z', + '𝖆' => 'a', + '𝖇' => 'b', + '𝖈' => 'c', + '𝖉' => 'd', + '𝖊' => 'e', + '𝖋' => 'f', + '𝖌' => 'g', + '𝖍' => 'h', + '𝖎' => 'i', + '𝖏' => 'j', + '𝖐' => 'k', + '𝖑' => 'l', + '𝖒' => 'm', + '𝖓' => 'n', + '𝖔' => 'o', + '𝖕' => 'p', + '𝖖' => 'q', + '𝖗' => 'r', + '𝖘' => 's', + '𝖙' => 't', + '𝖚' => 'u', + '𝖛' => 'v', + '𝖜' => 'w', + '𝖝' => 'x', + '𝖞' => 'y', + '𝖟' => 'z', + '𝖠' => 'A', + '𝖡' => 'B', + '𝖢' => 'C', + '𝖣' => 'D', + '𝖤' => 'E', + '𝖥' => 'F', + '𝖦' => 'G', + '𝖧' => 'H', + '𝖨' => 'I', + '𝖩' => 'J', + '𝖪' => 'K', + '𝖫' => 'L', + '𝖬' => 'M', + '𝖭' => 'N', + '𝖮' => 'O', + '𝖯' => 'P', + '𝖰' => 'Q', + '𝖱' => 'R', + '𝖲' => 'S', + '𝖳' => 'T', + '𝖴' => 'U', + '𝖵' => 'V', + '𝖶' => 'W', + '𝖷' => 'X', + '𝖸' => 'Y', + '𝖹' => 'Z', + '𝖺' => 'a', + '𝖻' => 'b', + '𝖼' => 'c', + '𝖽' => 'd', + '𝖾' => 'e', + '𝖿' => 'f', + '𝗀' => 'g', + '𝗁' => 'h', + '𝗂' => 'i', + '𝗃' => 'j', + '𝗄' => 'k', + '𝗅' => 'l', + '𝗆' => 'm', + '𝗇' => 'n', + '𝗈' => 'o', + '𝗉' => 'p', + '𝗊' => 'q', + '𝗋' => 'r', + '𝗌' => 's', + '𝗍' => 't', + '𝗎' => 'u', + '𝗏' => 'v', + '𝗐' => 'w', + '𝗑' => 'x', + '𝗒' => 'y', + '𝗓' => 'z', + '𝗔' => 'A', + '𝗕' => 'B', + '𝗖' => 'C', + '𝗗' => 'D', + '𝗘' => 'E', + '𝗙' => 'F', + '𝗚' => 'G', + '𝗛' => 'H', + '𝗜' => 'I', + '𝗝' => 'J', + '𝗞' => 'K', + '𝗟' => 'L', + '𝗠' => 'M', + '𝗡' => 'N', + '𝗢' => 'O', + '𝗣' => 'P', + '𝗤' => 'Q', + '𝗥' => 'R', + '𝗦' => 'S', + '𝗧' => 'T', + '𝗨' => 'U', + '𝗩' => 'V', + '𝗪' => 'W', + '𝗫' => 'X', + '𝗬' => 'Y', + '𝗭' => 'Z', + '𝗮' => 'a', + '𝗯' => 'b', + '𝗰' => 'c', + '𝗱' => 'd', + '𝗲' => 'e', + '𝗳' => 'f', + '𝗴' => 'g', + '𝗵' => 'h', + '𝗶' => 'i', + '𝗷' => 'j', + '𝗸' => 'k', + '𝗹' => 'l', + '𝗺' => 'm', + '𝗻' => 'n', + '𝗼' => 'o', + '𝗽' => 'p', + '𝗾' => 'q', + '𝗿' => 'r', + '𝘀' => 's', + '𝘁' => 't', + '𝘂' => 'u', + '𝘃' => 'v', + '𝘄' => 'w', + '𝘅' => 'x', + '𝘆' => 'y', + '𝘇' => 'z', + '𝘈' => 'A', + '𝘉' => 'B', + '𝘊' => 'C', + '𝘋' => 'D', + '𝘌' => 'E', + '𝘍' => 'F', + '𝘎' => 'G', + '𝘏' => 'H', + '𝘐' => 'I', + '𝘑' => 'J', + '𝘒' => 'K', + '𝘓' => 'L', + '𝘔' => 'M', + '𝘕' => 'N', + '𝘖' => 'O', + '𝘗' => 'P', + '𝘘' => 'Q', + '𝘙' => 'R', + '𝘚' => 'S', + '𝘛' => 'T', + '𝘜' => 'U', + '𝘝' => 'V', + '𝘞' => 'W', + '𝘟' => 'X', + '𝘠' => 'Y', + '𝘡' => 'Z', + '𝘢' => 'a', + '𝘣' => 'b', + '𝘤' => 'c', + '𝘥' => 'd', + '𝘦' => 'e', + '𝘧' => 'f', + '𝘨' => 'g', + '𝘩' => 'h', + '𝘪' => 'i', + '𝘫' => 'j', + '𝘬' => 'k', + '𝘭' => 'l', + '𝘮' => 'm', + '𝘯' => 'n', + '𝘰' => 'o', + '𝘱' => 'p', + '𝘲' => 'q', + '𝘳' => 'r', + '𝘴' => 's', + '𝘵' => 't', + '𝘶' => 'u', + '𝘷' => 'v', + '𝘸' => 'w', + '𝘹' => 'x', + '𝘺' => 'y', + '𝘻' => 'z', + '𝘼' => 'A', + '𝘽' => 'B', + '𝘾' => 'C', + '𝘿' => 'D', + '𝙀' => 'E', + '𝙁' => 'F', + '𝙂' => 'G', + '𝙃' => 'H', + '𝙄' => 'I', + '𝙅' => 'J', + '𝙆' => 'K', + '𝙇' => 'L', + '𝙈' => 'M', + '𝙉' => 'N', + '𝙊' => 'O', + '𝙋' => 'P', + '𝙌' => 'Q', + '𝙍' => 'R', + '𝙎' => 'S', + '𝙏' => 'T', + '𝙐' => 'U', + '𝙑' => 'V', + '𝙒' => 'W', + '𝙓' => 'X', + '𝙔' => 'Y', + '𝙕' => 'Z', + '𝙖' => 'a', + '𝙗' => 'b', + '𝙘' => 'c', + '𝙙' => 'd', + '𝙚' => 'e', + '𝙛' => 'f', + '𝙜' => 'g', + '𝙝' => 'h', + '𝙞' => 'i', + '𝙟' => 'j', + '𝙠' => 'k', + '𝙡' => 'l', + '𝙢' => 'm', + '𝙣' => 'n', + '𝙤' => 'o', + '𝙥' => 'p', + '𝙦' => 'q', + '𝙧' => 'r', + '𝙨' => 's', + '𝙩' => 't', + '𝙪' => 'u', + '𝙫' => 'v', + '𝙬' => 'w', + '𝙭' => 'x', + '𝙮' => 'y', + '𝙯' => 'z', + '𝙰' => 'A', + '𝙱' => 'B', + '𝙲' => 'C', + '𝙳' => 'D', + '𝙴' => 'E', + '𝙵' => 'F', + '𝙶' => 'G', + '𝙷' => 'H', + '𝙸' => 'I', + '𝙹' => 'J', + '𝙺' => 'K', + '𝙻' => 'L', + '𝙼' => 'M', + '𝙽' => 'N', + '𝙾' => 'O', + '𝙿' => 'P', + '𝚀' => 'Q', + '𝚁' => 'R', + '𝚂' => 'S', + '𝚃' => 'T', + '𝚄' => 'U', + '𝚅' => 'V', + '𝚆' => 'W', + '𝚇' => 'X', + '𝚈' => 'Y', + '𝚉' => 'Z', + '𝚊' => 'a', + '𝚋' => 'b', + '𝚌' => 'c', + '𝚍' => 'd', + '𝚎' => 'e', + '𝚏' => 'f', + '𝚐' => 'g', + '𝚑' => 'h', + '𝚒' => 'i', + '𝚓' => 'j', + '𝚔' => 'k', + '𝚕' => 'l', + '𝚖' => 'm', + '𝚗' => 'n', + '𝚘' => 'o', + '𝚙' => 'p', + '𝚚' => 'q', + '𝚛' => 'r', + '𝚜' => 's', + '𝚝' => 't', + '𝚞' => 'u', + '𝚟' => 'v', + '𝚠' => 'w', + '𝚡' => 'x', + '𝚢' => 'y', + '𝚣' => 'z', + '𝚤' => 'ı', + '𝚥' => 'ȷ', + '𝚨' => 'Α', + '𝚩' => 'Β', + '𝚪' => 'Γ', + '𝚫' => 'Δ', + '𝚬' => 'Ε', + '𝚭' => 'Ζ', + '𝚮' => 'Η', + '𝚯' => 'Θ', + '𝚰' => 'Ι', + '𝚱' => 'Κ', + '𝚲' => 'Λ', + '𝚳' => 'Μ', + '𝚴' => 'Ν', + '𝚵' => 'Ξ', + '𝚶' => 'Ο', + '𝚷' => 'Π', + '𝚸' => 'Ρ', + '𝚹' => 'Θ', + '𝚺' => 'Σ', + '𝚻' => 'Τ', + '𝚼' => 'Υ', + '𝚽' => 'Φ', + '𝚾' => 'Χ', + '𝚿' => 'Ψ', + '𝛀' => 'Ω', + '𝛁' => '∇', + '𝛂' => 'α', + '𝛃' => 'β', + '𝛄' => 'γ', + '𝛅' => 'δ', + '𝛆' => 'ε', + '𝛇' => 'ζ', + '𝛈' => 'η', + '𝛉' => 'θ', + '𝛊' => 'ι', + '𝛋' => 'κ', + '𝛌' => 'λ', + '𝛍' => 'μ', + '𝛎' => 'ν', + '𝛏' => 'ξ', + '𝛐' => 'ο', + '𝛑' => 'π', + '𝛒' => 'ρ', + '𝛓' => 'ς', + '𝛔' => 'σ', + '𝛕' => 'τ', + '𝛖' => 'υ', + '𝛗' => 'φ', + '𝛘' => 'χ', + '𝛙' => 'ψ', + '𝛚' => 'ω', + '𝛛' => '∂', + '𝛜' => 'ε', + '𝛝' => 'θ', + '𝛞' => 'κ', + '𝛟' => 'φ', + '𝛠' => 'ρ', + '𝛡' => 'π', + '𝛢' => 'Α', + '𝛣' => 'Β', + '𝛤' => 'Γ', + '𝛥' => 'Δ', + '𝛦' => 'Ε', + '𝛧' => 'Ζ', + '𝛨' => 'Η', + '𝛩' => 'Θ', + '𝛪' => 'Ι', + '𝛫' => 'Κ', + '𝛬' => 'Λ', + '𝛭' => 'Μ', + '𝛮' => 'Ν', + '𝛯' => 'Ξ', + '𝛰' => 'Ο', + '𝛱' => 'Π', + '𝛲' => 'Ρ', + '𝛳' => 'Θ', + '𝛴' => 'Σ', + '𝛵' => 'Τ', + '𝛶' => 'Υ', + '𝛷' => 'Φ', + '𝛸' => 'Χ', + '𝛹' => 'Ψ', + '𝛺' => 'Ω', + '𝛻' => '∇', + '𝛼' => 'α', + '𝛽' => 'β', + '𝛾' => 'γ', + '𝛿' => 'δ', + '𝜀' => 'ε', + '𝜁' => 'ζ', + '𝜂' => 'η', + '𝜃' => 'θ', + '𝜄' => 'ι', + '𝜅' => 'κ', + '𝜆' => 'λ', + '𝜇' => 'μ', + '𝜈' => 'ν', + '𝜉' => 'ξ', + '𝜊' => 'ο', + '𝜋' => 'π', + '𝜌' => 'ρ', + '𝜍' => 'ς', + '𝜎' => 'σ', + '𝜏' => 'τ', + '𝜐' => 'υ', + '𝜑' => 'φ', + '𝜒' => 'χ', + '𝜓' => 'ψ', + '𝜔' => 'ω', + '𝜕' => '∂', + '𝜖' => 'ε', + '𝜗' => 'θ', + '𝜘' => 'κ', + '𝜙' => 'φ', + '𝜚' => 'ρ', + '𝜛' => 'π', + '𝜜' => 'Α', + '𝜝' => 'Β', + '𝜞' => 'Γ', + '𝜟' => 'Δ', + '𝜠' => 'Ε', + '𝜡' => 'Ζ', + '𝜢' => 'Η', + '𝜣' => 'Θ', + '𝜤' => 'Ι', + '𝜥' => 'Κ', + '𝜦' => 'Λ', + '𝜧' => 'Μ', + '𝜨' => 'Ν', + '𝜩' => 'Ξ', + '𝜪' => 'Ο', + '𝜫' => 'Π', + '𝜬' => 'Ρ', + '𝜭' => 'Θ', + '𝜮' => 'Σ', + '𝜯' => 'Τ', + '𝜰' => 'Υ', + '𝜱' => 'Φ', + '𝜲' => 'Χ', + '𝜳' => 'Ψ', + '𝜴' => 'Ω', + '𝜵' => '∇', + '𝜶' => 'α', + '𝜷' => 'β', + '𝜸' => 'γ', + '𝜹' => 'δ', + '𝜺' => 'ε', + '𝜻' => 'ζ', + '𝜼' => 'η', + '𝜽' => 'θ', + '𝜾' => 'ι', + '𝜿' => 'κ', + '𝝀' => 'λ', + '𝝁' => 'μ', + '𝝂' => 'ν', + '𝝃' => 'ξ', + '𝝄' => 'ο', + '𝝅' => 'π', + '𝝆' => 'ρ', + '𝝇' => 'ς', + '𝝈' => 'σ', + '𝝉' => 'τ', + '𝝊' => 'υ', + '𝝋' => 'φ', + '𝝌' => 'χ', + '𝝍' => 'ψ', + '𝝎' => 'ω', + '𝝏' => '∂', + '𝝐' => 'ε', + '𝝑' => 'θ', + '𝝒' => 'κ', + '𝝓' => 'φ', + '𝝔' => 'ρ', + '𝝕' => 'π', + '𝝖' => 'Α', + '𝝗' => 'Β', + '𝝘' => 'Γ', + '𝝙' => 'Δ', + '𝝚' => 'Ε', + '𝝛' => 'Ζ', + '𝝜' => 'Η', + '𝝝' => 'Θ', + '𝝞' => 'Ι', + '𝝟' => 'Κ', + '𝝠' => 'Λ', + '𝝡' => 'Μ', + '𝝢' => 'Ν', + '𝝣' => 'Ξ', + '𝝤' => 'Ο', + '𝝥' => 'Π', + '𝝦' => 'Ρ', + '𝝧' => 'Θ', + '𝝨' => 'Σ', + '𝝩' => 'Τ', + '𝝪' => 'Υ', + '𝝫' => 'Φ', + '𝝬' => 'Χ', + '𝝭' => 'Ψ', + '𝝮' => 'Ω', + '𝝯' => '∇', + '𝝰' => 'α', + '𝝱' => 'β', + '𝝲' => 'γ', + '𝝳' => 'δ', + '𝝴' => 'ε', + '𝝵' => 'ζ', + '𝝶' => 'η', + '𝝷' => 'θ', + '𝝸' => 'ι', + '𝝹' => 'κ', + '𝝺' => 'λ', + '𝝻' => 'μ', + '𝝼' => 'ν', + '𝝽' => 'ξ', + '𝝾' => 'ο', + '𝝿' => 'π', + '𝞀' => 'ρ', + '𝞁' => 'ς', + '𝞂' => 'σ', + '𝞃' => 'τ', + '𝞄' => 'υ', + '𝞅' => 'φ', + '𝞆' => 'χ', + '𝞇' => 'ψ', + '𝞈' => 'ω', + '𝞉' => '∂', + '𝞊' => 'ε', + '𝞋' => 'θ', + '𝞌' => 'κ', + '𝞍' => 'φ', + '𝞎' => 'ρ', + '𝞏' => 'π', + '𝞐' => 'Α', + '𝞑' => 'Β', + '𝞒' => 'Γ', + '𝞓' => 'Δ', + '𝞔' => 'Ε', + '𝞕' => 'Ζ', + '𝞖' => 'Η', + '𝞗' => 'Θ', + '𝞘' => 'Ι', + '𝞙' => 'Κ', + '𝞚' => 'Λ', + '𝞛' => 'Μ', + '𝞜' => 'Ν', + '𝞝' => 'Ξ', + '𝞞' => 'Ο', + '𝞟' => 'Π', + '𝞠' => 'Ρ', + '𝞡' => 'Θ', + '𝞢' => 'Σ', + '𝞣' => 'Τ', + '𝞤' => 'Υ', + '𝞥' => 'Φ', + '𝞦' => 'Χ', + '𝞧' => 'Ψ', + '𝞨' => 'Ω', + '𝞩' => '∇', + '𝞪' => 'α', + '𝞫' => 'β', + '𝞬' => 'γ', + '𝞭' => 'δ', + '𝞮' => 'ε', + '𝞯' => 'ζ', + '𝞰' => 'η', + '𝞱' => 'θ', + '𝞲' => 'ι', + '𝞳' => 'κ', + '𝞴' => 'λ', + '𝞵' => 'μ', + '𝞶' => 'ν', + '𝞷' => 'ξ', + '𝞸' => 'ο', + '𝞹' => 'π', + '𝞺' => 'ρ', + '𝞻' => 'ς', + '𝞼' => 'σ', + '𝞽' => 'τ', + '𝞾' => 'υ', + '𝞿' => 'φ', + '𝟀' => 'χ', + '𝟁' => 'ψ', + '𝟂' => 'ω', + '𝟃' => '∂', + '𝟄' => 'ε', + '𝟅' => 'θ', + '𝟆' => 'κ', + '𝟇' => 'φ', + '𝟈' => 'ρ', + '𝟉' => 'π', + '𝟊' => 'Ϝ', + '𝟋' => 'ϝ', + '𝟎' => '0', + '𝟏' => '1', + '𝟐' => '2', + '𝟑' => '3', + '𝟒' => '4', + '𝟓' => '5', + '𝟔' => '6', + '𝟕' => '7', + '𝟖' => '8', + '𝟗' => '9', + '𝟘' => '0', + '𝟙' => '1', + '𝟚' => '2', + '𝟛' => '3', + '𝟜' => '4', + '𝟝' => '5', + '𝟞' => '6', + '𝟟' => '7', + '𝟠' => '8', + '𝟡' => '9', + '𝟢' => '0', + '𝟣' => '1', + '𝟤' => '2', + '𝟥' => '3', + '𝟦' => '4', + '𝟧' => '5', + '𝟨' => '6', + '𝟩' => '7', + '𝟪' => '8', + '𝟫' => '9', + '𝟬' => '0', + '𝟭' => '1', + '𝟮' => '2', + '𝟯' => '3', + '𝟰' => '4', + '𝟱' => '5', + '𝟲' => '6', + '𝟳' => '7', + '𝟴' => '8', + '𝟵' => '9', + '𝟶' => '0', + '𝟷' => '1', + '𝟸' => '2', + '𝟹' => '3', + '𝟺' => '4', + '𝟻' => '5', + '𝟼' => '6', + '𝟽' => '7', + '𝟾' => '8', + '𝟿' => '9', + '𞸀' => 'ا', + '𞸁' => 'ب', + '𞸂' => 'ج', + '𞸃' => 'د', + '𞸅' => 'و', + '𞸆' => 'ز', + '𞸇' => 'ح', + '𞸈' => 'ط', + '𞸉' => 'ي', + '𞸊' => 'ك', + '𞸋' => 'ل', + '𞸌' => 'م', + '𞸍' => 'ن', + '𞸎' => 'س', + '𞸏' => 'ع', + '𞸐' => 'ف', + '𞸑' => 'ص', + '𞸒' => 'ق', + '𞸓' => 'ر', + '𞸔' => 'ش', + '𞸕' => 'ت', + '𞸖' => 'ث', + '𞸗' => 'خ', + '𞸘' => 'ذ', + '𞸙' => 'ض', + '𞸚' => 'ظ', + '𞸛' => 'غ', + '𞸜' => 'ٮ', + '𞸝' => 'ں', + '𞸞' => 'ڡ', + '𞸟' => 'ٯ', + '𞸡' => 'ب', + '𞸢' => 'ج', + '𞸤' => 'ه', + '𞸧' => 'ح', + '𞸩' => 'ي', + '𞸪' => 'ك', + '𞸫' => 'ل', + '𞸬' => 'م', + '𞸭' => 'ن', + '𞸮' => 'س', + '𞸯' => 'ع', + '𞸰' => 'ف', + '𞸱' => 'ص', + '𞸲' => 'ق', + '𞸴' => 'ش', + '𞸵' => 'ت', + '𞸶' => 'ث', + '𞸷' => 'خ', + '𞸹' => 'ض', + '𞸻' => 'غ', + '𞹂' => 'ج', + '𞹇' => 'ح', + '𞹉' => 'ي', + '𞹋' => 'ل', + '𞹍' => 'ن', + '𞹎' => 'س', + '𞹏' => 'ع', + '𞹑' => 'ص', + '𞹒' => 'ق', + '𞹔' => 'ش', + '𞹗' => 'خ', + '𞹙' => 'ض', + '𞹛' => 'غ', + '𞹝' => 'ں', + '𞹟' => 'ٯ', + '𞹡' => 'ب', + '𞹢' => 'ج', + '𞹤' => 'ه', + '𞹧' => 'ح', + '𞹨' => 'ط', + '𞹩' => 'ي', + '𞹪' => 'ك', + '𞹬' => 'م', + '𞹭' => 'ن', + '𞹮' => 'س', + '𞹯' => 'ع', + '𞹰' => 'ف', + '𞹱' => 'ص', + '𞹲' => 'ق', + '𞹴' => 'ش', + '𞹵' => 'ت', + '𞹶' => 'ث', + '𞹷' => 'خ', + '𞹹' => 'ض', + '𞹺' => 'ظ', + '𞹻' => 'غ', + '𞹼' => 'ٮ', + '𞹾' => 'ڡ', + '𞺀' => 'ا', + '𞺁' => 'ب', + '𞺂' => 'ج', + '𞺃' => 'د', + '𞺄' => 'ه', + '𞺅' => 'و', + '𞺆' => 'ز', + '𞺇' => 'ح', + '𞺈' => 'ط', + '𞺉' => 'ي', + '𞺋' => 'ل', + '𞺌' => 'م', + '𞺍' => 'ن', + '𞺎' => 'س', + '𞺏' => 'ع', + '𞺐' => 'ف', + '𞺑' => 'ص', + '𞺒' => 'ق', + '𞺓' => 'ر', + '𞺔' => 'ش', + '𞺕' => 'ت', + '𞺖' => 'ث', + '𞺗' => 'خ', + '𞺘' => 'ذ', + '𞺙' => 'ض', + '𞺚' => 'ظ', + '𞺛' => 'غ', + '𞺡' => 'ب', + '𞺢' => 'ج', + '𞺣' => 'د', + '𞺥' => 'و', + '𞺦' => 'ز', + '𞺧' => 'ح', + '𞺨' => 'ط', + '𞺩' => 'ي', + '𞺫' => 'ل', + '𞺬' => 'م', + '𞺭' => 'ن', + '𞺮' => 'س', + '𞺯' => 'ع', + '𞺰' => 'ف', + '𞺱' => 'ص', + '𞺲' => 'ق', + '𞺳' => 'ر', + '𞺴' => 'ش', + '𞺵' => 'ت', + '𞺶' => 'ث', + '𞺷' => 'خ', + '𞺸' => 'ذ', + '𞺹' => 'ض', + '𞺺' => 'ظ', + '𞺻' => 'غ', + '🄀' => '0.', + '🄁' => '0,', + '🄂' => '1,', + '🄃' => '2,', + '🄄' => '3,', + '🄅' => '4,', + '🄆' => '5,', + '🄇' => '6,', + '🄈' => '7,', + '🄉' => '8,', + '🄊' => '9,', + '🄐' => '(A)', + '🄑' => '(B)', + '🄒' => '(C)', + '🄓' => '(D)', + '🄔' => '(E)', + '🄕' => '(F)', + '🄖' => '(G)', + '🄗' => '(H)', + '🄘' => '(I)', + '🄙' => '(J)', + '🄚' => '(K)', + '🄛' => '(L)', + '🄜' => '(M)', + '🄝' => '(N)', + '🄞' => '(O)', + '🄟' => '(P)', + '🄠' => '(Q)', + '🄡' => '(R)', + '🄢' => '(S)', + '🄣' => '(T)', + '🄤' => '(U)', + '🄥' => '(V)', + '🄦' => '(W)', + '🄧' => '(X)', + '🄨' => '(Y)', + '🄩' => '(Z)', + '🄪' => '〔S〕', + '🄫' => 'C', + '🄬' => 'R', + '🄭' => 'CD', + '🄮' => 'WZ', + '🄰' => 'A', + '🄱' => 'B', + '🄲' => 'C', + '🄳' => 'D', + '🄴' => 'E', + '🄵' => 'F', + '🄶' => 'G', + '🄷' => 'H', + '🄸' => 'I', + '🄹' => 'J', + '🄺' => 'K', + '🄻' => 'L', + '🄼' => 'M', + '🄽' => 'N', + '🄾' => 'O', + '🄿' => 'P', + '🅀' => 'Q', + '🅁' => 'R', + '🅂' => 'S', + '🅃' => 'T', + '🅄' => 'U', + '🅅' => 'V', + '🅆' => 'W', + '🅇' => 'X', + '🅈' => 'Y', + '🅉' => 'Z', + '🅊' => 'HV', + '🅋' => 'MV', + '🅌' => 'SD', + '🅍' => 'SS', + '🅎' => 'PPV', + '🅏' => 'WC', + '🅪' => 'MC', + '🅫' => 'MD', + '🅬' => 'MR', + '🆐' => 'DJ', + '🈀' => 'ほか', + '🈁' => 'ココ', + '🈂' => 'サ', + '🈐' => '手', + '🈑' => '字', + '🈒' => '双', + '🈓' => 'デ', + '🈔' => '二', + '🈕' => '多', + '🈖' => '解', + '🈗' => '天', + '🈘' => '交', + '🈙' => '映', + '🈚' => '無', + '🈛' => '料', + '🈜' => '前', + '🈝' => '後', + '🈞' => '再', + '🈟' => '新', + '🈠' => '初', + '🈡' => '終', + '🈢' => '生', + '🈣' => '販', + '🈤' => '声', + '🈥' => '吹', + '🈦' => '演', + '🈧' => '投', + '🈨' => '捕', + '🈩' => '一', + '🈪' => '三', + '🈫' => '遊', + '🈬' => '左', + '🈭' => '中', + '🈮' => '右', + '🈯' => '指', + '🈰' => '走', + '🈱' => '打', + '🈲' => '禁', + '🈳' => '空', + '🈴' => '合', + '🈵' => '満', + '🈶' => '有', + '🈷' => '月', + '🈸' => '申', + '🈹' => '割', + '🈺' => '営', + '🈻' => '配', + '🉀' => '〔本〕', + '🉁' => '〔三〕', + '🉂' => '〔二〕', + '🉃' => '〔安〕', + '🉄' => '〔点〕', + '🉅' => '〔打〕', + '🉆' => '〔盗〕', + '🉇' => '〔勝〕', + '🉈' => '〔敗〕', + '🉐' => '得', + '🉑' => '可', + '🯰' => '0', + '🯱' => '1', + '🯲' => '2', + '🯳' => '3', + '🯴' => '4', + '🯵' => '5', + '🯶' => '6', + '🯷' => '7', + '🯸' => '8', + '🯹' => '9', +); diff --git a/Server/vendor/symfony/polyfill-intl-normalizer/bootstrap.php b/Server/vendor/symfony/polyfill-intl-normalizer/bootstrap.php new file mode 100644 index 00000000..3608e5c0 --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-normalizer/bootstrap.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Intl\Normalizer as p; + +if (\PHP_VERSION_ID >= 80000) { + return require __DIR__.'/bootstrap80.php'; +} + +if (!function_exists('normalizer_is_normalized')) { + function normalizer_is_normalized($string, $form = p\Normalizer::FORM_C) { return p\Normalizer::isNormalized($string, $form); } +} +if (!function_exists('normalizer_normalize')) { + function normalizer_normalize($string, $form = p\Normalizer::FORM_C) { return p\Normalizer::normalize($string, $form); } +} diff --git a/Server/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php b/Server/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php new file mode 100644 index 00000000..e36d1a94 --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Intl\Normalizer as p; + +if (!function_exists('normalizer_is_normalized')) { + function normalizer_is_normalized(?string $string, ?int $form = p\Normalizer::FORM_C): bool { return p\Normalizer::isNormalized((string) $string, (int) $form); } +} +if (!function_exists('normalizer_normalize')) { + function normalizer_normalize(?string $string, ?int $form = p\Normalizer::FORM_C): string|false { return p\Normalizer::normalize((string) $string, (int) $form); } +} diff --git a/Server/vendor/symfony/polyfill-intl-normalizer/composer.json b/Server/vendor/symfony/polyfill-intl-normalizer/composer.json new file mode 100644 index 00000000..eb452bfd --- /dev/null +++ b/Server/vendor/symfony/polyfill-intl-normalizer/composer.json @@ -0,0 +1,39 @@ +{ + "name": "symfony/polyfill-intl-normalizer", + "type": "library", + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "keywords": ["polyfill", "shim", "compatibility", "portable", "intl", "normalizer"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=7.1" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, + "files": [ "bootstrap.php" ], + "classmap": [ "Resources/stubs" ] + }, + "suggest": { + "ext-intl": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/Server/vendor/psr/http-factory/LICENSE b/Server/vendor/symfony/polyfill-php72/LICENSE similarity index 87% rename from Server/vendor/psr/http-factory/LICENSE rename to Server/vendor/symfony/polyfill-php72/LICENSE index 3f1559b2..4cd8bdd3 100644 --- a/Server/vendor/psr/http-factory/LICENSE +++ b/Server/vendor/symfony/polyfill-php72/LICENSE @@ -1,13 +1,11 @@ -MIT License - -Copyright (c) 2018 PHP-FIG +Copyright (c) 2015-2019 Fabien Potencier 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: +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. @@ -17,5 +15,5 @@ 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. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Server/vendor/symfony/polyfill-php72/Php72.php b/Server/vendor/symfony/polyfill-php72/Php72.php new file mode 100644 index 00000000..5e20d5bf --- /dev/null +++ b/Server/vendor/symfony/polyfill-php72/Php72.php @@ -0,0 +1,217 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Php72; + +/** + * @author Nicolas Grekas + * @author Dariusz Rumiński + * + * @internal + */ +final class Php72 +{ + private static $hashMask; + + public static function utf8_encode($s) + { + $s .= $s; + $len = \strlen($s); + + for ($i = $len >> 1, $j = 0; $i < $len; ++$i, ++$j) { + switch (true) { + case $s[$i] < "\x80": $s[$j] = $s[$i]; break; + case $s[$i] < "\xC0": $s[$j] = "\xC2"; $s[++$j] = $s[$i]; break; + default: $s[$j] = "\xC3"; $s[++$j] = \chr(\ord($s[$i]) - 64); break; + } + } + + return substr($s, 0, $j); + } + + public static function utf8_decode($s) + { + $s = (string) $s; + $len = \strlen($s); + + for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) { + switch ($s[$i] & "\xF0") { + case "\xC0": + case "\xD0": + $c = (\ord($s[$i] & "\x1F") << 6) | \ord($s[++$i] & "\x3F"); + $s[$j] = $c < 256 ? \chr($c) : '?'; + break; + + case "\xF0": + ++$i; + // no break + + case "\xE0": + $s[$j] = '?'; + $i += 2; + break; + + default: + $s[$j] = $s[$i]; + } + } + + return substr($s, 0, $j); + } + + public static function php_os_family() + { + if ('\\' === \DIRECTORY_SEPARATOR) { + return 'Windows'; + } + + $map = [ + 'Darwin' => 'Darwin', + 'DragonFly' => 'BSD', + 'FreeBSD' => 'BSD', + 'NetBSD' => 'BSD', + 'OpenBSD' => 'BSD', + 'Linux' => 'Linux', + 'SunOS' => 'Solaris', + ]; + + return isset($map[\PHP_OS]) ? $map[\PHP_OS] : 'Unknown'; + } + + public static function spl_object_id($object) + { + if (null === self::$hashMask) { + self::initHashMask(); + } + if (null === $hash = spl_object_hash($object)) { + return; + } + + // On 32-bit systems, PHP_INT_SIZE is 4, + return self::$hashMask ^ hexdec(substr($hash, 16 - (\PHP_INT_SIZE * 2 - 1), (\PHP_INT_SIZE * 2 - 1))); + } + + public static function sapi_windows_vt100_support($stream, $enable = null) + { + if (!\is_resource($stream)) { + trigger_error('sapi_windows_vt100_support() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING); + + return false; + } + + $meta = stream_get_meta_data($stream); + + if ('STDIO' !== $meta['stream_type']) { + trigger_error('sapi_windows_vt100_support() was not able to analyze the specified stream', \E_USER_WARNING); + + return false; + } + + // We cannot actually disable vt100 support if it is set + if (false === $enable || !self::stream_isatty($stream)) { + return false; + } + + // The native function does not apply to stdin + $meta = array_map('strtolower', $meta); + $stdin = 'php://stdin' === $meta['uri'] || 'php://fd/0' === $meta['uri']; + + return !$stdin + && (false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + || 'xterm' === getenv('TERM') + || 'Hyper' === getenv('TERM_PROGRAM')); + } + + public static function stream_isatty($stream) + { + if (!\is_resource($stream)) { + trigger_error('stream_isatty() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING); + + return false; + } + + if ('\\' === \DIRECTORY_SEPARATOR) { + $stat = @fstat($stream); + // Check if formatted mode is S_IFCHR + return $stat ? 0020000 === ($stat['mode'] & 0170000) : false; + } + + return \function_exists('posix_isatty') && @posix_isatty($stream); + } + + private static function initHashMask() + { + $obj = (object) []; + self::$hashMask = -1; + + // check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below + $obFuncs = ['ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush']; + foreach (debug_backtrace(\PHP_VERSION_ID >= 50400 ? \DEBUG_BACKTRACE_IGNORE_ARGS : false) as $frame) { + if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && \in_array($frame['function'], $obFuncs)) { + $frame['line'] = 0; + break; + } + } + if (!empty($frame['line'])) { + ob_start(); + debug_zval_dump($obj); + self::$hashMask = (int) substr(ob_get_clean(), 17); + } + + self::$hashMask ^= hexdec(substr(spl_object_hash($obj), 16 - (\PHP_INT_SIZE * 2 - 1), (\PHP_INT_SIZE * 2 - 1))); + } + + public static function mb_chr($code, $encoding = null) + { + if (0x80 > $code %= 0x200000) { + $s = \chr($code); + } elseif (0x800 > $code) { + $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); + } elseif (0x10000 > $code) { + $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } else { + $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } + + if ('UTF-8' !== $encoding = $encoding ?? mb_internal_encoding()) { + $s = mb_convert_encoding($s, $encoding, 'UTF-8'); + } + + return $s; + } + + public static function mb_ord($s, $encoding = null) + { + if (null === $encoding) { + $s = mb_convert_encoding($s, 'UTF-8'); + } elseif ('UTF-8' !== $encoding) { + $s = mb_convert_encoding($s, 'UTF-8', $encoding); + } + + if (1 === \strlen($s)) { + return \ord($s); + } + + $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; + if (0xF0 <= $code) { + return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; + } + if (0xE0 <= $code) { + return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; + } + if (0xC0 <= $code) { + return (($code - 0xC0) << 6) + $s[2] - 0x80; + } + + return $code; + } +} diff --git a/Server/vendor/symfony/polyfill-php72/README.md b/Server/vendor/symfony/polyfill-php72/README.md new file mode 100644 index 00000000..ed190505 --- /dev/null +++ b/Server/vendor/symfony/polyfill-php72/README.md @@ -0,0 +1,35 @@ +Symfony Polyfill / Php72 +======================== + +This component provides functions added to PHP 7.2 core: + +- [`spl_object_id`](https://php.net/spl_object_id) +- [`stream_isatty`](https://php.net/stream_isatty) + +And also functions added to PHP 7.2 mbstring: + +- [`mb_ord`](https://php.net/mb_ord) +- [`mb_chr`](https://php.net/mb_chr) +- [`mb_scrub`](https://php.net/mb_scrub) + +On Windows only: + +- [`sapi_windows_vt100_support`](https://php.net/sapi_windows_vt100_support) + +Moved to core since 7.2 (was in the optional XML extension earlier): + +- [`utf8_encode`](https://php.net/utf8_encode) +- [`utf8_decode`](https://php.net/utf8_decode) + +Also, it provides constants added to PHP 7.2: + +- [`PHP_FLOAT_*`](https://php.net/reserved.constants#constant.php-float-dig) +- [`PHP_OS_FAMILY`](https://php.net/reserved.constants#constant.php-os-family) + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/Server/vendor/symfony/polyfill-php72/bootstrap.php b/Server/vendor/symfony/polyfill-php72/bootstrap.php new file mode 100644 index 00000000..b5c92d4c --- /dev/null +++ b/Server/vendor/symfony/polyfill-php72/bootstrap.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Php72 as p; + +if (\PHP_VERSION_ID >= 70200) { + return; +} + +if (!defined('PHP_FLOAT_DIG')) { + define('PHP_FLOAT_DIG', 15); +} +if (!defined('PHP_FLOAT_EPSILON')) { + define('PHP_FLOAT_EPSILON', 2.2204460492503E-16); +} +if (!defined('PHP_FLOAT_MIN')) { + define('PHP_FLOAT_MIN', 2.2250738585072E-308); +} +if (!defined('PHP_FLOAT_MAX')) { + define('PHP_FLOAT_MAX', 1.7976931348623157E+308); +} +if (!defined('PHP_OS_FAMILY')) { + define('PHP_OS_FAMILY', p\Php72::php_os_family()); +} + +if ('\\' === \DIRECTORY_SEPARATOR && !function_exists('sapi_windows_vt100_support')) { + function sapi_windows_vt100_support($stream, $enable = null) { return p\Php72::sapi_windows_vt100_support($stream, $enable); } +} +if (!function_exists('stream_isatty')) { + function stream_isatty($stream) { return p\Php72::stream_isatty($stream); } +} +if (!function_exists('utf8_encode')) { + function utf8_encode($string) { return p\Php72::utf8_encode($string); } +} +if (!function_exists('utf8_decode')) { + function utf8_decode($string) { return p\Php72::utf8_decode($string); } +} +if (!function_exists('spl_object_id')) { + function spl_object_id($object) { return p\Php72::spl_object_id($object); } +} +if (!function_exists('mb_ord')) { + function mb_ord($string, $encoding = null) { return p\Php72::mb_ord($string, $encoding); } +} +if (!function_exists('mb_chr')) { + function mb_chr($codepoint, $encoding = null) { return p\Php72::mb_chr($codepoint, $encoding); } +} +if (!function_exists('mb_scrub')) { + function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); } +} diff --git a/Server/vendor/symfony/deprecation-contracts/composer.json b/Server/vendor/symfony/polyfill-php72/composer.json similarity index 52% rename from Server/vendor/symfony/deprecation-contracts/composer.json rename to Server/vendor/symfony/polyfill-php72/composer.json index ceb6c079..4eac690e 100644 --- a/Server/vendor/symfony/deprecation-contracts/composer.json +++ b/Server/vendor/symfony/polyfill-php72/composer.json @@ -1,7 +1,8 @@ { - "name": "symfony/deprecation-contracts", + "name": "symfony/polyfill-php72", "type": "library", - "description": "A generic function and convention to trigger deprecation notices", + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "keywords": ["polyfill", "shim", "compatibility", "portable"], "homepage": "https://symfony.com", "license": "MIT", "authors": [ @@ -15,21 +16,20 @@ } ], "require": { - "php": ">=8.1" + "php": ">=7.1" }, "autoload": { - "files": [ - "function.php" - ] + "psr-4": { "Symfony\\Polyfill\\Php72\\": "" }, + "files": [ "bootstrap.php" ] }, "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "1.26-dev" }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } } } diff --git a/Server/vendor/textalk/websocket/.github/ISSUE_TEMPLATE/bug_report.md b/Server/vendor/textalk/websocket/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index d402046b..00000000 --- a/Server/vendor/textalk/websocket/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -name: Bug report -about: Use this if you believe there is a bug in this repo -title: '' -labels: bug -assignees: '' - ---- - -**Describe the bug** -Please provide a clear and concise description of the suspected issue. - -**How to reproduce** -If possible, provide information - possibly including code snippets - on how to reproduce the issue. - -**Logs** -If possible, provide logs that indicate the issue. See https://github.com/Textalk/websocket-php/blob/master/docs/Examples.md#echo-logger on how to use the EchoLog. - -**Versions** -* Version of this library -* PHP version diff --git a/Server/vendor/textalk/websocket/.github/ISSUE_TEMPLATE/feature_request.md b/Server/vendor/textalk/websocket/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index ce777f6d..00000000 --- a/Server/vendor/textalk/websocket/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this library -title: '' -labels: feature request -assignees: '' - ---- - -**Is it within the scope of this library?** -Consider and describe why the feature would be beneficial in this library, and not implemented as a separate project using this as a dependency. - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. diff --git a/Server/vendor/textalk/websocket/.github/ISSUE_TEMPLATE/other-issue.md b/Server/vendor/textalk/websocket/.github/ISSUE_TEMPLATE/other-issue.md deleted file mode 100644 index fe5cc8df..00000000 --- a/Server/vendor/textalk/websocket/.github/ISSUE_TEMPLATE/other-issue.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: Other issue -about: Use this for other issues -title: '' -labels: '' -assignees: '' - ---- - -**Describe your issue** diff --git a/Server/vendor/textalk/websocket/.github/workflows/acceptance.yml b/Server/vendor/textalk/websocket/.github/workflows/acceptance.yml deleted file mode 100644 index 06c17665..00000000 --- a/Server/vendor/textalk/websocket/.github/workflows/acceptance.yml +++ /dev/null @@ -1,113 +0,0 @@ -name: Acceptance - -on: [push, pull_request] - -jobs: - test-7-2: - runs-on: ubuntu-latest - name: Test PHP 7.2 - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up PHP 7.2 - uses: shivammathur/setup-php@v2 - with: - php-version: '7.2' - - name: Composer - run: make install - - name: Test - run: make test - - test-7-3: - runs-on: ubuntu-latest - name: Test PHP 7.3 - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up PHP 7.3 - uses: shivammathur/setup-php@v2 - with: - php-version: '7.3' - - name: Composer - run: make install - - name: Test - run: make test - - test-7-4: - runs-on: ubuntu-latest - name: Test PHP 7.4 - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up PHP 7.4 - uses: shivammathur/setup-php@v2 - with: - php-version: '7.4' - - name: Composer - run: make install - - name: Test - run: make test - - test-8-0: - runs-on: ubuntu-latest - name: Test PHP 8.0 - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up PHP 8.0 - uses: shivammathur/setup-php@v2 - with: - php-version: '8.0' - - name: Composer - run: make install - - name: Test - run: make test - - test-8-1: - runs-on: ubuntu-latest - name: Test PHP 8.1 - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up PHP 8.1 - uses: shivammathur/setup-php@v2 - with: - php-version: '8.1' - - name: Composer - run: make install - - name: Test - run: make test - - - cs-check: - runs-on: ubuntu-latest - name: Code standard - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up PHP 8.0 - uses: shivammathur/setup-php@v2 - with: - php-version: '8.0' - - name: Composer - run: make install - - name: Code standard - run: make cs-check - - coverage: - runs-on: ubuntu-latest - name: Code coverage - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up PHP 8.0 - uses: shivammathur/setup-php@v2 - with: - php-version: '8.0' - extensions: xdebug - - name: Composer - run: make install - - name: Code coverage - env: - COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: make coverage diff --git a/Server/vendor/textalk/websocket/.gitignore b/Server/vendor/textalk/websocket/.gitignore deleted file mode 100644 index 379ab4b4..00000000 --- a/Server/vendor/textalk/websocket/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -.phpunit.result.cache -build/ -composer.lock -composer.phar -vendor/ \ No newline at end of file diff --git a/Server/vendor/textalk/websocket/COPYING.md b/Server/vendor/textalk/websocket/COPYING.md deleted file mode 100644 index ba964803..00000000 --- a/Server/vendor/textalk/websocket/COPYING.md +++ /dev/null @@ -1,16 +0,0 @@ -# Websocket: License - -Websocket PHP is free software released under the following license: - -[ISC License](http://en.wikipedia.org/wiki/ISC_license) - -Permission to use, copy, modify, and/or distribute this software for any purpose with or without -fee is hereby granted, provided that the above copyright notice and this permission notice appear -in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE -AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. diff --git a/Server/vendor/textalk/websocket/Makefile b/Server/vendor/textalk/websocket/Makefile deleted file mode 100644 index 930a9ed3..00000000 --- a/Server/vendor/textalk/websocket/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -install: composer.phar - ./composer.phar install - -update: composer.phar - ./composer.phar self-update - ./composer.phar update - -test: composer.lock - ./vendor/bin/phpunit - -cs-check: composer.lock - ./vendor/bin/phpcs --standard=codestandard.xml lib tests examples - -coverage: composer.lock build - XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml - ./vendor/bin/php-coveralls -v - -composer.phar: - curl -s http://getcomposer.org/installer | php - -composer.lock: composer.phar - ./composer.phar --no-interaction install - -vendor/bin/phpunit: install - -build: - mkdir build - -clean: - rm composer.phar - rm -r vendor - rm -r build diff --git a/Server/vendor/textalk/websocket/README.md b/Server/vendor/textalk/websocket/README.md deleted file mode 100644 index 70c16ccd..00000000 --- a/Server/vendor/textalk/websocket/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# Websocket Client and Server for PHP - -[![Build Status](https://github.com/Textalk/websocket-php/actions/workflows/acceptance.yml/badge.svg)](https://github.com/Textalk/websocket-php/actions) -[![Coverage Status](https://coveralls.io/repos/github/Textalk/websocket-php/badge.svg?branch=master)](https://coveralls.io/github/Textalk/websocket-php) - -This library contains WebSocket client and server for PHP. - -The client and server provides methods for reading and writing to WebSocket streams. -It does not include convenience operations such as listeners and implicit error handling. - -## Documentation - -- [Client](docs/Client.md) -- [Server](docs/Server.md) -- [Message](docs/Message.md) -- [Examples](docs/Examples.md) -- [Changelog](docs/Changelog.md) -- [Contributing](docs/Contributing.md) - -## Installing - -Preferred way to install is with [Composer](https://getcomposer.org/). -``` -composer require textalk/websocket -``` - -* Current version support PHP versions `^7.2|^8.0`. -* For PHP `7.1` support use version [`1.4`](https://github.com/Textalk/websocket-php/tree/1.4.0). -* For PHP `^5.4` and `7.0` support use version [`1.3`](https://github.com/Textalk/websocket-php/tree/1.3.0). - -## Client - -The [client](docs/Client.md) can read and write on a WebSocket stream. -It internally supports Upgrade handshake and implicit close and ping/pong operations. - -```php -$client = new WebSocket\Client("ws://echo.websocket.org/"); -$client->text("Hello WebSocket.org!"); -echo $client->receive(); -$client->close(); -``` - -## Server - -The library contains a rudimentary single stream/single thread [server](docs/Server.md). -It internally supports Upgrade handshake and implicit close and ping/pong operations. - -Note that it does **not** support threading or automatic association ot continuous client requests. -If you require this kind of server behavior, you need to build it on top of provided server implementation. - -```php -$server = new WebSocket\Server(); -$server->accept(); -$message = $server->receive(); -$server->text($message); -$server->close(); -``` - -### License and Contributors - -[ISC License](COPYING.md) - -Fredrik Liljegren, Armen Baghumian Sankbarani, Ruslan Bekenev, -Joshua Thijssen, Simon Lipp, Quentin Bellus, Patrick McCarren, swmcdonnell, -Ignas Bernotas, Mark Herhold, Andreas Palm, Sören Jensen, pmaasz, Alexey Stavrov, -Michael Slezak, Pierre Seznec, rmeisler, Nickolay V. Shmyrev, Christoph Kempen, -Marc Roberts, Antonio Mora, Simon Podlipsky. diff --git a/Server/vendor/textalk/websocket/codestandard.xml b/Server/vendor/textalk/websocket/codestandard.xml deleted file mode 100644 index bb1cd260..00000000 --- a/Server/vendor/textalk/websocket/codestandard.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/Server/vendor/textalk/websocket/composer.json b/Server/vendor/textalk/websocket/composer.json deleted file mode 100644 index 9bc0dcc2..00000000 --- a/Server/vendor/textalk/websocket/composer.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "textalk/websocket", - "description": "WebSocket client and server", - "license": "ISC", - "type": "library", - "authors": [ - { - "name": "Fredrik Liljegren" - }, - { - "name": "Sören Jensen", - "email": "soren@abicart.se" - } - ], - "autoload": { - "psr-4": { - "WebSocket\\": "lib" - } - }, - "autoload-dev": { - "psr-4": { - "WebSocket\\": "tests/mock" - } - }, - "require": { - "php": "^7.2 | ^8.0", - "psr/log": "^1 | ^2 | ^3" - }, - "require-dev": { - "phpunit/phpunit": "^8.0|^9.0", - "php-coveralls/php-coveralls": "^2.0", - "squizlabs/php_codesniffer": "^3.5" - } -} diff --git a/Server/vendor/textalk/websocket/docs/Changelog.md b/Server/vendor/textalk/websocket/docs/Changelog.md deleted file mode 100644 index 4d980632..00000000 --- a/Server/vendor/textalk/websocket/docs/Changelog.md +++ /dev/null @@ -1,143 +0,0 @@ -[Client](Client.md) • [Server](Server.md) • [Message](Message.md) • [Examples](Examples.md) • Changelog • [Contributing](Contributing.md) - -# Websocket: Changelog - -## `v1.5` - - > PHP version `^7.2|^8.0` - -### `1.5.8` - - * Handle read error during handshake (@sirn-se) - -### `1.5.7` - - * Large header block fix (@sirn-se) - -### `1.5.6` - - * Add test for PHP 8.1 (@sirn-se) - * Code standard (@sirn-se) - -### `1.5.5` - - * Support for psr/log v2 and v3 (@simPod) - * GitHub Actions replaces Travis (@sirn-se) - -### `1.5.4` - - * Keep open connection on read timeout (@marcroberts) - -### `1.5.3` - - * Fix for persistent connection (@sirn-se) - -### `1.5.2` - - * Fix for getName() method (@sirn-se) - -### `1.5.1` - - * Fix for persistent connections (@rmeisler) - -### `1.5.0` - - * Convenience send methods; text(), binary(), ping(), pong() (@sirn-se) - * Optional Message instance as receive() method return (@sirn-se) - * Opcode filter for receive() method (@sirn-se) - * Added PHP `8.0` support (@webpatser) - * Dropped PHP `7.1` support (@sirn-se) - * Fix for unordered fragmented messages (@sirn-se) - * Improved error handling on stream calls (@sirn-se) - * Various code re-write (@sirn-se) - -## `v1.4` - - > PHP version `^7.1` - -#### `1.4.3` - - * Solve stream closure/get meta conflict (@sirn-se) - * Examples and documentation overhaul (@sirn-se) - -#### `1.4.2` - - * Force stream close on read error (@sirn-se) - * Authorization headers line feed (@sirn-se) - * Documentation (@matias-pool, @sirn-se) - -#### `1.4.1` - - * Ping/Pong, handled internally to avoid breaking fragmented messages (@nshmyrev, @sirn-se) - * Fix for persistent connections (@rmeisler) - * Fix opcode bitmask (@peterjah) - -#### `1.4.0` - - * Dropped support of old PHP versions (@sirn-se) - * Added PSR-3 Logging support (@sirn-se) - * Persistent connection option (@slezakattack) - * TimeoutException on connection time out (@slezakattack) - -## `v1.3` - - > PHP version `^5.4` and `^7.0` - -#### `1.3.1` - - * Allow control messages without payload (@Logioniz) - * Error code in ConnectionException (@sirn-se) - -#### `1.3.0` - - * Implements ping/pong frames (@pmccarren @Logioniz) - * Close behaviour (@sirn-se) - * Various fixes concerning connection handling (@sirn-se) - * Overhaul of Composer, Travis and Coveralls setup, PSR code standard and unit tests (@sirn-se) - -## `v1.2` - - > PHP version `^5.4` and `^7.0` - -#### `1.2.0` - - * Adding stream context options (to set e.g. SSL `allow_self_signed`). - -## `v1.1` - - > PHP version `^5.4` and `^7.0` - -#### `1.1.2` - - * Fixed error message on broken frame. - -#### `1.1.1` - - * Adding license information. - -#### `1.1.0` - - * Supporting huge payloads. - -## `v1.0` - - > PHP version `^5.4` and `^7.0` - -#### `1.0.3` - - * Bugfix: Correcting address in error-message - -#### `1.0.2` - - * Bugfix: Add port in request-header. - -#### `1.0.1` - - * Fixing a bug from empty payloads. - -#### `1.0.0` - - * Release as production ready. - * Adding option to set/override headers. - * Supporting basic authentication from user:pass in URL. - diff --git a/Server/vendor/textalk/websocket/docs/Client.md b/Server/vendor/textalk/websocket/docs/Client.md deleted file mode 100644 index e6154b6d..00000000 --- a/Server/vendor/textalk/websocket/docs/Client.md +++ /dev/null @@ -1,137 +0,0 @@ -Client • [Server](Server.md) • [Message](Message.md) • [Examples](Examples.md) • [Changelog](Changelog.md) • [Contributing](Contributing.md) - -# Websocket: Client - -The client can read and write on a WebSocket stream. -It internally supports Upgrade handshake and implicit close and ping/pong operations. - -## Class synopsis - -```php -WebSocket\Client { - - public __construct(string $uri, array $options = []) - public __destruct() - public __toString() : string - - public text(string $payload) : void - public binary(string $payload) : void - public ping(string $payload = '') : void - public pong(string $payload = '') : void - public send(mixed $payload, string $opcode = 'text', bool $masked = true) : void - public receive() : mixed - public close(int $status = 1000, mixed $message = 'ttfn') : mixed - - public getName() : string|null - public getPier() : string|null - public getLastOpcode() : string - public getCloseStatus() : int - public isConnected() : bool - public setTimeout(int $seconds) : void - public setFragmentSize(int $fragment_size) : self - public getFragmentSize() : int - public setLogger(Psr\Log\LoggerInterface $logger = null) : void -} -``` - -## Examples - -### Simple send-receive operation - -This example send a single message to a server, and output the response. - -```php -$client = new WebSocket\Client("ws://echo.websocket.org/"); -$client->text("Hello WebSocket.org!"); -echo $client->receive(); -$client->close(); -``` - -### Listening to a server - -To continuously listen to incoming messages, you need to put the receive operation within a loop. -Note that these functions **always** throw exception on any failure, including recoverable failures such as connection time out. -By consuming exceptions, the code will re-connect the socket in next loop iteration. - -```php -$client = new WebSocket\Client("ws://echo.websocket.org/"); -while (true) { - try { - $message = $client->receive(); - // Act on received message - // Break while loop to stop listening - } catch (\WebSocket\ConnectionException $e) { - // Possibly log errors - } -} -$client->close(); -``` - -### Filtering received messages - -By default the `receive()` method return messages of 'text' and 'binary' opcode. -The filter option allows you to specify which message types to return. - -```php -$client = new WebSocket\Client("ws://echo.websocket.org/", ['filter' => ['text']]); -$client->receive(); // Only return 'text' messages - -$client = new WebSocket\Client("ws://echo.websocket.org/", ['filter' => ['text', 'binary', 'ping', 'pong', 'close']]); -$client->receive(); // Return all messages -``` - -### Sending messages - -There are convenience methods to send messages with different opcodes. -```php -$client = new WebSocket\Client("ws://echo.websocket.org/"); - -// Convenience methods -$client->text('A plain text message'); // Send an opcode=text message -$client->binary($binary_string); // Send an opcode=binary message -$client->ping(); // Send an opcode=ping frame -$client->pong(); // Send an unsolicited opcode=pong frame - -// Generic send method -$client->send($payload); // Sent as masked opcode=text -$client->send($payload, 'binary'); // Sent as masked opcode=binary -$client->send($payload, 'binary', false); // Sent as unmasked opcode=binary -``` - -## Constructor options - -The `$options` parameter in constructor accepts an associative array of options. - -* `context` - A stream context created using [stream_context_create](https://www.php.net/manual/en/function.stream-context-create). -* `filter` - Array of opcodes to return on receive, default `['text', 'binary']` -* `fragment_size` - Maximum payload size. Default 4096 chars. -* `headers` - Additional headers as associative array name => content. -* `logger` - A [PSR-3](https://www.php-fig.org/psr/psr-3/) compatible logger. -* `persistent` - Connection is re-used between requests until time out is reached. Default false. -* `return_obj` - Return a [Message](Message.md) instance on receive, default false -* `timeout` - Time out in seconds. Default 5 seconds. - -```php -$context = stream_context_create(); -stream_context_set_option($context, 'ssl', 'verify_peer', false); -stream_context_set_option($context, 'ssl', 'verify_peer_name', false); - -$client = new WebSocket\Client("ws://echo.websocket.org/", [ - 'context' => $context, // Attach stream context created above - 'filter' => ['text', 'binary', 'ping'], // Specify message types for receive() to return - 'headers' => [ // Additional headers, used to specify subprotocol - 'Sec-WebSocket-Protocol' => 'soap', - 'origin' => 'localhost', - ], - 'logger' => $my_psr3_logger, // Attach a PSR3 compatible logger - 'return_obj' => true, // Return Message instance rather than just text - 'timeout' => 60, // 1 minute time out -]); -``` - -## Exceptions - -* `WebSocket\BadOpcodeException` - Thrown if provided opcode is invalid. -* `WebSocket\BadUriException` - Thrown if provided URI is invalid. -* `WebSocket\ConnectionException` - Thrown on any socket I/O failure. -* `WebSocket\TimeoutException` - Thrown when the socket experiences a time out. diff --git a/Server/vendor/textalk/websocket/docs/Contributing.md b/Server/vendor/textalk/websocket/docs/Contributing.md deleted file mode 100644 index 263d8687..00000000 --- a/Server/vendor/textalk/websocket/docs/Contributing.md +++ /dev/null @@ -1,44 +0,0 @@ -[Client](Client.md) • [Server](Server.md) • [Message](Message.md) • [Examples](Examples.md) • [Changelog](Changelog.md) • Contributing - -# Websocket: Contributing - -Everyone is welcome to help out! -But to keep this project sustainable, please ensure your contribution respects the requirements below. - -## PR Requirements - -Requirements on pull requests; -* All tests **MUST** pass. -* Code coverage **MUST** remain at 100%. -* Code **MUST** adhere to PSR-1 and PSR-12 code standards. - -## Dependency management - -Install or update dependencies using [Composer](https://getcomposer.org/). - -``` -# Install dependencies -make install - -# Update dependencies -make update -``` - -## Code standard - -This project uses [PSR-1](https://www.php-fig.org/psr/psr-1/) and [PSR-12](https://www.php-fig.org/psr/psr-12/) code standards. -``` -# Check code standard adherence -make cs-check -``` - -## Unit testing - -Unit tests with [PHPUnit](https://phpunit.readthedocs.io/), coverage with [Coveralls](https://github.com/php-coveralls/php-coveralls) -``` -# Run unit tests -make test - -# Create coverage -make coverage -``` diff --git a/Server/vendor/textalk/websocket/docs/Examples.md b/Server/vendor/textalk/websocket/docs/Examples.md deleted file mode 100644 index 7dd4e0c9..00000000 --- a/Server/vendor/textalk/websocket/docs/Examples.md +++ /dev/null @@ -1,98 +0,0 @@ -[Client](Client.md) • [Server](Server.md) • [Message](Message.md) • Examples • [Changelog](Changelog.md) • [Contributing](Contributing.md) - -# Websocket: Examples - -Here are some examples on how to use the WebSocket library. - -## Echo logger - -In dev environment (as in having run composer to include dev dependencies) you have -access to a simple echo logger that print out information synchronously. - -This is usable for debugging. For production, use a proper logger. - -```php -namespace WebSocket; - -$logger = new EchoLogger(); - -$client = new Client('ws://echo.websocket.org/'); -$client->setLogger($logger); - -$server = new Server(); -$server->setLogger($logger); -``` - -An example of server output; -``` -info | Server listening to port 8000 [] -debug | Wrote 129 of 129 bytes. [] -info | Server connected to port 8000 [] -info | Received 'text' message [] -debug | Wrote 9 of 9 bytes. [] -info | Sent 'text' message [] -debug | Received 'close', status: 1000. [] -debug | Wrote 32 of 32 bytes. [] -info | Sent 'close' message [] -info | Received 'close' message [] -``` - -## The `send` client - -Source: [examples/send.php](../examples/send.php) - -A simple, single send/receive client. - -Example use: -``` -php examples/send.php --opcode text "A text message" // Send a text message to localhost -php examples/send.php --opcode ping "ping it" // Send a ping message to localhost -php examples/send.php --uri ws://echo.websocket.org "A text message" // Send a text message to echo.websocket.org -php examples/send.php --opcode text --debug "A text message" // Use runtime debugging -``` - -## The `echoserver` server - -Source: [examples/echoserver.php](../examples/echoserver.php) - -A simple server that responds to recevied commands. - -Example use: -``` -php examples/echoserver.php // Run with default settings -php examples/echoserver.php --port 8080 // Listen on port 8080 -php examples/echoserver.php --debug // Use runtime debugging -``` - -These strings can be sent as message to trigger server to perform actions; -* `exit` - Server will initiate close procedure -* `ping` - Server will send a ping message -* `headers` - Server will respond with all headers provided by client -* `auth` - Server will respond with auth header if provided by client -* For other sent strings, server will respond with the same strings - -## The `random` client - -Source: [examples/random_client.php](../examples/random_client.php) - -The random client will use random options and continuously send/receive random messages. - -Example use: -``` -php examples/random_client.php --uri ws://echo.websocket.org // Connect to echo.websocket.org -php examples/random_client.php --timeout 5 --fragment_size 16 // Specify settings -php examples/random_client.php --debug // Use runtime debugging -``` - -## The `random` server - -Source: [examples/random_server.php](../examples/random_server.php) - -The random server will use random options and continuously send/receive random messages. - -Example use: -``` -php examples/random_server.php --port 8080 // // Listen on port 8080 -php examples/random_server.php --timeout 5 --fragment_size 16 // Specify settings -php examples/random_server.php --debug // Use runtime debugging -``` diff --git a/Server/vendor/textalk/websocket/docs/Message.md b/Server/vendor/textalk/websocket/docs/Message.md deleted file mode 100644 index 9bd0f2b1..00000000 --- a/Server/vendor/textalk/websocket/docs/Message.md +++ /dev/null @@ -1,60 +0,0 @@ -[Client](Client.md) • [Server](Server.md) • Message • [Examples](Examples.md) • [Changelog](Changelog.md) • [Contributing](Contributing.md) - -# Websocket: Messages - -If option `return_obj` is set to `true` on [client](Client.md) or [server](Server.md), -the `receive()` method will return a Message instance instead of a string. - -Available classes correspond to opcode; -* WebSocket\Message\Text -* WebSocket\Message\Binary -* WebSocket\Message\Ping -* WebSocket\Message\Pong -* WebSocket\Message\Close - -Additionally; -* WebSocket\Message\Message - abstract base class for all messages above -* WebSocket\Message\Factory - Factory class to create Msssage instances - -## Message abstract class synopsis - -```php -WebSocket\Message\Message { - - public __construct(string $payload = '') - public __toString() : string - - public getOpcode() : string - public getLength() : int - public getTimestamp() : DateTime - public getContent() : string - public setContent(string $payload = '') : void - public hasContent() : bool -} -``` - -## Factory class synopsis - -```php -WebSocket\Message\Factory { - - public create(string $opcode, string $payload = '') : Message -} -``` - -## Example - -Receving a Message and echo some methods. - -```php -$client = new WebSocket\Client('ws://echo.websocket.org/', ['return_obj' => true]); -$client->text('Hello WebSocket.org!'); -// Echo return same message as sent -$message = $client->receive(); -echo $message->getOpcode(); // -> "text" -echo $message->getLength(); // -> 20 -echo $message->getContent(); // -> "Hello WebSocket.org!" -echo $message->hasContent(); // -> true -echo $message->getTimestamp()->format('H:i:s'); // -> 19:37:18 -$client->close(); -``` diff --git a/Server/vendor/textalk/websocket/docs/Server.md b/Server/vendor/textalk/websocket/docs/Server.md deleted file mode 100644 index 7d01a41a..00000000 --- a/Server/vendor/textalk/websocket/docs/Server.md +++ /dev/null @@ -1,136 +0,0 @@ -[Client](Client.md) • Server • [Message](Message.md) • [Examples](Examples.md) • [Changelog](Changelog.md) • [Contributing](Contributing.md) - -# Websocket: Server - -The library contains a rudimentary single stream/single thread server. -It internally supports Upgrade handshake and implicit close and ping/pong operations. - -Note that it does **not** support threading or automatic association ot continuous client requests. -If you require this kind of server behavior, you need to build it on top of provided server implementation. - -## Class synopsis - -```php -WebSocket\Server { - - public __construct(array $options = []) - public __destruct() - public __toString() : string - - public accept() : bool - public text(string $payload) : void - public binary(string $payload) : void - public ping(string $payload = '') : void - public pong(string $payload = '') : void - public send(mixed $payload, string $opcode = 'text', bool $masked = true) : void - public receive() : mixed - public close(int $status = 1000, mixed $message = 'ttfn') : mixed - - public getPort() : int - public getPath() : string - public getRequest() : array - public getHeader(string $header_name) : string|null - - public getName() : string|null - public getPier() : string|null - public getLastOpcode() : string - public getCloseStatus() : int - public isConnected() : bool - public setTimeout(int $seconds) : void - public setFragmentSize(int $fragment_size) : self - public getFragmentSize() : int - public setLogger(Psr\Log\LoggerInterface $logger = null) : void -} -``` - -## Examples - -### Simple receive-send operation - -This example reads a single message from a client, and respond with the same message. - -```php -$server = new WebSocket\Server(); -$server->accept(); -$message = $server->receive(); -$server->text($message); -$server->close(); -``` - -### Listening to clients - -To continuously listen to incoming messages, you need to put the receive operation within a loop. -Note that these functions **always** throw exception on any failure, including recoverable failures such as connection time out. -By consuming exceptions, the code will re-connect the socket in next loop iteration. - -```php -$server = new WebSocket\Server(); -while ($server->accept()) { - try { - $message = $server->receive(); - // Act on received message - // Break while loop to stop listening - } catch (\WebSocket\ConnectionException $e) { - // Possibly log errors - } -} -$server->close(); -``` - -### Filtering received messages - -By default the `receive()` method return messages of 'text' and 'binary' opcode. -The filter option allows you to specify which message types to return. - -```php -$server = new WebSocket\Server(['filter' => ['text']]); -$server->receive(); // only return 'text' messages - -$server = new WebSocket\Server(['filter' => ['text', 'binary', 'ping', 'pong', 'close']]); -$server->receive(); // return all messages -``` - -### Sending messages - -There are convenience methods to send messages with different opcodes. -```php -$server = new WebSocket\Server(); - -// Convenience methods -$server->text('A plain text message'); // Send an opcode=text message -$server->binary($binary_string); // Send an opcode=binary message -$server->ping(); // Send an opcode=ping frame -$server->pong(); // Send an unsolicited opcode=pong frame - -// Generic send method -$server->send($payload); // Sent as masked opcode=text -$server->send($payload, 'binary'); // Sent as masked opcode=binary -$server->send($payload, 'binary', false); // Sent as unmasked opcode=binary -``` - -## Constructor options - -The `$options` parameter in constructor accepts an associative array of options. - -* `filter` - Array of opcodes to return on receive, default `['text', 'binary']` -* `fragment_size` - Maximum payload size. Default 4096 chars. -* `logger` - A [PSR-3](https://www.php-fig.org/psr/psr-3/) compatible logger. -* `port` - The server port to listen to. Default 8000. -* `return_obj` - Return a [Message](Message.md) instance on receive, default false -* `timeout` - Time out in seconds. Default 5 seconds. - -```php -$server = new WebSocket\Server([ - 'filter' => ['text', 'binary', 'ping'], // Specify message types for receive() to return - 'logger' => $my_psr3_logger, // Attach a PSR3 compatible logger - 'port' => 9000, // Listening port - 'return_obj' => true, // Return Message insatnce rather than just text - 'timeout' => 60, // 1 minute time out -]); -``` - -## Exceptions - -* `WebSocket\BadOpcodeException` - Thrown if provided opcode is invalid. -* `WebSocket\ConnectionException` - Thrown on any socket I/O failure. -* `WebSocket\TimeoutException` - Thrown when the socket experiences a time out. diff --git a/Server/vendor/textalk/websocket/examples/echoserver.php b/Server/vendor/textalk/websocket/examples/echoserver.php deleted file mode 100644 index 231c4c9f..00000000 --- a/Server/vendor/textalk/websocket/examples/echoserver.php +++ /dev/null @@ -1,87 +0,0 @@ - : The port to listen to, default 8000 - * --timeout : Timeout in seconds, default 200 seconds - * --debug : Output log data (if logger is available) - */ - -namespace WebSocket; - -require __DIR__ . '/../vendor/autoload.php'; - -error_reporting(-1); - -echo "> Random server\n"; - -// Server options specified or random -$options = array_merge([ - 'port' => 8000, - 'timeout' => 200, - 'filter' => ['text', 'binary', 'ping', 'pong'], -], getopt('', ['port:', 'timeout:', 'debug'])); - -// If debug mode and logger is available -if (isset($options['debug']) && class_exists('WebSocket\EchoLog')) { - $logger = new EchoLog(); - $options['logger'] = $logger; - echo "> Using logger\n"; -} - -// Setting timeout to 200 seconds to make time for all tests and manual runs. -try { - $server = new Server($options); -} catch (ConnectionException $e) { - echo "> ERROR: {$e->getMessage()}\n"; - die(); -} - -echo "> Listening to port {$server->getPort()}\n"; - -// Force quit to close server -while (true) { - try { - while ($server->accept()) { - echo "> Accepted on port {$server->getPort()}\n"; - while (true) { - $message = $server->receive(); - $opcode = $server->getLastOpcode(); - if (is_null($message)) { - echo "> Closing connection\n"; - continue 2; - } - echo "> Got '{$message}' [opcode: {$opcode}]\n"; - if (in_array($opcode, ['ping', 'pong'])) { - $server->send($message); - continue; - } - // Allow certain string to trigger server action - switch ($message) { - case 'exit': - echo "> Client told me to quit. Bye bye.\n"; - $server->close(); - echo "> Close status: {$server->getCloseStatus()}\n"; - exit; - case 'headers': - $server->text(implode("\r\n", $server->getRequest())); - break; - case 'ping': - $server->ping($message); - break; - case 'auth': - $auth = $server->getHeader('Authorization'); - $server->text("{$auth} - {$message}"); - break; - default: - $server->text($message); - } - } - } - } catch (ConnectionException $e) { - echo "> ERROR: {$e->getMessage()}\n"; - } -} diff --git a/Server/vendor/textalk/websocket/examples/random_client.php b/Server/vendor/textalk/websocket/examples/random_client.php deleted file mode 100644 index b23bd6b4..00000000 --- a/Server/vendor/textalk/websocket/examples/random_client.php +++ /dev/null @@ -1,94 +0,0 @@ - : The URI to connect to, default ws://localhost:8000 - * --timeout : Timeout in seconds, random default - * --fragment_size : Fragment size as bytes, random default - * --debug : Output log data (if logger is available) - */ - -namespace WebSocket; - -require __DIR__ . '/../vendor/autoload.php'; - -error_reporting(-1); - -$randStr = function (int $maxlength = 4096) { - $string = ''; - $length = rand(1, $maxlength); - for ($i = 0; $i < $length; $i++) { - $string .= chr(rand(33, 126)); - } - return $string; -}; - -echo "> Random client\n"; - -// Server options specified or random -$options = array_merge([ - 'uri' => 'ws://localhost:8000', - 'timeout' => rand(1, 60), - 'fragment_size' => rand(1, 4096) * 8, -], getopt('', ['uri:', 'timeout:', 'fragment_size:', 'debug'])); - -// If debug mode and logger is available -if (isset($options['debug']) && class_exists('WebSocket\EchoLog')) { - $logger = new EchoLog(); - $options['logger'] = $logger; - echo "> Using logger\n"; -} - -// Main loop -while (true) { - try { - $client = new Client($options['uri'], $options); - $info = json_encode([ - 'uri' => $options['uri'], - 'timeout' => $options['timeout'], - 'framgemt_size' => $client->getFragmentSize(), - ]); - echo "> Creating client {$info}\n"; - - try { - while (true) { - // Random actions - switch (rand(1, 10)) { - case 1: - echo "> Sending text\n"; - $client->text("Text message {$randStr()}"); - break; - case 2: - echo "> Sending binary\n"; - $client->binary("Binary message {$randStr()}"); - break; - case 3: - echo "> Sending close\n"; - $client->close(rand(1000, 2000), "Close message {$randStr(8)}"); - break; - case 4: - echo "> Sending ping\n"; - $client->ping("Ping message {$randStr(8)}"); - break; - case 5: - echo "> Sending pong\n"; - $client->pong("Pong message {$randStr(8)}"); - break; - default: - echo "> Receiving\n"; - $received = $client->receive(); - echo "> Received {$client->getLastOpcode()}: {$received}\n"; - } - sleep(rand(1, 5)); - } - } catch (\Throwable $e) { - echo "ERROR I/O: {$e->getMessage()} [{$e->getCode()}]\n"; - } - } catch (\Throwable $e) { - echo "ERROR: {$e->getMessage()} [{$e->getCode()}]\n"; - } - sleep(rand(1, 5)); -} diff --git a/Server/vendor/textalk/websocket/examples/random_server.php b/Server/vendor/textalk/websocket/examples/random_server.php deleted file mode 100644 index 0b0849cb..00000000 --- a/Server/vendor/textalk/websocket/examples/random_server.php +++ /dev/null @@ -1,93 +0,0 @@ - : The port to listen to, default 8000 - * --timeout : Timeout in seconds, random default - * --fragment_size : Fragment size as bytes, random default - * --debug : Output log data (if logger is available) - */ - -namespace WebSocket; - -require __DIR__ . '/../vendor/autoload.php'; - -error_reporting(-1); - -$randStr = function (int $maxlength = 4096) { - $string = ''; - $length = rand(1, $maxlength); - for ($i = 0; $i < $length; $i++) { - $string .= chr(rand(33, 126)); - } - return $string; -}; - -echo "> Random server\n"; - -// Server options specified or random -$options = array_merge([ - 'port' => 8000, - 'timeout' => rand(1, 60), - 'fragment_size' => rand(1, 4096) * 8, -], getopt('', ['port:', 'timeout:', 'fragment_size:', 'debug'])); - -// If debug mode and logger is available -if (isset($options['debug']) && class_exists('WebSocket\EchoLog')) { - $logger = new EchoLog(); - $options['logger'] = $logger; - echo "> Using logger\n"; -} - -// Force quit to close server -while (true) { - try { - // Setup server - $server = new Server($options); - $info = json_encode([ - 'port' => $server->getPort(), - 'timeout' => $options['timeout'], - 'framgemt_size' => $server->getFragmentSize(), - ]); - echo "> Creating server {$info}\n"; - - while ($server->accept()) { - while (true) { - // Random actions - switch (rand(1, 10)) { - case 1: - echo "> Sending text\n"; - $server->text("Text message {$randStr()}"); - break; - case 2: - echo "> Sending binary\n"; - $server->binary("Binary message {$randStr()}"); - break; - case 3: - echo "> Sending close\n"; - $server->close(rand(1000, 2000), "Close message {$randStr(8)}"); - break; - case 4: - echo "> Sending ping\n"; - $server->ping("Ping message {$randStr(8)}"); - break; - case 5: - echo "> Sending pong\n"; - $server->pong("Pong message {$randStr(8)}"); - break; - default: - echo "> Receiving\n"; - $received = $server->receive(); - echo "> Received {$server->getLastOpcode()}: {$received}\n"; - } - sleep(rand(1, 5)); - } - } - } catch (\Throwable $e) { - echo "ERROR: {$e->getMessage()} [{$e->getCode()}]\n"; - } - sleep(rand(1, 5)); -} diff --git a/Server/vendor/textalk/websocket/examples/send.php b/Server/vendor/textalk/websocket/examples/send.php deleted file mode 100644 index 30e48e0c..00000000 --- a/Server/vendor/textalk/websocket/examples/send.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * Console options: - * --uri : The URI to connect to, default ws://localhost:8000 - * --opcode : Opcode to send, default 'text' - * --debug : Output log data (if logger is available) - */ - -namespace WebSocket; - -require __DIR__ . '/../vendor/autoload.php'; - -error_reporting(-1); - -echo "> Send client\n"; - -// Server options specified or random -$options = array_merge([ - 'uri' => 'ws://localhost:8000', - 'opcode' => 'text', -], getopt('', ['uri:', 'opcode:', 'debug'])); -$message = array_pop($argv); - -// If debug mode and logger is available -if (isset($options['debug']) && class_exists('WebSocket\EchoLog')) { - $logger = new EchoLog(); - $options['logger'] = $logger; - echo "> Using logger\n"; -} - -try { - // Create client, send and recevie - $client = new Client($options['uri'], $options); - $client->send($message, $options['opcode']); - echo "> Sent '{$message}' [opcode: {$options['opcode']}]\n"; - if (in_array($options['opcode'], ['text', 'binary'])) { - $message = $client->receive(); - $opcode = $client->getLastOpcode(); - if (!is_null($message)) { - echo "> Got '{$message}' [opcode: {$opcode}]\n"; - } - } - $client->close(); - echo "> Closing client\n"; -} catch (\Throwable $e) { - echo "ERROR: {$e->getMessage()} [{$e->getCode()}]\n"; -} diff --git a/Server/vendor/textalk/websocket/lib/BadOpcodeException.php b/Server/vendor/textalk/websocket/lib/BadOpcodeException.php deleted file mode 100644 index a5187153..00000000 --- a/Server/vendor/textalk/websocket/lib/BadOpcodeException.php +++ /dev/null @@ -1,7 +0,0 @@ - 0, - 'text' => 1, - 'binary' => 2, - 'close' => 8, - 'ping' => 9, - 'pong' => 10, - ]; - - public function getLastOpcode(): ?string - { - return $this->last_opcode; - } - - public function getCloseStatus(): ?int - { - return $this->close_status; - } - - public function isConnected(): bool - { - return $this->socket && - (get_resource_type($this->socket) == 'stream' || - get_resource_type($this->socket) == 'persistent stream'); - } - - public function setTimeout(int $timeout): void - { - $this->options['timeout'] = $timeout; - - if ($this->isConnected()) { - stream_set_timeout($this->socket, $timeout); - } - } - - public function setFragmentSize(int $fragment_size): self - { - $this->options['fragment_size'] = $fragment_size; - return $this; - } - - public function getFragmentSize(): int - { - return $this->options['fragment_size']; - } - - public function setLogger(LoggerInterface $logger = null): void - { - $this->logger = $logger ?: new NullLogger(); - } - - public function send(string $payload, string $opcode = 'text', bool $masked = true): void - { - if (!$this->isConnected()) { - $this->connect(); - } - - if (!in_array($opcode, array_keys(self::$opcodes))) { - $warning = "Bad opcode '{$opcode}'. Try 'text' or 'binary'."; - $this->logger->warning($warning); - throw new BadOpcodeException($warning); - } - - $payload_chunks = str_split($payload, $this->options['fragment_size']); - $frame_opcode = $opcode; - - for ($index = 0; $index < count($payload_chunks); ++$index) { - $chunk = $payload_chunks[$index]; - $final = $index == count($payload_chunks) - 1; - - $this->sendFragment($final, $chunk, $frame_opcode, $masked); - - // all fragments after the first will be marked a continuation - $frame_opcode = 'continuation'; - } - - $this->logger->info("Sent '{$opcode}' message", [ - 'opcode' => $opcode, - 'content-length' => strlen($payload), - 'frames' => count($payload_chunks), - ]); - } - - /** - * Convenience method to send text message - * @param string $payload Content as string - */ - public function text(string $payload): void - { - $this->send($payload); - } - - /** - * Convenience method to send binary message - * @param string $payload Content as binary string - */ - public function binary(string $payload): void - { - $this->send($payload, 'binary'); - } - - /** - * Convenience method to send ping - * @param string $payload Optional text as string - */ - public function ping(string $payload = ''): void - { - $this->send($payload, 'ping'); - } - - /** - * Convenience method to send unsolicited pong - * @param string $payload Optional text as string - */ - public function pong(string $payload = ''): void - { - $this->send($payload, 'pong'); - } - - /** - * Get name of local socket, or null if not connected - * @return string|null - */ - public function getName(): ?string - { - return $this->isConnected() ? stream_socket_get_name($this->socket, false) : null; - } - - /** - * Get name of remote socket, or null if not connected - * @return string|null - */ - public function getPier(): ?string - { - return $this->isConnected() ? stream_socket_get_name($this->socket, true) : null; - } - - /** - * Get string representation of instance - * @return string String representation - */ - public function __toString(): string - { - return sprintf( - "%s(%s)", - get_class($this), - $this->getName() ?: 'closed' - ); - } - - /** - * Receive one message. - * Will continue reading until read message match filter settings. - * Return Message instance or string according to settings. - */ - protected function sendFragment(bool $final, string $payload, string $opcode, bool $masked): void - { - $data = ''; - - $byte_1 = $final ? 0b10000000 : 0b00000000; // Final fragment marker. - $byte_1 |= self::$opcodes[$opcode]; // Set opcode. - $data .= pack('C', $byte_1); - - $byte_2 = $masked ? 0b10000000 : 0b00000000; // Masking bit marker. - - // 7 bits of payload length... - $payload_length = strlen($payload); - if ($payload_length > 65535) { - $data .= pack('C', $byte_2 | 0b01111111); - $data .= pack('J', $payload_length); - } elseif ($payload_length > 125) { - $data .= pack('C', $byte_2 | 0b01111110); - $data .= pack('n', $payload_length); - } else { - $data .= pack('C', $byte_2 | $payload_length); - } - - // Handle masking - if ($masked) { - // generate a random mask: - $mask = ''; - for ($i = 0; $i < 4; $i++) { - $mask .= chr(rand(0, 255)); - } - $data .= $mask; - - // Append payload to frame: - for ($i = 0; $i < $payload_length; $i++) { - $data .= $payload[$i] ^ $mask[$i % 4]; - } - } else { - $data .= $payload; - } - - $this->write($data); - $this->logger->debug("Sent '{$opcode}' frame", [ - 'opcode' => $opcode, - 'final' => $final, - 'content-length' => strlen($payload), - ]); - } - - public function receive() - { - $filter = $this->options['filter']; - if (!$this->isConnected()) { - $this->connect(); - } - - do { - $response = $this->receiveFragment(); - list ($payload, $final, $opcode) = $response; - - // Continuation and factual opcode - $continuation = ($opcode == 'continuation'); - $payload_opcode = $continuation ? $this->read_buffer['opcode'] : $opcode; - - // Filter frames - if (!in_array($payload_opcode, $filter)) { - if ($payload_opcode == 'close') { - return null; // Always abort receive on close - } - $final = false; - continue; // Continue reading - } - - // First continuation frame, create buffer - if (!$final && !$continuation) { - $this->read_buffer = ['opcode' => $opcode, 'payload' => $payload, 'frames' => 1]; - continue; // Continue reading - } - - // Subsequent continuation frames, add to buffer - if ($continuation) { - $this->read_buffer['payload'] .= $payload; - $this->read_buffer['frames']++; - } - } while (!$final); - - // Final, return payload - $frames = 1; - if ($continuation) { - $payload = $this->read_buffer['payload']; - $frames = $this->read_buffer['frames']; - $this->read_buffer = null; - } - $this->logger->info("Received '{opcode}' message", [ - 'opcode' => $payload_opcode, - 'content-length' => strlen($payload), - 'frames' => $frames, - ]); - - $this->last_opcode = $payload_opcode; - $factory = new Factory(); - return $this->options['return_obj'] - ? $factory->create($payload_opcode, $payload) - : $payload; - } - - protected function receiveFragment(): array - { - // Read the fragment "header" first, two bytes. - $data = $this->read(2); - list ($byte_1, $byte_2) = array_values(unpack('C*', $data)); - - $final = (bool)($byte_1 & 0b10000000); // Final fragment marker. - $rsv = $byte_1 & 0b01110000; // Unused bits, ignore - - // Parse opcode - $opcode_int = $byte_1 & 0b00001111; - $opcode_ints = array_flip(self::$opcodes); - if (!array_key_exists($opcode_int, $opcode_ints)) { - $warning = "Bad opcode in websocket frame: {$opcode_int}"; - $this->logger->warning($warning); - throw new ConnectionException($warning, ConnectionException::BAD_OPCODE); - } - $opcode = $opcode_ints[$opcode_int]; - - // Masking bit - $mask = (bool)($byte_2 & 0b10000000); - - $payload = ''; - - // Payload length - $payload_length = $byte_2 & 0b01111111; - - if ($payload_length > 125) { - if ($payload_length === 126) { - $data = $this->read(2); // 126: Payload is a 16-bit unsigned int - $payload_length = current(unpack('n', $data)); - } else { - $data = $this->read(8); // 127: Payload is a 64-bit unsigned int - $payload_length = current(unpack('J', $data)); - } - } - - // Get masking key. - if ($mask) { - $masking_key = $this->read(4); - } - - // Get the actual payload, if any (might not be for e.g. close frames. - if ($payload_length > 0) { - $data = $this->read($payload_length); - - if ($mask) { - // Unmask payload. - for ($i = 0; $i < $payload_length; $i++) { - $payload .= ($data[$i] ^ $masking_key[$i % 4]); - } - } else { - $payload = $data; - } - } - - $this->logger->debug("Read '{opcode}' frame", [ - 'opcode' => $opcode, - 'final' => $final, - 'content-length' => strlen($payload), - ]); - - // if we received a ping, send a pong and wait for the next message - if ($opcode === 'ping') { - $this->logger->debug("Received 'ping', sending 'pong'."); - $this->send($payload, 'pong', true); - return [$payload, true, $opcode]; - } - - // if we received a pong, wait for the next message - if ($opcode === 'pong') { - $this->logger->debug("Received 'pong'."); - return [$payload, true, $opcode]; - } - - if ($opcode === 'close') { - $status_bin = ''; - $status = ''; - // Get the close status. - $status_bin = ''; - $status = ''; - if ($payload_length > 0) { - $status_bin = $payload[0] . $payload[1]; - $status = current(unpack('n', $payload)); - $this->close_status = $status; - } - // Get additional close message - if ($payload_length >= 2) { - $payload = substr($payload, 2); - } - - $this->logger->debug("Received 'close', status: {$this->close_status}."); - - if ($this->is_closing) { - $this->is_closing = false; // A close response, all done. - } else { - $this->send($status_bin . 'Close acknowledged: ' . $status, 'close', true); // Respond. - } - - // Close the socket. - fclose($this->socket); - - // Closing should not return message. - return [$payload, true, $opcode]; - } - - return [$payload, $final, $opcode]; - } - - /** - * Tell the socket to close. - * - * @param integer $status http://tools.ietf.org/html/rfc6455#section-7.4 - * @param string $message A closing message, max 125 bytes. - */ - public function close(int $status = 1000, string $message = 'ttfn'): void - { - if (!$this->isConnected()) { - return; - } - $status_binstr = sprintf('%016b', $status); - $status_str = ''; - foreach (str_split($status_binstr, 8) as $binstr) { - $status_str .= chr(bindec($binstr)); - } - $this->send($status_str . $message, 'close', true); - $this->logger->debug("Closing with status: {$status_str}."); - - $this->is_closing = true; - $this->receive(); // Receiving a close frame will close the socket now. - } - - /** - * Disconnect from client/server. - */ - public function disconnect(): void - { - if ($this->isConnected()) { - fclose($this->socket); - $this->socket = null; - } - } - - protected function write(string $data): void - { - $length = strlen($data); - $written = @fwrite($this->socket, $data); - if ($written === false) { - $this->throwException("Failed to write {$length} bytes."); - } - if ($written < strlen($data)) { - $this->throwException("Could only write {$written} out of {$length} bytes."); - } - $this->logger->debug("Wrote {$written} of {$length} bytes."); - } - - protected function read(string $length): string - { - $data = ''; - while (strlen($data) < $length) { - $buffer = @fread($this->socket, $length - strlen($data)); - - if (!$buffer) { - $meta = stream_get_meta_data($this->socket); - if (!empty($meta['timed_out'])) { - $message = 'Client read timeout'; - $this->logger->error($message, $meta); - throw new TimeoutException($message, ConnectionException::TIMED_OUT, $meta); - } - } - if ($buffer === false) { - $read = strlen($data); - $this->throwException("Broken frame, read {$read} of stated {$length} bytes."); - } - if ($buffer === '') { - $this->throwException("Empty read; connection dead?"); - } - $data .= $buffer; - $read = strlen($data); - $this->logger->debug("Read {$read} of {$length} bytes."); - } - return $data; - } - - protected function throwException(string $message, int $code = 0): void - { - $meta = ['closed' => true]; - if ($this->isConnected()) { - $meta = stream_get_meta_data($this->socket); - fclose($this->socket); - $this->socket = null; - } - if (!empty($meta['timed_out'])) { - $this->logger->error($message, $meta); - throw new TimeoutException($message, ConnectionException::TIMED_OUT, $meta); - } - if (!empty($meta['eof'])) { - $code = ConnectionException::EOF; - } - $this->logger->error($message, $meta); - throw new ConnectionException($message, $code, $meta); - } -} diff --git a/Server/vendor/textalk/websocket/lib/Client.php b/Server/vendor/textalk/websocket/lib/Client.php deleted file mode 100644 index 71d320a9..00000000 --- a/Server/vendor/textalk/websocket/lib/Client.php +++ /dev/null @@ -1,226 +0,0 @@ - null, - 'filter' => ['text', 'binary'], - 'fragment_size' => 4096, - 'headers' => null, - 'logger' => null, - 'origin' => null, // @deprecated - 'persistent' => false, - 'return_obj' => false, - 'timeout' => 5, - ]; - - protected $socket_uri; - - /** - * @param string $uri A ws/wss-URI - * @param array $options - * Associative array containing: - * - context: Set the stream context. Default: empty context - * - timeout: Set the socket timeout in seconds. Default: 5 - * - fragment_size: Set framgemnt size. Default: 4096 - * - headers: Associative array of headers to set/override. - */ - public function __construct(string $uri, array $options = []) - { - $this->options = array_merge(self::$default_options, $options); - $this->socket_uri = $uri; - $this->setLogger($this->options['logger']); - } - - public function __destruct() - { - if ($this->isConnected() && get_resource_type($this->socket) !== 'persistent stream') { - fclose($this->socket); - } - $this->socket = null; - } - - /** - * Perform WebSocket handshake - */ - protected function connect(): void - { - $url_parts = parse_url($this->socket_uri); - if (empty($url_parts) || empty($url_parts['scheme']) || empty($url_parts['host'])) { - $error = "Invalid url '{$this->socket_uri}' provided."; - $this->logger->error($error); - throw new BadUriException($error); - } - $scheme = $url_parts['scheme']; - $host = $url_parts['host']; - $user = isset($url_parts['user']) ? $url_parts['user'] : ''; - $pass = isset($url_parts['pass']) ? $url_parts['pass'] : ''; - $port = isset($url_parts['port']) ? $url_parts['port'] : ($scheme === 'wss' ? 443 : 80); - $path = isset($url_parts['path']) ? $url_parts['path'] : '/'; - $query = isset($url_parts['query']) ? $url_parts['query'] : ''; - $fragment = isset($url_parts['fragment']) ? $url_parts['fragment'] : ''; - - $path_with_query = $path; - if (!empty($query)) { - $path_with_query .= '?' . $query; - } - if (!empty($fragment)) { - $path_with_query .= '#' . $fragment; - } - - if (!in_array($scheme, ['ws', 'wss'])) { - $error = "Url should have scheme ws or wss, not '{$scheme}' from URI '{$this->socket_uri}'."; - $this->logger->error($error); - throw new BadUriException($error); - } - - $host_uri = ($scheme === 'wss' ? 'ssl' : 'tcp') . '://' . $host; - - // Set the stream context options if they're already set in the config - if (isset($this->options['context'])) { - // Suppress the error since we'll catch it below - if (@get_resource_type($this->options['context']) === 'stream-context') { - $context = $this->options['context']; - } else { - $error = "Stream context in \$options['context'] isn't a valid context."; - $this->logger->error($error); - throw new \InvalidArgumentException($error); - } - } else { - $context = stream_context_create(); - } - - $persistent = $this->options['persistent'] === true; - $flags = STREAM_CLIENT_CONNECT; - $flags = $persistent ? $flags | STREAM_CLIENT_PERSISTENT : $flags; - - $error = $errno = $errstr = null; - set_error_handler(function (int $severity, string $message, string $file, int $line) use (&$error) { - $this->logger->warning($message, ['severity' => $severity]); - $error = $message; - }, E_ALL); - - // Open the socket. - $this->socket = stream_socket_client( - "{$host_uri}:{$port}", - $errno, - $errstr, - $this->options['timeout'], - $flags, - $context - ); - - restore_error_handler(); - - if (!$this->isConnected()) { - $error = "Could not open socket to \"{$host}:{$port}\": {$errstr} ({$errno}) {$error}."; - $this->logger->error($error); - throw new ConnectionException($error); - } - - $address = "{$scheme}://{$host}{$path_with_query}"; - - if (!$persistent || ftell($this->socket) == 0) { - // Set timeout on the stream as well. - stream_set_timeout($this->socket, $this->options['timeout']); - - // Generate the WebSocket key. - $key = self::generateKey(); - - // Default headers - $headers = [ - 'Host' => $host . ":" . $port, - 'User-Agent' => 'websocket-client-php', - 'Connection' => 'Upgrade', - 'Upgrade' => 'websocket', - 'Sec-WebSocket-Key' => $key, - 'Sec-WebSocket-Version' => '13', - ]; - - // Handle basic authentication. - if ($user || $pass) { - $headers['authorization'] = 'Basic ' . base64_encode($user . ':' . $pass); - } - - // Deprecated way of adding origin (use headers instead). - if (isset($this->options['origin'])) { - $headers['origin'] = $this->options['origin']; - } - - // Add and override with headers from options. - if (isset($this->options['headers'])) { - $headers = array_merge($headers, $this->options['headers']); - } - - $header = "GET " . $path_with_query . " HTTP/1.1\r\n" . implode( - "\r\n", - array_map( - function ($key, $value) { - return "$key: $value"; - }, - array_keys($headers), - $headers - ) - ) . "\r\n\r\n"; - - // Send headers. - $this->write($header); - - // Get server response header (terminated with double CR+LF). - $response = ''; - do { - $buffer = fgets($this->socket, 1024); - if ($buffer === false) { - $meta = stream_get_meta_data($this->socket); - $message = 'Client handshake error'; - $this->logger->error($message, $meta); - throw new ConnectionException($message); - } - $response .= $buffer; - } while (substr_count($response, "\r\n\r\n") == 0); - - // Validate response. - if (!preg_match('#Sec-WebSocket-Accept:\s(.*)$#mUi', $response, $matches)) { - $error = "Connection to '{$address}' failed: Server sent invalid upgrade response: {$response}"; - $this->logger->error($error); - throw new ConnectionException($error); - } - - $keyAccept = trim($matches[1]); - $expectedResonse - = base64_encode(pack('H*', sha1($key . '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'))); - - if ($keyAccept !== $expectedResonse) { - $error = 'Server sent bad upgrade response.'; - $this->logger->error($error); - throw new ConnectionException($error); - } - } - - $this->logger->info("Client connected to {$address}"); - } - - /** - * Generate a random string for WebSocket key. - * - * @return string Random string - */ - protected static function generateKey(): string - { - $key = ''; - for ($i = 0; $i < 16; $i++) { - $key .= chr(rand(33, 126)); - } - return base64_encode($key); - } -} diff --git a/Server/vendor/textalk/websocket/lib/ConnectionException.php b/Server/vendor/textalk/websocket/lib/ConnectionException.php deleted file mode 100644 index 7e1ecbfe..00000000 --- a/Server/vendor/textalk/websocket/lib/ConnectionException.php +++ /dev/null @@ -1,26 +0,0 @@ -data = $data; - } - - public function getData(): array - { - return $this->data; - } -} diff --git a/Server/vendor/textalk/websocket/lib/Exception.php b/Server/vendor/textalk/websocket/lib/Exception.php deleted file mode 100644 index 6482b7ea..00000000 --- a/Server/vendor/textalk/websocket/lib/Exception.php +++ /dev/null @@ -1,7 +0,0 @@ -payload = $payload; - $this->timestamp = new DateTime(); - } - - public function getOpcode(): string - { - return $this->opcode; - } - - public function getLength(): int - { - return strlen($this->payload); - } - - public function getTimestamp(): DateTime - { - return $this->timestamp; - } - - public function getContent(): string - { - return $this->payload; - } - - public function setContent(string $payload = ''): void - { - $this->payload = $payload; - } - - public function hasContent(): bool - { - return $this->payload != ''; - } - - public function __toString(): string - { - return get_class($this); - } -} diff --git a/Server/vendor/textalk/websocket/lib/Message/Ping.php b/Server/vendor/textalk/websocket/lib/Message/Ping.php deleted file mode 100644 index 908d2337..00000000 --- a/Server/vendor/textalk/websocket/lib/Message/Ping.php +++ /dev/null @@ -1,8 +0,0 @@ - ['text', 'binary'], - 'fragment_size' => 4096, - 'logger' => null, - 'port' => 8000, - 'return_obj' => false, - 'timeout' => null, - ]; - - protected $addr; - protected $port; - protected $listening; - protected $request; - protected $request_path; - - /** - * @param array $options - * Associative array containing: - * - timeout: Set the socket timeout in seconds. - * - fragment_size: Set framgemnt size. Default: 4096 - * - port: Chose port for listening. Default 8000. - */ - public function __construct(array $options = []) - { - $this->options = array_merge(self::$default_options, $options); - $this->port = $this->options['port']; - $this->setLogger($this->options['logger']); - - $error = $errno = $errstr = null; - set_error_handler(function (int $severity, string $message, string $file, int $line) use (&$error) { - $this->logger->warning($message, ['severity' => $severity]); - $error = $message; - }, E_ALL); - - do { - $this->listening = stream_socket_server("tcp://0.0.0.0:$this->port", $errno, $errstr); - } while ($this->listening === false && $this->port++ < 10000); - - restore_error_handler(); - - if (!$this->listening) { - $error = "Could not open listening socket: {$errstr} ({$errno}) {$error}"; - $this->logger->error($error); - throw new ConnectionException($error, (int)$errno); - } - - $this->logger->info("Server listening to port {$this->port}"); - } - - public function __destruct() - { - if ($this->isConnected()) { - fclose($this->socket); - } - $this->socket = null; - } - - public function getPort(): int - { - return $this->port; - } - - public function getPath(): string - { - return $this->request_path; - } - - public function getRequest(): array - { - return $this->request; - } - - public function getHeader($header): ?string - { - foreach ($this->request as $row) { - if (stripos($row, $header) !== false) { - list($headername, $headervalue) = explode(":", $row); - return trim($headervalue); - } - } - return null; - } - - public function accept(): bool - { - $this->socket = null; - return (bool)$this->listening; - } - - protected function connect(): void - { - - $error = null; - set_error_handler(function (int $severity, string $message, string $file, int $line) use (&$error) { - $this->logger->warning($message, ['severity' => $severity]); - $error = $message; - }, E_ALL); - - if (isset($this->options['timeout'])) { - $this->socket = stream_socket_accept($this->listening, $this->options['timeout']); - } else { - $this->socket = stream_socket_accept($this->listening); - } - - restore_error_handler(); - - if (!$this->socket) { - $this->throwException("Server failed to connect. {$error}"); - } - if (isset($this->options['timeout'])) { - stream_set_timeout($this->socket, $this->options['timeout']); - } - - $this->logger->info("Client has connected to port {port}", [ - 'port' => $this->port, - 'pier' => stream_socket_get_name($this->socket, true), - ]); - $this->performHandshake(); - } - - protected function performHandshake(): void - { - $request = ''; - do { - $buffer = stream_get_line($this->socket, 1024, "\r\n"); - $request .= $buffer . "\n"; - $metadata = stream_get_meta_data($this->socket); - } while (!feof($this->socket) && $metadata['unread_bytes'] > 0); - - if (!preg_match('/GET (.*) HTTP\//mUi', $request, $matches)) { - $error = "No GET in request: {$request}"; - $this->logger->error($error); - throw new ConnectionException($error); - } - $get_uri = trim($matches[1]); - $uri_parts = parse_url($get_uri); - - $this->request = explode("\n", $request); - $this->request_path = $uri_parts['path']; - /// @todo Get query and fragment as well. - - if (!preg_match('#Sec-WebSocket-Key:\s(.*)$#mUi', $request, $matches)) { - $error = "Client had no Key in upgrade request: {$request}"; - $this->logger->error($error); - throw new ConnectionException($error); - } - - $key = trim($matches[1]); - - /// @todo Validate key length and base 64... - $response_key = base64_encode(pack('H*', sha1($key . '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'))); - - $header = "HTTP/1.1 101 Switching Protocols\r\n" - . "Upgrade: websocket\r\n" - . "Connection: Upgrade\r\n" - . "Sec-WebSocket-Accept: $response_key\r\n" - . "\r\n"; - - $this->write($header); - $this->logger->debug("Handshake on {$get_uri}"); - } -} diff --git a/Server/vendor/textalk/websocket/lib/TimeoutException.php b/Server/vendor/textalk/websocket/lib/TimeoutException.php deleted file mode 100644 index d20e622f..00000000 --- a/Server/vendor/textalk/websocket/lib/TimeoutException.php +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - tests - - - - - lib/ - - - diff --git a/Server/vendor/textalk/websocket/tests/ClientTest.php b/Server/vendor/textalk/websocket/tests/ClientTest.php deleted file mode 100644 index e0cf94cd..00000000 --- a/Server/vendor/textalk/websocket/tests/ClientTest.php +++ /dev/null @@ -1,458 +0,0 @@ -send('Connect'); - $this->assertTrue(MockSocket::isEmpty()); - $this->assertEquals(4096, $client->getFragmentSize()); - - MockSocket::initialize('send-receive', $this); - $client->send('Sending a message'); - $message = $client->receive(); - $this->assertTrue(MockSocket::isEmpty()); - $this->assertEquals('text', $client->getLastOpcode()); - - MockSocket::initialize('client.close', $this); - $this->assertTrue($client->isConnected()); - $this->assertNull($client->getCloseStatus()); - - $client->close(); - $this->assertFalse($client->isConnected()); - $this->assertEquals(1000, $client->getCloseStatus()); - - $this->assertTrue(MockSocket::isEmpty()); - } - - public function testDestruct(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $client->send('Connect'); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('client.destruct', $this); - } - - public function testClienExtendedUrl(): void - { - MockSocket::initialize('client.connect-extended', $this); - $client = new Client('ws://localhost:8000/my/mock/path?my_query=yes#my_fragment'); - $client->send('Connect'); - $this->assertTrue(MockSocket::isEmpty()); - } - - public function testClientWithTimeout(): void - { - MockSocket::initialize('client.connect-timeout', $this); - $client = new Client('ws://localhost:8000/my/mock/path', ['timeout' => 300]); - $client->send('Connect'); - $this->assertTrue(MockSocket::isEmpty()); - } - - public function testClientWithContext(): void - { - MockSocket::initialize('client.connect-context', $this); - $client = new Client('ws://localhost:8000/my/mock/path', ['context' => '@mock-stream-context']); - $client->send('Connect'); - $this->assertTrue(MockSocket::isEmpty()); - } - - public function testClientAuthed(): void - { - MockSocket::initialize('client.connect-authed', $this); - $client = new Client('wss://usename:password@localhost:8000/my/mock/path'); - $client->send('Connect'); - $this->assertTrue(MockSocket::isEmpty()); - } - - public function testWithHeaders(): void - { - MockSocket::initialize('client.connect-headers', $this); - $client = new Client('ws://localhost:8000/my/mock/path', [ - 'origin' => 'Origin header', - 'headers' => ['Generic header' => 'Generic content'], - ]); - $client->send('Connect'); - $this->assertTrue(MockSocket::isEmpty()); - } - - public function testPayload128(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $client->send('Connect'); - $this->assertTrue(MockSocket::isEmpty()); - - $payload = file_get_contents(__DIR__ . '/mock/payload.128.txt'); - - MockSocket::initialize('send-receive-128', $this); - $client->send($payload, 'text', false); - $message = $client->receive(); - $this->assertEquals($payload, $message); - $this->assertTrue(MockSocket::isEmpty()); - } - - public function testPayload65536(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $client->send('Connect'); - $this->assertTrue(MockSocket::isEmpty()); - - $payload = file_get_contents(__DIR__ . '/mock/payload.65536.txt'); - $client->setFragmentSize(65540); - - MockSocket::initialize('send-receive-65536', $this); - $client->send($payload, 'text', false); - $message = $client->receive(); - $this->assertEquals($payload, $message); - $this->assertTrue(MockSocket::isEmpty()); - $this->assertEquals(65540, $client->getFragmentSize()); - } - - public function testMultiFragment(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $client->send('Connect'); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('send-receive-multi-fragment', $this); - $client->setFragmentSize(8); - $client->send('Multi fragment test'); - $message = $client->receive(); - $this->assertEquals('Multi fragment test', $message); - $this->assertTrue(MockSocket::isEmpty()); - $this->assertEquals(8, $client->getFragmentSize()); - } - - public function testPingPong(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $client->send('Connect'); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('ping-pong', $this); - $client->send('Server ping', 'ping'); - $client->send('', 'ping'); - $message = $client->receive(); - $this->assertEquals('Receiving a message', $message); - $this->assertEquals('text', $client->getLastOpcode()); - $this->assertTrue(MockSocket::isEmpty()); - } - - public function testRemoteClose(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $client->send('Connect'); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('close-remote', $this); - - $message = $client->receive(); - $this->assertNull($message); - - $this->assertFalse($client->isConnected()); - $this->assertEquals(17260, $client->getCloseStatus()); - $this->assertNull($client->getLastOpcode()); - $this->assertTrue(MockSocket::isEmpty()); - } - - public function testSetTimeout(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $client->send('Connect'); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('config-timeout', $this); - $client->setTimeout(300); - $this->assertTrue($client->isConnected()); - $this->assertTrue(MockSocket::isEmpty()); - } - - public function testReconnect(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $client->send('Connect'); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('client.close', $this); - $this->assertTrue($client->isConnected()); - $this->assertNull($client->getCloseStatus()); - $client->close(); - $this->assertFalse($client->isConnected()); - $this->assertEquals(1000, $client->getCloseStatus()); - $this->assertNull($client->getLastOpcode()); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('client.reconnect', $this); - $message = $client->receive(); - $this->assertTrue($client->isConnected()); - $this->assertTrue(MockSocket::isEmpty()); - } - - public function testPersistentConnection(): void - { - MockSocket::initialize('client.connect-persistent', $this); - $client = new Client('ws://localhost:8000/my/mock/path', ['persistent' => true]); - $client->send('Connect'); - $client->disconnect(); - $this->assertFalse($client->isConnected()); - $this->assertTrue(MockSocket::isEmpty()); - } - - public function testBadScheme(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client('bad://localhost:8000/my/mock/path'); - $this->expectException('WebSocket\BadUriException'); - $this->expectExceptionMessage('Url should have scheme ws or wss'); - $client->send('Connect'); - } - - public function testBadUrl(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client('this is not an url'); - $this->expectException('WebSocket\BadUriException'); - $this->expectExceptionMessage('Invalid url \'this is not an url\' provided.'); - $client->send('Connect'); - } - - public function testBadStreamContext(): void - { - MockSocket::initialize('client.connect-bad-context', $this); - $client = new Client('ws://localhost:8000/my/mock/path', ['context' => 'BAD']); - $this->expectException('InvalidArgumentException'); - $this->expectExceptionMessage('Stream context in $options[\'context\'] isn\'t a valid context'); - $client->send('Connect'); - } - - public function testFailedConnection(): void - { - MockSocket::initialize('client.connect-failed', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $this->expectException('WebSocket\ConnectionException'); - $this->expectExceptionCode(0); - $this->expectExceptionMessage('Could not open socket to "localhost:8000"'); - $client->send('Connect'); - } - - public function testFailedConnectionWithError(): void - { - MockSocket::initialize('client.connect-error', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $this->expectException('WebSocket\ConnectionException'); - $this->expectExceptionCode(0); - $this->expectExceptionMessage('Could not open socket to "localhost:8000"'); - $client->send('Connect'); - } - - public function testInvalidUpgrade(): void - { - MockSocket::initialize('client.connect-invalid-upgrade', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $this->expectException('WebSocket\ConnectionException'); - $this->expectExceptionCode(0); - $this->expectExceptionMessage('Connection to \'ws://localhost/my/mock/path\' failed'); - $client->send('Connect'); - } - - public function testInvalidKey(): void - { - MockSocket::initialize('client.connect-invalid-key', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $this->expectException('WebSocket\ConnectionException'); - $this->expectExceptionCode(0); - $this->expectExceptionMessage('Server sent bad upgrade response'); - $client->send('Connect'); - } - - public function testSendBadOpcode(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $client->send('Connect'); - - MockSocket::initialize('send-bad-opcode', $this); - $this->expectException('WebSocket\BadOpcodeException'); - $this->expectExceptionMessage('Bad opcode \'bad\'. Try \'text\' or \'binary\'.'); - $client->send('Bad Opcode', 'bad'); - } - - public function testRecieveBadOpcode(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $client->send('Connect'); - MockSocket::initialize('receive-bad-opcode', $this); - $this->expectException('WebSocket\ConnectionException'); - $this->expectExceptionCode(1026); - $this->expectExceptionMessage('Bad opcode in websocket frame: 12'); - $message = $client->receive(); - } - - public function testBrokenWrite(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $client->send('Connect'); - MockSocket::initialize('send-broken-write', $this); - $this->expectException('WebSocket\ConnectionException'); - $this->expectExceptionCode(1025); - $this->expectExceptionMessage('Could only write 18 out of 22 bytes.'); - $client->send('Failing to write'); - } - - public function testFailedWrite(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $client->send('Connect'); - MockSocket::initialize('send-failed-write', $this); - $this->expectException('WebSocket\TimeoutException'); - $this->expectExceptionCode(1024); - $this->expectExceptionMessage('Failed to write 22 bytes.'); - $client->send('Failing to write'); - } - - public function testBrokenRead(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $client->send('Connect'); - MockSocket::initialize('receive-broken-read', $this); - $this->expectException('WebSocket\ConnectionException'); - $this->expectExceptionCode(1025); - $this->expectExceptionMessage('Broken frame, read 0 of stated 2 bytes.'); - $client->receive(); - } - - public function testHandshakeError(): void - { - MockSocket::initialize('client.connect-handshake-error', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $this->expectException('WebSocket\ConnectionException'); - $this->expectExceptionCode(0); - $this->expectExceptionMessage('Client handshake error'); - $client->send('Connect'); - } - - public function testReadTimeout(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $client->send('Connect'); - MockSocket::initialize('receive-client-timeout', $this); - $this->expectException('WebSocket\TimeoutException'); - $this->expectExceptionCode(1024); - $this->expectExceptionMessage('Client read timeout'); - $client->receive(); - } - - public function testEmptyRead(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $client->send('Connect'); - MockSocket::initialize('receive-empty-read', $this); - $this->expectException('WebSocket\TimeoutException'); - $this->expectExceptionCode(1024); - $this->expectExceptionMessage('Empty read; connection dead?'); - $client->receive(); - } - - public function testFrameFragmentation(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client( - 'ws://localhost:8000/my/mock/path', - ['filter' => ['text', 'binary', 'pong', 'close']] - ); - $client->send('Connect'); - MockSocket::initialize('receive-fragmentation', $this); - $message = $client->receive(); - $this->assertEquals('Server ping', $message); - $this->assertEquals('pong', $client->getLastOpcode()); - $message = $client->receive(); - $this->assertEquals('Multi fragment test', $message); - $this->assertEquals('text', $client->getLastOpcode()); - $this->assertTrue(MockSocket::isEmpty()); - MockSocket::initialize('close-remote', $this); - $message = $client->receive(); - $this->assertEquals('Closing', $message); - $this->assertTrue(MockSocket::isEmpty()); - $this->assertFalse($client->isConnected()); - $this->assertEquals(17260, $client->getCloseStatus()); - $this->assertEquals('close', $client->getLastOpcode()); - } - - public function testMessageFragmentation(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client( - 'ws://localhost:8000/my/mock/path', - ['filter' => ['text', 'binary', 'pong', 'close'], 'return_obj' => true] - ); - $client->send('Connect'); - MockSocket::initialize('receive-fragmentation', $this); - $message = $client->receive(); - $this->assertInstanceOf('WebSocket\Message\Message', $message); - $this->assertInstanceOf('WebSocket\Message\Pong', $message); - $this->assertEquals('Server ping', $message->getContent()); - $this->assertEquals('pong', $message->getOpcode()); - $message = $client->receive(); - $this->assertInstanceOf('WebSocket\Message\Message', $message); - $this->assertInstanceOf('WebSocket\Message\Text', $message); - $this->assertEquals('Multi fragment test', $message->getContent()); - $this->assertEquals('text', $message->getOpcode()); - $this->assertTrue(MockSocket::isEmpty()); - MockSocket::initialize('close-remote', $this); - $message = $client->receive(); - $this->assertInstanceOf('WebSocket\Message\Message', $message); - $this->assertInstanceOf('WebSocket\Message\Close', $message); - $this->assertEquals('Closing', $message->getContent()); - $this->assertEquals('close', $message->getOpcode()); - } - - public function testConvenicanceMethods(): void - { - MockSocket::initialize('client.connect', $this); - $client = new Client('ws://localhost:8000/my/mock/path'); - $this->assertNull($client->getName()); - $this->assertNull($client->getPier()); - $this->assertEquals('WebSocket\Client(closed)', "{$client}"); - $client->text('Connect'); - MockSocket::initialize('send-convenicance', $this); - $client->binary(base64_encode('Binary content')); - $client->ping(); - $client->pong(); - $this->assertEquals('127.0.0.1:12345', $client->getName()); - $this->assertEquals('127.0.0.1:8000', $client->getPier()); - $this->assertEquals('WebSocket\Client(127.0.0.1:12345)', "{$client}"); - } -} diff --git a/Server/vendor/textalk/websocket/tests/ExceptionTest.php b/Server/vendor/textalk/websocket/tests/ExceptionTest.php deleted file mode 100644 index 2083e709..00000000 --- a/Server/vendor/textalk/websocket/tests/ExceptionTest.php +++ /dev/null @@ -1,51 +0,0 @@ - 'with data'], - new TimeoutException( - 'Nested exception', - ConnectionException::TIMED_OUT - ) - ); - } catch (Throwable $e) { - } - - $this->assertInstanceOf('WebSocket\ConnectionException', $e); - $this->assertInstanceOf('WebSocket\Exception', $e); - $this->assertInstanceOf('Exception', $e); - $this->assertInstanceOf('Throwable', $e); - $this->assertEquals('An error message', $e->getMessage()); - $this->assertEquals(1025, $e->getCode()); - $this->assertEquals(['test' => 'with data'], $e->getData()); - - $p = $e->getPrevious(); - $this->assertInstanceOf('WebSocket\TimeoutException', $p); - $this->assertInstanceOf('WebSocket\ConnectionException', $p); - $this->assertEquals('Nested exception', $p->getMessage()); - $this->assertEquals(1024, $p->getCode()); - $this->assertEquals([], $p->getData()); - } -} diff --git a/Server/vendor/textalk/websocket/tests/MessageTest.php b/Server/vendor/textalk/websocket/tests/MessageTest.php deleted file mode 100644 index bade4359..00000000 --- a/Server/vendor/textalk/websocket/tests/MessageTest.php +++ /dev/null @@ -1,60 +0,0 @@ -create('text', 'Some content'); - $this->assertInstanceOf('WebSocket\Message\Text', $message); - $message = $factory->create('binary', 'Some content'); - $this->assertInstanceOf('WebSocket\Message\Binary', $message); - $message = $factory->create('ping', 'Some content'); - $this->assertInstanceOf('WebSocket\Message\Ping', $message); - $message = $factory->create('pong', 'Some content'); - $this->assertInstanceOf('WebSocket\Message\Pong', $message); - $message = $factory->create('close', 'Some content'); - $this->assertInstanceOf('WebSocket\Message\Close', $message); - } - - public function testMessage() - { - $message = new Text('Some content'); - $this->assertInstanceOf('WebSocket\Message\Message', $message); - $this->assertInstanceOf('WebSocket\Message\Text', $message); - $this->assertEquals('Some content', $message->getContent()); - $this->assertEquals('text', $message->getOpcode()); - $this->assertEquals(12, $message->getLength()); - $this->assertTrue($message->hasContent()); - $this->assertInstanceOf('DateTime', $message->getTimestamp()); - $message->setContent(''); - $this->assertEquals(0, $message->getLength()); - $this->assertFalse($message->hasContent()); - $this->assertEquals('WebSocket\Message\Text', "{$message}"); - } - - public function testBadOpcode() - { - $factory = new Factory(); - $this->expectException('WebSocket\BadOpcodeException'); - $this->expectExceptionMessage("Invalid opcode 'invalid' provided"); - $message = $factory->create('invalid', 'Some content'); - } -} diff --git a/Server/vendor/textalk/websocket/tests/README.md b/Server/vendor/textalk/websocket/tests/README.md deleted file mode 100644 index b710a7ed..00000000 --- a/Server/vendor/textalk/websocket/tests/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Testing - -Unit tests with [PHPUnit](https://phpunit.readthedocs.io/). - - -## How to run - -To run all test, run in console. - -``` -make test -``` - - -## Continuous integration - -GitHub Actions are run on PHP versions -`7.2`, `7.3`, `7.4` and `8.0`. - -Code coverage by [Coveralls](https://coveralls.io/github/Textalk/websocket-php). - - -## Test strategy - -Test set up overloads various stream and socket functions, -and use "scripts" to define and mock input/output of these functions. - -This set up negates the dependency on running servers, -and allow testing various errors that might occur. diff --git a/Server/vendor/textalk/websocket/tests/ServerTest.php b/Server/vendor/textalk/websocket/tests/ServerTest.php deleted file mode 100644 index c2370f47..00000000 --- a/Server/vendor/textalk/websocket/tests/ServerTest.php +++ /dev/null @@ -1,447 +0,0 @@ -assertTrue(MockSocket::isEmpty()); - MockSocket::initialize('server.accept', $this); - $server->accept(); - $server->send('Connect'); - $this->assertEquals(8000, $server->getPort()); - $this->assertEquals('/my/mock/path', $server->getPath()); - $this->assertTrue($server->isConnected()); - $this->assertEquals(4096, $server->getFragmentSize()); - $this->assertNull($server->getCloseStatus()); - $this->assertEquals([ - 'GET /my/mock/path HTTP/1.1', - 'host: localhost:8000', - 'user-agent: websocket-client-php', - 'connection: Upgrade', - 'upgrade: websocket', - 'sec-websocket-key: cktLWXhUdDQ2OXF0ZCFqOQ==', - 'sec-websocket-version: 13', - '', - '', - ], $server->getRequest()); - $this->assertEquals('websocket-client-php', $server->getHeader('USER-AGENT')); - $this->assertNull($server->getHeader('no such header')); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('send-receive', $this); - $server->send('Sending a message'); - $message = $server->receive(); - $this->assertEquals('Receiving a message', $message); - $this->assertTrue(MockSocket::isEmpty()); - $this->assertNull($server->getCloseStatus()); - $this->assertEquals('text', $server->getLastOpcode()); - - MockSocket::initialize('server.close', $this); - $server->close(); - $this->assertFalse($server->isConnected()); - $this->assertEquals(1000, $server->getCloseStatus()); - $this->assertTrue(MockSocket::isEmpty()); - - $server->close(); // Already closed - } - - public function testDestruct(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(); - - MockSocket::initialize('server.accept-destruct', $this); - $server->accept(); - $message = $server->receive(); - } - - public function testServerWithTimeout(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(['timeout' => 300]); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('server.accept-timeout', $this); - $server->accept(); - $server->send('Connect'); - $this->assertTrue(MockSocket::isEmpty()); - } - - public function testPayload128(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('server.accept', $this); - $server->accept(); - $server->send('Connect'); - $this->assertTrue($server->isConnected()); - $this->assertTrue(MockSocket::isEmpty()); - - $payload = file_get_contents(__DIR__ . '/mock/payload.128.txt'); - - MockSocket::initialize('send-receive-128', $this); - $server->send($payload, 'text', false); - $message = $server->receive(); - $this->assertEquals($payload, $message); - $this->assertTrue(MockSocket::isEmpty()); - } - - public function testPayload65536(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('server.accept', $this); - $server->accept(); - $server->send('Connect'); - $this->assertTrue($server->isConnected()); - $this->assertTrue(MockSocket::isEmpty()); - - $payload = file_get_contents(__DIR__ . '/mock/payload.65536.txt'); - $server->setFragmentSize(65540); - - MockSocket::initialize('send-receive-65536', $this); - $server->send($payload, 'text', false); - $message = $server->receive(); - $this->assertEquals($payload, $message); - $this->assertTrue(MockSocket::isEmpty()); - } - - public function testMultiFragment(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('server.accept', $this); - $server->accept(); - $server->send('Connect'); - $this->assertTrue($server->isConnected()); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('send-receive-multi-fragment', $this); - $server->setFragmentSize(8); - $server->send('Multi fragment test'); - $message = $server->receive(); - $this->assertEquals('Multi fragment test', $message); - $this->assertTrue(MockSocket::isEmpty()); - } - - public function testPingPong(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('server.accept', $this); - $server->accept(); - $server->send('Connect'); - $this->assertTrue($server->isConnected()); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('ping-pong', $this); - $server->send('Server ping', 'ping'); - $server->send('', 'ping'); - $message = $server->receive(); - $this->assertEquals('Receiving a message', $message); - $this->assertEquals('text', $server->getLastOpcode()); - $this->assertTrue(MockSocket::isEmpty()); - } - - public function testRemoteClose(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('server.accept', $this); - $server->accept(); - $server->send('Connect'); - $this->assertTrue($server->isConnected()); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('close-remote', $this); - - $message = $server->receive(); - $this->assertEquals('', $message); - - $this->assertTrue(MockSocket::isEmpty()); - $this->assertFalse($server->isConnected()); - $this->assertEquals(17260, $server->getCloseStatus()); - $this->assertNull($server->getLastOpcode()); - } - - public function testSetTimeout(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('server.accept', $this); - $server->accept(); - $server->send('Connect'); - $this->assertTrue($server->isConnected()); - $this->assertTrue(MockSocket::isEmpty()); - - MockSocket::initialize('config-timeout', $this); - $server->setTimeout(300); - $this->assertTrue($server->isConnected()); - $this->assertTrue(MockSocket::isEmpty()); - } - - public function testFailedSocketServer(): void - { - MockSocket::initialize('server.construct-failed-socket-server', $this); - $this->expectException('WebSocket\ConnectionException'); - $this->expectExceptionCode(0); - $this->expectExceptionMessage('Could not open listening socket:'); - $server = new Server(['port' => 9999]); - } - - public function testFailedSocketServerWithError(): void - { - MockSocket::initialize('server.construct-error-socket-server', $this); - $this->expectException('WebSocket\ConnectionException'); - $this->expectExceptionCode(0); - $this->expectExceptionMessage('Could not open listening socket:'); - $server = new Server(['port' => 9999]); - } - - public function testFailedConnect(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(); - - MockSocket::initialize('server.accept-failed-connect', $this); - $server->accept(); - $this->expectException('WebSocket\ConnectionException'); - $this->expectExceptionCode(0); - $this->expectExceptionMessage('Server failed to connect'); - $server->send('Connect'); - } - - public function testFailedConnectWithError(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(); - - MockSocket::initialize('server.accept-error-connect', $this); - $server->accept(); - $this->expectException('WebSocket\ConnectionException'); - $this->expectExceptionCode(0); - $this->expectExceptionMessage('Server failed to connect'); - $server->send('Connect'); - } - - public function testFailedConnectTimeout(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(['timeout' => 300]); - - MockSocket::initialize('server.accept-failed-connect', $this); - $server->accept(); - $this->expectException('WebSocket\ConnectionException'); - $this->expectExceptionCode(0); - $this->expectExceptionMessage('Server failed to connect'); - $server->send('Connect'); - } - - public function testFailedHttp(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(); - MockSocket::initialize('server.accept-failed-http', $this); - $server->accept(); - $this->expectException('WebSocket\ConnectionException'); - $this->expectExceptionCode(0); - $this->expectExceptionMessage('No GET in request'); - $server->send('Connect'); - } - - public function testFailedWsKey(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(); - MockSocket::initialize('server.accept-failed-ws-key', $this); - $server->accept(); - $this->expectException('WebSocket\ConnectionException'); - $this->expectExceptionCode(0); - $this->expectExceptionMessage('Client had no Key in upgrade request'); - $server->send('Connect'); - } - - public function testSendBadOpcode(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(); - MockSocket::initialize('server.accept', $this); - $server->accept(); - $server->send('Connect'); - $this->expectException('WebSocket\BadOpcodeException'); - $this->expectExceptionCode(0); - $this->expectExceptionMessage('Bad opcode \'bad\'. Try \'text\' or \'binary\'.'); - $server->send('Bad Opcode', 'bad'); - } - - public function testRecieveBadOpcode(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(); - MockSocket::initialize('server.accept', $this); - $server->accept(); - $server->send('Connect'); - MockSocket::initialize('receive-bad-opcode', $this); - $this->expectException('WebSocket\ConnectionException'); - $this->expectExceptionCode(1026); - $this->expectExceptionMessage('Bad opcode in websocket frame: 12'); - $message = $server->receive(); - } - - public function testBrokenWrite(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(); - MockSocket::initialize('server.accept', $this); - $server->accept(); - $server->send('Connect'); - MockSocket::initialize('send-broken-write', $this); - $this->expectException('WebSocket\ConnectionException'); - $this->expectExceptionCode(1025); - $this->expectExceptionMessage('Could only write 18 out of 22 bytes.'); - $server->send('Failing to write'); - } - - public function testFailedWrite(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(); - MockSocket::initialize('server.accept', $this); - $server->accept(); - $server->send('Connect'); - MockSocket::initialize('send-failed-write', $this); - $this->expectException('WebSocket\TimeoutException'); - $this->expectExceptionCode(1024); - $this->expectExceptionMessage('Failed to write 22 bytes.'); - $server->send('Failing to write'); - } - - public function testBrokenRead(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(); - MockSocket::initialize('server.accept', $this); - $server->accept(); - $server->send('Connect'); - MockSocket::initialize('receive-broken-read', $this); - $this->expectException('WebSocket\ConnectionException'); - $this->expectExceptionCode(1025); - $this->expectExceptionMessage('Broken frame, read 0 of stated 2 bytes.'); - $server->receive(); - } - - public function testEmptyRead(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(); - MockSocket::initialize('server.accept', $this); - $server->accept(); - $server->send('Connect'); - MockSocket::initialize('receive-empty-read', $this); - $this->expectException('WebSocket\TimeoutException'); - $this->expectExceptionCode(1024); - $this->expectExceptionMessage('Empty read; connection dead?'); - $server->receive(); - } - - public function testFrameFragmentation(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(['filter' => ['text', 'binary', 'pong', 'close']]); - MockSocket::initialize('server.accept', $this); - $server->accept(); - $server->send('Connect'); - MockSocket::initialize('receive-fragmentation', $this); - $message = $server->receive(); - $this->assertEquals('Server ping', $message); - $this->assertEquals('pong', $server->getLastOpcode()); - $message = $server->receive(); - $this->assertEquals('Multi fragment test', $message); - $this->assertEquals('text', $server->getLastOpcode()); - $this->assertTrue(MockSocket::isEmpty()); - MockSocket::initialize('close-remote', $this); - $message = $server->receive(); - $this->assertEquals('Closing', $message); - $this->assertTrue(MockSocket::isEmpty()); - $this->assertFalse($server->isConnected()); - $this->assertEquals(17260, $server->getCloseStatus()); - $this->assertEquals('close', $server->getLastOpcode()); - } - - public function testMessageFragmentation(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(['filter' => ['text', 'binary', 'pong', 'close'], 'return_obj' => true]); - MockSocket::initialize('server.accept', $this); - $server->accept(); - $server->send('Connect'); - MockSocket::initialize('receive-fragmentation', $this); - $message = $server->receive(); - $this->assertInstanceOf('WebSocket\Message\Message', $message); - $this->assertInstanceOf('WebSocket\Message\Pong', $message); - $this->assertEquals('Server ping', $message->getContent()); - $this->assertEquals('pong', $message->getOpcode()); - $message = $server->receive(); - $this->assertInstanceOf('WebSocket\Message\Message', $message); - $this->assertInstanceOf('WebSocket\Message\Text', $message); - $this->assertEquals('Multi fragment test', $message->getContent()); - $this->assertEquals('text', $message->getOpcode()); - $this->assertTrue(MockSocket::isEmpty()); - MockSocket::initialize('close-remote', $this); - $message = $server->receive(); - $this->assertInstanceOf('WebSocket\Message\Message', $message); - $this->assertInstanceOf('WebSocket\Message\Close', $message); - $this->assertEquals('Closing', $message->getContent()); - $this->assertEquals('close', $message->getOpcode()); - } - - public function testConvenicanceMethods(): void - { - MockSocket::initialize('server.construct', $this); - $server = new Server(); - $this->assertNull($server->getName()); - $this->assertNull($server->getPier()); - $this->assertEquals('WebSocket\Server(closed)', "{$server}"); - MockSocket::initialize('server.accept', $this); - $server->accept(); - $server->text('Connect'); - MockSocket::initialize('send-convenicance', $this); - $server->binary(base64_encode('Binary content')); - $server->ping(); - $server->pong(); - $this->assertEquals('127.0.0.1:12345', $server->getName()); - $this->assertEquals('127.0.0.1:8000', $server->getPier()); - $this->assertEquals('WebSocket\Server(127.0.0.1:12345)', "{$server}"); - $this->assertTrue(MockSocket::isEmpty()); - } -} diff --git a/Server/vendor/textalk/websocket/tests/bootstrap.php b/Server/vendor/textalk/websocket/tests/bootstrap.php deleted file mode 100644 index 5d6bdd07..00000000 --- a/Server/vendor/textalk/websocket/tests/bootstrap.php +++ /dev/null @@ -1,6 +0,0 @@ -interpolate($message, $context); - $context_string = empty($context) ? '' : json_encode($context); - echo str_pad($level, 8) . " | {$message} {$context_string}\n"; - } - - public function interpolate($message, array $context = []) - { - // Build a replacement array with braces around the context keys - $replace = []; - foreach ($context as $key => $val) { - // Check that the value can be cast to string - if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString'))) { - $replace['{' . $key . '}'] = $val; - } - } - - // Interpolate replacement values into the message and return - return strtr($message, $replace); - } -} diff --git a/Server/vendor/textalk/websocket/tests/mock/MockSocket.php b/Server/vendor/textalk/websocket/tests/mock/MockSocket.php deleted file mode 100644 index e51823d1..00000000 --- a/Server/vendor/textalk/websocket/tests/mock/MockSocket.php +++ /dev/null @@ -1,78 +0,0 @@ -assertEquals($current['function'], $function); - foreach ($current['params'] as $index => $param) { - self::$asserter->assertEquals($param, $params[$index], json_encode([$current, $params])); - } - if (isset($current['error'])) { - $map = array_merge(['msg' => 'Error', 'type' => E_USER_NOTICE], (array)$current['error']); - trigger_error($map['msg'], $map['type']); - } - if (isset($current['return-op'])) { - return self::op($current['return-op'], $params, $current['return']); - } - if (isset($current['return'])) { - return $current['return']; - } - return call_user_func_array($function, $params); - } - - // Check if all expected calls are performed - public static function isEmpty(): bool - { - return empty(self::$queue); - } - - // Initialize call queue - public static function initialize($op_file, $asserter): void - { - $file = dirname(__DIR__) . "/scripts/{$op_file}.json"; - self::$queue = json_decode(file_get_contents($file), true); - self::$asserter = $asserter; - } - - // Special output handling - private static function op($op, $params, $data) - { - switch ($op) { - case 'chr-array': - // Convert int array to string - $out = ''; - foreach ($data as $val) { - $out .= chr($val); - } - return $out; - case 'file': - $content = file_get_contents(__DIR__ . "/{$data[0]}"); - return substr($content, $data[1], $data[2]); - case 'key-save': - preg_match('#Sec-WebSocket-Key:\s(.*)$#mUi', $params[1], $matches); - self::$stored['sec-websocket-key'] = trim($matches[1]); - return $data; - case 'key-respond': - $key = self::$stored['sec-websocket-key'] . '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'; - $encoded = base64_encode(pack('H*', sha1($key))); - return str_replace('{key}', $encoded, $data); - } - return $data; - } -} diff --git a/Server/vendor/textalk/websocket/tests/mock/mock-socket.php b/Server/vendor/textalk/websocket/tests/mock/mock-socket.php deleted file mode 100644 index a0389334..00000000 --- a/Server/vendor/textalk/websocket/tests/mock/mock-socket.php +++ /dev/null @@ -1,83 +0,0 @@ - 以下类库都在`\\think\\helper`命名空间下 - -## Str - -> 字符串操作 - -``` -// 检查字符串中是否包含某些字符串 -Str::contains($haystack, $needles) - -// 检查字符串是否以某些字符串结尾 -Str::endsWith($haystack, $needles) - -// 获取指定长度的随机字母数字组合的字符串 -Str::random($length = 16) - -// 字符串转小写 -Str::lower($value) - -// 字符串转大写 -Str::upper($value) - -// 获取字符串的长度 -Str::length($value) - -// 截取字符串 -Str::substr($string, $start, $length = null) - -``` \ No newline at end of file diff --git a/Server/vendor/topthink/think-helper/composer.json b/Server/vendor/topthink/think-helper/composer.json deleted file mode 100644 index 0892fa63..00000000 --- a/Server/vendor/topthink/think-helper/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "topthink/think-helper", - "description": "The ThinkPHP6 Helper Package", - "license": "Apache-2.0", - "authors": [ - { - "name": "yunwuxin", - "email": "448901948@qq.com" - } - ], - "require": { - "php": ">=7.1.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "autoload": { - "psr-4": { - "think\\": "src" - }, - "files": [ - "src/helper.php" - ] - }, - "autoload-dev": { - "psr-4": { - "Tests\\": "tests" - } - }, - "scripts": { - "test": "./vendor/bin/phpunit --colors" - }, - "scripts-descriptions": { - "test": "Run all tests." - } -} diff --git a/Server/vendor/topthink/think-helper/phpunit.xml.dist b/Server/vendor/topthink/think-helper/phpunit.xml.dist deleted file mode 100644 index c083f148..00000000 --- a/Server/vendor/topthink/think-helper/phpunit.xml.dist +++ /dev/null @@ -1,17 +0,0 @@ - - - - - ./tests/ - - - - - ./src - - - diff --git a/Server/vendor/topthink/think-helper/src/Collection.php b/Server/vendor/topthink/think-helper/src/Collection.php deleted file mode 100644 index a6aaae1e..00000000 --- a/Server/vendor/topthink/think-helper/src/Collection.php +++ /dev/null @@ -1,678 +0,0 @@ - -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use ArrayAccess; -use ArrayIterator; -use Countable; -use IteratorAggregate; -use JsonSerializable; -use think\contract\Arrayable; -use think\contract\Jsonable; -use think\helper\Arr; -use Traversable; - -/** - * 数据集管理类 - * - * @template TKey of array-key - * @template-covariant TValue - * - * @implements ArrayAccess - * @implements IteratorAggregate - */ -class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable, Arrayable, Jsonable -{ - /** - * 数据集数据 - * @var array - */ - protected $items = []; - - /** - * 构造函数 - * @param iterable|Collection $items 数据 - */ - public function __construct($items = []) - { - $this->items = $this->convertToArray($items); - } - - /** - * @param iterable|Collection $items - * @return static - */ - public static function make($items = []) - { - return new static($items); - } - - /** - * 是否为空 - * @return bool - */ - public function isEmpty(): bool - { - return empty($this->items); - } - - public function toArray(): array - { - return array_map(function ($value) { - return $value instanceof Arrayable ? $value->toArray() : $value; - }, $this->items); - } - - /** - * @return array - */ - public function all(): array - { - return $this->items; - } - - /** - * 合并数组 - * - * @param mixed $items 数据 - * @return static - */ - public function merge($items) - { - return new static(array_merge($this->items, $this->convertToArray($items))); - } - - /** - * 按指定键整理数据 - * - * @param mixed $items 数据 - * @param string|null $indexKey 键名 - * @return array - */ - public function dictionary($items = null, ?string &$indexKey = null) - { - if ($items instanceof self) { - $items = $items->all(); - } - - $items = is_null($items) ? $this->items : $items; - - if ($items && empty($indexKey)) { - $indexKey = is_array($items[0]) ? 'id' : $items[0]->getPk(); - } - - if (isset($indexKey) && is_string($indexKey)) { - return array_column($items, null, $indexKey); - } - - return $items; - } - - /** - * 比较数组,返回差集 - * - * @param mixed $items 数据 - * @param string|null $indexKey 指定比较的键名 - * @return static - */ - public function diff($items, ?string $indexKey = null) - { - if ($this->isEmpty() || is_scalar($this->items[0])) { - return new static(array_diff($this->items, $this->convertToArray($items))); - } - - $diff = []; - $dictionary = $this->dictionary($items, $indexKey); - - if (is_string($indexKey)) { - foreach ($this->items as $item) { - if (!isset($dictionary[$item[$indexKey]])) { - $diff[] = $item; - } - } - } - - return new static($diff); - } - - /** - * 比较数组,返回交集 - * - * @param mixed $items 数据 - * @param string|null $indexKey 指定比较的键名 - * @return static - */ - public function intersect($items, ?string $indexKey = null) - { - if ($this->isEmpty() || is_scalar($this->items[0])) { - return new static(array_intersect($this->items, $this->convertToArray($items))); - } - - $intersect = []; - $dictionary = $this->dictionary($items, $indexKey); - - if (is_string($indexKey)) { - foreach ($this->items as $item) { - if (isset($dictionary[$item[$indexKey]])) { - $intersect[] = $item; - } - } - } - - return new static($intersect); - } - - /** - * 交换数组中的键和值 - * - * @return static - */ - public function flip() - { - return new static(array_flip($this->items)); - } - - /** - * 返回数组中所有的键名 - * - * @return static - */ - public function keys() - { - return new static(array_keys($this->items)); - } - - /** - * 返回数组中所有的值组成的新 Collection 实例 - * @return static - */ - public function values() - { - return new static(array_values($this->items)); - } - - /** - * 删除数组的最后一个元素(出栈) - * - * @return TValue - */ - public function pop() - { - return array_pop($this->items); - } - - /** - * 通过使用用户自定义函数,以字符串返回数组 - * - * @param callable $callback 调用方法 - * @param mixed $initial - * @return mixed - */ - public function reduce(callable $callback, $initial = null) - { - return array_reduce($this->items, $callback, $initial); - } - - /** - * 以相反的顺序返回数组。 - * - * @return static - */ - public function reverse() - { - return new static(array_reverse($this->items)); - } - - /** - * 删除数组中首个元素,并返回被删除元素的值 - * - * @return TValue - */ - public function shift() - { - return array_shift($this->items); - } - - /** - * 在数组结尾插入一个元素 - * - * @param mixed $value 元素 - * @param string|null $key KEY - * @return $this - */ - public function push($value, ?string $key = null) - { - if (is_null($key)) { - $this->items[] = $value; - } else { - $this->items[$key] = $value; - } - - return $this; - } - - /** - * 把一个数组分割为新的数组块. - * - * @param int $size 块大小 - * @param bool $preserveKeys - * @return static - */ - public function chunk(int $size, bool $preserveKeys = false) - { - $chunks = []; - - foreach (array_chunk($this->items, $size, $preserveKeys) as $chunk) { - $chunks[] = new static($chunk); - } - - return new static($chunks); - } - - /** - * 在数组开头插入一个元素 - * - * @param mixed $value 元素 - * @param string|null $key KEY - * @return $this - */ - public function unshift($value, ?string $key = null) - { - if (is_null($key)) { - array_unshift($this->items, $value); - } else { - $this->items = [$key => $value] + $this->items; - } - - return $this; - } - - /** - * 给每个元素执行个回调 - * - * - * @param callable $callback 回调 - * @return $this - */ - public function each(callable $callback) - { - foreach ($this->items as $key => $item) { - $result = $callback($item, $key); - - if (false === $result) { - break; - } elseif (!is_object($item)) { - $this->items[$key] = $result; - } - } - - return $this; - } - - /** - * 用回调函数处理数组中的元素 - * - * @param callable|null $callback 回调 - * @return static - */ - public function map(callable $callback) - { - return new static(array_map($callback, $this->items)); - } - - /** - * 用回调函数过滤数组中的元素 - * - * @param callable|null $callback 回调 - * @return static - */ - public function filter(?callable $callback = null) - { - if ($callback) { - return new static(array_filter($this->items, $callback)); - } - - return new static(array_filter($this->items)); - } - - /** - * 根据字段条件过滤数组中的元素 - * - * @param string $field 字段名 - * @param mixed $operator 操作符 - * @param mixed $value 数据 - * @return static - */ - public function where(string $field, $operator, $value = null) - { - if (is_null($value)) { - $value = $operator; - $operator = '='; - } - - return $this->filter(function ($data) use ($field, $operator, $value) { - if (strpos($field, '.')) { - [$field, $relation] = explode('.', $field); - - $result = $data[$field][$relation] ?? null; - } else { - $result = $data[$field] ?? null; - } - - switch (strtolower($operator)) { - case '===': - return $result === $value; - case '!==': - return $result !== $value; - case '!=': - case '<>': - return $result != $value; - case '>': - return $result > $value; - case '>=': - return $result >= $value; - case '<': - return $result < $value; - case '<=': - return $result <= $value; - case 'like': - return is_string($result) && false !== strpos($result, $value); - case 'not like': - return is_string($result) && false === strpos($result, $value); - case 'in': - return is_scalar($result) && in_array($result, $value, true); - case 'not in': - return is_scalar($result) && !in_array($result, $value, true); - case 'between': - [$min, $max] = is_string($value) ? explode(',', $value) : $value; - return is_scalar($result) && $result >= $min && $result <= $max; - case 'not between': - [$min, $max] = is_string($value) ? explode(',', $value) : $value; - return is_scalar($result) && $result > $max || $result < $min; - case '==': - case '=': - default: - return $result == $value; - } - }); - } - - /** - * LIKE过滤 - * - * @param string $field 字段名 - * @param string $value 数据 - * @return static - */ - public function whereLike(string $field, string $value) - { - return $this->where($field, 'like', $value); - } - - /** - * NOT LIKE过滤 - * - * @param string $field 字段名 - * @param string $value 数据 - * @return static - */ - public function whereNotLike(string $field, string $value) - { - return $this->where($field, 'not like', $value); - } - - /** - * IN过滤 - * - * @param string $field 字段名 - * @param array $value 数据 - * @return static - */ - public function whereIn(string $field, array $value) - { - return $this->where($field, 'in', $value); - } - - /** - * NOT IN过滤 - * - * @param string $field 字段名 - * @param array $value 数据 - * @return static - */ - public function whereNotIn(string $field, array $value) - { - return $this->where($field, 'not in', $value); - } - - /** - * BETWEEN 过滤 - * - * @param string $field 字段名 - * @param mixed $value 数据 - * @return static - */ - public function whereBetween(string $field, $value) - { - return $this->where($field, 'between', $value); - } - - /** - * NOT BETWEEN 过滤 - * - * @param string $field 字段名 - * @param mixed $value 数据 - * @return static - */ - public function whereNotBetween(string $field, $value) - { - return $this->where($field, 'not between', $value); - } - - /** - * 返回数据中指定的一列 - * - * @param string|null $columnKey 键名 - * @param string|null $indexKey 作为索引值的列 - * @return array - */ - public function column(?string $columnKey, ?string $indexKey = null) - { - return array_column($this->items, $columnKey, $indexKey); - } - - /** - * 对数组排序 - * - * @param callable|null $callback 回调 - * @return static - */ - public function sort(?callable $callback = null) - { - $items = $this->items; - - $callback = $callback ?: function ($a, $b) { - return $a == $b ? 0 : (($a < $b) ? -1 : 1); - }; - - uasort($items, $callback); - - return new static($items); - } - - /** - * 指定字段排序 - * - * @param string $field 排序字段 - * @param string $order 排序 - * @return $this - */ - public function order(string $field, string $order = 'asc') - { - return $this->sort(function ($a, $b) use ($field, $order) { - $fieldA = $a[$field] ?? null; - $fieldB = $b[$field] ?? null; - - return 'desc' == strtolower($order) ? intval($fieldB > $fieldA) : intval($fieldA > $fieldB); - }); - } - - /** - * 将数组打乱 - * - * @return static - */ - public function shuffle() - { - $items = $this->items; - - shuffle($items); - - return new static($items); - } - - /** - * 获取第一个单元数据 - * - * @param callable|null $callback - * @param null $default - * @return TValue - */ - public function first(?callable $callback = null, $default = null) - { - return Arr::first($this->items, $callback, $default); - } - - /** - * 获取最后一个单元数据 - * - * @param callable|null $callback - * @param null $default - * @return TValue - */ - public function last(?callable $callback = null, $default = null) - { - return Arr::last($this->items, $callback, $default); - } - - /** - * 截取数组 - * - * @param int $offset 起始位置 - * @param int|null $length 截取长度 - * @param bool $preserveKeys preserveKeys - * @return static - */ - public function slice(int $offset, ?int $length = null, bool $preserveKeys = false) - { - return new static(array_slice($this->items, $offset, $length, $preserveKeys)); - } - - /** - * @param TKey $key - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($offset) : bool - { - return array_key_exists($offset, $this->items); - } - - /** - * @param TKey $offset - * @return TValue - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->items[$offset]; - } - - /** - * @param TKey|null $offset - * @param TValue $value - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->items[] = $value; - } else { - $this->items[$offset] = $value; - } - } - - /** - * @param TKey $offset - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) - { - unset($this->items[$offset]); - } - - //Countable - public function count(): int - { - return count($this->items); - } - - /** - * @return ArrayIterator - */ - #[\ReturnTypeWillChange] - public function getIterator(): Traversable - { - return new ArrayIterator($this->items); - } - - //JsonSerializable - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return $this->toArray(); - } - - /** - * 转换当前数据集为JSON字符串 - * - * @param integer $options json参数 - * @return string - */ - public function toJson(int $options = JSON_UNESCAPED_UNICODE): string - { - return json_encode($this->toArray(), $options); - } - - public function __toString() - { - return $this->toJson(); - } - - /** - * 转换成数组 - * - * @param mixed $items 数据 - * @return array - */ - protected function convertToArray($items): array - { - if ($items instanceof self) { - return $items->all(); - } - - return (array) $items; - } -} diff --git a/Server/vendor/topthink/think-helper/src/contract/Arrayable.php b/Server/vendor/topthink/think-helper/src/contract/Arrayable.php deleted file mode 100644 index 7c6b992b..00000000 --- a/Server/vendor/topthink/think-helper/src/contract/Arrayable.php +++ /dev/null @@ -1,8 +0,0 @@ - -// +---------------------------------------------------------------------- - -use think\Collection; -use think\helper\Arr; - -if (!function_exists('throw_if')) { - /** - * 按条件抛异常 - * - * @template TValue - * @template TException of \Throwable - * - * @param TValue $condition - * @param TException|class-string|string $exception - * @param mixed ...$parameters - * @return TValue - * - * @throws TException - */ - function throw_if($condition, $exception, ...$parameters) - { - if ($condition) { - throw (is_string($exception) ? new $exception(...$parameters) : $exception); - } - - return $condition; - } -} - -if (!function_exists('throw_unless')) { - /** - * 按条件抛异常 - * - * @template TValue - * @template TException of \Throwable - * - * @param TValue $condition - * @param TException|class-string|string $exception - * @param mixed ...$parameters - * @return TValue - * - * @throws TException - */ - function throw_unless($condition, $exception, ...$parameters) - { - if (!$condition) { - throw (is_string($exception) ? new $exception(...$parameters) : $exception); - } - - return $condition; - } -} - -if (!function_exists('tap')) { - /** - * 对一个值调用给定的闭包,然后返回该值 - * - * @template TValue - * - * @param TValue $value - * @param (callable(TValue): mixed)|null $callback - * @return TValue - */ - function tap($value, $callback = null) - { - if (is_null($callback)) { - return $value; - } - - $callback($value); - - return $value; - } -} - -if (!function_exists('value')) { - /** - * Return the default value of the given value. - * - * @template TValue - * - * @param TValue|\Closure(): TValue $value - * @return TValue - */ - function value($value) - { - return $value instanceof Closure ? $value() : $value; - } -} - -if (!function_exists('collect')) { - /** - * Create a collection from the given value. - * - * @param mixed $value - * @return Collection - */ - function collect($value = null) - { - return new Collection($value); - } -} - -if (!function_exists('data_fill')) { - /** - * Fill in data where it's missing. - * - * @param mixed $target - * @param string|array $key - * @param mixed $value - * @return mixed - */ - function data_fill(&$target, $key, $value) - { - return data_set($target, $key, $value, false); - } -} - -if (!function_exists('data_get')) { - /** - * Get an item from an array or object using "dot" notation. - * - * @param mixed $target - * @param string|array|int $key - * @param mixed $default - * @return mixed - */ - function data_get($target, $key, $default = null) - { - if (is_null($key)) { - return $target; - } - - $key = is_array($key) ? $key : explode('.', $key); - - while (!is_null($segment = array_shift($key))) { - if ('*' === $segment) { - if ($target instanceof Collection) { - $target = $target->all(); - } elseif (!is_array($target)) { - return value($default); - } - - $result = []; - - foreach ($target as $item) { - $result[] = data_get($item, $key); - } - - return in_array('*', $key) ? Arr::collapse($result) : $result; - } - - if (Arr::accessible($target) && Arr::exists($target, $segment)) { - $target = $target[$segment]; - } elseif (is_object($target) && isset($target->{$segment})) { - $target = $target->{$segment}; - } else { - return value($default); - } - } - - return $target; - } -} - -if (!function_exists('data_set')) { - /** - * Set an item on an array or object using dot notation. - * - * @param mixed $target - * @param string|array $key - * @param mixed $value - * @param bool $overwrite - * @return mixed - */ - function data_set(&$target, $key, $value, $overwrite = true) - { - $segments = is_array($key) ? $key : explode('.', $key); - - if (($segment = array_shift($segments)) === '*') { - if (!Arr::accessible($target)) { - $target = []; - } - - if ($segments) { - foreach ($target as &$inner) { - data_set($inner, $segments, $value, $overwrite); - } - } elseif ($overwrite) { - foreach ($target as &$inner) { - $inner = $value; - } - } - } elseif (Arr::accessible($target)) { - if ($segments) { - if (!Arr::exists($target, $segment)) { - $target[$segment] = []; - } - - data_set($target[$segment], $segments, $value, $overwrite); - } elseif ($overwrite || !Arr::exists($target, $segment)) { - $target[$segment] = $value; - } - } elseif (is_object($target)) { - if ($segments) { - if (!isset($target->{$segment})) { - $target->{$segment} = []; - } - - data_set($target->{$segment}, $segments, $value, $overwrite); - } elseif ($overwrite || !isset($target->{$segment})) { - $target->{$segment} = $value; - } - } else { - $target = []; - - if ($segments) { - data_set($target[$segment], $segments, $value, $overwrite); - } elseif ($overwrite) { - $target[$segment] = $value; - } - } - - return $target; - } -} - -if (!function_exists('trait_uses_recursive')) { - /** - * 获取一个trait里所有引用到的trait - * - * @param string $trait Trait - * @return array - */ - function trait_uses_recursive(string $trait): array - { - $traits = class_uses($trait); - foreach ($traits as $trait) { - $traits += trait_uses_recursive($trait); - } - - return $traits; - } -} - -if (!function_exists('class_basename')) { - /** - * 获取类名(不包含命名空间) - * - * @param mixed $class 类名 - * @return string - */ - function class_basename($class): string - { - $class = is_object($class) ? get_class($class) : $class; - return basename(str_replace('\\', '/', $class)); - } -} - -if (!function_exists('class_uses_recursive')) { - /** - *获取一个类里所有用到的trait,包括父类的 - * - * @param mixed $class 类名 - * @return array - */ - function class_uses_recursive($class): array - { - if (is_object($class)) { - $class = get_class($class); - } - - $results = []; - $classes = array_merge([$class => $class], class_parents($class)); - foreach ($classes as $class) { - $results += trait_uses_recursive($class); - } - - return array_unique($results); - } -} - -if (!function_exists('array_is_list')) { - /** - * 判断数组是否为list - * - * @param array $array 数据 - * @return bool - */ - function array_is_list(array $array): bool - { - return array_values($array) === $array; - } -} - -if (!function_exists('json_validate')) { - /** - * 判断是否为有效json数据 - * - * @param string $string 数据 - * @return bool - */ - function json_validate(string $string): bool - { - json_decode($string); - return json_last_error() === JSON_ERROR_NONE; - } -} \ No newline at end of file diff --git a/Server/vendor/topthink/think-helper/src/helper/Arr.php b/Server/vendor/topthink/think-helper/src/helper/Arr.php deleted file mode 100644 index 11caffa4..00000000 --- a/Server/vendor/topthink/think-helper/src/helper/Arr.php +++ /dev/null @@ -1,657 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\helper; - -use ArrayAccess; -use InvalidArgumentException; -use think\Collection; - -class Arr -{ - - /** - * Determine whether the given value is array accessible. - * - * @param mixed $value - * @return bool - */ - public static function accessible($value) - { - return is_array($value) || $value instanceof ArrayAccess; - } - - /** - * Add an element to an array using "dot" notation if it doesn't exist. - * - * @param array $array - * @param string $key - * @param mixed $value - * @return array - */ - public static function add($array, $key, $value) - { - if (is_null(static::get($array, $key))) { - static::set($array, $key, $value); - } - - return $array; - } - - /** - * Collapse an array of arrays into a single array. - * - * @param array $array - * @return array - */ - public static function collapse($array) - { - $results = []; - - foreach ($array as $values) { - if ($values instanceof Collection) { - $values = $values->all(); - } elseif (!is_array($values)) { - continue; - } - - $results = array_merge($results, $values); - } - - return $results; - } - - /** - * Cross join the given arrays, returning all possible permutations. - * - * @param array ...$arrays - * @return array - */ - public static function crossJoin(...$arrays) - { - $results = [[]]; - - foreach ($arrays as $index => $array) { - $append = []; - - foreach ($results as $product) { - foreach ($array as $item) { - $product[$index] = $item; - - $append[] = $product; - } - } - - $results = $append; - } - - return $results; - } - - /** - * Divide an array into two arrays. One with keys and the other with values. - * - * @param array $array - * @return array - */ - public static function divide($array) - { - return [array_keys($array), array_values($array)]; - } - - /** - * Flatten a multi-dimensional associative array with dots. - * - * @param array $array - * @param string $prepend - * @return array - */ - public static function dot($array, $prepend = '') - { - $results = []; - - foreach ($array as $key => $value) { - if (is_array($value) && !empty($value)) { - $results = array_merge($results, static::dot($value, $prepend . $key . '.')); - } else { - $results[$prepend . $key] = $value; - } - } - - return $results; - } - - /** - * Get all of the given array except for a specified array of keys. - * - * @param array $array - * @param array|string $keys - * @return array - */ - public static function except($array, $keys) - { - static::forget($array, $keys); - - return $array; - } - - /** - * Determine if the given key exists in the provided array. - * - * @param \ArrayAccess|array $array - * @param string|int $key - * @return bool - */ - public static function exists($array, $key) - { - if ($array instanceof ArrayAccess) { - return $array->offsetExists($key); - } - - return array_key_exists($key, $array); - } - - /** - * Return the first element in an array passing a given truth test. - * - * @param array $array - * @param callable|null $callback - * @param mixed $default - * @return mixed - */ - public static function first($array, ?callable $callback = null, $default = null) - { - if (is_null($callback)) { - if (empty($array)) { - return value($default); - } - - foreach ($array as $item) { - return $item; - } - } - - foreach ($array as $key => $value) { - if (call_user_func($callback, $value, $key)) { - return $value; - } - } - - return value($default); - } - - /** - * Return the last element in an array passing a given truth test. - * - * @param array $array - * @param callable|null $callback - * @param mixed $default - * @return mixed - */ - public static function last($array, ?callable $callback = null, $default = null) - { - if (is_null($callback)) { - return empty($array) ? value($default) : end($array); - } - - return static::first(array_reverse($array, true), $callback, $default); - } - - /** - * Flatten a multi-dimensional array into a single level. - * - * @param array $array - * @param int $depth - * @return array - */ - public static function flatten($array, $depth = INF) - { - $result = []; - - foreach ($array as $item) { - $item = $item instanceof Collection ? $item->all() : $item; - - if (!is_array($item)) { - $result[] = $item; - } elseif ($depth === 1) { - $result = array_merge($result, array_values($item)); - } else { - $result = array_merge($result, static::flatten($item, $depth - 1)); - } - } - - return $result; - } - - /** - * Remove one or many array items from a given array using "dot" notation. - * - * @param array $array - * @param array|string $keys - * @return void - */ - public static function forget(&$array, $keys) - { - $original = &$array; - - $keys = (array) $keys; - - if (count($keys) === 0) { - return; - } - - foreach ($keys as $key) { - // if the exact key exists in the top-level, remove it - if (static::exists($array, $key)) { - unset($array[$key]); - - continue; - } - - $parts = explode('.', $key); - - // clean up before each pass - $array = &$original; - - while (count($parts) > 1) { - $part = array_shift($parts); - - if (isset($array[$part]) && is_array($array[$part])) { - $array = &$array[$part]; - } else { - continue 2; - } - } - - unset($array[array_shift($parts)]); - } - } - - /** - * Get an item from an array using "dot" notation. - * - * @param \ArrayAccess|array $array - * @param string $key - * @param mixed $default - * @return mixed - */ - public static function get($array, $key, $default = null) - { - if (!static::accessible($array)) { - return value($default); - } - - if (is_null($key)) { - return $array; - } - - if (static::exists($array, $key)) { - return $array[$key]; - } - - if (strpos($key, '.') === false) { - return $array[$key] ?? value($default); - } - - foreach (explode('.', $key) as $segment) { - if (static::accessible($array) && static::exists($array, $segment)) { - $array = $array[$segment]; - } else { - return value($default); - } - } - - return $array; - } - - /** - * Check if an item or items exist in an array using "dot" notation. - * - * @param \ArrayAccess|array $array - * @param string|array $keys - * @return bool - */ - public static function has($array, $keys) - { - $keys = (array) $keys; - - if (!$array || $keys === []) { - return false; - } - - foreach ($keys as $key) { - $subKeyArray = $array; - - if (static::exists($array, $key)) { - continue; - } - - foreach (explode('.', $key) as $segment) { - if (static::accessible($subKeyArray) && static::exists($subKeyArray, $segment)) { - $subKeyArray = $subKeyArray[$segment]; - } else { - return false; - } - } - } - - return true; - } - - /** - * Determines if an array is associative. - * - * An array is "associative" if it doesn't have sequential numerical keys beginning with zero. - * - * @param array $array - * @return bool - */ - public static function isAssoc(array $array) - { - $keys = array_keys($array); - - return array_keys($keys) !== $keys; - } - - /** - * Get a subset of the items from the given array. - * - * @param array $array - * @param array|string $keys - * @return array - */ - public static function only($array, $keys) - { - return array_intersect_key($array, array_flip((array) $keys)); - } - - /** - * Pluck an array of values from an array. - * - * @param array $array - * @param string|array $value - * @param string|array|null $key - * @return array - */ - public static function pluck($array, $value, $key = null) - { - $results = []; - - [$value, $key] = static::explodePluckParameters($value, $key); - - foreach ($array as $item) { - $itemValue = data_get($item, $value); - - // If the key is "null", we will just append the value to the array and keep - // looping. Otherwise we will key the array using the value of the key we - // received from the developer. Then we'll return the final array form. - if (is_null($key)) { - $results[] = $itemValue; - } else { - $itemKey = data_get($item, $key); - - if (is_object($itemKey) && method_exists($itemKey, '__toString')) { - $itemKey = (string) $itemKey; - } - - $results[$itemKey] = $itemValue; - } - } - - return $results; - } - - /** - * Explode the "value" and "key" arguments passed to "pluck". - * - * @param string|array $value - * @param string|array|null $key - * @return array - */ - protected static function explodePluckParameters($value, $key) - { - $value = is_string($value) ? explode('.', $value) : $value; - - $key = is_null($key) || is_array($key) ? $key : explode('.', $key); - - return [$value, $key]; - } - - /** - * Push an item onto the beginning of an array. - * - * @param array $array - * @param mixed $value - * @param mixed $key - * @return array - */ - public static function prepend($array, $value, $key = null) - { - if (is_null($key)) { - array_unshift($array, $value); - } else { - $array = [$key => $value] + $array; - } - - return $array; - } - - /** - * Get a value from the array, and remove it. - * - * @param array $array - * @param string $key - * @param mixed $default - * @return mixed - */ - public static function pull(&$array, $key, $default = null) - { - $value = static::get($array, $key, $default); - - static::forget($array, $key); - - return $value; - } - - /** - * Get one or a specified number of random values from an array. - * - * @param array $array - * @param int|null $number - * @return mixed - * - * @throws \InvalidArgumentException - */ - public static function random($array, $number = null) - { - $requested = is_null($number) ? 1 : $number; - - $count = count($array); - - if ($requested > $count) { - throw new InvalidArgumentException( - "You requested {$requested} items, but there are only {$count} items available." - ); - } - - if (is_null($number)) { - return $array[array_rand($array)]; - } - - if ((int) $number === 0) { - return []; - } - - $keys = array_rand($array, $number); - - $results = []; - - foreach ((array) $keys as $key) { - $results[] = $array[$key]; - } - - return $results; - } - - /** - * Set an array item to a given value using "dot" notation. - * - * If no key is given to the method, the entire array will be replaced. - * - * @param array $array - * @param string $key - * @param mixed $value - * @return array - */ - public static function set(&$array, $key, $value) - { - if (is_null($key)) { - return $array = $value; - } - - $keys = explode('.', $key); - - while (count($keys) > 1) { - $key = array_shift($keys); - - // If the key doesn't exist at this depth, we will just create an empty array - // to hold the next value, allowing us to create the arrays to hold final - // values at the correct depth. Then we'll keep digging into the array. - if (!isset($array[$key]) || !is_array($array[$key])) { - $array[$key] = []; - } - - $array = &$array[$key]; - } - - $array[array_shift($keys)] = $value; - - return $array; - } - - /** - * Shuffle the given array and return the result. - * - * @param array $array - * @param int|null $seed - * @return array - */ - public static function shuffle($array, $seed = null) - { - if (is_null($seed)) { - shuffle($array); - } else { - srand($seed); - - usort($array, function () { - return rand(-1, 1); - }); - } - - return $array; - } - - /** - * Sort the array using the given callback or "dot" notation. - * - * @param array $array - * @param callable|string|null $callback - * @return array - */ - public static function sort($array, $callback = null) - { - return Collection::make($array)->sort($callback)->all(); - } - - /** - * Recursively sort an array by keys and values. - * - * @param array $array - * @return array - */ - public static function sortRecursive($array) - { - foreach ($array as &$value) { - if (is_array($value)) { - $value = static::sortRecursive($value); - } - } - - if (static::isAssoc($array)) { - ksort($array); - } else { - sort($array); - } - - return $array; - } - - /** - * Convert the array into a query string. - * - * @param array $array - * @return string - */ - public static function query($array) - { - return http_build_query($array, null, '&', PHP_QUERY_RFC3986); - } - - /** - * Filter the array using the given callback. - * - * @param array $array - * @param callable $callback - * @return array - */ - public static function where($array, callable $callback) - { - return array_filter($array, $callback, ARRAY_FILTER_USE_BOTH); - } - - /** - * If the given value is not an array and not null, wrap it in one. - * - * @param mixed $value - * @return array - */ - public static function wrap($value) - { - if (is_null($value)) { - return []; - } - - return is_array($value) ? $value : [$value]; - } - - public static function mergeDeep(array ...$arrays): array - { - $result = []; - foreach ($arrays as $array) { - foreach ($array as $key => $value) { - if (isset($result[$key]) && is_array($result[$key]) && is_array($value)) { - $result[$key] = self::mergeDeep( - $result[$key], - $value - ); - } else { - $result[$key] = $value; - } - } - } - return $result; - } - - public static function flatMap(callable $fn, array $array): array - { - return array_merge(...array_map($fn, $array)); - } -} diff --git a/Server/vendor/topthink/think-helper/src/helper/Macroable.php b/Server/vendor/topthink/think-helper/src/helper/Macroable.php deleted file mode 100644 index ade5db78..00000000 --- a/Server/vendor/topthink/think-helper/src/helper/Macroable.php +++ /dev/null @@ -1,66 +0,0 @@ - -// +---------------------------------------------------------------------- -namespace think\helper; - -use Closure; -use think\exception\FuncNotFoundException; - -trait Macroable -{ - /** - * 方法注入. - * - * @var Closure[] - */ - protected static $macro = []; - - /** - * 设置方法注入. - * - * @param string $method - * @param Closure $closure - * - * @return void - */ - public static function macro(string $method, Closure $closure) - { - static::$macro[$method] = $closure; - } - - /** - * 检查方法是否已经有注入 - * - * @param string $name - * @return bool - */ - public static function hasMacro(string $method) - { - return isset(static::$macro[$method]); - } - - public function __call($method, $args) - { - if (!isset(static::$macro[$method])) { - throw new FuncNotFoundException('method not exists: ' . static::class . '::' . $method . '()', "{static::class}::{$method}"); - } - - return call_user_func_array(static::$macro[$method]->bindTo($this, static::class), $args); - } - - public static function __callStatic($method, $args) - { - if (!isset(static::$macro[$method])) { - throw new FuncNotFoundException('method not exists: ' . static::class . '::' . $method . '()', "{static::class}::{$method}"); - } - - return call_user_func_array(static::$macro[$method]->bindTo(null, static::class), $args); - } -} diff --git a/Server/vendor/topthink/think-helper/src/helper/Str.php b/Server/vendor/topthink/think-helper/src/helper/Str.php deleted file mode 100644 index 61b34d89..00000000 --- a/Server/vendor/topthink/think-helper/src/helper/Str.php +++ /dev/null @@ -1,234 +0,0 @@ - -// +---------------------------------------------------------------------- -namespace think\helper; - -class Str -{ - - protected static $snakeCache = []; - - protected static $camelCache = []; - - protected static $studlyCache = []; - - /** - * 检查字符串中是否包含某些字符串 - * @param string $haystack - * @param string|array $needles - * @return bool - */ - public static function contains(string $haystack, $needles): bool - { - foreach ((array) $needles as $needle) { - if ('' != $needle && mb_strpos($haystack, $needle) !== false) { - return true; - } - } - - return false; - } - - /** - * 检查字符串是否以某些字符串结尾 - * - * @param string $haystack - * @param string|array $needles - * @return bool - */ - public static function endsWith(string $haystack, $needles): bool - { - foreach ((array) $needles as $needle) { - if ((string) $needle === static::substr($haystack, -static::length($needle))) { - return true; - } - } - - return false; - } - - /** - * 检查字符串是否以某些字符串开头 - * - * @param string $haystack - * @param string|array $needles - * @return bool - */ - public static function startsWith(string $haystack, $needles): bool - { - foreach ((array) $needles as $needle) { - if ('' != $needle && mb_strpos($haystack, $needle) === 0) { - return true; - } - } - - return false; - } - - /** - * 获取指定长度的随机字母数字组合的字符串 - * - * @param int $length - * @param int $type - * @param string $addChars - * @return string - */ - public static function random(int $length = 6, ?int $type = null, string $addChars = ''): string - { - $str = ''; - switch ($type) { - case 0: - $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' . $addChars; - break; - case 1: - $chars = str_repeat('0123456789', 3); - break; - case 2: - $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' . $addChars; - break; - case 3: - $chars = 'abcdefghijklmnopqrstuvwxyz' . $addChars; - break; - case 4: - $chars = "们以我到他会作时要动国产的一是工就年阶义发成部民可出能方进在了不和有大这主中人上为来分生对于学下级地个用同行面说种过命度革而多子后自社加小机也经力线本电高量长党得实家定深法表着水理化争现所二起政三好十战无农使性前等反体合斗路图把结第里正新开论之物从当两些还天资事队批点育重其思与间内去因件日利相由压员气业代全组数果期导平各基或月毛然如应形想制心样干都向变关问比展那它最及外没看治提五解系林者米群头意只明四道马认次文通但条较克又公孔领军流入接席位情运器并飞原油放立题质指建区验活众很教决特此常石强极土少已根共直团统式转别造切九你取西持总料连任志观调七么山程百报更见必真保热委手改管处己将修支识病象几先老光专什六型具示复安带每东增则完风回南广劳轮科北打积车计给节做务被整联步类集号列温装即毫知轴研单色坚据速防史拉世设达尔场织历花受求传口断况采精金界品判参层止边清至万确究书" . $addChars; - break; - default: - $chars = 'ABCDEFGHIJKMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz23456789' . $addChars; - break; - } - if ($length > 10) { - $chars = $type == 1 ? str_repeat($chars, $length) : str_repeat($chars, 5); - } - if ($type != 4) { - $chars = str_shuffle($chars); - $str = substr($chars, 0, $length); - } else { - for ($i = 0; $i < $length; $i++) { - $str .= mb_substr($chars, floor(mt_rand(0, mb_strlen($chars, 'utf-8') - 1)), 1); - } - } - return $str; - } - - /** - * 字符串转小写 - * - * @param string $value - * @return string - */ - public static function lower(string $value): string - { - return mb_strtolower($value, 'UTF-8'); - } - - /** - * 字符串转大写 - * - * @param string $value - * @return string - */ - public static function upper(string $value): string - { - return mb_strtoupper($value, 'UTF-8'); - } - - /** - * 获取字符串的长度 - * - * @param string $value - * @return int - */ - public static function length(string $value): int - { - return mb_strlen($value); - } - - /** - * 截取字符串 - * - * @param string $string - * @param int $start - * @param int|null $length - * @return string - */ - public static function substr(string $string, int $start, ?int $length = null): string - { - return mb_substr($string, $start, $length, 'UTF-8'); - } - - /** - * 驼峰转下划线 - * - * @param string $value - * @param string $delimiter - * @return string - */ - public static function snake(string $value, string $delimiter = '_'): string - { - $key = $value; - - if (isset(static::$snakeCache[$key][$delimiter])) { - return static::$snakeCache[$key][$delimiter]; - } - - if (!ctype_lower($value)) { - $value = preg_replace('/\s+/u', '', ucwords($value)); - - $value = static::lower(preg_replace('/(.)(?=[A-Z])/u', '$1' . $delimiter, $value)); - } - - return static::$snakeCache[$key][$delimiter] = $value; - } - - /** - * 下划线转驼峰(首字母小写) - * - * @param string $value - * @return string - */ - public static function camel(string $value): string - { - if (isset(static::$camelCache[$value])) { - return static::$camelCache[$value]; - } - - return static::$camelCache[$value] = lcfirst(static::studly($value)); - } - - /** - * 下划线转驼峰(首字母大写) - * - * @param string $value - * @return string - */ - public static function studly(string $value): string - { - $key = $value; - - if (isset(static::$studlyCache[$key])) { - return static::$studlyCache[$key]; - } - - $value = ucwords(str_replace(['-', '_'], ' ', $value)); - - return static::$studlyCache[$key] = str_replace(' ', '', $value); - } - - /** - * 转为首字母大写的标题格式 - * - * @param string $value - * @return string - */ - public static function title(string $value): string - { - return mb_convert_case($value, MB_CASE_TITLE, 'UTF-8'); - } -} diff --git a/Server/vendor/topthink/think-helper/tests/ArrTest.php b/Server/vendor/topthink/think-helper/tests/ArrTest.php deleted file mode 100644 index eac9d7c7..00000000 --- a/Server/vendor/topthink/think-helper/tests/ArrTest.php +++ /dev/null @@ -1,372 +0,0 @@ - 'ThinkPHP'], 'price', 100); - $this->assertSame(['name' => 'ThinkPHP', 'price' => 100], $array); - } - - public function testCrossJoin() - { - // Single dimension - $this->assertSame( - [[1, 'a'], [1, 'b'], [1, 'c']], - Arr::crossJoin([1], ['a', 'b', 'c']) - ); - // Square matrix - $this->assertSame( - [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']], - Arr::crossJoin([1, 2], ['a', 'b']) - ); - // Rectangular matrix - $this->assertSame( - [[1, 'a'], [1, 'b'], [1, 'c'], [2, 'a'], [2, 'b'], [2, 'c']], - Arr::crossJoin([1, 2], ['a', 'b', 'c']) - ); - // 3D matrix - $this->assertSame( - [ - [1, 'a', 'I'], [1, 'a', 'II'], [1, 'a', 'III'], - [1, 'b', 'I'], [1, 'b', 'II'], [1, 'b', 'III'], - [2, 'a', 'I'], [2, 'a', 'II'], [2, 'a', 'III'], - [2, 'b', 'I'], [2, 'b', 'II'], [2, 'b', 'III'], - ], - Arr::crossJoin([1, 2], ['a', 'b'], ['I', 'II', 'III']) - ); - // With 1 empty dimension - $this->assertSame([], Arr::crossJoin([], ['a', 'b'], ['I', 'II', 'III'])); - $this->assertSame([], Arr::crossJoin([1, 2], [], ['I', 'II', 'III'])); - $this->assertSame([], Arr::crossJoin([1, 2], ['a', 'b'], [])); - // With empty arrays - $this->assertSame([], Arr::crossJoin([], [], [])); - $this->assertSame([], Arr::crossJoin([], [])); - $this->assertSame([], Arr::crossJoin([])); - // Not really a proper usage, still, test for preserving BC - $this->assertSame([[]], Arr::crossJoin()); - } - - public function testDivide() - { - [$keys, $values] = Arr::divide(['name' => 'ThinkPHP']); - $this->assertSame(['name'], $keys); - $this->assertSame(['ThinkPHP'], $values); - } - - public function testDot() - { - $array = Arr::dot(['foo' => ['bar' => 'baz']]); - $this->assertSame(['foo.bar' => 'baz'], $array); - $array = Arr::dot([]); - $this->assertSame([], $array); - $array = Arr::dot(['foo' => []]); - $this->assertSame(['foo' => []], $array); - $array = Arr::dot(['foo' => ['bar' => []]]); - $this->assertSame(['foo.bar' => []], $array); - } - - public function testExcept() - { - $array = ['name' => 'ThinkPHP', 'price' => 100]; - $array = Arr::except($array, ['price']); - $this->assertSame(['name' => 'ThinkPHP'], $array); - } - - public function testExists() - { - $this->assertTrue(Arr::exists([1], 0)); - $this->assertTrue(Arr::exists([null], 0)); - $this->assertTrue(Arr::exists(['a' => 1], 'a')); - $this->assertTrue(Arr::exists(['a' => null], 'a')); - $this->assertFalse(Arr::exists([1], 1)); - $this->assertFalse(Arr::exists([null], 1)); - $this->assertFalse(Arr::exists(['a' => 1], 0)); - } - - public function testFirst() - { - $array = [100, 200, 300]; - $value = Arr::first($array, function ($value) { - return $value >= 150; - }); - $this->assertSame(200, $value); - $this->assertSame(100, Arr::first($array)); - - $this->assertSame('default', Arr::first([], null, 'default')); - - $this->assertSame('default', Arr::first([], function () { - return false; - }, 'default')); - } - - public function testLast() - { - $array = [100, 200, 300]; - $last = Arr::last($array, function ($value) { - return $value < 250; - }); - $this->assertSame(200, $last); - $last = Arr::last($array, function ($value, $key) { - return $key < 2; - }); - $this->assertSame(200, $last); - $this->assertSame(300, Arr::last($array)); - } - - public function testFlatten() - { - // Flat arrays are unaffected - $array = ['#foo', '#bar', '#baz']; - $this->assertSame(['#foo', '#bar', '#baz'], Arr::flatten(['#foo', '#bar', '#baz'])); - // Nested arrays are flattened with existing flat items - $array = [['#foo', '#bar'], '#baz']; - $this->assertSame(['#foo', '#bar', '#baz'], Arr::flatten($array)); - // Flattened array includes "null" items - $array = [['#foo', null], '#baz', null]; - $this->assertSame(['#foo', null, '#baz', null], Arr::flatten($array)); - // Sets of nested arrays are flattened - $array = [['#foo', '#bar'], ['#baz']]; - $this->assertSame(['#foo', '#bar', '#baz'], Arr::flatten($array)); - // Deeply nested arrays are flattened - $array = [['#foo', ['#bar']], ['#baz']]; - $this->assertSame(['#foo', '#bar', '#baz'], Arr::flatten($array)); - // Nested arrays are flattened alongside arrays - $array = [new Collection(['#foo', '#bar']), ['#baz']]; - $this->assertSame(['#foo', '#bar', '#baz'], Arr::flatten($array)); - // Nested arrays containing plain arrays are flattened - $array = [new Collection(['#foo', ['#bar']]), ['#baz']]; - $this->assertSame(['#foo', '#bar', '#baz'], Arr::flatten($array)); - // Nested arrays containing arrays are flattened - $array = [['#foo', new Collection(['#bar'])], ['#baz']]; - $this->assertSame(['#foo', '#bar', '#baz'], Arr::flatten($array)); - // Nested arrays containing arrays containing arrays are flattened - $array = [['#foo', new Collection(['#bar', ['#zap']])], ['#baz']]; - $this->assertSame(['#foo', '#bar', '#zap', '#baz'], Arr::flatten($array)); - } - - public function testFlattenWithDepth() - { - // No depth flattens recursively - $array = [['#foo', ['#bar', ['#baz']]], '#zap']; - $this->assertSame(['#foo', '#bar', '#baz', '#zap'], Arr::flatten($array)); - // Specifying a depth only flattens to that depth - $array = [['#foo', ['#bar', ['#baz']]], '#zap']; - $this->assertSame(['#foo', ['#bar', ['#baz']], '#zap'], Arr::flatten($array, 1)); - $array = [['#foo', ['#bar', ['#baz']]], '#zap']; - $this->assertSame(['#foo', '#bar', ['#baz'], '#zap'], Arr::flatten($array, 2)); - } - - public function testGet() - { - $array = ['products.item' => ['price' => 100]]; - $this->assertSame(['price' => 100], Arr::get($array, 'products.item')); - $array = ['products' => ['item' => ['price' => 100]]]; - $value = Arr::get($array, 'products.item'); - $this->assertSame(['price' => 100], $value); - // Test null array values - $array = ['foo' => null, 'bar' => ['baz' => null]]; - $this->assertNull(Arr::get($array, 'foo', 'default')); - $this->assertNull(Arr::get($array, 'bar.baz', 'default')); - // Test null key returns the whole array - $array = ['foo', 'bar']; - $this->assertSame($array, Arr::get($array, null)); - // Test $array is empty and key is null - $this->assertSame([], Arr::get([], null)); - $this->assertSame([], Arr::get([], null, 'default')); - } - - public function testHas() - { - $array = ['products.item' => ['price' => 100]]; - $this->assertTrue(Arr::has($array, 'products.item')); - $array = ['products' => ['item' => ['price' => 100]]]; - $this->assertTrue(Arr::has($array, 'products.item')); - $this->assertTrue(Arr::has($array, 'products.item.price')); - $this->assertFalse(Arr::has($array, 'products.foo')); - $this->assertFalse(Arr::has($array, 'products.item.foo')); - $array = ['foo' => null, 'bar' => ['baz' => null]]; - $this->assertTrue(Arr::has($array, 'foo')); - $this->assertTrue(Arr::has($array, 'bar.baz')); - $array = ['foo', 'bar']; - $this->assertFalse(Arr::has($array, null)); - $this->assertFalse(Arr::has([], null)); - $array = ['products' => ['item' => ['price' => 100]]]; - $this->assertTrue(Arr::has($array, ['products.item'])); - $this->assertTrue(Arr::has($array, ['products.item', 'products.item.price'])); - $this->assertTrue(Arr::has($array, ['products', 'products'])); - $this->assertFalse(Arr::has($array, ['foo'])); - $this->assertFalse(Arr::has($array, [])); - $this->assertFalse(Arr::has($array, ['products.item', 'products.price'])); - $this->assertFalse(Arr::has([], [null])); - } - - public function testIsAssoc() - { - $this->assertTrue(Arr::isAssoc(['a' => 'a', 0 => 'b'])); - $this->assertTrue(Arr::isAssoc([1 => 'a', 0 => 'b'])); - $this->assertTrue(Arr::isAssoc([1 => 'a', 2 => 'b'])); - $this->assertFalse(Arr::isAssoc([0 => 'a', 1 => 'b'])); - $this->assertFalse(Arr::isAssoc(['a', 'b'])); - } - - public function testOnly() - { - $array = ['name' => 'ThinkPHP', 'price' => 100, 'orders' => 10]; - $array = Arr::only($array, ['name', 'price']); - $this->assertSame(['name' => 'ThinkPHP', 'price' => 100], $array); - } - - public function testPrepend() - { - $array = Arr::prepend(['one', 'two', 'three', 'four'], 'zero'); - $this->assertSame(['zero', 'one', 'two', 'three', 'four'], $array); - $array = Arr::prepend(['one' => 1, 'two' => 2], 0, 'zero'); - $this->assertSame(['zero' => 0, 'one' => 1, 'two' => 2], $array); - } - - public function testPull() - { - $array = ['name' => 'ThinkPHP', 'price' => 100]; - $name = Arr::pull($array, 'name'); - $this->assertSame('ThinkPHP', $name); - $this->assertSame(['price' => 100], $array); - // Only works on first level keys - $array = ['i@example.com' => 'Joe', 'jack@localhost' => 'Jane']; - $name = Arr::pull($array, 'i@example.com'); - $this->assertSame('Joe', $name); - $this->assertSame(['jack@localhost' => 'Jane'], $array); - // Does not work for nested keys - $array = ['emails' => ['i@example.com' => 'Joe', 'jack@localhost' => 'Jane']]; - $name = Arr::pull($array, 'emails.i@example.com'); - $this->assertNull($name); - $this->assertSame(['emails' => ['i@example.com' => 'Joe', 'jack@localhost' => 'Jane']], $array); - } - - public function testRandom() - { - $randomValue = Arr::random(['foo', 'bar', 'baz']); - $this->assertContains($randomValue, ['foo', 'bar', 'baz']); - $randomValues = Arr::random(['foo', 'bar', 'baz'], 1); - $this->assertIsArray($randomValues); - $this->assertCount(1, $randomValues); - $this->assertContains($randomValues[0], ['foo', 'bar', 'baz']); - $randomValues = Arr::random(['foo', 'bar', 'baz'], 2); - $this->assertIsArray($randomValues); - $this->assertCount(2, $randomValues); - $this->assertContains($randomValues[0], ['foo', 'bar', 'baz']); - $this->assertContains($randomValues[1], ['foo', 'bar', 'baz']); - } - - public function testSet() - { - $array = ['products' => ['item' => ['price' => 100]]]; - Arr::set($array, 'products.item.price', 200); - Arr::set($array, 'goods.item.price', 200); - $this->assertSame(['products' => ['item' => ['price' => 200]], 'goods' => ['item' => ['price' => 200]]], $array); - } - - public function testWhere() - { - $array = [100, '200', 300, '400', 500]; - $array = Arr::where($array, function ($value, $key) { - return is_string($value); - }); - $this->assertSame([1 => '200', 3 => '400'], $array); - } - - public function testWhereKey() - { - $array = ['10' => 1, 'foo' => 3, 20 => 2]; - $array = Arr::where($array, function ($value, $key) { - return is_numeric($key); - }); - $this->assertSame(['10' => 1, 20 => 2], $array); - } - - public function testForget() - { - $array = ['products' => ['item' => ['price' => 100]]]; - Arr::forget($array, null); - $this->assertSame(['products' => ['item' => ['price' => 100]]], $array); - $array = ['products' => ['item' => ['price' => 100]]]; - Arr::forget($array, []); - $this->assertSame(['products' => ['item' => ['price' => 100]]], $array); - $array = ['products' => ['item' => ['price' => 100]]]; - Arr::forget($array, 'products.item'); - $this->assertSame(['products' => []], $array); - $array = ['products' => ['item' => ['price' => 100]]]; - Arr::forget($array, 'products.item.price'); - $this->assertSame(['products' => ['item' => []]], $array); - $array = ['products' => ['item' => ['price' => 100]]]; - Arr::forget($array, 'products.final.price'); - $this->assertSame(['products' => ['item' => ['price' => 100]]], $array); - $array = ['shop' => ['cart' => [150 => 0]]]; - Arr::forget($array, 'shop.final.cart'); - $this->assertSame(['shop' => ['cart' => [150 => 0]]], $array); - $array = ['products' => ['item' => ['price' => ['original' => 50, 'taxes' => 60]]]]; - Arr::forget($array, 'products.item.price.taxes'); - $this->assertSame(['products' => ['item' => ['price' => ['original' => 50]]]], $array); - $array = ['products' => ['item' => ['price' => ['original' => 50, 'taxes' => 60]]]]; - Arr::forget($array, 'products.item.final.taxes'); - $this->assertSame(['products' => ['item' => ['price' => ['original' => 50, 'taxes' => 60]]]], $array); - $array = ['products' => ['item' => ['price' => 50], null => 'something']]; - Arr::forget($array, ['products.amount.all', 'products.item.price']); - $this->assertSame(['products' => ['item' => [], null => 'something']], $array); - // Only works on first level keys - $array = ['i@example.com' => 'Joe', 'i@thinkphp.com' => 'Jane']; - Arr::forget($array, 'i@example.com'); - $this->assertSame(['i@thinkphp.com' => 'Jane'], $array); - // Does not work for nested keys - $array = ['emails' => ['i@example.com' => ['name' => 'Joe'], 'jack@localhost' => ['name' => 'Jane']]]; - Arr::forget($array, ['emails.i@example.com', 'emails.jack@localhost']); - $this->assertSame(['emails' => ['i@example.com' => ['name' => 'Joe']]], $array); - } - - public function testWrap() - { - $string = 'a'; - $array = ['a']; - $object = new stdClass(); - $object->value = 'a'; - $this->assertSame(['a'], Arr::wrap($string)); - $this->assertSame($array, Arr::wrap($array)); - $this->assertSame([$object], Arr::wrap($object)); - } - - public function testMergeDeep() - { - $this->assertSame( - [ - 'a' => [ - 'c' => [2], - 'e' => 5, - 'f' => 4, - ], - 'x' => 3, - ], - Arr::mergeDeep( - [ - 'a' => [ - 'c' => [1], - 'e' => 5, - ], - 'x' => 4, - ], - [ - 'a' => [ - 'c' => [2], - 'f' => 4, - ], - 'x' => 3, - ] - ) - ); - } -} diff --git a/Server/vendor/topthink/think-helper/tests/CollectionTest.php b/Server/vendor/topthink/think-helper/tests/CollectionTest.php deleted file mode 100644 index b69c1755..00000000 --- a/Server/vendor/topthink/think-helper/tests/CollectionTest.php +++ /dev/null @@ -1,70 +0,0 @@ - 'Hello']); - $this->assertSame(['name' => 'Hello', 'id' => 1], $c->merge(['id' => 1])->all()); - } - - public function testFirst() - { - $c = new Collection(['name' => 'Hello', 'age' => 25]); - - $this->assertSame('Hello', $c->first()); - } - - public function testLast() - { - $c = new Collection(['name' => 'Hello', 'age' => 25]); - - $this->assertSame(25, $c->last()); - } - - public function testToArray() - { - $c = new Collection(['name' => 'Hello', 'age' => 25]); - - $this->assertSame(['name' => 'Hello', 'age' => 25], $c->toArray()); - } - - public function testToJson() - { - $c = new Collection(['name' => 'Hello', 'age' => 25]); - - $this->assertSame(json_encode(['name' => 'Hello', 'age' => 25]), $c->toJson()); - $this->assertSame(json_encode(['name' => 'Hello', 'age' => 25]), (string) $c); - $this->assertSame(json_encode(['name' => 'Hello', 'age' => 25]), json_encode($c)); - } - - public function testSerialize() - { - $c = new Collection(['name' => 'Hello', 'age' => 25]); - - $sc = serialize($c); - $c = unserialize($sc); - - $this->assertSame(['name' => 'Hello', 'age' => 25], $c->all()); - } - - public function testGetIterator() - { - $c = new Collection(['name' => 'Hello', 'age' => 25]); - - $this->assertInstanceOf(\ArrayIterator::class, $c->getIterator()); - - $this->assertSame(['name' => 'Hello', 'age' => 25], $c->getIterator()->getArrayCopy()); - } - - public function testCount() - { - $c = new Collection(['name' => 'Hello', 'age' => 25]); - - $this->assertCount(2, $c); - } -} diff --git a/Server/vendor/topthink/think-helper/tests/StrTest.php b/Server/vendor/topthink/think-helper/tests/StrTest.php deleted file mode 100644 index 813ad4ce..00000000 --- a/Server/vendor/topthink/think-helper/tests/StrTest.php +++ /dev/null @@ -1,59 +0,0 @@ -assertSame('fooBar', Str::camel('FooBar')); - $this->assertSame('fooBar', Str::camel('FooBar')); - $this->assertSame('fooBar', Str::camel('foo_bar')); - $this->assertSame('fooBar', Str::camel('_foo_bar')); - $this->assertSame('fooBar', Str::camel('_foo_bar_')); - } - - public function testStudly() - { - $this->assertSame('FooBar', Str::studly('fooBar')); - $this->assertSame('FooBar', Str::studly('_foo_bar')); - $this->assertSame('FooBar', Str::studly('_foo_bar_')); - $this->assertSame('FooBar', Str::studly('_foo_bar_')); - } - - public function testSnake() - { - $this->assertSame('think_p_h_p_framework', Str::snake('ThinkPHPFramework')); - $this->assertSame('think_php_framework', Str::snake('ThinkPhpFramework')); - $this->assertSame('think php framework', Str::snake('ThinkPhpFramework', ' ')); - $this->assertSame('think_php_framework', Str::snake('Think Php Framework')); - $this->assertSame('think_php_framework', Str::snake('Think Php Framework ')); - // ensure cache keys don't overlap - $this->assertSame('think__php__framework', Str::snake('ThinkPhpFramework', '__')); - $this->assertSame('think_php_framework_', Str::snake('ThinkPhpFramework_', '_')); - $this->assertSame('think_php_framework', Str::snake('think php Framework')); - $this->assertSame('think_php_frame_work', Str::snake('think php FrameWork')); - // prevent breaking changes - $this->assertSame('foo-bar', Str::snake('foo-bar')); - $this->assertSame('foo-_bar', Str::snake('Foo-Bar')); - $this->assertSame('foo__bar', Str::snake('Foo_Bar')); - $this->assertSame('żółtałódka', Str::snake('ŻółtaŁódka')); - } - - public function testTitle() - { - $this->assertSame('Welcome Back', Str::title('welcome back')); - } - - public function testRandom() - { - $this->assertIsString(Str::random(10)); - } - - public function testUpper() - { - $this->assertSame('USERNAME', Str::upper('username')); - $this->assertSame('USERNAME', Str::upper('userNaMe')); - } -} diff --git a/Server/vendor/topthink/think-helper/tests/TestCase.php b/Server/vendor/topthink/think-helper/tests/TestCase.php deleted file mode 100644 index 87f6cb34..00000000 --- a/Server/vendor/topthink/think-helper/tests/TestCase.php +++ /dev/null @@ -1,13 +0,0 @@ - - */ -class TestCase extends BaseTestCase -{ -} diff --git a/Server/vendor/topthink/think-queue/.gitignore b/Server/vendor/topthink/think-queue/.gitignore deleted file mode 100644 index 4aec7821..00000000 --- a/Server/vendor/topthink/think-queue/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/vendor/ -/.idea/ -/composer.lock -/thinkphp/ diff --git a/Server/vendor/topthink/think-queue/LICENSE b/Server/vendor/topthink/think-queue/LICENSE deleted file mode 100644 index 8dada3ed..00000000 --- a/Server/vendor/topthink/think-queue/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Server/vendor/topthink/think-queue/README.md b/Server/vendor/topthink/think-queue/README.md deleted file mode 100644 index 35dead16..00000000 --- a/Server/vendor/topthink/think-queue/README.md +++ /dev/null @@ -1,135 +0,0 @@ -# think-queue for ThinkPHP5.1 - -## 安装 - -> composer require topthink/think-queue - -## 配置 - -> 配置文件位于 `config/queue.php` - -### 公共配置 - -``` -[ - 'connector'=>'sync' //驱动类型,可选择 sync(默认):同步执行,database:数据库驱动,redis:Redis驱动,topthink:Topthink驱动 - //或其他自定义的完整的类名 -] -``` - -### 驱动配置 -> 各个驱动的具体可用配置项在`think\queue\connector`目录下各个驱动类里的`options`属性中,写在上面的`queue`配置里即可覆盖 - - -## 使用 Database -> 创建如下数据表 - -``` -CREATE TABLE `prefix_jobs` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `queue` varchar(255) NOT NULL, - `payload` longtext NOT NULL, - `attempts` tinyint(3) unsigned NOT NULL, - `reserved` tinyint(3) unsigned NOT NULL, - `reserved_at` int(10) unsigned DEFAULT NULL, - `available_at` int(10) unsigned NOT NULL, - `created_at` int(10) unsigned NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -``` - -## 创建任务类 -> 单模块项目推荐使用 `app\job` 作为任务类的命名空间 -> 多模块项目可用使用 `app\module\job` 作为任务类的命名空间 -> 也可以放在任意可以自动加载到的地方 - -任务类不需继承任何类,如果这个类只有一个任务,那么就只需要提供一个`fire`方法就可以了,如果有多个小任务,就写多个方法,下面发布任务的时候会有区别 -每个方法会传入两个参数 `think\queue\Job $job`(当前的任务对象) 和 `$data`(发布任务时自定义的数据) - -还有个可选的任务失败执行的方法 `failed` 传入的参数为`$data`(发布任务时自定义的数据) - -### 下面写两个例子 - -``` -namespace app\job; - -use think\queue\Job; - -class Job1{ - - public function fire(Job $job, $data){ - - //....这里执行具体的任务 - - if ($job->attempts() > 3) { - //通过这个方法可以检查这个任务已经重试了几次了 - } - - - //如果任务执行成功后 记得删除任务,不然这个任务会重复执行,直到达到最大重试次数后失败后,执行failed方法 - $job->delete(); - - // 也可以重新发布这个任务 - $job->release($delay); //$delay为延迟时间 - - } - - public function failed($data){ - - // ...任务达到最大重试次数后,失败了 - } - -} - -``` - -``` - -namespace app\lib\job; - -use think\queue\Job; - -class Job2{ - - public function task1(Job $job, $data){ - - - } - - public function task2(Job $job, $data){ - - - } - - public function failed($data){ - - - } - -} - -``` - - -## 发布任务 -> `think\Queue::push($job, $data = '', $queue = null)` 和 `think\Queue::later($delay, $job, $data = '', $queue = null)` 两个方法,前者是立即执行,后者是在`$delay`秒后执行 - -`$job` 是任务名 -单模块的,且命名空间是`app\job`的,比如上面的例子一,写`Job1`类名即可 -多模块的,且命名空间是`app\module\job`的,写`model/Job1`即可 -其他的需要些完整的类名,比如上面的例子二,需要写完整的类名`app\lib\job\Job2` -如果一个任务类里有多个小任务的话,如上面的例子二,需要用@+方法名`app\lib\job\Job2@task1`、`app\lib\job\Job2@task2` - -`$data` 是你要传到任务里的参数 - -`$queue` 队列名,指定这个任务是在哪个队列上执行,同下面监控队列的时候指定的队列名,可不填 - -## 监听任务并执行 - -> php think queue:listen - -> php think queue:work --daemon(不加--daemon为执行单个任务) - -两种,具体的可选参数可以输入命令加 --help 查看 - ->可配合supervisor使用,保证进程常驻 diff --git a/Server/vendor/topthink/think-queue/composer.json b/Server/vendor/topthink/think-queue/composer.json deleted file mode 100644 index 0ed3b4ea..00000000 --- a/Server/vendor/topthink/think-queue/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "topthink/think-queue", - "description": "The ThinkPHP5 Queue Package", - "type": "think-extend", - "authors": [ - { - "name": "yunwuxin", - "email": "448901948@qq.com" - } - ], - "license": "Apache-2.0", - "autoload": { - "psr-4": { - "think\\": "src" - }, - "files": [ - "src/common.php" - ] - }, - "require": { - "topthink/think-helper": ">=1.0.4", - "topthink/think-installer": "^2.0", - "topthink/framework": "5.1.*" - }, - "extra": { - "think-config": { - "queue": "src/config.php" - } - } -} diff --git a/Server/vendor/topthink/think-queue/src/Queue.php b/Server/vendor/topthink/think-queue/src/Queue.php deleted file mode 100644 index 531169f2..00000000 --- a/Server/vendor/topthink/think-queue/src/Queue.php +++ /dev/null @@ -1,49 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think; - -use think\helper\Str; -use think\queue\Connector; - -/** - * Class Queue - * @package think\queue - * - * @method static push($job, $data = '', $queue = null) - * @method static later($delay, $job, $data = '', $queue = null) - * @method static pop($queue = null) - * @method static marshal() - */ -class Queue -{ - /** @var Connector */ - protected static $connector; - - private static function buildConnector() - { - $options = \think\facade\Config::pull('queue'); - $type = !empty($options['connector']) ? $options['connector'] : 'Sync'; - - if (!isset(self::$connector)) { - - $class = false !== strpos($type, '\\') ? $type : '\\think\\queue\\connector\\' . Str::studly($type); - - self::$connector = new $class($options); - } - return self::$connector; - } - - public static function __callStatic($name, $arguments) - { - return call_user_func_array([self::buildConnector(), $name], $arguments); - } -} diff --git a/Server/vendor/topthink/think-queue/src/common.php b/Server/vendor/topthink/think-queue/src/common.php deleted file mode 100644 index 81b35d1d..00000000 --- a/Server/vendor/topthink/think-queue/src/common.php +++ /dev/null @@ -1,36 +0,0 @@ - -// +---------------------------------------------------------------------- - -\think\Console::addDefaultCommands([ - "think\\queue\\command\\Work", - "think\\queue\\command\\Restart", - "think\\queue\\command\\Listen", - "think\\queue\\command\\Subscribe" -]); - -if (!function_exists('queue')) { - - /** - * 添加到队列 - * @param $job - * @param string $data - * @param int $delay - * @param null $queue - */ - function queue($job, $data = '', $delay = 0, $queue = null) - { - if ($delay > 0) { - \think\Queue::later($delay, $job, $data, $queue); - } else { - \think\Queue::push($job, $data, $queue); - } - } -} diff --git a/Server/vendor/topthink/think-queue/src/config.php b/Server/vendor/topthink/think-queue/src/config.php deleted file mode 100644 index 9223ef61..00000000 --- a/Server/vendor/topthink/think-queue/src/config.php +++ /dev/null @@ -1,14 +0,0 @@ - -// +---------------------------------------------------------------------- - -return [ - 'connector' => 'Sync' -]; diff --git a/Server/vendor/topthink/think-queue/src/queue/CallQueuedHandler.php b/Server/vendor/topthink/think-queue/src/queue/CallQueuedHandler.php deleted file mode 100644 index 0f1a627d..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/CallQueuedHandler.php +++ /dev/null @@ -1,36 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\queue; - -class CallQueuedHandler -{ - - public function call(Job $job, array $data) - { - $command = unserialize($data['command']); - - call_user_func([$command, 'handle']); - - if (!$job->isDeletedOrReleased()) { - $job->delete(); - } - } - - public function failed(array $data) - { - $command = unserialize($data['command']); - - if (method_exists($command, 'failed')) { - $command->failed(); - } - } -} diff --git a/Server/vendor/topthink/think-queue/src/queue/Connector.php b/Server/vendor/topthink/think-queue/src/queue/Connector.php deleted file mode 100644 index b0694372..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/Connector.php +++ /dev/null @@ -1,69 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\queue; - -use InvalidArgumentException; - -abstract class Connector -{ - protected $options = []; - - abstract public function push($job, $data = '', $queue = null); - - abstract public function later($delay, $job, $data = '', $queue = null); - - abstract public function pop($queue = null); - - public function marshal() - { - throw new \RuntimeException('pop queues not support for this type'); - } - - protected function createPayload($job, $data = '', $queue = null) - { - if (is_object($job)) { - $payload = json_encode([ - 'job' => 'think\queue\CallQueuedHandler@call', - 'data' => [ - 'commandName' => get_class($job), - 'command' => serialize(clone $job), - ], - ]); - } else { - $payload = json_encode($this->createPlainPayload($job, $data)); - } - - if (JSON_ERROR_NONE !== json_last_error()) { - throw new InvalidArgumentException('Unable to create payload: ' . json_last_error_msg()); - } - - return $payload; - } - - protected function createPlainPayload($job, $data) - { - return ['job' => $job, 'data' => $data]; - } - - protected function setMeta($payload, $key, $value) - { - $payload = json_decode($payload, true); - $payload[$key] = $value; - $payload = json_encode($payload); - - if (JSON_ERROR_NONE !== json_last_error()) { - throw new InvalidArgumentException('Unable to create payload: ' . json_last_error_msg()); - } - - return $payload; - } -} diff --git a/Server/vendor/topthink/think-queue/src/queue/Job.php b/Server/vendor/topthink/think-queue/src/queue/Job.php deleted file mode 100644 index 618769ea..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/Job.php +++ /dev/null @@ -1,213 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\queue; - -use DateTime; -use think\facade\Env; - -abstract class Job -{ - - /** - * The job handler instance. - * @var mixed - */ - protected $instance; - - /** - * The name of the queue the job belongs to. - * @var string - */ - protected $queue; - - /** - * Indicates if the job has been deleted. - * @var bool - */ - protected $deleted = false; - - /** - * Indicates if the job has been released. - * @var bool - */ - protected $released = false; - - /** - * Fire the job. - * @return void - */ - abstract public function fire(); - - /** - * Delete the job from the queue. - * @return void - */ - public function delete() - { - $this->deleted = true; - } - - /** - * Determine if the job has been deleted. - * @return bool - */ - public function isDeleted() - { - return $this->deleted; - } - - /** - * Release the job back into the queue. - * @param int $delay - * @return void - */ - public function release($delay = 0) - { - $this->released = true; - } - - /** - * Determine if the job was released back into the queue. - * @return bool - */ - public function isReleased() - { - return $this->released; - } - - /** - * Determine if the job has been deleted or released. - * @return bool - */ - public function isDeletedOrReleased() - { - return $this->isDeleted() || $this->isReleased(); - } - - /** - * Get the number of times the job has been attempted. - * @return int - */ - abstract public function attempts(); - - /** - * Get the raw body string for the job. - * @return string - */ - abstract public function getRawBody(); - - /** - * Resolve and fire the job handler method. - * @param array $payload - * @return void - */ - protected function resolveAndFire(array $payload) - { - list($class, $method) = $this->parseJob($payload['job']); - - $this->instance = $this->resolve($class); - if ($this->instance) { - $this->instance->{$method}($this, $payload['data']); - } - } - - /** - * Parse the job declaration into class and method. - * @param string $job - * @return array - */ - protected function parseJob($job) - { - $segments = explode('@', $job); - - return count($segments) > 1 ? $segments : [$segments[0], 'fire']; - } - - /** - * Resolve the given job handler. - * @param string $name - * @return mixed - */ - protected function resolve($name) - { - if (strpos($name, '\\') === false) { - - if (strpos($name, '/') === false) { - $module = ''; - } else { - list($module, $name) = explode('/', $name, 2); - } - - $name = Env::get('app_namespace') . ($module ? '\\' . strtolower($module) : '') . '\\job\\' . $name; - } - if (class_exists($name)) { - return new $name(); - } - } - - /** - * Call the failed method on the job instance. - * @return void - */ - public function failed() - { - $payload = json_decode($this->getRawBody(), true); - - list($class, $method) = $this->parseJob($payload['job']); - - $this->instance = $this->resolve($class); - if ($this->instance && method_exists($this->instance, 'failed')) { - $this->instance->failed($payload['data']); - } - } - - /** - * Calculate the number of seconds with the given delay. - * @param \DateTime|int $delay - * @return int - */ - protected function getSeconds($delay) - { - if ($delay instanceof DateTime) { - return max(0, $delay->getTimestamp() - $this->getTime()); - } - - return (int) $delay; - } - - /** - * Get the current system time. - * @return int - */ - protected function getTime() - { - return time(); - } - - /** - * Get the name of the queued job class. - * @return string - */ - public function getName() - { - return json_decode($this->getRawBody(), true)['job']; - } - - /** - * Get the name of the queue the job belongs to. - * @return string - */ - public function getQueue() - { - return $this->queue; - } -} diff --git a/Server/vendor/topthink/think-queue/src/queue/Listener.php b/Server/vendor/topthink/think-queue/src/queue/Listener.php deleted file mode 100644 index e8fcaa40..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/Listener.php +++ /dev/null @@ -1,164 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\queue; - -use Closure; -use think\Process; - -class Listener -{ - - /** - * @var string - */ - protected $commandPath; - - /** - * @var int - */ - protected $sleep = 3; - - /** - * @var int - */ - protected $maxTries = 0; - - /** - * @var string - */ - protected $workerCommand; - - /** - * @var \Closure|null - */ - protected $outputHandler; - - /** - * @param string $commandPath - */ - public function __construct($commandPath) - { - $this->commandPath = $commandPath; - $this->workerCommand = - '"' . PHP_BINARY . '" think queue:work --queue="%s" --delay=%s --memory=%s --sleep=%s --tries=%s'; - } - - /** - * @param string $queue - * @param string $delay - * @param string $memory - * @param int $timeout - * @return void - */ - public function listen($queue, $delay, $memory, $timeout = 60) - { - $process = $this->makeProcess($queue, $delay, $memory, $timeout); - - while (true) { - $this->runProcess($process, $memory); - } - } - - /** - * @param \Think\Process $process - * @param int $memory - */ - public function runProcess(Process $process, $memory) - { - $process->run(function ($type, $line) { - $this->handleWorkerOutput($type, $line); - }); - - if ($this->memoryExceeded($memory)) { - $this->stop(); - } - } - - /** - * @param string $queue - * @param int $delay - * @param int $memory - * @param int $timeout - * @return \think\Process - */ - public function makeProcess($queue, $delay, $memory, $timeout) - { - $string = $this->workerCommand; - $command = sprintf($string, $queue, $delay, $memory, $this->sleep, $this->maxTries); - - return new Process($command, $this->commandPath, null, null, $timeout); - } - - /** - * @param int $type - * @param string $line - * @return void - */ - protected function handleWorkerOutput($type, $line) - { - if (isset($this->outputHandler)) { - call_user_func($this->outputHandler, $type, $line); - } - } - - /** - * @param int $memoryLimit - * @return bool - */ - public function memoryExceeded($memoryLimit) - { - return (memory_get_usage() / 1024 / 1024) >= $memoryLimit; - } - - /** - * @return void - */ - public function stop() - { - die; - } - - /** - * @param \Closure $outputHandler - * @return void - */ - public function setOutputHandler(Closure $outputHandler) - { - $this->outputHandler = $outputHandler; - } - - /** - * @return int - */ - public function getSleep() - { - return $this->sleep; - } - - /** - * @param int $sleep - * @return void - */ - public function setSleep($sleep) - { - $this->sleep = $sleep; - } - - /** - * @param int $tries - * @return void - */ - public function setMaxTries($tries) - { - $this->maxTries = $tries; - } -} diff --git a/Server/vendor/topthink/think-queue/src/queue/Queueable.php b/Server/vendor/topthink/think-queue/src/queue/Queueable.php deleted file mode 100644 index 2a6ec4e8..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/Queueable.php +++ /dev/null @@ -1,46 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\queue; - -trait Queueable -{ - - /** @var string 队列名称 */ - public $queue; - - /** @var integer 延迟时间 */ - public $delay; - - /** - * 设置队列名 - * @param $queue - * @return $this - */ - public function queue($queue) - { - $this->queue = $queue; - - return $this; - } - - /** - * 设置延迟时间 - * @param $delay - * @return $this - */ - public function delay($delay) - { - $this->delay = $delay; - - return $this; - } -} diff --git a/Server/vendor/topthink/think-queue/src/queue/ShouldQueue.php b/Server/vendor/topthink/think-queue/src/queue/ShouldQueue.php deleted file mode 100644 index cb49c12d..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/ShouldQueue.php +++ /dev/null @@ -1,17 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\queue; - -interface ShouldQueue -{ - -} diff --git a/Server/vendor/topthink/think-queue/src/queue/Worker.php b/Server/vendor/topthink/think-queue/src/queue/Worker.php deleted file mode 100644 index a008d3c9..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/Worker.php +++ /dev/null @@ -1,119 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\queue; - -use Exception; -use think\facade\Hook; -use think\Queue; - -class Worker -{ - - /** - * 执行下个任务 - * @param string $queue - * @param int $delay - * @param int $sleep - * @param int $maxTries - * @return array - */ - public function pop($queue = null, $delay = 0, $sleep = 3, $maxTries = 0) - { - - $job = $this->getNextJob($queue); - - if (!is_null($job)) { - Hook::listen('worker_before_process', $queue); - return $this->process($job, $maxTries, $delay); - } - - Hook::listen('worker_before_sleep', $queue); - $this->sleep($sleep); - - return ['job' => null, 'failed' => false]; - } - - /** - * 获取下个任务 - * @param string $queue - * @return Job - */ - protected function getNextJob($queue) - { - if (is_null($queue)) { - return Queue::pop(); - } - - foreach (explode(',', $queue) as $queue) { - if (!is_null($job = Queue::pop($queue))) { - return $job; - } - } - } - - /** - * Process a given job from the queue. - * @param \think\queue\Job $job - * @param int $maxTries - * @param int $delay - * @return array - * @throws Exception - */ - public function process(Job $job, $maxTries = 0, $delay = 0) - { - if ($maxTries > 0 && $job->attempts() > $maxTries) { - return $this->logFailedJob($job); - } - - try { - $job->fire(); - - return ['job' => $job, 'failed' => false]; - } catch (Exception $e) { - if (!$job->isDeleted()) { - $job->release($delay); - } - - throw $e; - } - } - - /** - * Log a failed job into storage. - * @param \Think\Queue\Job $job - * @return array - */ - protected function logFailedJob(Job $job) - { - if (!$job->isDeleted()) { - try { - $job->delete(); - $job->failed(); - } finally { - Hook::listen('queue_failed', $job); - } - } - - return ['job' => $job, 'failed' => true]; - } - - /** - * Sleep the script for a given number of seconds. - * @param int $seconds - * @return void - */ - public function sleep($seconds) - { - sleep($seconds); - } - -} diff --git a/Server/vendor/topthink/think-queue/src/queue/command/Listen.php b/Server/vendor/topthink/think-queue/src/queue/command/Listen.php deleted file mode 100644 index 3f6cd639..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/command/Listen.php +++ /dev/null @@ -1,60 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\queue\command; - -use think\console\Command; -use think\console\Input; -use think\console\input\Option; -use think\console\Output; -use think\queue\Listener; - -class Listen extends Command -{ - /** @var Listener */ - protected $listener; - - public function configure() - { - $this->setName('queue:listen') - ->addOption('queue', null, Option::VALUE_OPTIONAL, 'The queue to listen on', null) - ->addOption('delay', null, Option::VALUE_OPTIONAL, 'Amount of time to delay failed jobs', 0) - ->addOption('memory', null, Option::VALUE_OPTIONAL, 'The memory limit in megabytes', 128) - ->addOption('timeout', null, Option::VALUE_OPTIONAL, 'Seconds a job may run before timing out', 60) - ->addOption('sleep', null, Option::VALUE_OPTIONAL, 'Seconds to wait before checking queue for jobs', 3) - ->addOption('tries', null, Option::VALUE_OPTIONAL, 'Number of times to attempt a job before logging it failed', 0) - ->setDescription('Listen to a given queue'); - } - - public function initialize(Input $input, Output $output) - { - $this->listener = new Listener(getcwd()); - $this->listener->setSleep($input->getOption('sleep')); - $this->listener->setMaxTries($input->getOption('tries')); - - $this->listener->setOutputHandler(function ($type, $line) use ($output) { - $output->write($line); - }); - } - - public function execute(Input $input, Output $output) - { - $delay = $input->getOption('delay'); - - $memory = $input->getOption('memory'); - - $timeout = $input->getOption('timeout'); - - $queue = $input->getOption('queue') ?: 'default'; - - $this->listener->listen($queue, $delay, $memory, $timeout); - } -} diff --git a/Server/vendor/topthink/think-queue/src/queue/command/Restart.php b/Server/vendor/topthink/think-queue/src/queue/command/Restart.php deleted file mode 100644 index 6e9336b8..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/command/Restart.php +++ /dev/null @@ -1,31 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\queue\command; - -use think\console\Command; -use think\console\Input; -use think\console\Output; -use think\facade\Cache; - -class Restart extends Command -{ - public function configure() - { - $this->setName('queue:restart')->setDescription('Restart queue worker daemons after their current job'); - } - - public function execute(Input $input, Output $output) - { - Cache::set('think:queue:restart', time()); - $output->writeln("Broadcasting queue restart signal."); - } -} diff --git a/Server/vendor/topthink/think-queue/src/queue/command/Subscribe.php b/Server/vendor/topthink/think-queue/src/queue/command/Subscribe.php deleted file mode 100644 index cf266ea1..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/command/Subscribe.php +++ /dev/null @@ -1,46 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\queue\command; - -use think\console\Command; -use think\console\Input; -use think\console\input\Argument; -use think\console\input\Option; -use think\console\Output; -use think\facade\Url; -use think\Queue; - -class Subscribe extends Command -{ - public function configure() - { - $this->setName('queue:subscribe') - ->setDescription('Subscribe a URL to an push queue') - ->addArgument('name', Argument::REQUIRED, 'name') - ->addArgument('url', Argument::REQUIRED, 'The URL to be subscribed.') - ->addArgument('queue', Argument::OPTIONAL, 'The URL to be subscribed.') - ->addOption('option', null, Option::VALUE_IS_ARRAY | Option::VALUE_OPTIONAL, 'the options'); - } - - public function execute(Input $input, Output $output) - { - - $url = $input->getArgument('url'); - if (!preg_match('/^https?:\/\//', $url)) { - $url = Url::build($url); - } - - Queue::subscribe($input->getArgument('name'), $url, $input->getArgument('queue'), $input->getOption('option')); - - $output->write('Queue subscriber added: ' . $input->getArgument('url') . ''); - } -} diff --git a/Server/vendor/topthink/think-queue/src/queue/command/Work.php b/Server/vendor/topthink/think-queue/src/queue/command/Work.php deleted file mode 100644 index 06fcc16b..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/command/Work.php +++ /dev/null @@ -1,210 +0,0 @@ - -// +---------------------------------------------------------------------- -namespace think\queue\command; - -use Exception; -use think\console\Command; -use think\console\Input; -use think\console\input\Option; -use think\console\Output; -use think\exception\Handle; -use think\exception\ThrowableError; -use think\facade\Cache; -use think\facade\Config; -use think\facade\Hook; -use think\queue\Job; -use think\queue\Worker; -use Throwable; - -class Work extends Command -{ - - /** - * The queue worker instance. - * @var \think\queue\Worker - */ - protected $worker; - - protected function initialize(Input $input, Output $output) - { - $this->worker = new Worker(); - } - - protected function configure() - { - $this->setName('queue:work') - ->addOption('queue', null, Option::VALUE_OPTIONAL, 'The queue to listen on') - ->addOption('daemon', null, Option::VALUE_NONE, 'Run the worker in daemon mode') - ->addOption('delay', null, Option::VALUE_OPTIONAL, 'Amount of time to delay failed jobs', 0) - ->addOption('force', null, Option::VALUE_NONE, 'Force the worker to run even in maintenance mode') - ->addOption('memory', null, Option::VALUE_OPTIONAL, 'The memory limit in megabytes', 128) - ->addOption('sleep', null, Option::VALUE_OPTIONAL, 'Number of seconds to sleep when no job is available', 3) - ->addOption('tries', null, Option::VALUE_OPTIONAL, 'Number of times to attempt a job before logging it failed', 0) - ->setDescription('Process the next job on a queue'); - } - - /** - * Execute the console command. - * @param Input $input - * @param Output $output - * @return int|null|void - */ - public function execute(Input $input, Output $output) - { - $queue = $input->getOption('queue'); - - $delay = $input->getOption('delay'); - - $memory = $input->getOption('memory'); - - if ($input->getOption('daemon')) { - Hook::listen('worker_daemon_start', $queue); - $this->daemon( - $queue, $delay, $memory, - $input->getOption('sleep'), $input->getOption('tries') - ); - } else { - $response = $this->worker->pop($queue, $delay, $input->getOption('sleep'), $input->getOption('tries')); - $this->output($response); - } - } - - protected function output($response) - { - if (!is_null($response['job'])) { - /** @var Job $job */ - $job = $response['job']; - if ($response['failed']) { - $this->output->writeln('Failed: ' . $job->getName()); - } else { - $this->output->writeln('Processed: ' . $job->getName()); - } - } - } - - /** - * 启动一个守护进程执行任务. - * - * @param string $queue - * @param int $delay - * @param int $memory - * @param int $sleep - * @param int $maxTries - * @return array - */ - protected function daemon($queue = null, $delay = 0, $memory = 128, $sleep = 3, $maxTries = 0) - { - $lastRestart = $this->getTimestampOfLastQueueRestart(); - - while (true) { - $this->runNextJobForDaemon( - $queue, $delay, $sleep, $maxTries - ); - - if ($this->memoryExceeded($memory)) { - Hook::listen('worker_memory_exceeded', $queue); - $this->stop(); - } - - if ($this->queueShouldRestart($lastRestart)) { - Hook::listen('worker_queue_restart', $queue); - $this->stop(); - } - } - } - - /** - * 以守护进程的方式执行下个任务. - * - * @param string $queue - * @param int $delay - * @param int $sleep - * @param int $maxTries - * @return void - */ - protected function runNextJobForDaemon($queue, $delay, $sleep, $maxTries) - { - try { - $response = $this->worker->pop($queue, $delay, $sleep, $maxTries); - - $this->output($response); - } catch (Exception $e) { - $this->getExceptionHandler()->report($e); - } catch (Throwable $e) { - $this->getExceptionHandler()->report(new ThrowableError($e)); - } - } - - /** - * 获取上次重启守护进程的时间 - * - * @return int|null - */ - protected function getTimestampOfLastQueueRestart() - { - return Cache::get('think:queue:restart'); - } - - /** - * 检查是否要重启守护进程 - * - * @param int|null $lastRestart - * @return bool - */ - protected function queueShouldRestart($lastRestart) - { - return $this->getTimestampOfLastQueueRestart() != $lastRestart; - } - - /** - * 检查内存是否超出 - * @param int $memoryLimit - * @return bool - */ - protected function memoryExceeded($memoryLimit) - { - return (memory_get_usage() / 1024 / 1024) >= $memoryLimit; - } - - /** - * 获取异常处理实例 - * - * @return \think\exception\Handle - */ - protected function getExceptionHandler() - { - static $handle; - - if (!$handle) { - - if ($class = Config::get('exception_handle')) { - if (class_exists($class) && is_subclass_of($class, "\\think\\exception\\Handle")) { - $handle = new $class; - } - } - if (!$handle) { - $handle = new Handle(); - } - } - - return $handle; - } - - /** - * 停止执行任务的守护进程. - * @return void - */ - public function stop() - { - die; - } - -} diff --git a/Server/vendor/topthink/think-queue/src/queue/connector/Database.php b/Server/vendor/topthink/think-queue/src/queue/connector/Database.php deleted file mode 100644 index 868ee27e..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/connector/Database.php +++ /dev/null @@ -1,169 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\queue\connector; - -use think\Db; -use think\queue\Connector; -use think\queue\job\Database as DatabaseJob; - -class Database extends Connector -{ - - protected $options = [ - 'expire' => 60, - 'default' => 'default', - 'table' => 'jobs' - ]; - - public function __construct(array $options) - { - if (!empty($options)) { - $this->options = array_merge($this->options, $options); - } - } - - public function push($job, $data = '', $queue = null) - { - return $this->pushToDatabase(0, $queue, $this->createPayload($job, $data)); - } - - public function later($delay, $job, $data = '', $queue = null) - { - return $this->pushToDatabase($delay, $queue, $this->createPayload($job, $data)); - } - - public function pop($queue = null) - { - $queue = $this->getQueue($queue); - - if (!is_null($this->options['expire'])) { - $this->releaseJobsThatHaveBeenReservedTooLong($queue); - } - - if ($job = $this->getNextAvailableJob($queue)) { - $this->markJobAsReserved($job->id); - - Db::commit(); - - return new DatabaseJob($this, $job, $queue); - } - - Db::commit(); - } - - /** - * 重新发布任务 - * - * @param string $queue - * @param \StdClass $job - * @param int $delay - * @return mixed - */ - public function release($queue, $job, $delay) - { - return $this->pushToDatabase($delay, $queue, $job->payload, $job->attempts); - } - - /** - * Push a raw payload to the database with a given delay. - * - * @param \DateTime|int $delay - * @param string|null $queue - * @param string $payload - * @param int $attempts - * @return mixed - */ - protected function pushToDatabase($delay, $queue, $payload, $attempts = 0) - { - return Db::name($this->options['table'])->insert([ - 'queue' => $this->getQueue($queue), - 'payload' => $payload, - 'attempts' => $attempts, - 'reserved' => 0, - 'reserved_at' => null, - 'available_at' => time() + $delay, - 'created_at' => time(), - ]); - } - - /** - * 获取下个有效任务 - * - * @param string|null $queue - * @return \StdClass|null - */ - protected function getNextAvailableJob($queue) - { - Db::startTrans(); - - $job = Db::name($this->options['table']) - ->lock(true) - ->where('queue', $this->getQueue($queue)) - ->where('reserved', 0) - ->where('available_at', '<=', time()) - ->order('id', 'asc') - ->find(); - - return $job ? (object) $job : null; - } - - /** - * 标记任务正在执行. - * - * @param string $id - * @return void - */ - protected function markJobAsReserved($id) - { - Db::name($this->options['table'])->where('id', $id)->update([ - 'reserved' => 1, - 'reserved_at' => time(), - ]); - } - - /** - * 重新发布超时的任务 - * - * @param string $queue - * @return void - */ - protected function releaseJobsThatHaveBeenReservedTooLong($queue) - { - $expired = time() - $this->options['expire']; - - Db::name($this->options['table']) - ->where('queue', $this->getQueue($queue)) - ->where('reserved', 1) - ->where('reserved_at', '<=', $expired) - ->update([ - 'reserved' => 0, - 'reserved_at' => null, - 'attempts' => ['inc', 1], - ]); - } - - /** - * 删除任务 - * - * @param string $id - * @return void - */ - public function deleteReserved($id) - { - Db::name($this->options['table'])->delete($id); - } - - protected function getQueue($queue) - { - return $queue ?: $this->options['default']; - } -} diff --git a/Server/vendor/topthink/think-queue/src/queue/connector/Redis.php b/Server/vendor/topthink/think-queue/src/queue/connector/Redis.php deleted file mode 100644 index c3b2b563..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/connector/Redis.php +++ /dev/null @@ -1,236 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\queue\connector; - -use Exception; -use think\helper\Str; -use think\queue\Connector; -use think\queue\job\Redis as RedisJob; - -class Redis extends Connector -{ - /** @var \Redis */ - protected $redis; - - protected $options = [ - 'expire' => 60, - 'default' => 'default', - 'host' => '127.0.0.1', - 'port' => 6379, - 'password' => '', - 'select' => 0, - 'timeout' => 0, - 'persistent' => false, - ]; - - public function __construct(array $options) - { - if (!extension_loaded('redis')) { - throw new Exception('redis扩展未安装'); - } - if (!empty($options)) { - $this->options = array_merge($this->options, $options); - } - - $func = $this->options['persistent'] ? 'pconnect' : 'connect'; - $this->redis = new \Redis; - $this->redis->$func($this->options['host'], $this->options['port'], $this->options['timeout']); - - if ('' != $this->options['password']) { - $this->redis->auth($this->options['password']); - } - - if (0 != $this->options['select']) { - $this->redis->select($this->options['select']); - } - } - - public function push($job, $data = '', $queue = null) - { - return $this->pushRaw($this->createPayload($job, $data), $queue); - } - - public function later($delay, $job, $data = '', $queue = null) - { - $payload = $this->createPayload($job, $data); - - $this->redis->zAdd($this->getQueue($queue) . ':delayed', time() + $delay, $payload); - } - - public function pop($queue = null) - { - $original = $queue ?: $this->options['default']; - - $queue = $this->getQueue($queue); - - $this->migrateExpiredJobs($queue . ':delayed', $queue, false); - - if (!is_null($this->options['expire'])) { - $this->migrateExpiredJobs($queue . ':reserved', $queue); - } - - $job = $this->redis->lPop($queue); - - if (false !== $job) { - $this->redis->zAdd($queue . ':reserved', time() + $this->options['expire'], $job); - - return new RedisJob($this, $job, $original); - } - } - - /** - * 重新发布任务 - * - * @param string $queue - * @param string $payload - * @param int $delay - * @param int $attempts - * @return void - */ - public function release($queue, $payload, $delay, $attempts) - { - $payload = $this->setMeta($payload, 'attempts', $attempts); - - $this->redis->zAdd($this->getQueue($queue) . ':delayed', time() + $delay, $payload); - } - - public function pushRaw($payload, $queue = null) - { - $this->redis->rPush($this->getQueue($queue), $payload); - - return json_decode($payload, true)['id']; - } - - protected function createPayload($job, $data = '', $queue = null) - { - $payload = $this->setMeta( - parent::createPayload($job, $data), 'id', $this->getRandomId() - ); - - return $this->setMeta($payload, 'attempts', 1); - } - - /** - * 删除任务 - * - * @param string $queue - * @param string $job - * @return void - */ - public function deleteReserved($queue, $job) - { - $this->redis->zRem($this->getQueue($queue) . ':reserved', $job); - } - - /** - * 移动延迟任务 - * - * @param string $from - * @param string $to - * @param bool $attempt - */ - public function migrateExpiredJobs($from, $to, $attempt = true) - { - $this->redis->watch($from); - - $jobs = $this->getExpiredJobs( - $from, $time = time() - ); - if (count($jobs) > 0) { - $this->transaction(function () use ($from, $to, $time, $jobs, $attempt) { - $this->removeExpiredJobs($from, $time); - $this->pushExpiredJobsOntoNewQueue($to, $jobs, $attempt); - }); - } - $this->redis->unwatch(); - } - - /** - * redis事务 - * @param \Closure $closure - */ - protected function transaction(\Closure $closure) - { - $this->redis->multi(); - try { - call_user_func($closure); - if (!$this->redis->exec()) { - $this->redis->discard(); - } - } catch (Exception $e) { - $this->redis->discard(); - } - } - - /** - * 获取所有到期任务 - * - * @param string $from - * @param int $time - * @return array - */ - protected function getExpiredJobs($from, $time) - { - return $this->redis->zRangeByScore($from, '-inf', $time); - } - - /** - * 删除过期任务 - * - * @param string $from - * @param int $time - * @return void - */ - protected function removeExpiredJobs($from, $time) - { - $this->redis->zRemRangeByScore($from, '-inf', $time); - } - - /** - * 重新发布到期任务 - * - * @param string $to - * @param array $jobs - * @param boolean $attempt - */ - protected function pushExpiredJobsOntoNewQueue($to, $jobs, $attempt = true) - { - if ($attempt) { - foreach ($jobs as &$job) { - $attempts = json_decode($job, true)['attempts']; - $job = $this->setMeta($job, 'attempts', $attempts + 1); - } - } - call_user_func_array([$this->redis, 'rPush'], array_merge([$to], $jobs)); - } - - /** - * 随机id - * - * @return string - */ - protected function getRandomId() - { - return Str::random(32); - } - - /** - * 获取队列名 - * - * @param string|null $queue - * @return string - */ - protected function getQueue($queue) - { - return 'queues:' . ($queue ?: $this->options['default']); - } -} diff --git a/Server/vendor/topthink/think-queue/src/queue/connector/Sync.php b/Server/vendor/topthink/think-queue/src/queue/connector/Sync.php deleted file mode 100644 index 2fbdedaa..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/connector/Sync.php +++ /dev/null @@ -1,57 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\queue\connector; - -use Exception; -use think\queue\Connector; -use think\queue\job\Sync as SyncJob; -use Throwable; - -class Sync extends Connector -{ - - public function push($job, $data = '', $queue = null) - { - $queueJob = $this->resolveJob($this->createPayload($job, $data, $queue)); - - try { - set_time_limit(0); - $queueJob->fire(); - } catch (Exception $e) { - $queueJob->failed(); - - throw $e; - } catch (Throwable $e) { - $queueJob->failed(); - - throw $e; - } - - return 0; - } - - public function later($delay, $job, $data = '', $queue = null) - { - return $this->push($job, $data, $queue); - } - - public function pop($queue = null) - { - - } - - protected function resolveJob($payload) - { - return new SyncJob($payload); - } - -} diff --git a/Server/vendor/topthink/think-queue/src/queue/connector/Topthink.php b/Server/vendor/topthink/think-queue/src/queue/connector/Topthink.php deleted file mode 100644 index 732da241..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/connector/Topthink.php +++ /dev/null @@ -1,223 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\queue\connector; - -use think\exception\HttpException; -use think\facade\Request; -use think\queue\Connector; -use think\queue\job\Topthink as TopthinkJob; -use think\Response; - -class Topthink extends Connector -{ - protected $options = [ - 'token' => '', - 'project_id' => '', - 'protocol' => 'https', - 'host' => 'qns.topthink.com', - 'port' => 443, - 'api_version' => 1, - 'max_retries' => 3, - 'default' => 'default', - ]; - - /** @var Request */ - protected $request; - - protected $url; - - protected $curl = null; - - protected $last_status; - - protected $headers = []; - - public function __construct(array $options) - { - if (!empty($options)) { - $this->options = array_merge($this->options, $options); - } - - $this->url = "{$this->options['protocol']}://{$this->options['host']}:{$this->options['port']}/v{$this->options['api_version']}/"; - - $this->headers['Authorization'] = "Bearer {$this->options['token']}"; - } - - public function push($job, $data = '', $queue = null) - { - return $this->pushRaw(0, $queue, $this->createPayload($job, $data)); - } - - public function later($delay, $job, $data = '', $queue = null) - { - return $this->pushRaw($delay, $queue, $this->createPayload($job, $data)); - } - - public function release($queue, $job, $delay) - { - return $this->pushRaw($delay, $queue, $job->payload, $job->attempts); - } - - public function marshal() - { - $job = new TopthinkJob($this, $this->marshalPushedJob(), Request::header('topthink-message-queue')); - if (Request::header('topthink-message-status') == 'success') { - $job->fire(); - } else { - $job->failed(); - } - return new Response('OK'); - } - - public function pushRaw($delay, $queue, $payload, $attempts = 0) - { - $queue_name = $this->getQueue($queue); - $queue = rawurlencode($queue_name); - $url = "project/{$this->options['project_id']}/queue/{$queue}/message"; - $message = [ - 'payload' => $payload, - 'attempts' => $attempts, - 'delay' => $delay, - ]; - - return $this->apiCall('POST', $url, $message)->id; - } - - public function deleteMessage($queue, $id) - { - $queue = rawurlencode($queue); - $url = "project/{$this->options['project_id']}/queue/{$queue}/message/{$id}"; - return $this->apiCall('DELETE', $url); - } - - protected function apiCall($type, $url, $params = []) - { - $url = "{$this->url}$url"; - - if (null == $this->curl) { - $this->curl = curl_init(); - } - - switch ($type = strtoupper($type)) { - case 'DELETE': - curl_setopt($this->curl, CURLOPT_URL, $url); - curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, $type); - curl_setopt($this->curl, CURLOPT_POSTFIELDS, json_encode($params)); - break; - case 'PUT': - curl_setopt($this->curl, CURLOPT_URL, $url); - curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, $type); - curl_setopt($this->curl, CURLOPT_POSTFIELDS, json_encode($params)); - break; - case 'POST': - curl_setopt($this->curl, CURLOPT_URL, $url); - curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, $type); - curl_setopt($this->curl, CURLOPT_POST, true); - curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params); - break; - case 'GET': - curl_setopt($this->curl, CURLOPT_POSTFIELDS, null); - curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, $type); - curl_setopt($this->curl, CURLOPT_HTTPGET, true); - $url .= '?' . http_build_query($params); - curl_setopt($this->curl, CURLOPT_URL, $url); - break; - } - - curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, false); - curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true); - - $headers = []; - foreach ($this->headers as $k => $v) { - if ('Connection' == $k) { - $v = 'Close'; - } - $headers[] = "$k: $v"; - } - - curl_setopt($this->curl, CURLOPT_HTTPHEADER, $headers); - curl_setopt($this->curl, CURLOPT_CONNECTTIMEOUT, 10); - - return $this->callWithRetries(); - } - - protected function callWithRetries() - { - for ($retry = 0; $retry < $this->options['max_retries']; $retry++) { - $out = curl_exec($this->curl); - if (false === $out) { - $this->reportHttpError(0, curl_error($this->curl)); - } - $this->last_status = curl_getinfo($this->curl, CURLINFO_HTTP_CODE); - - if ($this->last_status >= 200 && $this->last_status < 300) { - return self::jsonDecode($out); - } elseif ($this->last_status >= 500) { - self::waitRandomInterval($retry); - } else { - $this->reportHttpError($this->last_status, $out); - } - } - $this->reportHttpError($this->last_status, "Service unavailable"); - return; - } - - protected static function jsonDecode($response) - { - $data = json_decode($response); - - $json_error = json_last_error(); - if (JSON_ERROR_NONE != $json_error) { - throw new \RuntimeException($json_error); - } - - return $data; - } - - protected static function waitRandomInterval($retry) - { - $max_delay = pow(4, $retry) * 100 * 1000; - usleep(rand(0, $max_delay)); - } - - protected function reportHttpError($status, $text) - { - throw new HttpException($status, "http error: {$status} | {$text}"); - } - - /** - * Marshal out the pushed job and payload. - * - * @return object - */ - protected function marshalPushedJob() - { - return (object) [ - 'id' => Request::header('topthink-message-id'), - 'payload' => Request::getContent(), - 'attempts' => Request::header('topthink-message-attempts'), - ]; - } - - public function __destruct() - { - if (null != $this->curl) { - curl_close($this->curl); - $this->curl = null; - } - } - - public function pop($queue = null) - { - throw new \RuntimeException('pop queues not support for this type'); - } -} diff --git a/Server/vendor/topthink/think-queue/src/queue/job/Database.php b/Server/vendor/topthink/think-queue/src/queue/job/Database.php deleted file mode 100644 index 06064b3e..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/job/Database.php +++ /dev/null @@ -1,88 +0,0 @@ - -// +---------------------------------------------------------------------- -namespace think\queue\job; - -use think\queue\Job; -use think\queue\connector\Database as DatabaseQueue; - -class Database extends Job -{ - /** - * The database queue instance. - * @var DatabaseQueue - */ - protected $database; - - /** - * The database job payload. - * @var Object - */ - protected $job; - - public function __construct(DatabaseQueue $database, $job, $queue) - { - $this->job = $job; - $this->queue = $queue; - $this->database = $database; - $this->job->attempts = $this->job->attempts + 1; - } - - /** - * 执行任务 - * @return void - */ - public function fire() - { - $this->resolveAndFire(json_decode($this->job->payload, true)); - } - - /** - * 删除任务 - * @return void - */ - public function delete() - { - parent::delete(); - $this->database->deleteReserved($this->job->id); - } - - /** - * 重新发布任务 - * @param int $delay - * @return void - */ - public function release($delay = 0) - { - parent::release($delay); - - $this->delete(); - - $this->database->release($this->queue, $this->job, $delay); - } - - /** - * 获取当前任务尝试次数 - * @return int - */ - public function attempts() - { - return (int) $this->job->attempts; - } - - /** - * Get the raw body string for the job. - * @return string - */ - public function getRawBody() - { - return $this->job->payload; - } -} diff --git a/Server/vendor/topthink/think-queue/src/queue/job/Redis.php b/Server/vendor/topthink/think-queue/src/queue/job/Redis.php deleted file mode 100644 index 10477ce6..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/job/Redis.php +++ /dev/null @@ -1,92 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\queue\job; - -use think\queue\Job; -use think\queue\connector\Redis as RedisQueue; - -class Redis extends Job -{ - - /** - * The redis queue instance. - * @var RedisQueue - */ - protected $redis; - - /** - * The database job payload. - * @var Object - */ - protected $job; - - public function __construct(RedisQueue $redis, $job, $queue) - { - $this->job = $job; - $this->queue = $queue; - $this->redis = $redis; - } - - /** - * Fire the job. - * @return void - */ - public function fire() - { - $this->resolveAndFire(json_decode($this->getRawBody(), true)); - } - - /** - * Get the number of times the job has been attempted. - * @return int - */ - public function attempts() - { - return json_decode($this->job, true)['attempts']; - } - - /** - * Get the raw body string for the job. - * @return string - */ - public function getRawBody() - { - return $this->job; - } - - /** - * 删除任务 - * - * @return void - */ - public function delete() - { - parent::delete(); - - $this->redis->deleteReserved($this->queue, $this->job); - } - - /** - * 重新发布任务 - * - * @param int $delay - * @return void - */ - public function release($delay = 0) - { - parent::release($delay); - - $this->delete(); - - $this->redis->release($this->queue, $this->job, $delay, $this->attempts() + 1); - } -} diff --git a/Server/vendor/topthink/think-queue/src/queue/job/Sync.php b/Server/vendor/topthink/think-queue/src/queue/job/Sync.php deleted file mode 100644 index e81a758a..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/job/Sync.php +++ /dev/null @@ -1,56 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\queue\job; - -use think\queue\Job; - -class Sync extends Job -{ - /** - * The queue message data. - * - * @var string - */ - protected $payload; - - public function __construct($payload) - { - $this->payload = $payload; - } - - /** - * Fire the job. - * @return void - */ - public function fire() - { - $this->resolveAndFire(json_decode($this->payload, true)); - } - - /** - * Get the number of times the job has been attempted. - * @return int - */ - public function attempts() - { - return 1; - } - - /** - * Get the raw body string for the job. - * @return string - */ - public function getRawBody() - { - return $this->payload; - } -} diff --git a/Server/vendor/topthink/think-queue/src/queue/job/Topthink.php b/Server/vendor/topthink/think-queue/src/queue/job/Topthink.php deleted file mode 100644 index b98b59c1..00000000 --- a/Server/vendor/topthink/think-queue/src/queue/job/Topthink.php +++ /dev/null @@ -1,85 +0,0 @@ - -// +---------------------------------------------------------------------- - -namespace think\queue\job; - -use think\queue\Job; -use think\queue\connector\Topthink as TopthinkQueue; - -class Topthink extends Job -{ - - /** - * The Iron queue instance. - * - * @var TopthinkQueue - */ - protected $topthink; - - /** - * The IronMQ message instance. - * - * @var object - */ - protected $job; - - public function __construct(TopthinkQueue $topthink, $job, $queue) - { - $this->topthink = $topthink; - $this->job = $job; - $this->queue = $queue; - $this->job->attempts = $this->job->attempts + 1; - } - - /** - * Fire the job. - * @return void - */ - public function fire() - { - $this->resolveAndFire(json_decode($this->job->payload, true)); - } - - /** - * Get the number of times the job has been attempted. - * @return int - */ - public function attempts() - { - return (int) $this->job->attempts; - } - - public function delete() - { - parent::delete(); - - $this->topthink->deleteMessage($this->queue, $this->job->id); - } - - public function release($delay = 0) - { - parent::release($delay); - - $this->delete(); - - $this->topthink->release($this->queue, $this->job, $delay); - } - - /** - * Get the raw body string for the job. - * @return string - */ - public function getRawBody() - { - return $this->job->payload; - } - -}