From b69804db0ffaf05bc50ef9a5cc15049606a1a657 Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Fri, 7 Jul 2023 14:42:27 +1200 Subject: [PATCH] Revert "Updating Guzzle for security" This reverts commit f9fef21621d865dc090fe7542bfb5098b68b18c6. --- composer.json | 5 +- composer.lock | 124 ++++++++-------- vendor/autoload.php | 5 - vendor/composer/ClassLoader.php | 113 ++------------- vendor/composer/InstalledVersions.php | 27 +--- vendor/composer/autoload_classmap.php | 2 +- vendor/composer/autoload_files.php | 2 +- vendor/composer/autoload_namespaces.php | 2 +- vendor/composer/autoload_psr4.php | 2 +- vendor/composer/autoload_real.php | 40 ++++-- vendor/composer/installed.json | 134 ++++++++++-------- vendor/composer/installed.php | 84 +++++------ vendor/composer/platform_check.php | 4 +- vendor/guzzlehttp/guzzle/CHANGELOG.md | 92 +----------- vendor/guzzlehttp/guzzle/README.md | 14 +- vendor/guzzlehttp/guzzle/composer.json | 10 +- vendor/guzzlehttp/guzzle/src/Client.php | 38 +++-- .../guzzle/src/Cookie/CookieJar.php | 26 ++-- .../guzzle/src/Cookie/CookieJarInterface.php | 2 +- .../guzzle/src/Cookie/SessionCookieJar.php | 2 +- .../guzzle/src/Cookie/SetCookie.php | 84 +++-------- .../guzzle/src/Handler/CurlFactory.php | 79 +++-------- .../guzzle/src/Handler/CurlMultiHandler.php | 3 +- .../guzzle/src/Handler/EasyHandle.php | 2 +- .../guzzle/src/Handler/HeaderProcessor.php | 4 +- .../guzzle/src/Handler/MockHandler.php | 3 +- .../guzzle/src/Handler/StreamHandler.php | 66 +++------ vendor/guzzlehttp/guzzle/src/HandlerStack.php | 12 +- .../guzzle/src/MessageFormatter.php | 15 +- vendor/guzzlehttp/guzzle/src/Middleware.php | 20 +-- .../guzzle/src/PrepareBodyMiddleware.php | 1 - .../guzzle/src/RedirectMiddleware.php | 8 +- .../guzzlehttp/guzzle/src/RequestOptions.php | 16 +-- .../guzzlehttp/guzzle/src/RetryMiddleware.php | 7 +- vendor/guzzlehttp/guzzle/src/Utils.php | 22 +-- vendor/guzzlehttp/guzzle/src/functions.php | 8 +- .../guzzle/src/functions_include.php | 2 +- vendor/guzzlehttp/promises/CHANGELOG.md | 15 +- vendor/guzzlehttp/promises/Makefile | 13 ++ vendor/guzzlehttp/promises/README.md | 57 ++++---- vendor/guzzlehttp/promises/composer.json | 5 + vendor/guzzlehttp/promises/src/Each.php | 2 +- .../guzzlehttp/promises/src/EachPromise.php | 8 ++ vendor/guzzlehttp/promises/src/Utils.php | 2 +- vendor/guzzlehttp/psr7/CHANGELOG.md | 34 +---- vendor/guzzlehttp/psr7/README.md | 28 +--- vendor/guzzlehttp/psr7/composer.json | 5 +- vendor/guzzlehttp/psr7/src/Header.php | 2 +- vendor/guzzlehttp/psr7/src/LazyOpenStream.php | 10 +- vendor/guzzlehttp/psr7/src/Message.php | 2 +- vendor/guzzlehttp/psr7/src/MessageTrait.php | 13 +- .../guzzlehttp/psr7/src/MultipartStream.php | 2 +- vendor/guzzlehttp/psr7/src/ServerRequest.php | 8 +- vendor/guzzlehttp/psr7/src/Uri.php | 8 +- vendor/psr/http-factory/.pullapprove.yml | 7 + vendor/psr/http-message/README.md | 5 +- vendor/psr/http-message/composer.json | 4 +- .../psr/http-message/src/MessageInterface.php | 16 +-- .../psr/http-message/src/RequestInterface.php | 10 +- .../http-message/src/ResponseInterface.php | 4 +- .../src/ServerRequestInterface.php | 8 +- .../psr/http-message/src/StreamInterface.php | 12 +- .../src/UploadedFileInterface.php | 4 +- vendor/psr/http-message/src/UriInterface.php | 17 +-- vendor/symfony/deprecation-contracts/LICENSE | 2 +- .../deprecation-contracts/function.php | 2 +- 66 files changed, 515 insertions(+), 870 deletions(-) create mode 100644 vendor/guzzlehttp/promises/Makefile create mode 100644 vendor/psr/http-factory/.pullapprove.yml diff --git a/composer.json b/composer.json index ca2f21e94..b9a15319b 100644 --- a/composer.json +++ b/composer.json @@ -3,11 +3,12 @@ "php": ">=7.2.5", "google/apiclient": "^2.13.1", "google/apiclient-services": "^0.221", + "guzzlehttp/guzzle": "^7.0", + "guzzlehttp/promises": "1.5.1", "google/analytics-data": "^0.9.4", "google/analytics-admin": "^0.10.0", "phpseclib/phpseclib": "^3.0.19", - "phpseclib/bcmath_compat": "^2.0", - "guzzlehttp/guzzle": "^7.7" + "phpseclib/bcmath_compat": "^2.0" }, "replace": { "monolog/monolog": "*" diff --git a/composer.lock b/composer.lock index c63cb6d0b..e54a21fe5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ee6bb2a91313c20928e8404ab1a1b7bd", + "content-hash": "510d06ce275fba076d7301417c4680f2", "packages": [ { "name": "firebase/php-jwt", @@ -617,22 +617,22 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.7.0", + "version": "7.5.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5" + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5", - "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0", - "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "guzzlehttp/promises": "^1.5", + "guzzlehttp/psr7": "^1.9 || ^2.4", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -643,8 +643,7 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", - "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", - "php-http/message-factory": "^1.1", + "php-http/client-integration-tests": "^3.0", "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, @@ -658,6 +657,9 @@ "bamarni-bin": { "bin-links": true, "forward-command": false + }, + "branch-alias": { + "dev-master": "7.5-dev" } }, "autoload": { @@ -723,7 +725,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.7.0" + "source": "https://github.com/guzzle/guzzle/tree/7.5.0" }, "funding": [ { @@ -739,20 +741,20 @@ "type": "tidelift" } ], - "time": "2023-05-21T14:04:53+00:00" + "time": "2022-08-28T15:39:27+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.3", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e" + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/67ab6e18aaa14d753cc148911d273f6e6cb6721e", - "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e", + "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", "shasum": "" }, "require": { @@ -762,6 +764,11 @@ "symfony/phpunit-bridge": "^4.4 || ^5.1" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, "autoload": { "files": [ "src/functions_include.php" @@ -802,7 +809,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.3" + "source": "https://github.com/guzzle/promises/tree/1.5.1" }, "funding": [ { @@ -818,26 +825,26 @@ "type": "tidelift" } ], - "time": "2023-05-21T12:31:43+00:00" + "time": "2021-10-22T20:56:57+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.5.0", + "version": "2.4.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6" + "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379", + "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", + "psr/http-message": "^1.0", "ralouphie/getallheaders": "^3.0" }, "provide": { @@ -857,6 +864,9 @@ "bamarni-bin": { "bin-links": true, "forward-command": false + }, + "branch-alias": { + "dev-master": "2.4-dev" } }, "autoload": { @@ -918,7 +928,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.5.0" + "source": "https://github.com/guzzle/psr7/tree/2.4.1" }, "funding": [ { @@ -934,7 +944,7 @@ "type": "tidelift" } ], - "time": "2023-04-17T16:11:26+00:00" + "time": "2022-08-28T14:45:39+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -1276,21 +1286,21 @@ }, { "name": "psr/http-client", - "version": "1.0.2", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", "shasum": "" }, "require": { "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0 || ^2.0" + "psr/http-message": "^1.0" }, "type": "library", "extra": { @@ -1310,7 +1320,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "description": "Common interface for HTTP clients", @@ -1322,27 +1332,27 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/1.0.2" + "source": "https://github.com/php-fig/http-client/tree/master" }, - "time": "2023-04-10T20:12:12+00:00" + "time": "2020-06-29T06:28:15+00:00" }, { "name": "psr/http-factory", - "version": "1.0.2", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", "shasum": "" }, "require": { "php": ">=7.0.0", - "psr/http-message": "^1.0 || ^2.0" + "psr/http-message": "^1.0" }, "type": "library", "extra": { @@ -1362,7 +1372,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "description": "Common interfaces for PSR-7 HTTP message factories", @@ -1377,31 +1387,31 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + "source": "https://github.com/php-fig/http-factory/tree/master" }, - "time": "2023-04-10T20:10:41+00:00" + "time": "2019-04-30T12:38:16+00:00" }, { "name": "psr/http-message", - "version": "1.1", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { @@ -1430,9 +1440,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/1.1" + "source": "https://github.com/php-fig/http-message/tree/master" }, - "time": "2023-04-04T09:50:52+00:00" + "time": "2016-08-06T14:39:51+00:00" }, { "name": "ralouphie/getallheaders", @@ -1480,25 +1490,25 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -1527,7 +1537,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" }, "funding": [ { @@ -1543,7 +1553,7 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2022-01-02T09:53:40+00:00" } ], "packages-dev": [], @@ -1556,5 +1566,5 @@ "php": ">=7.2.5" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.1.0" } diff --git a/vendor/autoload.php b/vendor/autoload.php index 3b7075adb..a90e2cb44 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -2,11 +2,6 @@ // autoload.php @generated by Composer -if (PHP_VERSION_ID < 50600) { - echo '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; - exit(1); -} - require_once __DIR__ . '/composer/autoload_real.php'; return ComposerAutoloaderInitbfe0ce4af7932a343124a58229b00de0::getLoader(); diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index afef3fa2a..6d0c3f2d0 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -42,75 +42,30 @@ */ class ClassLoader { - /** @var ?string */ private $vendorDir; // PSR-4 - /** - * @var array[] - * @psalm-var array> - */ private $prefixLengthsPsr4 = array(); - /** - * @var array[] - * @psalm-var array> - */ private $prefixDirsPsr4 = array(); - /** - * @var array[] - * @psalm-var array - */ private $fallbackDirsPsr4 = array(); // PSR-0 - /** - * @var array[] - * @psalm-var array> - */ private $prefixesPsr0 = array(); - /** - * @var array[] - * @psalm-var array - */ private $fallbackDirsPsr0 = array(); - /** @var bool */ private $useIncludePath = false; - - /** - * @var string[] - * @psalm-var array - */ private $classMap = array(); - - /** @var bool */ private $classMapAuthoritative = false; - - /** - * @var bool[] - * @psalm-var array - */ private $missingClasses = array(); - - /** @var ?string */ private $apcuPrefix; - /** - * @var self[] - */ private static $registeredLoaders = array(); - /** - * @param ?string $vendorDir - */ public function __construct($vendorDir = null) { $this->vendorDir = $vendorDir; } - /** - * @return string[] - */ public function getPrefixes() { if (!empty($this->prefixesPsr0)) { @@ -120,47 +75,28 @@ public function getPrefixes() return array(); } - /** - * @return array[] - * @psalm-return array> - */ public function getPrefixesPsr4() { return $this->prefixDirsPsr4; } - /** - * @return array[] - * @psalm-return array - */ public function getFallbackDirs() { return $this->fallbackDirsPsr0; } - /** - * @return array[] - * @psalm-return array - */ public function getFallbackDirsPsr4() { return $this->fallbackDirsPsr4; } - /** - * @return string[] Array of classname => path - * @psalm-return array - */ public function getClassMap() { return $this->classMap; } /** - * @param string[] $classMap Class to filename map - * @psalm-param array $classMap - * - * @return void + * @param array $classMap Class to filename map */ public function addClassMap(array $classMap) { @@ -175,11 +111,9 @@ public function addClassMap(array $classMap) * 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 string[]|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - * - * @return void + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories */ public function add($prefix, $paths, $prepend = false) { @@ -222,13 +156,11 @@ public function add($prefix, $paths, $prepend = false) * 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 string[]|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories * * @throws \InvalidArgumentException - * - * @return void */ public function addPsr4($prefix, $paths, $prepend = false) { @@ -272,10 +204,8 @@ public function addPsr4($prefix, $paths, $prepend = false) * 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 string[]|string $paths The PSR-0 base directories - * - * @return void + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories */ public function set($prefix, $paths) { @@ -290,12 +220,10 @@ public function set($prefix, $paths) * 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 string[]|string $paths The PSR-4 base directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories * * @throws \InvalidArgumentException - * - * @return void */ public function setPsr4($prefix, $paths) { @@ -315,8 +243,6 @@ public function setPsr4($prefix, $paths) * Turns on searching the include path for class files. * * @param bool $useIncludePath - * - * @return void */ public function setUseIncludePath($useIncludePath) { @@ -339,8 +265,6 @@ public function getUseIncludePath() * that have not been registered with the class map. * * @param bool $classMapAuthoritative - * - * @return void */ public function setClassMapAuthoritative($classMapAuthoritative) { @@ -361,8 +285,6 @@ public function isClassMapAuthoritative() * APCu prefix to use to cache found/not-found classes, if the extension is enabled. * * @param string|null $apcuPrefix - * - * @return void */ public function setApcuPrefix($apcuPrefix) { @@ -383,8 +305,6 @@ public function getApcuPrefix() * Registers this instance as an autoloader. * * @param bool $prepend Whether to prepend the autoloader or not - * - * @return void */ public function register($prepend = false) { @@ -404,8 +324,6 @@ public function register($prepend = false) /** * Unregisters this instance as an autoloader. - * - * @return void */ public function unregister() { @@ -485,11 +403,6 @@ public static function getRegisteredLoaders() return self::$registeredLoaders; } - /** - * @param string $class - * @param string $ext - * @return string|false - */ private function findFileWithExtension($class, $ext) { // PSR-4 lookup @@ -561,10 +474,6 @@ private function findFileWithExtension($class, $ext) * Scope isolated include. * * Prevents access to $this/self from included files. - * - * @param string $file - * @return void - * @private */ function includeFile($file) { diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php index c6b54af7b..b3a4e1611 100644 --- a/vendor/composer/InstalledVersions.php +++ b/vendor/composer/InstalledVersions.php @@ -20,27 +20,12 @@ * * See also https://getcomposer.org/doc/07-runtime.md#installed-versions * - * To require its presence, you can require `composer-runtime-api ^2.0` - * - * @final + * To require it's presence, you can require `composer-runtime-api ^2.0` */ 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 - */ private static $installed; - - /** - * @var bool|null - */ private static $canGetVendors; - - /** - * @var array[] - * @psalm-var array}> - */ private static $installedByVendor = array(); /** @@ -243,7 +228,7 @@ public static function getInstallPath($packageName) /** * @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} */ public static function getRootPackage() { @@ -257,7 +242,7 @@ public static function getRootPackage() * * @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}, versions: array} */ public static function getRawData() { @@ -280,7 +265,7 @@ public static function getRawData() * 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 +288,7 @@ public static function getAllRawData() * @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}, versions: array} $data */ public static function reload($data) { @@ -313,7 +298,7 @@ public static function reload($data) /** * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ private static function getInstalled() { diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index c15ab2ecc..dd7b353c1 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -2,7 +2,7 @@ // autoload_classmap.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 98d2e77b6..e806ec27f 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -2,7 +2,7 @@ // autoload_files.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index 15a2ff3ad..b7fc0125d 100644 --- a/vendor/composer/autoload_namespaces.php +++ b/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/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index af7bbfc5a..dfd98abe2 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -2,7 +2,7 @@ // autoload_psr4.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 70043d59c..36ecdb38c 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -25,15 +25,38 @@ public static function getLoader() require __DIR__ . '/platform_check.php'; spl_autoload_register(array('ComposerAutoloaderInitbfe0ce4af7932a343124a58229b00de0', '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('ComposerAutoloaderInitbfe0ce4af7932a343124a58229b00de0', 'loadClassLoader')); - require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitbfe0ce4af7932a343124a58229b00de0::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\ComposerStaticInitbfe0ce4af7932a343124a58229b00de0::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); - $includeFiles = \Composer\Autoload\ComposerStaticInitbfe0ce4af7932a343124a58229b00de0::$files; + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInitbfe0ce4af7932a343124a58229b00de0::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } foreach ($includeFiles as $fileIdentifier => $file) { composerRequirebfe0ce4af7932a343124a58229b00de0($fileIdentifier, $file); } @@ -42,16 +65,11 @@ public static function getLoader() } } -/** - * @param string $fileIdentifier - * @param string $file - * @return void - */ function composerRequirebfe0ce4af7932a343124a58229b00de0($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; } } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 56f442488..6f43a37b6 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -647,23 +647,23 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.7.0", - "version_normalized": "7.7.0.0", + "version": "7.5.0", + "version_normalized": "7.5.0.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5" + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5", - "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0", - "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "guzzlehttp/promises": "^1.5", + "guzzlehttp/psr7": "^1.9 || ^2.4", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -674,8 +674,7 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", - "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", - "php-http/message-factory": "^1.1", + "php-http/client-integration-tests": "^3.0", "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, @@ -684,12 +683,15 @@ "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, - "time": "2023-05-21T14:04:53+00:00", + "time": "2022-08-28T15:39:27+00:00", "type": "library", "extra": { "bamarni-bin": { "bin-links": true, "forward-command": false + }, + "branch-alias": { + "dev-master": "7.5-dev" } }, "installation-source": "dist", @@ -756,7 +758,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.7.0" + "source": "https://github.com/guzzle/guzzle/tree/7.5.0" }, "funding": [ { @@ -776,17 +778,17 @@ }, { "name": "guzzlehttp/promises", - "version": "1.5.3", - "version_normalized": "1.5.3.0", + "version": "1.5.1", + "version_normalized": "1.5.1.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e" + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/67ab6e18aaa14d753cc148911d273f6e6cb6721e", - "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e", + "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", "shasum": "" }, "require": { @@ -795,8 +797,13 @@ "require-dev": { "symfony/phpunit-bridge": "^4.4 || ^5.1" }, - "time": "2023-05-21T12:31:43+00:00", + "time": "2021-10-22T20:56:57+00:00", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, "installation-source": "dist", "autoload": { "files": [ @@ -838,7 +845,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.3" + "source": "https://github.com/guzzle/promises/tree/1.5.1" }, "funding": [ { @@ -858,23 +865,23 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.5.0", - "version_normalized": "2.5.0.0", + "version": "2.4.1", + "version_normalized": "2.4.1.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6" + "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379", + "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", + "psr/http-message": "^1.0", "ralouphie/getallheaders": "^3.0" }, "provide": { @@ -889,12 +896,15 @@ "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, - "time": "2023-04-17T16:11:26+00:00", + "time": "2022-08-28T14:45:39+00:00", "type": "library", "extra": { "bamarni-bin": { "bin-links": true, "forward-command": false + }, + "branch-alias": { + "dev-master": "2.4-dev" } }, "installation-source": "dist", @@ -957,7 +967,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.5.0" + "source": "https://github.com/guzzle/psr7/tree/2.4.1" }, "funding": [ { @@ -1330,24 +1340,24 @@ }, { "name": "psr/http-client", - "version": "1.0.2", - "version_normalized": "1.0.2.0", + "version": "1.0.1", + "version_normalized": "1.0.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", "shasum": "" }, "require": { "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0 || ^2.0" + "psr/http-message": "^1.0" }, - "time": "2023-04-10T20:12:12+00:00", + "time": "2020-06-29T06:28:15+00:00", "type": "library", "extra": { "branch-alias": { @@ -1367,7 +1377,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "description": "Common interface for HTTP clients", @@ -1379,30 +1389,30 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/1.0.2" + "source": "https://github.com/php-fig/http-client/tree/master" }, "install-path": "../psr/http-client" }, { "name": "psr/http-factory", - "version": "1.0.2", - "version_normalized": "1.0.2.0", + "version": "1.0.1", + "version_normalized": "1.0.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", "shasum": "" }, "require": { "php": ">=7.0.0", - "psr/http-message": "^1.0 || ^2.0" + "psr/http-message": "^1.0" }, - "time": "2023-04-10T20:10:41+00:00", + "time": "2019-04-30T12:38:16+00:00", "type": "library", "extra": { "branch-alias": { @@ -1422,7 +1432,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "description": "Common interfaces for PSR-7 HTTP message factories", @@ -1437,33 +1447,33 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + "source": "https://github.com/php-fig/http-factory/tree/master" }, "install-path": "../psr/http-factory" }, { "name": "psr/http-message", - "version": "1.1", - "version_normalized": "1.1.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": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": ">=5.3.0" }, - "time": "2023-04-04T09:50:52+00:00", + "time": "2016-08-06T14:39:51+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.0.x-dev" } }, "installation-source": "dist", @@ -1493,7 +1503,7 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/1.1" + "source": "https://github.com/php-fig/http-message/tree/master" }, "install-path": "../psr/http-message" }, @@ -1546,27 +1556,27 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", - "version_normalized": "3.3.0.0", + "version": "v2.5.2", + "version_normalized": "2.5.2.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.1" }, - "time": "2023-05-23T14:45:45+00:00", + "time": "2022-01-02T09:53:40+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -1596,7 +1606,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" }, "funding": [ { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 861701ebc..cf34a4f1d 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -1,157 +1,157 @@ array( - 'name' => '__root__', 'pretty_version' => 'dev-4.x-dev', 'version' => 'dev-4.x-dev', - 'reference' => 'd40a7bcb6c1b3a6d464786ef7e4882ad766514f7', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), + 'reference' => '8b4875466ab0aeb61b2e336c942a34967b8b20b0', + 'name' => '__root__', 'dev' => true, ), 'versions' => array( '__root__' => array( 'pretty_version' => 'dev-4.x-dev', 'version' => 'dev-4.x-dev', - 'reference' => 'd40a7bcb6c1b3a6d464786ef7e4882ad766514f7', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), + 'reference' => '8b4875466ab0aeb61b2e336c942a34967b8b20b0', 'dev_requirement' => false, ), 'firebase/php-jwt' => array( 'pretty_version' => 'v6.2.0', 'version' => '6.2.0.0', - 'reference' => 'd28e6df83830252650da4623c78aaaf98fb385f3', 'type' => 'library', 'install_path' => __DIR__ . '/../firebase/php-jwt', 'aliases' => array(), + 'reference' => 'd28e6df83830252650da4623c78aaaf98fb385f3', 'dev_requirement' => false, ), 'google/analytics-admin' => array( 'pretty_version' => 'v0.10.0', 'version' => '0.10.0.0', - 'reference' => '7f8af98407f00236c76ef51b6b6adb7a251edbe6', 'type' => 'library', 'install_path' => __DIR__ . '/../google/analytics-admin', 'aliases' => array(), + 'reference' => '7f8af98407f00236c76ef51b6b6adb7a251edbe6', 'dev_requirement' => false, ), 'google/analytics-data' => array( 'pretty_version' => 'v0.9.4', 'version' => '0.9.4.0', - 'reference' => 'f1da5ed9be985794d7738cfe3f3a3db59e6ce511', 'type' => 'library', 'install_path' => __DIR__ . '/../google/analytics-data', 'aliases' => array(), + 'reference' => 'f1da5ed9be985794d7738cfe3f3a3db59e6ce511', 'dev_requirement' => false, ), 'google/apiclient' => array( 'pretty_version' => 'v2.13.1', 'version' => '2.13.1.0', - 'reference' => '895749dd4f14c349ca0b4aad020ff973f961e519', 'type' => 'library', 'install_path' => __DIR__ . '/../google/apiclient', 'aliases' => array(), + 'reference' => '895749dd4f14c349ca0b4aad020ff973f961e519', 'dev_requirement' => false, ), 'google/apiclient-services' => array( 'pretty_version' => 'v0.221.0', 'version' => '0.221.0.0', - 'reference' => '55fb77c4dcb7ec2b41128d41815b3aac65ddfadb', 'type' => 'library', 'install_path' => __DIR__ . '/../google/apiclient-services', 'aliases' => array(), + 'reference' => '55fb77c4dcb7ec2b41128d41815b3aac65ddfadb', 'dev_requirement' => false, ), 'google/auth' => array( 'pretty_version' => 'v1.21.0', 'version' => '1.21.0.0', - 'reference' => '73392bad2eb6852eea9084b6bbdec752515cb849', 'type' => 'library', 'install_path' => __DIR__ . '/../google/auth', 'aliases' => array(), + 'reference' => '73392bad2eb6852eea9084b6bbdec752515cb849', 'dev_requirement' => false, ), 'google/common-protos' => array( 'pretty_version' => '2.1.0', 'version' => '2.1.0.0', - 'reference' => '4bad82f73a10f8ea4e6d078da93406a16c996044', 'type' => 'library', 'install_path' => __DIR__ . '/../google/common-protos', 'aliases' => array(), + 'reference' => '4bad82f73a10f8ea4e6d078da93406a16c996044', 'dev_requirement' => false, ), 'google/gax' => array( 'pretty_version' => 'v1.15.0', 'version' => '1.15.0.0', - 'reference' => '68dfafe585650ea7b054b60864f10f7ce33ffe48', 'type' => 'library', 'install_path' => __DIR__ . '/../google/gax', 'aliases' => array(), + 'reference' => '68dfafe585650ea7b054b60864f10f7ce33ffe48', 'dev_requirement' => false, ), 'google/grpc-gcp' => array( 'pretty_version' => 'v0.2.0', 'version' => '0.2.0.0', - 'reference' => '2465c2273e11ada1e95155aa1e209f3b8f03c314', 'type' => 'library', 'install_path' => __DIR__ . '/../google/grpc-gcp', 'aliases' => array(), + 'reference' => '2465c2273e11ada1e95155aa1e209f3b8f03c314', 'dev_requirement' => false, ), 'google/longrunning' => array( 'pretty_version' => 'v0.1.0', 'version' => '0.1.0.0', - 'reference' => 'd2ddbe3acf5db2692a7b515597640cf3905a534a', 'type' => 'library', 'install_path' => __DIR__ . '/../google/longrunning', 'aliases' => array(), + 'reference' => 'd2ddbe3acf5db2692a7b515597640cf3905a534a', 'dev_requirement' => false, ), 'google/protobuf' => array( 'pretty_version' => 'v3.22.2', 'version' => '3.22.2.0', - 'reference' => 'ff28a64946708e13f2be627b5e5561f247ecf95c', 'type' => 'library', 'install_path' => __DIR__ . '/../google/protobuf', 'aliases' => array(), + 'reference' => 'ff28a64946708e13f2be627b5e5561f247ecf95c', 'dev_requirement' => false, ), 'grpc/grpc' => array( 'pretty_version' => '1.42.0', 'version' => '1.42.0.0', - 'reference' => '9fa44f104cb92e924d4da547323a97f3d8aca6d4', 'type' => 'library', 'install_path' => __DIR__ . '/../grpc/grpc', 'aliases' => array(), + 'reference' => '9fa44f104cb92e924d4da547323a97f3d8aca6d4', 'dev_requirement' => false, ), 'guzzlehttp/guzzle' => array( - 'pretty_version' => '7.7.0', - 'version' => '7.7.0.0', - 'reference' => 'fb7566caccf22d74d1ab270de3551f72a58399f5', + 'pretty_version' => '7.5.0', + 'version' => '7.5.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', 'aliases' => array(), + 'reference' => 'b50a2a1251152e43f6a37f0fa053e730a67d25ba', 'dev_requirement' => false, ), 'guzzlehttp/promises' => array( - 'pretty_version' => '1.5.3', - 'version' => '1.5.3.0', - 'reference' => '67ab6e18aaa14d753cc148911d273f6e6cb6721e', + '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.5.0', - 'version' => '2.5.0.0', - 'reference' => 'b635f279edd83fc275f822a1188157ffea568ff6', + 'pretty_version' => '2.4.1', + 'version' => '2.4.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/psr7', 'aliases' => array(), + 'reference' => '69568e4293f4fa993f3b0e51c9723e1e17c41379', 'dev_requirement' => false, ), 'monolog/monolog' => array( @@ -163,55 +163,55 @@ 'paragonie/constant_time_encoding' => array( 'pretty_version' => 'v2.5.0', 'version' => '2.5.0.0', - 'reference' => '9229e15f2e6ba772f0c55dd6986c563b937170a8', 'type' => 'library', 'install_path' => __DIR__ . '/../paragonie/constant_time_encoding', 'aliases' => array(), + 'reference' => '9229e15f2e6ba772f0c55dd6986c563b937170a8', 'dev_requirement' => false, ), 'paragonie/random_compat' => array( 'pretty_version' => 'v9.99.100', 'version' => '9.99.100.0', - 'reference' => '996434e5492cb4c3edcb9168db6fbb1359ef965a', 'type' => 'library', 'install_path' => __DIR__ . '/../paragonie/random_compat', 'aliases' => array(), + 'reference' => '996434e5492cb4c3edcb9168db6fbb1359ef965a', 'dev_requirement' => false, ), 'phpseclib/bcmath_compat' => array( 'pretty_version' => '2.0.1', 'version' => '2.0.1.0', - 'reference' => '2ffea8bfe1702b4535a7b3c2649c4301968e9a3c', 'type' => 'library', 'install_path' => __DIR__ . '/../phpseclib/bcmath_compat', 'aliases' => array(), + 'reference' => '2ffea8bfe1702b4535a7b3c2649c4301968e9a3c', 'dev_requirement' => false, ), 'phpseclib/phpseclib' => array( 'pretty_version' => '3.0.19', 'version' => '3.0.19.0', - 'reference' => 'cc181005cf548bfd8a4896383bb825d859259f95', 'type' => 'library', 'install_path' => __DIR__ . '/../phpseclib/phpseclib', 'aliases' => array(), + 'reference' => 'cc181005cf548bfd8a4896383bb825d859259f95', 'dev_requirement' => false, ), 'psr/cache' => array( 'pretty_version' => '1.0.1', 'version' => '1.0.1.0', - 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/cache', 'aliases' => array(), + 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8', 'dev_requirement' => false, ), 'psr/http-client' => array( - 'pretty_version' => '1.0.2', - 'version' => '1.0.2.0', - 'reference' => '0955afe48220520692d2d09f7ab7e0f93ffd6a31', + 'pretty_version' => '1.0.1', + 'version' => '1.0.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-client', 'aliases' => array(), + 'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621', 'dev_requirement' => false, ), 'psr/http-client-implementation' => array( @@ -221,12 +221,12 @@ ), ), 'psr/http-factory' => array( - 'pretty_version' => '1.0.2', - 'version' => '1.0.2.0', - 'reference' => 'e616d01114759c4c489f93b099585439f795fe35', + 'pretty_version' => '1.0.1', + 'version' => '1.0.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-factory', 'aliases' => array(), + 'reference' => '12ac7fcd07e5b077433f5f2bee95b3a771bf61be', 'dev_requirement' => false, ), 'psr/http-factory-implementation' => array( @@ -236,12 +236,12 @@ ), ), 'psr/http-message' => array( - 'pretty_version' => '1.1', - 'version' => '1.1.0.0', - 'reference' => 'cb6ce4845ce34a8ad9e68117c10ee90a29919eba', + '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( @@ -253,19 +253,19 @@ 'ralouphie/getallheaders' => array( 'pretty_version' => '3.0.3', 'version' => '3.0.3.0', - 'reference' => '120b605dfeb996808c31b6477290a714d356e822', 'type' => 'library', 'install_path' => __DIR__ . '/../ralouphie/getallheaders', 'aliases' => array(), + 'reference' => '120b605dfeb996808c31b6477290a714d356e822', 'dev_requirement' => false, ), 'symfony/deprecation-contracts' => array( - 'pretty_version' => 'v3.3.0', - 'version' => '3.3.0.0', - 'reference' => '7c3aff79d10325257a001fcf92d991f24fc967cf', + 'pretty_version' => 'v2.5.2', + 'version' => '2.5.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), + 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66', 'dev_requirement' => false, ), ), diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php index 4c3a5d68f..a8b98d5ce 100644 --- a/vendor/composer/platform_check.php +++ b/vendor/composer/platform_check.php @@ -4,8 +4,8 @@ $issues = array(); -if (!(PHP_VERSION_ID >= 80100)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.'; +if (!(PHP_VERSION_ID >= 70205)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.5". You are running ' . PHP_VERSION . '.'; } if ($issues) { diff --git a/vendor/guzzlehttp/guzzle/CHANGELOG.md b/vendor/guzzlehttp/guzzle/CHANGELOG.md index 1144eb763..12949ba67 100644 --- a/vendor/guzzlehttp/guzzle/CHANGELOG.md +++ b/vendor/guzzlehttp/guzzle/CHANGELOG.md @@ -2,52 +2,6 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version. - -## 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 @@ -55,30 +9,20 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - Support PHP 8.2 - Add request to delay closure params - ## 7.4.5 - 2022-06-20 -### Fixed - * 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 - * 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 - * Fix cross-domain cookie leakage - ## 7.4.2 - 2022-03-20 ### Fixed @@ -87,7 +31,6 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - Reject non-HTTP schemes in StreamHandler - Set a default ssl.peer_name context in StreamHandler to allow `force_ip_resolve` - ## 7.4.1 - 2021-12-06 ### Changed @@ -99,7 +42,6 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - Only close curl handle if it's done [#2950](https://github.com/guzzle/guzzle/pull/2950) - ## 7.4.0 - 2021-10-18 ### Added @@ -117,7 +59,6 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - 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 @@ -130,7 +71,6 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - 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 @@ -153,7 +93,6 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - Using environment variable GUZZLE_CURL_SELECT_TIMEOUT [#2786](https://github.com/guzzle/guzzle/pull/2786) - ## 7.1.1 - 2020-09-30 ### Fixed @@ -165,7 +104,6 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - We dont connect curl `sink` on HEAD requests. - Removed some PHP 5 workarounds - ## 7.1.0 - 2020-09-22 ### Added @@ -188,17 +126,14 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - `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 @@ -206,7 +141,6 @@ No changes since 7.0.0-rc1. * 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 @@ -232,7 +166,6 @@ No changes since 7.0.0-rc1. * 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. @@ -266,18 +199,15 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * `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) - ## 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) @@ -287,13 +217,11 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * 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 * 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) @@ -306,7 +234,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 @@ -348,14 +275,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 @@ -363,7 +289,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: @@ -374,7 +299,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`. @@ -394,7 +318,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 @@ -410,7 +333,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 @@ -445,7 +367,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 @@ -463,7 +384,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 `&` @@ -472,7 +392,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. @@ -497,7 +416,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` @@ -508,7 +426,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 @@ -561,7 +478,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 @@ -572,7 +488,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. @@ -593,7 +508,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 @@ -608,7 +522,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 @@ -630,7 +543,6 @@ object). string on a URL: Now allowing many more characters to be present in the query string without being percent encoded. See https://tools.ietf.org/html/rfc3986#appendix-A - ## 5.0.1 - 2014-10-16 Bugfix release. @@ -642,7 +554,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. @@ -724,7 +635,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. diff --git a/vendor/guzzlehttp/guzzle/README.md b/vendor/guzzlehttp/guzzle/README.md index 0786462b3..f287fa98d 100644 --- a/vendor/guzzlehttp/guzzle/README.md +++ b/vendor/guzzlehttp/guzzle/README.md @@ -60,13 +60,13 @@ composer require guzzlehttp/guzzle ## Version Guidance -| 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 only | `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.3 | +| 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 diff --git a/vendor/guzzlehttp/guzzle/composer.json b/vendor/guzzlehttp/guzzle/composer.json index 3207f8c3a..f369ce67e 100644 --- a/vendor/guzzlehttp/guzzle/composer.json +++ b/vendor/guzzlehttp/guzzle/composer.json @@ -53,8 +53,8 @@ "require": { "php": "^7.2.5 || ^8.0", "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0", - "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "guzzlehttp/promises": "^1.5", + "guzzlehttp/psr7": "^1.9 || ^2.4", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" }, @@ -64,8 +64,7 @@ "require-dev": { "ext-curl": "*", "bamarni/composer-bin-plugin": "^1.8.1", - "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", - "php-http/message-factory": "^1.1", + "php-http/client-integration-tests": "^3.0", "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, @@ -85,6 +84,9 @@ "bamarni-bin": { "bin-links": true, "forward-command": false + }, + "branch-alias": { + "dev-master": "7.5-dev" } }, "autoload": { diff --git a/vendor/guzzlehttp/guzzle/src/Client.php b/vendor/guzzlehttp/guzzle/src/Client.php index 9b0d71070..58f1d891a 100644 --- a/vendor/guzzlehttp/guzzle/src/Client.php +++ b/vendor/guzzlehttp/guzzle/src/Client.php @@ -120,14 +120,13 @@ public function sendAsync(RequestInterface $request, array $options = []): Promi public function send(RequestInterface $request, array $options = []): ResponseInterface { $options[RequestOptions::SYNCHRONOUS] = true; - return $this->sendAsync($request, $options)->wait(); } /** * The HttpClient PSR (PSR-18) specify this method. * - * {@inheritDoc} + * @inheritDoc */ public function sendRequest(RequestInterface $request): ResponseInterface { @@ -185,7 +184,6 @@ public function requestAsync(string $method, $uri = '', array $options = []): Pr public function request(string $method, $uri = '', array $options = []): ResponseInterface { $options[RequestOptions::SYNCHRONOUS] = true; - return $this->requestAsync($method, $uri, $options)->wait(); } @@ -230,11 +228,11 @@ private function configureDefaults(array $config): void { $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' => false, ]; // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set. @@ -356,10 +354,10 @@ private function applyOptions(RequestInterface $request, array &$options): Reque 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.'); + . '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'], '', '&'); unset($options['form_params']); @@ -405,7 +403,7 @@ private function applyOptions(RequestInterface $request, array &$options): Reque // 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']['Authorization'] = 'Basic ' - .\base64_encode("$value[0]:$value[1]"); + . \base64_encode("$value[0]:$value[1]"); break; case 'digest': // @todo: Do not rely on curl @@ -439,17 +437,13 @@ private function applyOptions(RequestInterface $request, array &$options): Reque } } - if (isset($options['version'])) { - $modify['version'] = $options['version']; - } - $request = Psr7\Utils::modifyRequest($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']['Content-Type'] = 'multipart/form-data; boundary=' - .$request->getBody()->getBoundary(); + . $request->getBody()->getBoundary(); } // Merge in conditional headers if they are not present. @@ -475,9 +469,9 @@ private function applyOptions(RequestInterface $request, array &$options): Reque private function invalidBody(): InvalidArgumentException { 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.'); + . '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.'); } } diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php index b4ced5a1a..9985a9814 100644 --- a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php +++ b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php @@ -50,10 +50,10 @@ public static function fromArray(array $cookies, string $domain): self $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 ])); } @@ -97,7 +97,7 @@ public function getCookieByName(string $name): ?SetCookie } /** - * {@inheritDoc} + * @inheritDoc */ public function toArray(): array { @@ -107,13 +107,12 @@ public function toArray(): array } /** - * {@inheritDoc} + * @inheritDoc */ public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void { if (!$domain) { $this->cookies = []; - return; } elseif (!$path) { $this->cookies = \array_filter( @@ -143,7 +142,7 @@ static function (SetCookie $cookie) use ($path, $domain, $name) { } /** - * {@inheritDoc} + * @inheritDoc */ public function clearSessionCookies(): void { @@ -156,7 +155,7 @@ static function (SetCookie $cookie): bool { } /** - * {@inheritDoc} + * @inheritDoc */ public function setCookie(SetCookie $cookie): bool { @@ -171,10 +170,9 @@ public function setCookie(SetCookie $cookie): bool $result = $cookie->validate(); if ($result !== true) { if ($this->strictMode) { - throw new \RuntimeException('Invalid cookie: '.$result); + throw new \RuntimeException('Invalid cookie: ' . $result); } $this->removeCookieIfEmpty($cookie); - return false; } @@ -255,7 +253,7 @@ public function extractCookies(RequestInterface $request, ResponseInterface $res /** * Computes cookie path following RFC 6265 section 5.1.4 * - * @see https://tools.ietf.org/html/rfc6265#section-5.1.4 + * @link https://tools.ietf.org/html/rfc6265#section-5.1.4 */ private function getCookiePathFromRequest(RequestInterface $request): string { @@ -291,8 +289,8 @@ public function withCookieHeader(RequestInterface $request): RequestInterface !$cookie->isExpired() && (!$cookie->getSecure() || $scheme === 'https') ) { - $values[] = $cookie->getName().'=' - .$cookie->getValue(); + $values[] = $cookie->getName() . '=' + . $cookie->getValue(); } } diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php index 50bc36398..7df374b5b 100644 --- a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php +++ b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php @@ -13,7 +13,7 @@ * necessary. Subclasses are also responsible for storing and retrieving * cookies from a file, database, etc. * - * @see https://docs.python.org/2/library/cookielib.html Inspiration + * @link https://docs.python.org/2/library/cookielib.html Inspiration * @extends \IteratorAggregate */ interface CookieJarInterface extends \Countable, \IteratorAggregate diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php b/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php index cb3e67c6a..5d51ca982 100644 --- a/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php +++ b/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php @@ -71,7 +71,7 @@ protected function load(): void $this->setCookie(new SetCookie($cookie)); } } elseif (\strlen($data)) { - throw new \RuntimeException('Invalid cookie data'); + throw new \RuntimeException("Invalid cookie data"); } } } diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php index d74915bed..a613c77bf 100644 --- a/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php +++ b/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php @@ -11,15 +11,15 @@ class SetCookie * @var array */ private static $defaults = [ - 'Name' => 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 ]; /** @@ -58,13 +58,7 @@ public static function fromString(string $cookie): self } 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; - } + $data[$search] = $value; continue 2; } } @@ -80,49 +74,13 @@ public static function fromString(string $cookie): self */ 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]; + /** @var array|null $replaced will be null in case of replace error */ + $replaced = \array_replace(self::$defaults, $data); + if ($replaced === null) { + throw new \InvalidArgumentException('Unable to replace the default values for the Cookie.'); } + $this->data = $replaced; // Extract the Expires value and turn it into a UNIX timestamp if needed if (!$this->getExpires() && $this->getMaxAge()) { // Calculate the Expires date @@ -134,13 +92,13 @@ public function __construct(array $data = []) 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}") . '; '; } } } @@ -436,7 +394,7 @@ public function matchesDomain(string $domain): bool return false; } - return (bool) \preg_match('/\.'.\preg_quote($cookieDomain, '/').'$/', $domain); + return (bool) \preg_match('/\.' . \preg_quote($cookieDomain, '/') . '$/', $domain); } /** @@ -465,8 +423,8 @@ public function validate() $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 diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php index 3a6a8db26..0c45089f1 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php @@ -51,7 +51,7 @@ public function create(RequestInterface $request, array $options): EasyHandle unset($options['curl']['body_as_string']); } - $easy = new EasyHandle(); + $easy = new EasyHandle; $easy->request = $request; $easy->options = $options; $conf = $this->getDefaultConf($easy); @@ -161,11 +161,11 @@ private static function finishError(callable $handler, EasyHandle $easy, CurlFac private static function createRejection(EasyHandle $easy, array $ctx): PromiseInterface { static $connectionErrors = [ - \CURLE_OPERATION_TIMEOUTED => true, + \CURLE_OPERATION_TIMEOUTED => true, \CURLE_COULDNT_RESOLVE_HOST => true, - \CURLE_COULDNT_CONNECT => true, - \CURLE_SSL_CONNECT_ERROR => true, - \CURLE_GOT_NOTHING => true, + \CURLE_COULDNT_CONNECT => true, + \CURLE_SSL_CONNECT_ERROR => true, + \CURLE_GOT_NOTHING => true, ]; if ($easy->createResponseException) { @@ -219,12 +219,12 @@ private static function createRejection(EasyHandle $easy, array $ctx): PromiseIn private function getDefaultConf(EasyHandle $easy): array { $conf = [ - '_headers' => $easy->request->getHeaders(), - \CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(), - \CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''), + '_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, + \CURLOPT_HEADER => false, + \CURLOPT_CONNECTTIMEOUT => 150, ]; if (\defined('CURLOPT_PROTOCOLS')) { @@ -250,7 +250,6 @@ private function applyMethod(EasyHandle $easy, array &$conf): void if ($size === null || $size > 0) { $this->applyBody($easy->request, $easy->options, $conf); - return; } @@ -342,7 +341,6 @@ private function removeHeader(string $name, array &$options): void foreach (\array_keys($options['_headers']) as $key) { if (!\strcasecmp($key, $name)) { unset($options['_headers'][$key]); - return; } } @@ -445,41 +443,13 @@ private function applyHandlerOptions(EasyHandle $easy, array &$conf): void $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 { + if (!isset($options['proxy']['no']) || !Utils::isHostInNoProxy($host, $options['proxy']['no'])) { $conf[\CURLOPT_PROXY] = $options['proxy'][$scheme]; } } } } - if (isset($options['crypto_method'])) { - if (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) { - if (!defined('CURL_SSLVERSION_TLSv1_0')) { - throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.0 not supported by your version of cURL'); - } - $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_0; - } elseif (\STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method']) { - if (!defined('CURL_SSLVERSION_TLSv1_1')) { - throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.1 not supported by your version of cURL'); - } - $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_1; - } elseif (\STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']) { - if (!defined('CURL_SSLVERSION_TLSv1_2')) { - 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 (!defined('CURL_SSLVERSION_TLSv1_3')) { - 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)) { @@ -489,8 +459,8 @@ private function applyHandlerOptions(EasyHandle $easy, array &$conf): void 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 + # 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); @@ -553,10 +523,9 @@ private static function retryFailedRewind(callable $handler, EasyHandle $easy, a } } 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); } @@ -565,15 +534,14 @@ private static function retryFailedRewind(callable $handler, EasyHandle $easy, a $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); @@ -603,7 +571,6 @@ private function createHeaderFn(EasyHandle $easy): callable $easy->createResponse(); } catch (\Exception $e) { $easy->createResponseException = $e; - return -1; } if ($onHeaders !== null) { @@ -613,7 +580,6 @@ private function createHeaderFn(EasyHandle $easy): callable // Associate the exception with the handle and trigger // a curl header write error by returning 0. $easy->onHeadersException = $e; - return -1; } } @@ -623,7 +589,6 @@ private function createHeaderFn(EasyHandle $easy): callable } else { $easy->headers[] = $value; } - return \strlen($h); }; } diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php index f0acde145..4356d0247 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php @@ -164,8 +164,7 @@ public function tick(): void \usleep(250); } - while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) { - } + while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM); $this->processMessages(); } diff --git a/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php b/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php index 1bc39f4b4..224344d7c 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php @@ -106,7 +106,7 @@ public function createResponse(): void */ 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/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php b/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php index 5554b8fa9..a0988845f 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php @@ -14,9 +14,9 @@ final class HeaderProcessor * * @param string[] $headers * - * @return array{0:string, 1:int, 2:?string, 3:array} - * * @throws \RuntimeException + * + * @return array{0:string, 1:int, 2:?string, 3:array} */ public static function parseHeaders(array $headers): array { diff --git a/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php index 77ffed521..79664e279 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php @@ -138,7 +138,6 @@ function ($reason) use ($request, $options) { if ($this->onRejected) { ($this->onRejected)($reason); } - return P\Create::rejectionFor($reason); } ); @@ -160,7 +159,7 @@ public function append(...$values): void ) { $this->queue[] = $value; } else { - throw new \TypeError('Expected a Response, Promise, Throwable or callable. Found '.Utils::describeType($value)); + throw new \TypeError('Expected a Response, Promise, Throwable or callable. Found ' . Utils::describeType($value)); } } } diff --git a/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php index 61632f564..543f825a2 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php @@ -67,7 +67,7 @@ public function __invoke(RequestInterface $request, array $options): PromiseInte 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') + || false !== \strpos($message, "connection attempt failed") ) { $e = new ConnectException($e->getMessage(), $request, $e); } else { @@ -231,10 +231,9 @@ private function createResource(callable $callback) \set_error_handler(static function ($_, $msg, $file, $line) use (&$errors): bool { $errors[] = [ 'message' => $msg, - 'file' => $file, - 'line' => $line, + 'file' => $file, + 'line' => $line ]; - return true; }); @@ -248,7 +247,7 @@ private function createResource(callable $callback) $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)); @@ -351,7 +350,6 @@ private function resolveHost(RequestInterface $request, array $options): UriInte if (false === $records || !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']) { @@ -359,8 +357,7 @@ private function resolveHost(RequestInterface $request, array $options): UriInte if (false === $records || !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'].']'); + return $uri->withHost('[' . $records[0]['ipv6'] . ']'); } } @@ -378,11 +375,11 @@ private function getDefaultContext(RequestInterface $request): array $context = [ 'http' => [ - 'method' => $request->getMethod(), - 'header' => $headers, + 'method' => $request->getMethod(), + 'header' => $headers, 'protocol_version' => $request->getProtocolVersion(), - 'ignore_errors' => true, - 'follow_location' => 0, + 'ignore_errors' => true, + 'follow_location' => 0, ], 'ssl' => [ 'peer_name' => $request->getUri()->getHost(), @@ -391,7 +388,7 @@ private function getDefaultContext(RequestInterface $request): array $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')) { @@ -475,25 +472,6 @@ private function add_timeout(RequestInterface $request, array &$options, $value, } } - /** - * @param mixed $value as passed via Request transfer options. - */ - private function add_crypto_method(RequestInterface $request, array &$options, $value, array &$params): void - { - 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. */ @@ -564,27 +542,27 @@ private function add_debug(RequestInterface $request, array &$options, $value, a } static $map = [ - \STREAM_NOTIFY_CONNECT => 'CONNECT', + \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_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']; $value = Utils::debugResource($value); - $ident = $request->getMethod().' '.$request->getUri()->withFragment(''); + $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment(''); self::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.'" '); + \fwrite($value, $args[$i] . ': "' . $v . '" '); } \fwrite($value, "\n"); } @@ -599,7 +577,7 @@ private static function addNotification(array &$params, callable $notify): void } else { $params['notification'] = self::callArray([ $params['notification'], - $notify, + $notify ]); } } diff --git a/vendor/guzzlehttp/guzzle/src/HandlerStack.php b/vendor/guzzlehttp/guzzle/src/HandlerStack.php index 1ce9c4b19..e0a1d1191 100644 --- a/vendor/guzzlehttp/guzzle/src/HandlerStack.php +++ b/vendor/guzzlehttp/guzzle/src/HandlerStack.php @@ -86,14 +86,14 @@ public function __toString() $stack = []; if ($this->handler !== null) { - $stack[] = '0) Handler: '.$this->debugCallable($this->handler); + $stack[] = "0) Handler: " . $this->debugCallable($this->handler); } $result = ''; foreach (\array_reverse($this->stack) as $tuple) { - ++$depth; + $depth++; $str = "{$depth}) Name: '{$tuple[1]}', "; - $str .= 'Function: '.$this->debugCallable($tuple[0]); + $str .= "Function: " . $this->debugCallable($tuple[0]); $result = "> {$str}\n{$result}"; $stack[] = $str; } @@ -122,7 +122,7 @@ public function setHandler(callable $handler): void */ public function hasHandler(): bool { - return $this->handler !== null; + return $this->handler !== null ; } /** @@ -266,10 +266,10 @@ private function debugCallable($fn): string 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/vendor/guzzlehttp/guzzle/src/MessageFormatter.php b/vendor/guzzlehttp/guzzle/src/MessageFormatter.php index 9b77eee83..da499547f 100644 --- a/vendor/guzzlehttp/guzzle/src/MessageFormatter.php +++ b/vendor/guzzlehttp/guzzle/src/MessageFormatter.php @@ -40,11 +40,11 @@ class MessageFormatter implements MessageFormatterInterface /** * Apache Common Log Format. * - * @see https://httpd.apache.org/docs/2.4/logs.html#common + * @link https://httpd.apache.org/docs/2.4/logs.html#common * * @var string */ - public const CLF = '{hostname} {req_header_User-Agent} - [{date_common_log}] "{method} {target} HTTP/{version}" {code} {res_header_Content-Length}'; + public const CLF = "{hostname} {req_header_User-Agent} - [{date_common_log}] \"{method} {target} HTTP/{version}\" {code} {res_header_Content-Length}"; public const DEBUG = ">>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}"; public const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}'; @@ -90,9 +90,9 @@ function (array $matches) use ($request, $response, $error, &$cache) { break; case 'req_headers': $result = \trim($request->getMethod() - .' '.$request->getRequestTarget()) - .' HTTP/'.$request->getProtocolVersion()."\r\n" - .$this->headers($request); + . ' ' . $request->getRequestTarget()) + . ' HTTP/' . $request->getProtocolVersion() . "\r\n" + . $this->headers($request); break; case 'res_headers': $result = $response ? @@ -101,7 +101,7 @@ function (array $matches) use ($request, $response, $error, &$cache) { $response->getProtocolVersion(), $response->getStatusCode(), $response->getReasonPhrase() - )."\r\n".$this->headers($response) + ) . "\r\n" . $this->headers($response) : 'NULL'; break; case 'req_body': @@ -177,7 +177,6 @@ function (array $matches) use ($request, $response, $error, &$cache) { } $cache[$matches[1]] = $result; - return $result; }, $this->template @@ -191,7 +190,7 @@ private function headers(MessageInterface $message): string { $result = ''; foreach ($message->getHeaders() as $name => $values) { - $result .= $name.': '.\implode(', ', $values)."\r\n"; + $result .= $name . ': ' . \implode(', ', $values) . "\r\n"; } return \trim($result); diff --git a/vendor/guzzlehttp/guzzle/src/Middleware.php b/vendor/guzzlehttp/guzzle/src/Middleware.php index 7e3eb6b3a..7035c77ff 100644 --- a/vendor/guzzlehttp/guzzle/src/Middleware.php +++ b/vendor/guzzlehttp/guzzle/src/Middleware.php @@ -34,12 +34,10 @@ public static function cookies(): callable } $cookieJar = $options['cookies']; $request = $cookieJar->withCookieHeader($request); - return $handler($request, $options) ->then( static function (ResponseInterface $response) use ($cookieJar, $request): ResponseInterface { $cookieJar->extractCookies($request, $response); - return $response; } ); @@ -62,7 +60,6 @@ public static function httpErrors(BodySummarizerInterface $bodySummarizer = null if (empty($options['http_errors'])) { return $handler($request, $options); } - return $handler($request, $options)->then( static function (ResponseInterface $response) use ($request, $bodySummarizer) { $code = $response->getStatusCode(); @@ -96,22 +93,20 @@ public static function history(&$container): callable return $handler($request, $options)->then( static 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) { $container[] = [ - 'request' => $request, + 'request' => $request, 'response' => null, - 'error' => $reason, - 'options' => $options, + 'error' => $reason, + 'options' => $options ]; - return P\Create::rejectionFor($reason); } ); @@ -143,7 +138,6 @@ public static function tap(callable $before = null, callable $after = null): cal if ($after) { $after($request, $options, $response); } - return $response; }; }; @@ -208,14 +202,12 @@ public static function log(LoggerInterface $logger, $formatter, string $logLevel static function ($response) use ($logger, $request, $formatter, $logLevel): ResponseInterface { $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); } ); diff --git a/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php b/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php index 0a8de8128..7ca628338 100644 --- a/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php +++ b/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php @@ -84,7 +84,6 @@ private function addExpectHeader(RequestInterface $request, array $options, arra // The expect header is unconditionally enabled if ($expect === true) { $modify['set_headers']['Expect'] = '100-Continue'; - return; } diff --git a/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php b/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php index f32808a75..f67d448be 100644 --- a/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php +++ b/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php @@ -27,10 +27,10 @@ class RedirectMiddleware * @var array */ public static $defaultSettings = [ - 'max' => 5, - 'protocols' => ['http', 'https'], - 'strict' => false, - 'referer' => false, + 'max' => 5, + 'protocols' => ['http', 'https'], + 'strict' => false, + 'referer' => false, 'track_redirects' => false, ]; diff --git a/vendor/guzzlehttp/guzzle/src/RequestOptions.php b/vendor/guzzlehttp/guzzle/src/RequestOptions.php index bf3b02b6b..20b31bc20 100644 --- a/vendor/guzzlehttp/guzzle/src/RequestOptions.php +++ b/vendor/guzzlehttp/guzzle/src/RequestOptions.php @@ -7,7 +7,7 @@ * * More documentation for each option can be found at http://guzzlephp.org/. * - * @see http://docs.guzzlephp.org/en/v6/request-options.html + * @link http://docs.guzzlephp.org/en/v6/request-options.html */ final class RequestOptions { @@ -70,22 +70,10 @@ final class RequestOptions /** * connect_timeout: (float, default=0) Float describing the number of * seconds to wait while trying to connect to a server. Use 0 to wait - * 300 seconds (the default behavior). + * indefinitely (the default behavior). */ public const CONNECT_TIMEOUT = 'connect_timeout'; - /** - * crypto_method: (int) A value describing the minimum TLS protocol - * version to use. - * - * This setting must be set to one of the - * ``STREAM_CRYPTO_METHOD_TLS*_CLIENT`` constants. PHP 7.4 or higher is - * required in order to use TLS 1.3, and cURL 7.34.0 or higher is required - * in order to specify a crypto method, with cURL 7.52.0 or higher being - * required to use TLS 1.3. - */ - public const CRYPTO_METHOD = 'crypto_method'; - /** * debug: (bool|resource) Set to true or set to a PHP stream returned by * fopen() enable debug output with the HTTP handler used to send a diff --git a/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php b/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php index 8f4d93ac4..0236a9d54 100644 --- a/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php +++ b/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php @@ -44,7 +44,7 @@ public function __construct(callable $decider, callable $nextHandler, callable $ { $this->decider = $decider; $this->nextHandler = $nextHandler; - $this->delay = $delay ?: __CLASS__.'::exponentialDelay'; + $this->delay = $delay ?: __CLASS__ . '::exponentialDelay'; } /** @@ -54,7 +54,7 @@ public function __construct(callable $decider, callable $nextHandler, callable $ */ public static function exponentialDelay(int $retries): int { - return (int) 2 ** ($retries - 1) * 1000; + return (int) \pow(2, $retries - 1) * 1000; } public function __invoke(RequestInterface $request, array $options): PromiseInterface @@ -64,7 +64,6 @@ public function __invoke(RequestInterface $request, array $options): PromiseInte } $fn = $this->nextHandler; - return $fn($request, $options) ->then( $this->onFulfilled($request, $options), @@ -86,7 +85,6 @@ private function onFulfilled(RequestInterface $request, array $options): callabl )) { return $value; } - return $this->doRetry($request, $options, $value); }; } @@ -105,7 +103,6 @@ private function onRejected(RequestInterface $req, array $options): callable )) { return P\Create::rejectionFor($reason); } - return $this->doRetry($req, $options); }; } diff --git a/vendor/guzzlehttp/guzzle/src/Utils.php b/vendor/guzzlehttp/guzzle/src/Utils.php index fcf571d6b..e355f3212 100644 --- a/vendor/guzzlehttp/guzzle/src/Utils.php +++ b/vendor/guzzlehttp/guzzle/src/Utils.php @@ -23,9 +23,9 @@ public static function describeType($input): string { switch (\gettype($input)) { case 'object': - return 'object('.\get_class($input).')'; + return 'object(' . \get_class($input) . ')'; case 'array': - return 'array('.\count($input).')'; + return 'array(' . \count($input) . ')'; default: \ob_start(); \var_dump($input); @@ -79,9 +79,9 @@ public static function debugResource($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. - * * @throws \RuntimeException if no viable Handler is available. + * + * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system. */ public static function chooseHandler(): callable { @@ -247,8 +247,8 @@ public static function isHostInNoProxy(string $host, array $noProxyArray): bool } // 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) { + $area = '.' . \ltrim($area, '.'); + if (\substr($host, -(\strlen($area))) === $area) { return true; } } @@ -269,13 +269,13 @@ public static function isHostInNoProxy(string $host, array $noProxyArray): bool * * @throws InvalidArgumentException if the JSON cannot be decoded. * - * @see https://www.php.net/manual/en/function.json-decode.php + * @link 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()); + throw new InvalidArgumentException('json_decode error: ' . \json_last_error_msg()); } return $data; @@ -290,13 +290,13 @@ public static function jsonDecode(string $json, bool $assoc = false, int $depth * * @throws InvalidArgumentException if the JSON cannot be encoded. * - * @see https://www.php.net/manual/en/function.json-encode.php + * @link 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()); + throw new InvalidArgumentException('json_encode error: ' . \json_last_error_msg()); } /** @var string */ @@ -341,7 +341,7 @@ public static function idnUriConvert(UriInterface $uri, int $options = 0): UriIn $errorMessage = 'IDN conversion failed'; if ($errors) { - $errorMessage .= ' (errors: '.implode(', ', $errors).')'; + $errorMessage .= ' (errors: ' . implode(', ', $errors) . ')'; } throw new InvalidArgumentException($errorMessage); diff --git a/vendor/guzzlehttp/guzzle/src/functions.php b/vendor/guzzlehttp/guzzle/src/functions.php index 5edc66ab1..a70d2cbf3 100644 --- a/vendor/guzzlehttp/guzzle/src/functions.php +++ b/vendor/guzzlehttp/guzzle/src/functions.php @@ -50,10 +50,10 @@ 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. - * * @throws \RuntimeException if no viable Handler is available. * + * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system. + * * @deprecated choose_handler will be removed in guzzlehttp/guzzle:8.0. Use Utils::chooseHandler instead. */ function choose_handler(): callable @@ -141,7 +141,7 @@ function is_host_in_noproxy(string $host, array $noProxyArray): bool * * @throws Exception\InvalidArgumentException if the JSON cannot be decoded. * - * @see https://www.php.net/manual/en/function.json-decode.php + * @link 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. */ function json_decode(string $json, bool $assoc = false, int $depth = 512, int $options = 0) @@ -158,7 +158,7 @@ function json_decode(string $json, bool $assoc = false, int $depth = 512, int $o * * @throws Exception\InvalidArgumentException if the JSON cannot be encoded. * - * @see https://www.php.net/manual/en/function.json-encode.php + * @link 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. */ function json_encode($value, int $options = 0, int $depth = 512): string diff --git a/vendor/guzzlehttp/guzzle/src/functions_include.php b/vendor/guzzlehttp/guzzle/src/functions_include.php index 394f95347..6636a4224 100644 --- a/vendor/guzzlehttp/guzzle/src/functions_include.php +++ b/vendor/guzzlehttp/guzzle/src/functions_include.php @@ -2,5 +2,5 @@ // Don't redefine the functions if included multiple times. if (!\function_exists('GuzzleHttp\describe_type')) { - require __DIR__.'/functions.php'; + require __DIR__ . '/functions.php'; } diff --git a/vendor/guzzlehttp/promises/CHANGELOG.md b/vendor/guzzlehttp/promises/CHANGELOG.md index 2e1a2f384..235e13bc7 100644 --- a/vendor/guzzlehttp/promises/CHANGELOG.md +++ b/vendor/guzzlehttp/promises/CHANGELOG.md @@ -1,17 +1,5 @@ # CHANGELOG -## 1.5.3 - 2023-05-21 - -### Changed - -- Removed remaining usage of deprecated functions - -## 1.5.2 - 2022-08-07 - -### Changed - -- Officially support PHP 8.2 - ## 1.5.1 - 2021-10-22 ### Fixed @@ -24,11 +12,10 @@ ### Changed - Call handler when waiting on fulfilled/rejected Promise -- Officially support PHP 8.1 ### Fixed -- Fix manually settle promises generated with `Utils::task` +- Fix manually settle promises generated with Utils::task ## 1.4.1 - 2021-02-18 diff --git a/vendor/guzzlehttp/promises/Makefile b/vendor/guzzlehttp/promises/Makefile new file mode 100644 index 000000000..8d5b3ef95 --- /dev/null +++ b/vendor/guzzlehttp/promises/Makefile @@ -0,0 +1,13 @@ +all: clean test + +test: + vendor/bin/phpunit + +coverage: + vendor/bin/phpunit --coverage-html=artifacts/coverage + +view-coverage: + open artifacts/coverage/index.html + +clean: + rm -rf artifacts/* diff --git a/vendor/guzzlehttp/promises/README.md b/vendor/guzzlehttp/promises/README.md index 1ea667ab9..c175fec76 100644 --- a/vendor/guzzlehttp/promises/README.md +++ b/vendor/guzzlehttp/promises/README.md @@ -17,7 +17,7 @@ for a general introduction to promises. - [Implementation notes](#implementation-notes) -## Features +# Features - [Promises/A+](https://promisesaplus.com/) implementation. - Promise resolution and chaining is handled iteratively, allowing for @@ -29,14 +29,15 @@ for a general introduction to promises. `GuzzleHttp\Promise\Coroutine::of()`. -## 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. @@ -59,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 @@ -90,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 @@ -120,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. @@ -137,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. @@ -192,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 @@ -245,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 @@ -272,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 @@ -280,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 @@ -345,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. @@ -362,7 +366,7 @@ $promise->then(function ($value) { ``` -### RejectedPromise +## RejectedPromise A rejected promise can be created to represent a promise that has been rejected. @@ -379,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) @@ -405,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 @@ -433,9 +437,10 @@ $loop->addPeriodicTimer(0, [$queue, 'run']); *TODO*: Perhaps adding a `futureTick()` on each tick would be faster? -## Implementation Notes +# Implementation notes + -### Promise Resolution and Chaining is Handled Iteratively +## 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. @@ -471,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 @@ -499,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 will be 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 | |----------------|----------------| @@ -533,12 +536,10 @@ for 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/vendor/guzzlehttp/promises/composer.json b/vendor/guzzlehttp/promises/composer.json index 966e3e3a8..c959fb32b 100644 --- a/vendor/guzzlehttp/promises/composer.json +++ b/vendor/guzzlehttp/promises/composer.json @@ -46,6 +46,11 @@ "test": "vendor/bin/simple-phpunit", "test-ci": "vendor/bin/simple-phpunit --coverage-text" }, + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, "config": { "preferred-install": "dist", "sort-packages": true diff --git a/vendor/guzzlehttp/promises/src/Each.php b/vendor/guzzlehttp/promises/src/Each.php index ff8efd734..1dda35499 100644 --- a/vendor/guzzlehttp/promises/src/Each.php +++ b/vendor/guzzlehttp/promises/src/Each.php @@ -78,7 +78,7 @@ public static function ofLimitAll( $concurrency, callable $onFulfilled = null ) { - return self::ofLimit( + return each_limit( $iterable, $concurrency, $onFulfilled, diff --git a/vendor/guzzlehttp/promises/src/EachPromise.php b/vendor/guzzlehttp/promises/src/EachPromise.php index 280d79950..38ecb59b1 100644 --- a/vendor/guzzlehttp/promises/src/EachPromise.php +++ b/vendor/guzzlehttp/promises/src/EachPromise.php @@ -81,8 +81,16 @@ public function promise() $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); } diff --git a/vendor/guzzlehttp/promises/src/Utils.php b/vendor/guzzlehttp/promises/src/Utils.php index e37618833..8647126d8 100644 --- a/vendor/guzzlehttp/promises/src/Utils.php +++ b/vendor/guzzlehttp/promises/src/Utils.php @@ -107,7 +107,7 @@ public static function inspectAll($promises) { $results = []; foreach ($promises as $key => $promise) { - $results[$key] = self::inspect($promise); + $results[$key] = inspect($promise); } return $results; diff --git a/vendor/guzzlehttp/psr7/CHANGELOG.md b/vendor/guzzlehttp/psr7/CHANGELOG.md index fa716c094..83d7d30dd 100644 --- a/vendor/guzzlehttp/psr7/CHANGELOG.md +++ b/vendor/guzzlehttp/psr7/CHANGELOG.md @@ -7,38 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased -## 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 @@ -135,7 +103,7 @@ Identical to the RC release. ### Removed - PHP < 7.2 support -- All functions in the `GuzzleHttp\Psr7` namespace +- All functions in the Guzzle\Psr7 namespace ## 1.8.1 - 2021-03-21 diff --git a/vendor/guzzlehttp/psr7/README.md b/vendor/guzzlehttp/psr7/README.md index 9566a7d47..eea803a02 100644 --- a/vendor/guzzlehttp/psr7/README.md +++ b/vendor/guzzlehttp/psr7/README.md @@ -8,12 +8,6 @@ functionality like query string parsing. ![Static analysis](https://github.com/guzzle/psr7/workflows/Static%20analysis/badge.svg) -# Installation - -```shell -composer require guzzlehttp/psr7 -``` - # Stream implementation This package comes with a number of stream implementations and stream @@ -251,8 +245,6 @@ class EofCallbackStream implements StreamInterface private $callback; - private $stream; - public function __construct(StreamInterface $stream, callable $cb) { $this->stream = $stream; @@ -388,28 +380,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. diff --git a/vendor/guzzlehttp/psr7/composer.json b/vendor/guzzlehttp/psr7/composer.json index d51dd622e..cd91040cf 100644 --- a/vendor/guzzlehttp/psr7/composer.json +++ b/vendor/guzzlehttp/psr7/composer.json @@ -52,7 +52,7 @@ "require": { "php": "^7.2.5 || ^8.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", + "psr/http-message": "^1.0", "ralouphie/getallheaders": "^3.0" }, "provide": { @@ -81,6 +81,9 @@ "bamarni-bin": { "bin-links": true, "forward-command": false + }, + "branch-alias": { + "dev-master": "2.4-dev" } }, "config": { diff --git a/vendor/guzzlehttp/psr7/src/Header.php b/vendor/guzzlehttp/psr7/src/Header.php index 4d7005b22..10744ed45 100644 --- a/vendor/guzzlehttp/psr7/src/Header.php +++ b/vendor/guzzlehttp/psr7/src/Header.php @@ -62,7 +62,7 @@ public static function normalize($header): array } /** - * Splits a HTTP header defined to contain a comma-separated list into + * Splits a HTTP header defined to contain comma-separated list into * each individual value. Empty values will be removed. * * Example headers include 'accept', 'cache-control' and 'if-none-match'. diff --git a/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php index f6c84904e..5618331f1 100644 --- a/vendor/guzzlehttp/psr7/src/LazyOpenStream.php +++ b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php @@ -10,6 +10,7 @@ * Lazily reads or writes to a file that is opened only after an IO operation * take place on the stream. */ +#[\AllowDynamicProperties] final class LazyOpenStream implements StreamInterface { use StreamDecoratorTrait; @@ -20,11 +21,6 @@ final class LazyOpenStream implements StreamInterface /** @var string */ private $mode; - /** - * @var StreamInterface - */ - private $stream; - /** * @param string $filename File to lazily open * @param string $mode fopen mode to use when opening the stream @@ -33,10 +29,6 @@ public function __construct(string $filename, string $mode) { $this->filename = $filename; $this->mode = $mode; - - // unsetting the property forces the first access to go through - // __get(). - unset($this->stream); } /** diff --git a/vendor/guzzlehttp/psr7/src/Message.php b/vendor/guzzlehttp/psr7/src/Message.php index c1e15f826..61c1a5dcc 100644 --- a/vendor/guzzlehttp/psr7/src/Message.php +++ b/vendor/guzzlehttp/psr7/src/Message.php @@ -77,7 +77,7 @@ public static function bodySummary(MessageInterface $message, int $truncateAt = // 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; } diff --git a/vendor/guzzlehttp/psr7/src/MessageTrait.php b/vendor/guzzlehttp/psr7/src/MessageTrait.php index 464bdfaa4..d2dc28b60 100644 --- a/vendor/guzzlehttp/psr7/src/MessageTrait.php +++ b/vendor/guzzlehttp/psr7/src/MessageTrait.php @@ -224,9 +224,12 @@ private function assertHeader($header): void )); } - if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) { + 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 + ) ); } } @@ -254,10 +257,8 @@ private function assertValue(string $value): void // 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/vendor/guzzlehttp/psr7/src/MultipartStream.php b/vendor/guzzlehttp/psr7/src/MultipartStream.php index 3e12b74d1..3ae2c84a0 100644 --- a/vendor/guzzlehttp/psr7/src/MultipartStream.php +++ b/vendor/guzzlehttp/psr7/src/MultipartStream.php @@ -34,7 +34,7 @@ final class MultipartStream implements StreamInterface */ public function __construct(array $elements = [], string $boundary = null) { - $this->boundary = $boundary ?: bin2hex(random_bytes(20)); + $this->boundary = $boundary ?: sha1(uniqid('', true)); $this->stream = $this->createStream($elements); } diff --git a/vendor/guzzlehttp/psr7/src/ServerRequest.php b/vendor/guzzlehttp/psr7/src/ServerRequest.php index b2aa382da..43cbb502e 100644 --- a/vendor/guzzlehttp/psr7/src/ServerRequest.php +++ b/vendor/guzzlehttp/psr7/src/ServerRequest.php @@ -144,10 +144,10 @@ private static function normalizeNestedFileSpec(array $files = []): array 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); } diff --git a/vendor/guzzlehttp/psr7/src/Uri.php b/vendor/guzzlehttp/psr7/src/Uri.php index 09e878d3d..5c6416ae6 100644 --- a/vendor/guzzlehttp/psr7/src/Uri.php +++ b/vendor/guzzlehttp/psr7/src/Uri.php @@ -172,14 +172,10 @@ public static function composeComponents(?string $scheme, ?string $authority, st $uri .= $scheme . ':'; } - if ($authority != '' || $scheme === 'file') { + if ($authority != ''|| $scheme === 'file') { $uri .= '//' . $authority; } - if ($authority != '' && $path != '' && $path[0] != '/') { - $path = '/' . $path; - } - $uri .= $path; if ($query != '') { @@ -735,6 +731,8 @@ private function validateState(): void 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'); } + } elseif (isset($this->path[0]) && $this->path[0] !== '/') { + throw new MalformedUriException('The path of a URI with an authority must start with a slash "/" or be empty'); } } } diff --git a/vendor/psr/http-factory/.pullapprove.yml b/vendor/psr/http-factory/.pullapprove.yml new file mode 100644 index 000000000..8cf081942 --- /dev/null +++ b/vendor/psr/http-factory/.pullapprove.yml @@ -0,0 +1,7 @@ +extends: default +reviewers: + - + name: contributors + required: 1 + teams: + - http-factory-contributors diff --git a/vendor/psr/http-message/README.md b/vendor/psr/http-message/README.md index 2668be6c3..28185338f 100644 --- a/vendor/psr/http-message/README.md +++ b/vendor/psr/http-message/README.md @@ -10,7 +10,4 @@ interface that describes a HTTP message. See the specification for more details. Usage ----- -Before reading the usage guide we recommend reading the PSR-7 interfaces method list: - -* [`PSR-7 Interfaces Method List`](docs/PSR7-Interfaces.md) -* [`PSR-7 Usage Guide`](docs/PSR7-Usage.md) \ No newline at end of file +We'll certainly need some stuff in here. \ No newline at end of file diff --git a/vendor/psr/http-message/composer.json b/vendor/psr/http-message/composer.json index 56e8c0a6d..b0d2937a0 100644 --- a/vendor/psr/http-message/composer.json +++ b/vendor/psr/http-message/composer.json @@ -11,7 +11,7 @@ } ], "require": { - "php": "^7.2 || ^8.0" + "php": ">=5.3.0" }, "autoload": { "psr-4": { @@ -20,7 +20,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.0.x-dev" } } } diff --git a/vendor/psr/http-message/src/MessageInterface.php b/vendor/psr/http-message/src/MessageInterface.php index 8cdb4ed63..dd46e5ec8 100644 --- a/vendor/psr/http-message/src/MessageInterface.php +++ b/vendor/psr/http-message/src/MessageInterface.php @@ -1,7 +1,5 @@ */ - function trigger_deprecation(string $package, string $version, string $message, mixed ...$args): void + function trigger_deprecation(string $package, string $version, string $message, ...$args): void { @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED); }