Browse Source

Merge pull request #1658 from causefx/v2-develop

V2 develop
causefx 4 years ago
parent
commit
8cbafb81e4
100 changed files with 3142 additions and 1377 deletions
  1. 2 1
      .github/workflows/stale.yml
  2. 95 14
      api/classes/organizr.class.php
  3. 2 2
      api/composer.json
  4. 237 103
      api/composer.lock
  5. 3 1
      api/config/default.php
  6. 2 2
      api/functions/organizr-functions.php
  7. 10 5
      api/functions/sso-functions.php
  8. 27 1
      api/homepage/tautulli.php
  9. 2 2
      api/homepage/transmission.php
  10. 32 2
      api/plugins/healthChecks.php
  11. 2 4
      api/plugins/js/healthChecks-settings.js
  12. 16 76
      api/v2/routes/socks.php
  13. 40 40
      api/vendor/composer/InstalledVersions.php
  14. 219 111
      api/vendor/composer/installed.json
  15. 40 40
      api/vendor/composer/installed.php
  16. 41 0
      api/vendor/composer/semver/CHANGELOG.md
  17. 1 1
      api/vendor/composer/semver/README.md
  18. 2 3
      api/vendor/composer/semver/composer.json
  19. 1 1
      api/vendor/composer/semver/src/Constraint/AbstractConstraint.php
  20. 6 10
      api/vendor/composer/semver/src/Constraint/Constraint.php
  21. 2 2
      api/vendor/composer/semver/src/Constraint/EmptyConstraint.php
  22. 4 4
      api/vendor/composer/semver/src/Constraint/MultiConstraint.php
  23. 4 4
      api/vendor/composer/semver/src/Semver.php
  24. 84 54
      api/vendor/composer/semver/src/VersionParser.php
  25. 33 1
      api/vendor/guzzlehttp/guzzle/CHANGELOG.md
  26. 7 6
      api/vendor/guzzlehttp/guzzle/composer.json
  27. 0 87
      api/vendor/guzzlehttp/guzzle/psalm.baseline.xml
  28. 0 16
      api/vendor/guzzlehttp/guzzle/psalm.xml
  29. 28 0
      api/vendor/guzzlehttp/guzzle/src/BodySummarizer.php
  30. 13 0
      api/vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php
  31. 15 14
      api/vendor/guzzlehttp/guzzle/src/Client.php
  32. 1 4
      api/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php
  33. 13 11
      api/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
  34. 59 67
      api/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php
  35. 8 13
      api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
  36. 16 23
      api/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php
  37. 42 0
      api/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php
  38. 8 13
      api/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php
  39. 6 14
      api/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php
  40. 89 83
      api/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php
  41. 4 7
      api/vendor/guzzlehttp/guzzle/src/MessageFormatter.php
  42. 1 5
      api/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php
  43. 13 12
      api/vendor/guzzlehttp/guzzle/src/Middleware.php
  44. 7 15
      api/vendor/guzzlehttp/guzzle/src/Pool.php
  45. 4 7
      api/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php
  46. 12 32
      api/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php
  47. 4 6
      api/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php
  48. 1 3
      api/vendor/guzzlehttp/guzzle/src/TransferStats.php
  49. 6 18
      api/vendor/guzzlehttp/guzzle/src/Utils.php
  50. 9 0
      api/vendor/guzzlehttp/guzzle/vendor-bin/php-cs-fixer/composer.json
  51. 10 0
      api/vendor/guzzlehttp/guzzle/vendor-bin/phpstan/composer.json
  52. 9 0
      api/vendor/guzzlehttp/guzzle/vendor-bin/psalm/composer.json
  53. 19 0
      api/vendor/guzzlehttp/promises/CHANGELOG.md
  54. 35 7
      api/vendor/guzzlehttp/promises/README.md
  55. 9 4
      api/vendor/guzzlehttp/promises/composer.json
  56. 1 0
      api/vendor/guzzlehttp/promises/src/AggregateException.php
  57. 1 0
      api/vendor/guzzlehttp/promises/src/CancellationException.php
  58. 23 5
      api/vendor/guzzlehttp/promises/src/Coroutine.php
  59. 84 0
      api/vendor/guzzlehttp/promises/src/Create.php
  60. 90 0
      api/vendor/guzzlehttp/promises/src/Each.php
  61. 48 23
      api/vendor/guzzlehttp/promises/src/EachPromise.php
  62. 6 4
      api/vendor/guzzlehttp/promises/src/FulfilledPromise.php
  63. 46 0
      api/vendor/guzzlehttp/promises/src/Is.php
  64. 33 35
      api/vendor/guzzlehttp/promises/src/Promise.php
  65. 4 0
      api/vendor/guzzlehttp/promises/src/PromiseInterface.php
  66. 1 0
      api/vendor/guzzlehttp/promises/src/PromisorInterface.php
  67. 9 5
      api/vendor/guzzlehttp/promises/src/RejectedPromise.php
  68. 2 1
      api/vendor/guzzlehttp/promises/src/RejectionException.php
  69. 3 2
      api/vendor/guzzlehttp/promises/src/TaskQueue.php
  70. 1 2
      api/vendor/guzzlehttp/promises/src/TaskQueueInterface.php
  71. 274 0
      api/vendor/guzzlehttp/promises/src/Utils.php
  72. 80 174
      api/vendor/guzzlehttp/promises/src/functions.php
  73. 16 0
      api/vendor/guzzlehttp/psr7/.github/workflows/bc.yml
  74. 30 0
      api/vendor/guzzlehttp/psr7/.github/workflows/ci.yml
  75. 37 0
      api/vendor/guzzlehttp/psr7/.github/workflows/integration.yml
  76. 29 0
      api/vendor/guzzlehttp/psr7/.github/workflows/static.yml
  77. 56 0
      api/vendor/guzzlehttp/psr7/.php_cs.dist
  78. 51 3
      api/vendor/guzzlehttp/psr7/CHANGELOG.md
  79. 193 129
      api/vendor/guzzlehttp/psr7/README.md
  80. 3 3
      api/vendor/guzzlehttp/psr7/composer.json
  81. 6 1
      api/vendor/guzzlehttp/psr7/src/AppendStream.php
  82. 5 0
      api/vendor/guzzlehttp/psr7/src/BufferStream.php
  83. 6 3
      api/vendor/guzzlehttp/psr7/src/CachingStream.php
  84. 3 0
      api/vendor/guzzlehttp/psr7/src/DroppingStream.php
  85. 5 0
      api/vendor/guzzlehttp/psr7/src/FnStream.php
  86. 71 0
      api/vendor/guzzlehttp/psr7/src/Header.php
  87. 4 0
      api/vendor/guzzlehttp/psr7/src/InflateStream.php
  88. 5 2
      api/vendor/guzzlehttp/psr7/src/LazyOpenStream.php
  89. 4 2
      api/vendor/guzzlehttp/psr7/src/LimitStream.php
  90. 252 0
      api/vendor/guzzlehttp/psr7/src/Message.php
  91. 4 3
      api/vendor/guzzlehttp/psr7/src/MessageTrait.php
  92. 140 0
      api/vendor/guzzlehttp/psr7/src/MimeType.php
  93. 12 7
      api/vendor/guzzlehttp/psr7/src/MultipartStream.php
  94. 4 1
      api/vendor/guzzlehttp/psr7/src/NoSeekStream.php
  95. 14 9
      api/vendor/guzzlehttp/psr7/src/PumpStream.php
  96. 113 0
      api/vendor/guzzlehttp/psr7/src/Query.php
  97. 4 3
      api/vendor/guzzlehttp/psr7/src/Request.php
  98. 4 3
      api/vendor/guzzlehttp/psr7/src/Response.php
  99. 1 0
      api/vendor/guzzlehttp/psr7/src/Rfc7230.php
  100. 9 6
      api/vendor/guzzlehttp/psr7/src/ServerRequest.php

+ 2 - 1
.github/workflows/stale.yml

@@ -6,6 +6,7 @@ on:
 
 
 jobs:
 jobs:
   stale:
   stale:
+    if: github.event.label.name != 'bypass-activity'
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     steps:
       - uses: actions/stale@v3
       - uses: actions/stale@v3
@@ -16,4 +17,4 @@ jobs:
           close-issue-label: "closed-no-issue-activity"
           close-issue-label: "closed-no-issue-activity"
           stale-issue-label: "no-issue-activity"
           stale-issue-label: "no-issue-activity"
           days-before-stale: 15
           days-before-stale: 15
-          days-before-close: 90
+          days-before-close: 90

+ 95 - 14
api/classes/organizr.class.php

@@ -60,7 +60,7 @@ class Organizr
 	
 	
 	// ===================================
 	// ===================================
 	// Organizr Version
 	// Organizr Version
-	public $version = '2.1.308';
+	public $version = '2.1.333';
 	// ===================================
 	// ===================================
 	// Quick php Version check
 	// Quick php Version check
 	public $minimumPHP = '7.3';
 	public $minimumPHP = '7.3';
@@ -2040,6 +2040,10 @@ class Organizr
 							'name' => 'Allow Same Origin',
 							'name' => 'Allow Same Origin',
 							'value' => 'allow-same-origin'
 							'value' => 'allow-same-origin'
 						),
 						),
+						array(
+							'name' => 'Allow Orientation Lock',
+							'value' => 'allow-orientation-lock'
+						),
 						array(
 						array(
 							'name' => 'Allow Pointer Lock',
 							'name' => 'Allow Pointer Lock',
 							'value' => 'allow-pointer-lock'
 							'value' => 'allow-pointer-lock'
@@ -2047,10 +2051,15 @@ class Organizr
 						array(
 						array(
 							'name' => 'Allow Scripts',
 							'name' => 'Allow Scripts',
 							'value' => 'allow-scripts'
 							'value' => 'allow-scripts'
-						), array(
+						),
+						array(
 							'name' => 'Allow Popups',
 							'name' => 'Allow Popups',
 							'value' => 'allow-popups'
 							'value' => 'allow-popups'
 						),
 						),
+						array(
+							'name' => 'Allow Popups To Escape Sandbox',
+							'value' => 'allow-popups-to-escape-sandbox'
+						),
 						array(
 						array(
 							'name' => 'Allow Modals',
 							'name' => 'Allow Modals',
 							'value' => 'allow-modals'
 							'value' => 'allow-modals'
@@ -2059,6 +2068,10 @@ class Organizr
 							'name' => 'Allow Top Navigation',
 							'name' => 'Allow Top Navigation',
 							'value' => 'allow-top-navigation'
 							'value' => 'allow-top-navigation'
 						),
 						),
+						array(
+							'name' => 'Allow Top Navigation By User Activation',
+							'value' => 'allow-top-navigation-by-user-activation'
+						),
 						array(
 						array(
 							'name' => 'Allow Downloads',
 							'name' => 'Allow Downloads',
 							'value' => 'allow-downloads'
 							'value' => 'allow-downloads'
@@ -2266,24 +2279,31 @@ class Organizr
 			'FYI' => array(
 			'FYI' => array(
 				array(
 				array(
 					'type' => 'html',
 					'type' => 'html',
-					'label' => 'Important Information',
+					'label' => '',
 					'override' => 12,
 					'override' => 12,
 					'html' => '
 					'html' => '
-				<div class="row">
-							<div class="col-lg-12">
-								<div class="panel panel-info">
-									<div class="panel-heading">
-										<span lang="en">Notice</span>
+					<div class="row">
+						<div class="col-lg-12">
+							<div class="panel panel-danger">
+								<div class="panel-heading"><span lang="en">Please Read First</span></div>
+								<div class="panel-wrapper collapse in" aria-expanded="true">
+									<div class="panel-body">
+										<span lang="en">Using multiple SSO application will cause your Cookie Header item to increase.  If you haven\'t increased it by now, please follow this guide</span>
+										<span><a href="https://docs.organizr.app/books/troubleshooting/page/login-error-api-connection-failed" target="_blank">Cookie Header Guide</a></span>
 									</div>
 									</div>
-									<div class="panel-wrapper collapse in" aria-expanded="true">
-										<div class="panel-body">
-											<span lang="en">This is not the same as database authentication - i.e. Plex Authentication | Emby Authentication | FTP Authentication<br/>Click Main on the sub-menu above.</span>
-										</div>
+								</div>
+							</div>
+							<div class="panel panel-info">
+								<div class="panel-heading"><span lang="en">Notice</span></div>
+								<div class="panel-wrapper collapse in" aria-expanded="true">
+									<div class="panel-body">
+										<span lang="en">This is not the same as database authentication - i.e. Plex Authentication | Emby Authentication | FTP Authentication<br/>Click Main on the sub-menu above.</span>
 									</div>
 									</div>
 								</div>
 								</div>
 							</div>
 							</div>
 						</div>
 						</div>
-				'
+					</div>
+					'
 				)
 				)
 			),
 			),
 			'Plex' => array(
 			'Plex' => array(
@@ -6059,8 +6079,69 @@ class Organizr
 		';
 		';
 	}
 	}
 	
 	
-	public function socks($url, $enabled, $auth, $requestObject, $header = null, $multiple = null)
+	public function socksListing($app = null)
+	{
+		switch ($app) {
+			case 'sonarr':
+				$appDetails = [
+					'url' => 'sonarrURL',
+					'enabled' => 'sonarrSocksEnabled',
+					'auth' => 'sonarrSocksAuth',
+					'header' => 'X-Api-Key'
+				];
+				break;
+			case 'radarr':
+				$appDetails = [
+					'url' => 'radarrURL',
+					'enabled' => 'radarrSocksEnabled',
+					'auth' => 'radarrSocksAuth',
+					'header' => 'X-Api-Key'
+				];
+				break;
+			case 'lidarr':
+				$appDetails = [
+					'url' => 'lidarrURL',
+					'enabled' => 'lidarrSocksEnabled',
+					'auth' => 'lidarrSocksAuth',
+					'header' => 'X-Api-Key'
+				];
+				break;
+			case 'sabnzbd':
+				$appDetails = [
+					'url' => 'sabnzbdURL',
+					'enabled' => 'sabnzbdSocksEnabled',
+					'auth' => 'sabnzbdSocksAuth',
+					'header' => null
+				];
+				break;
+			case 'nzbget':
+				$appDetails = [
+					'url' => 'nzbgetURL',
+					'enabled' => 'nzbgetSocksEnabled',
+					'auth' => 'nzbgetSocksAuth',
+					'header' => 'Authorization'
+				];
+				break;
+			case 'tautulli':
+				$appDetails = [
+					'url' => 'tautulliURL',
+					'enabled' => 'tautulliSocksEnabled',
+					'auth' => 'tautulliSocksAuth',
+					'header' => null
+				];
+				break;
+			default:
+				$appDetails = null;
+		}
+		return $appDetails;
+	}
+	
+	public function socks($appDetails, $requestObject, $multiple = null)
 	{
 	{
+		$url = $appDetails['url'];
+		$enabled = $appDetails['enabled'];
+		$auth = $appDetails['auth'];
+		$header = $appDetails['header'];
 		$error = false;
 		$error = false;
 		if (!$this->config[$enabled]) {
 		if (!$this->config[$enabled]) {
 			$error = true;
 			$error = true;

+ 2 - 2
api/composer.json

@@ -1,9 +1,9 @@
 {
 {
   "require": {
   "require": {
     "dibi/dibi": "^3.2",
     "dibi/dibi": "^3.2",
-    "lcobucci/jwt": "^3.2",
+    "lcobucci/jwt": "3.3.1",
     "composer/semver": "^1.4",
     "composer/semver": "^1.4",
-    "phpmailer/phpmailer": "^6.0",
+    "phpmailer/phpmailer": "^6.2",
     "rmccue/requests": "^1.7",
     "rmccue/requests": "^1.7",
     "kryptonit3/sonarr": "1.0.6.1",
     "kryptonit3/sonarr": "1.0.6.1",
     "kryptonit3/couchpotato": "^1.0",
     "kryptonit3/couchpotato": "^1.0",

+ 237 - 103
api/composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
         "This file is @generated automatically"
     ],
     ],
-    "content-hash": "6c33c6a831d0034c65fe02a8df137f7c",
+    "content-hash": "a9cfe24cec195b73c109643bc90dc450",
     "packages": [
     "packages": [
         {
         {
             "name": "adldap2/adldap2",
             "name": "adldap2/adldap2",
@@ -128,24 +128,23 @@
         },
         },
         {
         {
             "name": "composer/semver",
             "name": "composer/semver",
-            "version": "1.4.2",
+            "version": "1.7.2",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/composer/semver.git",
                 "url": "https://github.com/composer/semver.git",
-                "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573"
+                "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/composer/semver/zipball/c7cb9a2095a074d131b65a8a0cd294479d785573",
-                "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573",
+                "url": "https://api.github.com/repos/composer/semver/zipball/647490bbcaf7fc4891c58f47b825eb99d19c377a",
+                "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
-                "php": "^5.3.2 || ^7.0"
+                "php": "^5.3.2 || ^7.0 || ^8.0"
             },
             },
             "require-dev": {
             "require-dev": {
-                "phpunit/phpunit": "^4.5 || ^5.0.5",
-                "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0"
+                "phpunit/phpunit": "^4.5 || ^5.0.5"
             },
             },
             "type": "library",
             "type": "library",
             "extra": {
             "extra": {
@@ -186,7 +185,26 @@
                 "validation",
                 "validation",
                 "versioning"
                 "versioning"
             ],
             ],
-            "time": "2016-08-30T16:08:34+00:00"
+            "support": {
+                "irc": "irc://irc.freenode.org/composer",
+                "issues": "https://github.com/composer/semver/issues",
+                "source": "https://github.com/composer/semver/tree/1.7.2"
+            },
+            "funding": [
+                {
+                    "url": "https://packagist.com",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/composer",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-12-03T15:47:16+00:00"
         },
         },
         {
         {
             "name": "dibi/dibi",
             "name": "dibi/dibi",
@@ -253,6 +271,10 @@
                 "sqlite",
                 "sqlite",
                 "sqlsrv"
                 "sqlsrv"
             ],
             ],
+            "support": {
+                "issues": "https://github.com/dg/dibi/issues",
+                "source": "https://github.com/dg/dibi/tree/v3.2.4"
+            },
             "time": "2020-03-26T03:05:01+00:00"
             "time": "2020-03-26T03:05:01+00:00"
         },
         },
         {
         {
@@ -440,32 +462,33 @@
         },
         },
         {
         {
             "name": "guzzlehttp/guzzle",
             "name": "guzzlehttp/guzzle",
-            "version": "7.1.1",
+            "version": "7.3.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/guzzle/guzzle.git",
                 "url": "https://github.com/guzzle/guzzle.git",
-                "reference": "7427d6f99df41cc01f33cd59832f721c150ffdf3"
+                "reference": "7008573787b430c1c1f650e3722d9bba59967628"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7427d6f99df41cc01f33cd59832f721c150ffdf3",
-                "reference": "7427d6f99df41cc01f33cd59832f721c150ffdf3",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7008573787b430c1c1f650e3722d9bba59967628",
+                "reference": "7008573787b430c1c1f650e3722d9bba59967628",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
                 "ext-json": "*",
                 "ext-json": "*",
-                "guzzlehttp/promises": "^1.0",
-                "guzzlehttp/psr7": "^1.6.1",
-                "php": "^7.2.5",
+                "guzzlehttp/promises": "^1.4",
+                "guzzlehttp/psr7": "^1.7 || ^2.0",
+                "php": "^7.2.5 || ^8.0",
                 "psr/http-client": "^1.0"
                 "psr/http-client": "^1.0"
             },
             },
             "provide": {
             "provide": {
                 "psr/http-client-implementation": "1.0"
                 "psr/http-client-implementation": "1.0"
             },
             },
             "require-dev": {
             "require-dev": {
+                "bamarni/composer-bin-plugin": "^1.4.1",
                 "ext-curl": "*",
                 "ext-curl": "*",
-                "php-http/client-integration-tests": "dev-phpunit8",
-                "phpunit/phpunit": "^8.5.5",
+                "php-http/client-integration-tests": "^3.0",
+                "phpunit/phpunit": "^8.5.5 || ^9.3.5",
                 "psr/log": "^1.1"
                 "psr/log": "^1.1"
             },
             },
             "suggest": {
             "suggest": {
@@ -476,7 +499,7 @@
             "type": "library",
             "type": "library",
             "extra": {
             "extra": {
                 "branch-alias": {
                 "branch-alias": {
-                    "dev-master": "7.1-dev"
+                    "dev-master": "7.3-dev"
                 }
                 }
             },
             },
             "autoload": {
             "autoload": {
@@ -518,7 +541,7 @@
             ],
             ],
             "support": {
             "support": {
                 "issues": "https://github.com/guzzle/guzzle/issues",
                 "issues": "https://github.com/guzzle/guzzle/issues",
-                "source": "https://github.com/guzzle/guzzle/tree/7.1.1"
+                "source": "https://github.com/guzzle/guzzle/tree/7.3.0"
             },
             },
             "funding": [
             "funding": [
                 {
                 {
@@ -538,27 +561,27 @@
                     "type": "github"
                     "type": "github"
                 }
                 }
             ],
             ],
-            "time": "2020-09-30T08:51:17+00:00"
+            "time": "2021-03-23T11:33:13+00:00"
         },
         },
         {
         {
             "name": "guzzlehttp/promises",
             "name": "guzzlehttp/promises",
-            "version": "v1.3.1",
+            "version": "1.4.1",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/guzzle/promises.git",
                 "url": "https://github.com/guzzle/promises.git",
-                "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
+                "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
-                "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
+                "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
+                "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
-                "php": ">=5.5.0"
+                "php": ">=5.5"
             },
             },
             "require-dev": {
             "require-dev": {
-                "phpunit/phpunit": "^4.0"
+                "symfony/phpunit-bridge": "^4.4 || ^5.1"
             },
             },
             "type": "library",
             "type": "library",
             "extra": {
             "extra": {
@@ -589,20 +612,24 @@
             "keywords": [
             "keywords": [
                 "promise"
                 "promise"
             ],
             ],
-            "time": "2016-12-20T10:07:11+00:00"
+            "support": {
+                "issues": "https://github.com/guzzle/promises/issues",
+                "source": "https://github.com/guzzle/promises/tree/1.4.1"
+            },
+            "time": "2021-03-07T09:25:29+00:00"
         },
         },
         {
         {
             "name": "guzzlehttp/psr7",
             "name": "guzzlehttp/psr7",
-            "version": "1.6.1",
+            "version": "1.8.2",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/guzzle/psr7.git",
                 "url": "https://github.com/guzzle/psr7.git",
-                "reference": "239400de7a173fe9901b9ac7c06497751f00727a"
+                "reference": "dc960a912984efb74d0a90222870c72c87f10c91"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
-                "reference": "239400de7a173fe9901b9ac7c06497751f00727a",
+                "url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91",
+                "reference": "dc960a912984efb74d0a90222870c72c87f10c91",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
@@ -615,15 +642,15 @@
             },
             },
             "require-dev": {
             "require-dev": {
                 "ext-zlib": "*",
                 "ext-zlib": "*",
-                "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
+                "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
             },
             },
             "suggest": {
             "suggest": {
-                "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
+                "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
             },
             },
             "type": "library",
             "type": "library",
             "extra": {
             "extra": {
                 "branch-alias": {
                 "branch-alias": {
-                    "dev-master": "1.6-dev"
+                    "dev-master": "1.7-dev"
                 }
                 }
             },
             },
             "autoload": {
             "autoload": {
@@ -660,7 +687,11 @@
                 "uri",
                 "uri",
                 "url"
                 "url"
             ],
             ],
-            "time": "2019-07-01T23:21:34+00:00"
+            "support": {
+                "issues": "https://github.com/guzzle/psr7/issues",
+                "source": "https://github.com/guzzle/psr7/tree/1.8.2"
+            },
+            "time": "2021-04-26T09:17:50+00:00"
         },
         },
         {
         {
             "name": "illuminate/contracts",
             "name": "illuminate/contracts",
@@ -721,7 +752,7 @@
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
-                "guzzlehttp/guzzle": "^6.0 || ^7.0"
+                "guzzlehttp/guzzle": "^7.0"
             },
             },
             "type": "library",
             "type": "library",
             "autoload": {
             "autoload": {
@@ -757,7 +788,7 @@
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
-                "guzzlehttp/guzzle": "^6.0 || ^7.0"
+                "guzzlehttp/guzzle": "^7.0"
             },
             },
             "type": "library",
             "type": "library",
             "autoload": {
             "autoload": {
@@ -793,7 +824,7 @@
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
-                "guzzlehttp/guzzle": "^6.0 || ^7.0"
+                "guzzlehttp/guzzle": "^7.0"
             },
             },
             "type": "library",
             "type": "library",
             "autoload": {
             "autoload": {
@@ -867,6 +898,10 @@
                 "JWS",
                 "JWS",
                 "jwt"
                 "jwt"
             ],
             ],
+            "support": {
+                "issues": "https://github.com/lcobucci/jwt/issues",
+                "source": "https://github.com/lcobucci/jwt/tree/3.3"
+            },
             "time": "2019-05-24T18:30:49+00:00"
             "time": "2019-05-24T18:30:49+00:00"
         },
         },
         {
         {
@@ -884,7 +919,7 @@
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
-                "guzzlehttp/guzzle": "^6.0 || ^7.0",
+                "guzzlehttp/guzzle": "^7.0",
                 "paragonie/random_compat": "^1 || ^2 || ^9.99",
                 "paragonie/random_compat": "^1 || ^2 || ^9.99",
                 "php": "^5.6 || ^7.0 || ^8.0"
                 "php": "^5.6 || ^7.0 || ^8.0"
             },
             },
@@ -1043,6 +1078,10 @@
                 "router",
                 "router",
                 "routing"
                 "routing"
             ],
             ],
+            "support": {
+                "issues": "https://github.com/nikic/FastRoute/issues",
+                "source": "https://github.com/nikic/FastRoute/tree/master"
+            },
             "time": "2018-02-13T20:26:39+00:00"
             "time": "2018-02-13T20:26:39+00:00"
         },
         },
         {
         {
@@ -1227,20 +1266,20 @@
         },
         },
         {
         {
             "name": "paragonie/random_compat",
             "name": "paragonie/random_compat",
-            "version": "v9.99.99",
+            "version": "v9.99.100",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/paragonie/random_compat.git",
                 "url": "https://github.com/paragonie/random_compat.git",
-                "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95"
+                "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
-                "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
+                "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a",
+                "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
-                "php": "^7"
+                "php": ">= 7"
             },
             },
             "require-dev": {
             "require-dev": {
                 "phpunit/phpunit": "4.*|5.*",
                 "phpunit/phpunit": "4.*|5.*",
@@ -1268,7 +1307,12 @@
                 "pseudorandom",
                 "pseudorandom",
                 "random"
                 "random"
             ],
             ],
-            "time": "2018-07-02T15:55:56+00:00"
+            "support": {
+                "email": "info@paragonie.com",
+                "issues": "https://github.com/paragonie/random_compat/issues",
+                "source": "https://github.com/paragonie/random_compat"
+            },
+            "time": "2020-10-15T08:29:30+00:00"
         },
         },
         {
         {
             "name": "paragonie/sodium_compat",
             "name": "paragonie/sodium_compat",
@@ -1473,16 +1517,16 @@
         },
         },
         {
         {
             "name": "phpmailer/phpmailer",
             "name": "phpmailer/phpmailer",
-            "version": "v6.2.0",
+            "version": "v6.4.1",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/PHPMailer/PHPMailer.git",
                 "url": "https://github.com/PHPMailer/PHPMailer.git",
-                "reference": "e38888a75c070304ca5514197d4847a59a5c853f"
+                "reference": "9256f12d8fb0cd0500f93b19e18c356906cbed3d"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e38888a75c070304ca5514197d4847a59a5c853f",
-                "reference": "e38888a75c070304ca5514197d4847a59a5c853f",
+                "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/9256f12d8fb0cd0500f93b19e18c356906cbed3d",
+                "reference": "9256f12d8fb0cd0500f93b19e18c356906cbed3d",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
@@ -1500,7 +1544,7 @@
                 "yoast/phpunit-polyfills": "^0.2.0"
                 "yoast/phpunit-polyfills": "^0.2.0"
             },
             },
             "suggest": {
             "suggest": {
-                "ext-mbstring": "Needed to send email in multibyte encoding charset",
+                "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
                 "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
                 "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
                 "league/oauth2-google": "Needed for Google XOAUTH2 authentication",
                 "league/oauth2-google": "Needed for Google XOAUTH2 authentication",
                 "psr/log": "For optional PSR-3 debug logging",
                 "psr/log": "For optional PSR-3 debug logging",
@@ -1537,7 +1581,7 @@
             "description": "PHPMailer is a full-featured email creation and transfer class for PHP",
             "description": "PHPMailer is a full-featured email creation and transfer class for PHP",
             "support": {
             "support": {
                 "issues": "https://github.com/PHPMailer/PHPMailer/issues",
                 "issues": "https://github.com/PHPMailer/PHPMailer/issues",
-                "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.2.0"
+                "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.4.1"
             },
             },
             "funding": [
             "funding": [
                 {
                 {
@@ -1545,7 +1589,7 @@
                     "type": "github"
                     "type": "github"
                 }
                 }
             ],
             ],
-            "time": "2020-11-25T15:24:57+00:00"
+            "time": "2021-04-29T12:25:04+00:00"
         },
         },
         {
         {
             "name": "pragmarx/google2fa",
             "name": "pragmarx/google2fa",
@@ -1610,27 +1654,22 @@
         },
         },
         {
         {
             "name": "psr/container",
             "name": "psr/container",
-            "version": "1.0.0",
+            "version": "1.1.1",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/php-fig/container.git",
                 "url": "https://github.com/php-fig/container.git",
-                "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
+                "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
-                "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
+                "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
+                "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
-                "php": ">=5.3.0"
+                "php": ">=7.2.0"
             },
             },
             "type": "library",
             "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.0.x-dev"
-                }
-            },
             "autoload": {
             "autoload": {
                 "psr-4": {
                 "psr-4": {
                     "Psr\\Container\\": "src/"
                     "Psr\\Container\\": "src/"
@@ -1643,7 +1682,7 @@
             "authors": [
             "authors": [
                 {
                 {
                     "name": "PHP-FIG",
                     "name": "PHP-FIG",
-                    "homepage": "http://www.php-fig.org/"
+                    "homepage": "https://www.php-fig.org/"
                 }
                 }
             ],
             ],
             "description": "Common Container Interface (PHP FIG PSR-11)",
             "description": "Common Container Interface (PHP FIG PSR-11)",
@@ -1655,7 +1694,11 @@
                 "container-interop",
                 "container-interop",
                 "psr"
                 "psr"
             ],
             ],
-            "time": "2017-02-14T16:28:37+00:00"
+            "support": {
+                "issues": "https://github.com/php-fig/container/issues",
+                "source": "https://github.com/php-fig/container/tree/1.1.1"
+            },
+            "time": "2021-03-05T17:36:06+00:00"
         },
         },
         {
         {
             "name": "psr/http-client",
             "name": "psr/http-client",
@@ -1759,6 +1802,9 @@
                 "request",
                 "request",
                 "response"
                 "response"
             ],
             ],
+            "support": {
+                "source": "https://github.com/php-fig/http-factory/tree/master"
+            },
             "time": "2019-04-30T12:38:16+00:00"
             "time": "2019-04-30T12:38:16+00:00"
         },
         },
         {
         {
@@ -1809,6 +1855,9 @@
                 "request",
                 "request",
                 "response"
                 "response"
             ],
             ],
+            "support": {
+                "source": "https://github.com/php-fig/http-message/tree/master"
+            },
             "time": "2016-08-06T14:39:51+00:00"
             "time": "2016-08-06T14:39:51+00:00"
         },
         },
         {
         {
@@ -1862,6 +1911,10 @@
                 "response",
                 "response",
                 "server"
                 "server"
             ],
             ],
+            "support": {
+                "issues": "https://github.com/php-fig/http-server-handler/issues",
+                "source": "https://github.com/php-fig/http-server-handler/tree/master"
+            },
             "time": "2018-10-30T16:46:14+00:00"
             "time": "2018-10-30T16:46:14+00:00"
         },
         },
         {
         {
@@ -1915,20 +1968,24 @@
                 "request",
                 "request",
                 "response"
                 "response"
             ],
             ],
+            "support": {
+                "issues": "https://github.com/php-fig/http-server-middleware/issues",
+                "source": "https://github.com/php-fig/http-server-middleware/tree/master"
+            },
             "time": "2018-10-30T17:12:04+00:00"
             "time": "2018-10-30T17:12:04+00:00"
         },
         },
         {
         {
             "name": "psr/log",
             "name": "psr/log",
-            "version": "1.1.0",
+            "version": "1.1.4",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/php-fig/log.git",
                 "url": "https://github.com/php-fig/log.git",
-                "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd"
+                "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
-                "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
+                "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
+                "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
@@ -1937,7 +1994,7 @@
             "type": "library",
             "type": "library",
             "extra": {
             "extra": {
                 "branch-alias": {
                 "branch-alias": {
-                    "dev-master": "1.0.x-dev"
+                    "dev-master": "1.1.x-dev"
                 }
                 }
             },
             },
             "autoload": {
             "autoload": {
@@ -1952,7 +2009,7 @@
             "authors": [
             "authors": [
                 {
                 {
                     "name": "PHP-FIG",
                     "name": "PHP-FIG",
-                    "homepage": "http://www.php-fig.org/"
+                    "homepage": "https://www.php-fig.org/"
                 }
                 }
             ],
             ],
             "description": "Common interface for logging libraries",
             "description": "Common interface for logging libraries",
@@ -1962,7 +2019,10 @@
                 "psr",
                 "psr",
                 "psr-3"
                 "psr-3"
             ],
             ],
-            "time": "2018-11-20T15:27:04+00:00"
+            "support": {
+                "source": "https://github.com/php-fig/log/tree/1.1.4"
+            },
+            "time": "2021-05-03T11:20:27+00:00"
         },
         },
         {
         {
             "name": "psr/simple-cache",
             "name": "psr/simple-cache",
@@ -2108,27 +2168,38 @@
                 }
                 }
             ],
             ],
             "description": "A polyfill for getallheaders.",
             "description": "A polyfill for getallheaders.",
+            "support": {
+                "issues": "https://github.com/ralouphie/getallheaders/issues",
+                "source": "https://github.com/ralouphie/getallheaders/tree/develop"
+            },
             "time": "2019-03-08T08:55:37+00:00"
             "time": "2019-03-08T08:55:37+00:00"
         },
         },
         {
         {
             "name": "rmccue/requests",
             "name": "rmccue/requests",
-            "version": "v1.7.0",
+            "version": "v1.8.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
-                "url": "https://github.com/rmccue/Requests.git",
-                "reference": "87932f52ffad70504d93f04f15690cf16a089546"
+                "url": "https://github.com/WordPress/Requests.git",
+                "reference": "afbe4790e4def03581c4a0963a1e8aa01f6030f1"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/rmccue/Requests/zipball/87932f52ffad70504d93f04f15690cf16a089546",
-                "reference": "87932f52ffad70504d93f04f15690cf16a089546",
+                "url": "https://api.github.com/repos/WordPress/Requests/zipball/afbe4790e4def03581c4a0963a1e8aa01f6030f1",
+                "reference": "afbe4790e4def03581c4a0963a1e8aa01f6030f1",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
                 "php": ">=5.2"
                 "php": ">=5.2"
             },
             },
             "require-dev": {
             "require-dev": {
-                "requests/test-server": "dev-master"
+                "dealerdirect/phpcodesniffer-composer-installer": "^0.7",
+                "php-parallel-lint/php-console-highlighter": "^0.5.0",
+                "php-parallel-lint/php-parallel-lint": "^1.3",
+                "phpcompatibility/php-compatibility": "^9.0",
+                "phpunit/phpunit": "^4.8 || ^5.7 || ^6.5 || ^7.5",
+                "requests/test-server": "dev-master",
+                "squizlabs/php_codesniffer": "^3.5",
+                "wp-coding-standards/wpcs": "^2.0"
             },
             },
             "type": "library",
             "type": "library",
             "autoload": {
             "autoload": {
@@ -2147,7 +2218,7 @@
                 }
                 }
             ],
             ],
             "description": "A HTTP library written in PHP, for human beings.",
             "description": "A HTTP library written in PHP, for human beings.",
-            "homepage": "http://github.com/rmccue/Requests",
+            "homepage": "http://github.com/WordPress/Requests",
             "keywords": [
             "keywords": [
                 "curl",
                 "curl",
                 "fsockopen",
                 "fsockopen",
@@ -2157,7 +2228,11 @@
                 "iri",
                 "iri",
                 "sockets"
                 "sockets"
             ],
             ],
-            "time": "2016-10-13T00:11:37+00:00"
+            "support": {
+                "issues": "https://github.com/WordPress/Requests/issues",
+                "source": "https://github.com/WordPress/Requests/tree/v1.8.0"
+            },
+            "time": "2021-04-27T11:05:25+00:00"
         },
         },
         {
         {
             "name": "slim/psr7",
             "name": "slim/psr7",
@@ -2455,20 +2530,20 @@
         },
         },
         {
         {
             "name": "symfony/polyfill-ctype",
             "name": "symfony/polyfill-ctype",
-            "version": "v1.18.0",
+            "version": "v1.22.1",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-ctype.git",
                 "url": "https://github.com/symfony/polyfill-ctype.git",
-                "reference": "1c302646f6efc070cd46856e600e5e0684d6b454"
+                "reference": "c6c942b1ac76c82448322025e084cadc56048b4e"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454",
-                "reference": "1c302646f6efc070cd46856e600e5e0684d6b454",
+                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e",
+                "reference": "c6c942b1ac76c82448322025e084cadc56048b4e",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
-                "php": ">=5.3.3"
+                "php": ">=7.1"
             },
             },
             "suggest": {
             "suggest": {
                 "ext-ctype": "For best performance"
                 "ext-ctype": "For best performance"
@@ -2476,7 +2551,7 @@
             "type": "library",
             "type": "library",
             "extra": {
             "extra": {
                 "branch-alias": {
                 "branch-alias": {
-                    "dev-master": "1.18-dev"
+                    "dev-main": "1.22-dev"
                 },
                 },
                 "thanks": {
                 "thanks": {
                     "name": "symfony/polyfill",
                     "name": "symfony/polyfill",
@@ -2513,24 +2588,41 @@
                 "polyfill",
                 "polyfill",
                 "portable"
                 "portable"
             ],
             ],
-            "time": "2020-07-14T12:35:20+00:00"
+            "support": {
+                "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1"
+            },
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2021-01-07T16:49:33+00:00"
         },
         },
         {
         {
             "name": "symfony/polyfill-mbstring",
             "name": "symfony/polyfill-mbstring",
-            "version": "v1.14.0",
+            "version": "v1.22.1",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-mbstring.git",
                 "url": "https://github.com/symfony/polyfill-mbstring.git",
-                "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2"
+                "reference": "5232de97ee3b75b0360528dae24e73db49566ab1"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2",
-                "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2",
+                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1",
+                "reference": "5232de97ee3b75b0360528dae24e73db49566ab1",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
-                "php": ">=5.3.3"
+                "php": ">=7.1"
             },
             },
             "suggest": {
             "suggest": {
                 "ext-mbstring": "For best performance"
                 "ext-mbstring": "For best performance"
@@ -2538,7 +2630,11 @@
             "type": "library",
             "type": "library",
             "extra": {
             "extra": {
                 "branch-alias": {
                 "branch-alias": {
-                    "dev-master": "1.14-dev"
+                    "dev-main": "1.22-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
                 }
             },
             },
             "autoload": {
             "autoload": {
@@ -2572,7 +2668,24 @@
                 "portable",
                 "portable",
                 "shim"
                 "shim"
             ],
             ],
-            "time": "2020-01-13T11:15:53+00:00"
+            "support": {
+                "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1"
+            },
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2021-01-22T09:19:47+00:00"
         },
         },
         {
         {
             "name": "symfony/polyfill-php56",
             "name": "symfony/polyfill-php56",
@@ -2632,25 +2745,29 @@
         },
         },
         {
         {
             "name": "symfony/polyfill-php72",
             "name": "symfony/polyfill-php72",
-            "version": "v1.10.0",
+            "version": "v1.22.1",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php72.git",
                 "url": "https://github.com/symfony/polyfill-php72.git",
-                "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631"
+                "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9050816e2ca34a8e916c3a0ae8b9c2fccf68b631",
-                "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631",
+                "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
+                "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
-                "php": ">=5.3.3"
+                "php": ">=7.1"
             },
             },
             "type": "library",
             "type": "library",
             "extra": {
             "extra": {
                 "branch-alias": {
                 "branch-alias": {
-                    "dev-master": "1.9-dev"
+                    "dev-main": "1.22-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
                 }
             },
             },
             "autoload": {
             "autoload": {
@@ -2683,11 +2800,28 @@
                 "portable",
                 "portable",
                 "shim"
                 "shim"
             ],
             ],
-            "time": "2018-09-21T13:07:52+00:00"
+            "support": {
+                "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1"
+            },
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2021-01-07T16:49:33+00:00"
         },
         },
         {
         {
             "name": "symfony/polyfill-php80",
             "name": "symfony/polyfill-php80",
-            "version": "v1.22.0",
+            "version": "v1.22.1",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php80.git",
                 "url": "https://github.com/symfony/polyfill-php80.git",
@@ -2750,7 +2884,7 @@
                 "shim"
                 "shim"
             ],
             ],
             "support": {
             "support": {
-                "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.0"
+                "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1"
             },
             },
             "funding": [
             "funding": [
                 {
                 {

+ 3 - 1
api/config/default.php

@@ -318,7 +318,7 @@ return array(
 	'ombiLimit' => '50',
 	'ombiLimit' => '50',
 	'localIPFrom' => '',
 	'localIPFrom' => '',
 	'localIPTo' => '',
 	'localIPTo' => '',
-	'sandbox' => 'allow-presentation,allow-forms,allow-same-origin,allow-pointer-lock,allow-scripts,allow-popups,allow-modals,allow-top-navigation',
+	'sandbox' => 'allow-presentation,allow-forms,allow-same-origin,allow-pointer-lock,allow-scripts,allow-popups,allow-modals,allow-top-navigation,allow-downloads,allow-orientation-lock,allow-popups-to-escape-sandbox,allow-top-navigation-by-user-activation',
 	'description' => 'Organizr - Accept no others',
 	'description' => 'Organizr - Accept no others',
 	'debugErrors' => false,
 	'debugErrors' => false,
 	'healthChecksURL' => 'https://healthchecks.io/api/v1/checks/',
 	'healthChecksURL' => 'https://healthchecks.io/api/v1/checks/',
@@ -369,6 +369,8 @@ return array(
 	'tautulliHeader' => 'Tautulli',
 	'tautulliHeader' => 'Tautulli',
 	'tautulliHeaderToggle' => true,
 	'tautulliHeaderToggle' => true,
 	'tautulliFriendlyName' => true,
 	'tautulliFriendlyName' => true,
+	'tautulliSocksEnabled' => false,
+	'tautulliSocksAuth' => '999',
 	'homepagePiholeEnabled' => false,
 	'homepagePiholeEnabled' => false,
 	'homepagePiholeAuth' => '1',
 	'homepagePiholeAuth' => '1',
 	'homepagePiholeRefresh' => '10000',
 	'homepagePiholeRefresh' => '10000',

+ 2 - 2
api/functions/organizr-functions.php

@@ -621,10 +621,10 @@ trait OrganizrFunctions
 		$options = [];
 		$options = [];
 		if (is_numeric($timeout)) {
 		if (is_numeric($timeout)) {
 			$timeout = $timeout / 1000;
 			$timeout = $timeout / 1000;
-			array_push($options, array('timeout' => $timeout));
+			$options = array_merge($options, array('timeout' => $timeout));
 		}
 		}
 		if ($this->localURL($url, $override)) {
 		if ($this->localURL($url, $override)) {
-			array_push($options, array('verify' => false));
+			$options = array_merge($options, array('verify' => false));
 			
 			
 		}
 		}
 		return $options;
 		return $options;

+ 10 - 5
api/functions/sso-functions.php

@@ -86,7 +86,8 @@ trait SSOFunctions
 			$headers = array(
 			$headers = array(
 				'X-Emby-Authorization' => 'MediaBrowser Client="Organizr Jellyfin Tab", Device="Organizr_PHP", DeviceId="Organizr_SSO", Version="1.0"',
 				'X-Emby-Authorization' => 'MediaBrowser Client="Organizr Jellyfin Tab", Device="Organizr_PHP", DeviceId="Organizr_SSO", Version="1.0"',
 				"Accept" => "application/json",
 				"Accept" => "application/json",
-				"Content-Type" => "application/json"
+				"Content-Type" => "application/json",
+				"X-Forwarded-For" => $this->userIP()
 			);
 			);
 			$data = array(
 			$data = array(
 				"Username" => $username,
 				"Username" => $username,
@@ -118,7 +119,8 @@ trait SSOFunctions
 			$url = $this->qualifyURL($this->config['ombiURL']);
 			$url = $this->qualifyURL($this->config['ombiURL']);
 			$headers = array(
 			$headers = array(
 				"Accept" => "application/json",
 				"Accept" => "application/json",
-				"Content-Type" => "application/json"
+				"Content-Type" => "application/json",
+				"X-Forwarded-For" => $this->userIP()
 			);
 			);
 			$data = array(
 			$data = array(
 				"username" => ($oAuthToken ? "" : $username),
 				"username" => ($oAuthToken ? "" : $username),
@@ -162,7 +164,8 @@ trait SSOFunctions
 					$headers = array(
 					$headers = array(
 						"Accept" => "application/json",
 						"Accept" => "application/json",
 						"Content-Type" => "application/x-www-form-urlencoded",
 						"Content-Type" => "application/x-www-form-urlencoded",
-						"User-Agent" => isset($_SERVER ['HTTP_USER_AGENT']) ? $_SERVER ['HTTP_USER_AGENT'] : null
+						"User-Agent" => isset($_SERVER ['HTTP_USER_AGENT']) ? $_SERVER ['HTTP_USER_AGENT'] : null,
+						"X-Forwarded-For" => $this->userIP()
 					);
 					);
 					$data = array(
 					$data = array(
 						"username" => ($plexToken ? "" : $username),
 						"username" => ($plexToken ? "" : $username),
@@ -196,7 +199,8 @@ trait SSOFunctions
 		try {
 		try {
 			$url = $this->qualifyURL($this->config['overseerrURL']);
 			$url = $this->qualifyURL($this->config['overseerrURL']);
 			$headers = array(
 			$headers = array(
-				"Content-Type" => "application/json"
+				"Content-Type" => "application/json",
+				"X-Forwarded-For" => $this->userIP()
 			);
 			);
 			$data = array(
 			$data = array(
 				//"username" => ($oAuthToken ? "" : $username), // not needed yet
 				//"username" => ($oAuthToken ? "" : $username), // not needed yet
@@ -235,7 +239,8 @@ trait SSOFunctions
 		try {
 		try {
 			$url = $this->qualifyURL($this->config['petioURL']);
 			$url = $this->qualifyURL($this->config['petioURL']);
 			$headers = array(
 			$headers = array(
-				"Content-Type" => "application/json"
+				"Content-Type" => "application/json",
+				"X-Forwarded-For" => $this->userIP()
 			);
 			);
 			$data = array(
 			$data = array(
 				'user' => [
 				'user' => [

+ 27 - 1
api/homepage/tautulli.php

@@ -70,6 +70,32 @@ trait TautulliHomepageItem
 						'options' => $this->timeOptions()
 						'options' => $this->timeOptions()
 					),
 					),
 				),
 				),
+				'API SOCKS' => array(
+					array(
+						'type' => 'html',
+						'override' => 12,
+						'label' => '',
+						'html' => '
+							<div class="panel panel-default">
+								<div class="panel-wrapper collapse in">
+									<div class="panel-body">' . $this->socksHeadingHTML('tautulli') . '</div>
+								</div>
+							</div>'
+					),
+					array(
+						'type' => 'switch',
+						'name' => 'tautulliSocksEnabled',
+						'label' => 'Enable',
+						'value' => $this->config['tautulliSocksEnabled']
+					),
+					array(
+						'type' => 'select',
+						'name' => 'tautulliSocksAuth',
+						'label' => 'Minimum Authentication',
+						'value' => $this->config['tautulliSocksAuth'],
+						'options' => $this->groupOptions
+					),
+				),
 				'Library Stats' => array(
 				'Library Stats' => array(
 					array(
 					array(
 						'type' => 'switch',
 						'type' => 'switch',
@@ -278,7 +304,7 @@ trait TautulliHomepageItem
 				$platform = $api['homestats']['data'][$key]['rows'][0]['platform_name'];
 				$platform = $api['homestats']['data'][$key]['rows'][0]['platform_name'];
 				$this->cacheImage($url . '/images/platforms/' . $platform . '.svg', 'tautulli-' . $platform, 'svg');
 				$this->cacheImage($url . '/images/platforms/' . $platform . '.svg', 'tautulli-' . $platform, 'svg');
 			}
 			}
-			$libstatsUrl = $apiURL . '&cmd=get_libraries';
+			$libstatsUrl = $apiURL . '&cmd=get_libraries_table';
 			$options = $this->requestOptions($this->config['tautulliURL'], false, $this->config['homepageTautulliRefresh']);
 			$options = $this->requestOptions($this->config['tautulliURL'], false, $this->config['homepageTautulliRefresh']);
 			$libstats = Requests::get($libstatsUrl, [], $options);
 			$libstats = Requests::get($libstatsUrl, [], $options);
 			if ($libstats->success) {
 			if ($libstats->success) {

+ 2 - 2
api/homepage/transmission.php

@@ -239,7 +239,7 @@ trait TransmissionHomepageItem
 						$torrents = json_decode($response->body, true)['arguments']['torrents'];
 						$torrents = json_decode($response->body, true)['arguments']['torrents'];
 					}
 					}
 					usort($torrents, function ($a, $b) {
 					usort($torrents, function ($a, $b) {
-						return $a["addedDate"] < $b["addedDate"];
+						return $a["addedDate"] <=> $b["addedDate"];
 					});
 					});
 					$api['content']['queueItems'] = $torrents;
 					$api['content']['queueItems'] = $torrents;
 					$api['content']['historyItems'] = false;
 					$api['content']['historyItems'] = false;
@@ -254,7 +254,7 @@ trait TransmissionHomepageItem
 			$this->setAPIResponse('error', $e->getMessage(), 500);
 			$this->setAPIResponse('error', $e->getMessage(), 500);
 			return false;
 			return false;
 		};
 		};
-		$api['content'] = isset($api['content']) ? $api['content'] : false;
+		$api['content'] = $api['content'] ?? false;
 		$this->setAPIResponse('success', null, 200, $api);
 		$this->setAPIResponse('success', null, 200, $api);
 		return $api;
 		return $api;
 	}
 	}

+ 32 - 2
api/plugins/healthChecks.php

@@ -21,6 +21,36 @@ class HealthChecks extends Organizr
 	public function _healthCheckPluginGetSettings()
 	public function _healthCheckPluginGetSettings()
 	{
 	{
 		return array(
 		return array(
+			'FYI' => array(
+				array(
+					'type' => 'html',
+					'label' => '',
+					'override' => 12,
+					'html' => '
+						<div class="row">
+						    <div class="col-lg-12">
+						        <div class="panel panel-info">
+						            <div class="panel-heading">
+						                <span lang="en">ATTENTION</span>
+						            </div>
+						            <div class="panel-wrapper collapse in" aria-expanded="true">
+						                <div class="panel-body">
+						                	<h4 lang="en">Once this plugin is setup, you will need to setup a CRON job</h4>
+						                    <br/>
+						                    <span>
+						                    	<h4><b lang="en">CRON Job URL</b></h4>
+						                    	<code>' . $this->getServerPath() . 'api/v2/plugins/healthchecks/run</code><br/>
+						                    	<h5><b lang="en">Frequency</b></h5>
+						                    	<span lang="en">As often as you like - i.e. every 1 minute</span>
+						                    </span>
+						                </div>
+						            </div>
+						        </div>
+						    </div>
+						</div>
+						'
+				)
+			),
 			'Options' => array(
 			'Options' => array(
 				array(
 				array(
 					'type' => 'select',
 					'type' => 'select',
@@ -52,7 +82,7 @@ class HealthChecks extends Organizr
 	public function _healthCheckPluginTest($url)
 	public function _healthCheckPluginTest($url)
 	{
 	{
 		$success = false;
 		$success = false;
-		$options = array('verify' => false, 'verifyname' => false, 'follow_redirects' => true, 'redirects' => 1);
+		$options = array('verify' => false, 'verifyname' => false, 'follow_redirects' => true, 'redirects' => 10);
 		$headers = array('Token' => $this->config['organizrAPI']);
 		$headers = array('Token' => $this->config['organizrAPI']);
 		$url = $this->qualifyURL($url);
 		$url = $this->qualifyURL($url);
 		try {
 		try {
@@ -141,4 +171,4 @@ class HealthChecks extends Organizr
 			$this->setAPIResponse('error', 'User does not have access', 401);
 			$this->setAPIResponse('error', 'User does not have access', 401);
 		}
 		}
 	}
 	}
-}
+}

+ 2 - 4
api/plugins/js/healthChecks-settings.js

@@ -12,17 +12,15 @@ $(document).on('click', '#HEALTHCHECKS-settings-button', function() {
         var response = data.response;
         var response = data.response;
         $('#HEALTHCHECKS-settings-items').html(buildFormGroup(response.data));
         $('#HEALTHCHECKS-settings-items').html(buildFormGroup(response.data));
         var elAddButtonStart = $('#HEALTHCHECKS-settings-page [id*="Services"] .row.start');
         var elAddButtonStart = $('#HEALTHCHECKS-settings-page [id*="Services"] .row.start');
-        var testone = $('#HEALTHCHECKS-settings-page [id*="Services"] .row.m-b-40').first('span')
-        var testtwo = $('#HEALTHCHECKS-settings-page [id*="Services"] .row.m-b-40 span')
+        var items = $('#HEALTHCHECKS-settings-page [id*="Services"] .row.m-b-40 span');
         $(elAddButtonStart).after('<div class="row"><button type="button" class="btn btn-info pull-right m-r-20 addNewHCService" ><i class="fa fa-plus"></i> Add New Service</button></div>');
         $(elAddButtonStart).after('<div class="row"><button type="button" class="btn btn-info pull-right m-r-20 addNewHCService" ><i class="fa fa-plus"></i> Add New Service</button></div>');
-        $.each(testtwo, function(key,val) {
+        $.each(items, function(key,val) {
             var el = $(val);
             var el = $(val);
             var text = el.text();
             var text = el.text();
             if(text === 'Service Name'){
             if(text === 'Service Name'){
                 $(this).after('&nbsp;<div class="pull-right text-danger removeHCService mouse"><i class="fa fa-close text-danger"></i></div>');
                 $(this).after('&nbsp;<div class="pull-right text-danger removeHCService mouse"><i class="fa fa-close text-danger"></i></div>');
             }
             }
         })
         })
-
     }).fail(function(xhr) {
     }).fail(function(xhr) {
         console.error("Organizr Function: API Connection Failed");
         console.error("Organizr Function: API Connection Failed");
     });
     });

+ 16 - 76
api/v2/routes/socks.php

@@ -1,45 +1,15 @@
 <?php
 <?php
 $app->any('/multiple/socks/{app}/{instance}/{route:.*}', function ($request, $response, $args) {
 $app->any('/multiple/socks/{app}/{instance}/{route:.*}', function ($request, $response, $args) {
 	$Organizr = ($request->getAttribute('Organizr')) ?? new Organizr();
 	$Organizr = ($request->getAttribute('Organizr')) ?? new Organizr();
-	switch ($args['app']) {
-		case 'sonarr':
-			$url = 'sonarrURL';
-			$enabled = 'sonarrSocksEnabled';
-			$auth = 'sonarrSocksAuth';
-			$header = 'X-Api-Key';
-			break;
-		case 'radarr':
-			$url = 'radarrURL';
-			$enabled = 'radarrSocksEnabled';
-			$auth = 'radarrSocksAuth';
-			$header = 'X-Api-Key';
-			break;
-		case 'lidarr':
-			$url = 'lidarrURL';
-			$enabled = 'lidarrSocksEnabled';
-			$auth = 'lidarrSocksAuth';
-			$header = 'X-Api-Key';
-			break;
-		case 'sabnzbd':
-			$url = 'sabnzbdURL';
-			$enabled = 'sabnzbdSocksEnabled';
-			$auth = 'sabnzbdSocksAuth';
-			$header = null;
-			break;
-		case 'nzbget':
-			$url = 'nzbgetURL';
-			$enabled = 'nzbgetSocksEnabled';
-			$auth = 'nzbgetSocksAuth';
-			$header = 'Authorization';
-			break;
-		default:
-			$Organizr->setAPIResponse('error', 'Application not supported for socks', 404);
-			$response->getBody()->write(jsonE($GLOBALS['api']));
-			return $response
-				->withHeader('Content-Type', 'application/json;charset=UTF-8')
-				->withStatus($GLOBALS['responseCode']);
+	$appDetails = $Organizr->socksListing($args['app']);
+	if (!$appDetails) {
+		$Organizr->setAPIResponse('error', 'Application not supported for socks', 404);
+		$response->getBody()->write(jsonE($GLOBALS['api']));
+		return $response
+			->withHeader('Content-Type', 'application/json;charset=UTF-8')
+			->withStatus($GLOBALS['responseCode']);
 	}
 	}
-	$socks = $Organizr->socks($url, $enabled, $auth, $request, $header, $args['instance']);
+	$socks = $Organizr->socks($appDetails, $request, $args['instance']);
 	$data = $socks ?? jsonE($GLOBALS['api']);
 	$data = $socks ?? jsonE($GLOBALS['api']);
 	$response->getBody()->write($data);
 	$response->getBody()->write($data);
 	return $response
 	return $response
@@ -48,45 +18,15 @@ $app->any('/multiple/socks/{app}/{instance}/{route:.*}', function ($request, $re
 });
 });
 $app->any('/socks/{app}/{route:.*}', function ($request, $response, $args) {
 $app->any('/socks/{app}/{route:.*}', function ($request, $response, $args) {
 	$Organizr = ($request->getAttribute('Organizr')) ?? new Organizr();
 	$Organizr = ($request->getAttribute('Organizr')) ?? new Organizr();
-	switch ($args['app']) {
-		case 'sonarr':
-			$url = 'sonarrURL';
-			$enabled = 'sonarrSocksEnabled';
-			$auth = 'sonarrSocksAuth';
-			$header = 'X-Api-Key';
-			break;
-		case 'radarr':
-			$url = 'radarrURL';
-			$enabled = 'radarrSocksEnabled';
-			$auth = 'radarrSocksAuth';
-			$header = 'X-Api-Key';
-			break;
-		case 'lidarr':
-			$url = 'lidarrURL';
-			$enabled = 'lidarrSocksEnabled';
-			$auth = 'lidarrSocksAuth';
-			$header = 'X-Api-Key';
-			break;
-		case 'sabnzbd':
-			$url = 'sabnzbdURL';
-			$enabled = 'sabnzbdSocksEnabled';
-			$auth = 'sabnzbdSocksAuth';
-			$header = null;
-			break;
-		case 'nzbget':
-			$url = 'nzbgetURL';
-			$enabled = 'nzbgetSocksEnabled';
-			$auth = 'nzbgetSocksAuth';
-			$header = 'Authorization';
-			break;
-		default:
-			$Organizr->setAPIResponse('error', 'Application not supported for socks', 404);
-			$response->getBody()->write(jsonE($GLOBALS['api']));
-			return $response
-				->withHeader('Content-Type', 'application/json;charset=UTF-8')
-				->withStatus($GLOBALS['responseCode']);
+	$appDetails = $Organizr->socksListing($args['app']);
+	if (!$appDetails) {
+		$Organizr->setAPIResponse('error', 'Application not supported for socks', 404);
+		$response->getBody()->write(jsonE($GLOBALS['api']));
+		return $response
+			->withHeader('Content-Type', 'application/json;charset=UTF-8')
+			->withStatus($GLOBALS['responseCode']);
 	}
 	}
-	$socks = $Organizr->socks($url, $enabled, $auth, $request, $header);
+	$socks = $Organizr->socks($appDetails, $request);
 	$data = $socks ?? jsonE($GLOBALS['api']);
 	$data = $socks ?? jsonE($GLOBALS['api']);
 	$response->getBody()->write($data);
 	$response->getBody()->write($data);
 	return $response
 	return $response

+ 40 - 40
api/vendor/composer/InstalledVersions.php

@@ -29,7 +29,7 @@ private static $installed = array (
     'aliases' => 
     'aliases' => 
     array (
     array (
     ),
     ),
-    'reference' => '7e9a4efa44fc1396837620eb2d675a4194d97cd5',
+    'reference' => 'd116a5555c0c9912ce0b22091539443ff3a9711a',
     'name' => '__root__',
     'name' => '__root__',
   ),
   ),
   'versions' => 
   'versions' => 
@@ -41,7 +41,7 @@ private static $installed = array (
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => '7e9a4efa44fc1396837620eb2d675a4194d97cd5',
+      'reference' => 'd116a5555c0c9912ce0b22091539443ff3a9711a',
     ),
     ),
     'adldap2/adldap2' => 
     'adldap2/adldap2' => 
     array (
     array (
@@ -63,12 +63,12 @@ private static $installed = array (
     ),
     ),
     'composer/semver' => 
     'composer/semver' => 
     array (
     array (
-      'pretty_version' => '1.4.2',
-      'version' => '1.4.2.0',
+      'pretty_version' => '1.7.2',
+      'version' => '1.7.2.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => 'c7cb9a2095a074d131b65a8a0cd294479d785573',
+      'reference' => '647490bbcaf7fc4891c58f47b825eb99d19c377a',
     ),
     ),
     'dg/dibi' => 
     'dg/dibi' => 
     array (
     array (
@@ -115,30 +115,30 @@ private static $installed = array (
     ),
     ),
     'guzzlehttp/guzzle' => 
     'guzzlehttp/guzzle' => 
     array (
     array (
-      'pretty_version' => '7.1.1',
-      'version' => '7.1.1.0',
+      'pretty_version' => '7.3.0',
+      'version' => '7.3.0.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => '7427d6f99df41cc01f33cd59832f721c150ffdf3',
+      'reference' => '7008573787b430c1c1f650e3722d9bba59967628',
     ),
     ),
     'guzzlehttp/promises' => 
     'guzzlehttp/promises' => 
     array (
     array (
-      'pretty_version' => 'v1.3.1',
-      'version' => '1.3.1.0',
+      'pretty_version' => '1.4.1',
+      'version' => '1.4.1.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => 'a59da6cf61d80060647ff4d3eb2c03a2bc694646',
+      'reference' => '8e7d04f1f6450fef59366c399cfad4b9383aa30d',
     ),
     ),
     'guzzlehttp/psr7' => 
     'guzzlehttp/psr7' => 
     array (
     array (
-      'pretty_version' => '1.6.1',
-      'version' => '1.6.1.0',
+      'pretty_version' => '1.8.2',
+      'version' => '1.8.2.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => '239400de7a173fe9901b9ac7c06497751f00727a',
+      'reference' => 'dc960a912984efb74d0a90222870c72c87f10c91',
     ),
     ),
     'illuminate/contracts' => 
     'illuminate/contracts' => 
     array (
     array (
@@ -241,12 +241,12 @@ private static $installed = array (
     ),
     ),
     'paragonie/random_compat' => 
     'paragonie/random_compat' => 
     array (
     array (
-      'pretty_version' => 'v9.99.99',
-      'version' => '9.99.99.0',
+      'pretty_version' => 'v9.99.100',
+      'version' => '9.99.100.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => '84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95',
+      'reference' => '996434e5492cb4c3edcb9168db6fbb1359ef965a',
     ),
     ),
     'paragonie/sodium_compat' => 
     'paragonie/sodium_compat' => 
     array (
     array (
@@ -277,12 +277,12 @@ private static $installed = array (
     ),
     ),
     'phpmailer/phpmailer' => 
     'phpmailer/phpmailer' => 
     array (
     array (
-      'pretty_version' => 'v6.2.0',
-      'version' => '6.2.0.0',
+      'pretty_version' => 'v6.4.1',
+      'version' => '6.4.1.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => 'e38888a75c070304ca5514197d4847a59a5c853f',
+      'reference' => '9256f12d8fb0cd0500f93b19e18c356906cbed3d',
     ),
     ),
     'pragmarx/google2fa' => 
     'pragmarx/google2fa' => 
     array (
     array (
@@ -295,12 +295,12 @@ private static $installed = array (
     ),
     ),
     'psr/container' => 
     'psr/container' => 
     array (
     array (
-      'pretty_version' => '1.0.0',
-      'version' => '1.0.0.0',
+      'pretty_version' => '1.1.1',
+      'version' => '1.1.1.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => 'b7ce3b176482dbbc1245ebf52b181af44c2cf55f',
+      'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf',
     ),
     ),
     'psr/http-client' => 
     'psr/http-client' => 
     array (
     array (
@@ -370,12 +370,12 @@ private static $installed = array (
     ),
     ),
     'psr/log' => 
     'psr/log' => 
     array (
     array (
-      'pretty_version' => '1.1.0',
-      'version' => '1.1.0.0',
+      'pretty_version' => '1.1.4',
+      'version' => '1.1.4.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => '6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd',
+      'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
     ),
     ),
     'psr/simple-cache' => 
     'psr/simple-cache' => 
     array (
     array (
@@ -406,12 +406,12 @@ private static $installed = array (
     ),
     ),
     'rmccue/requests' => 
     'rmccue/requests' => 
     array (
     array (
-      'pretty_version' => 'v1.7.0',
-      'version' => '1.7.0.0',
+      'pretty_version' => 'v1.8.0',
+      'version' => '1.8.0.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => '87932f52ffad70504d93f04f15690cf16a089546',
+      'reference' => 'afbe4790e4def03581c4a0963a1e8aa01f6030f1',
     ),
     ),
     'slim/psr7' => 
     'slim/psr7' => 
     array (
     array (
@@ -451,21 +451,21 @@ private static $installed = array (
     ),
     ),
     'symfony/polyfill-ctype' => 
     'symfony/polyfill-ctype' => 
     array (
     array (
-      'pretty_version' => 'v1.18.0',
-      'version' => '1.18.0.0',
+      'pretty_version' => 'v1.22.1',
+      'version' => '1.22.1.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => '1c302646f6efc070cd46856e600e5e0684d6b454',
+      'reference' => 'c6c942b1ac76c82448322025e084cadc56048b4e',
     ),
     ),
     'symfony/polyfill-mbstring' => 
     'symfony/polyfill-mbstring' => 
     array (
     array (
-      'pretty_version' => 'v1.14.0',
-      'version' => '1.14.0.0',
+      'pretty_version' => 'v1.22.1',
+      'version' => '1.22.1.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => '34094cfa9abe1f0f14f48f490772db7a775559f2',
+      'reference' => '5232de97ee3b75b0360528dae24e73db49566ab1',
     ),
     ),
     'symfony/polyfill-php56' => 
     'symfony/polyfill-php56' => 
     array (
     array (
@@ -478,17 +478,17 @@ private static $installed = array (
     ),
     ),
     'symfony/polyfill-php72' => 
     'symfony/polyfill-php72' => 
     array (
     array (
-      'pretty_version' => 'v1.10.0',
-      'version' => '1.10.0.0',
+      'pretty_version' => 'v1.22.1',
+      'version' => '1.22.1.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => '9050816e2ca34a8e916c3a0ae8b9c2fccf68b631',
+      'reference' => 'cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9',
     ),
     ),
     'symfony/polyfill-php80' => 
     'symfony/polyfill-php80' => 
     array (
     array (
-      'pretty_version' => 'v1.22.0',
-      'version' => '1.22.0.0',
+      'pretty_version' => 'v1.22.1',
+      'version' => '1.22.1.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),

+ 219 - 111
api/vendor/composer/installed.json

@@ -128,27 +128,26 @@
         },
         },
         {
         {
             "name": "composer/semver",
             "name": "composer/semver",
-            "version": "1.4.2",
-            "version_normalized": "1.4.2.0",
+            "version": "1.7.2",
+            "version_normalized": "1.7.2.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/composer/semver.git",
                 "url": "https://github.com/composer/semver.git",
-                "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573"
+                "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/composer/semver/zipball/c7cb9a2095a074d131b65a8a0cd294479d785573",
-                "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573",
+                "url": "https://api.github.com/repos/composer/semver/zipball/647490bbcaf7fc4891c58f47b825eb99d19c377a",
+                "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
-                "php": "^5.3.2 || ^7.0"
+                "php": "^5.3.2 || ^7.0 || ^8.0"
             },
             },
             "require-dev": {
             "require-dev": {
-                "phpunit/phpunit": "^4.5 || ^5.0.5",
-                "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0"
+                "phpunit/phpunit": "^4.5 || ^5.0.5"
             },
             },
-            "time": "2016-08-30T16:08:34+00:00",
+            "time": "2020-12-03T15:47:16+00:00",
             "type": "library",
             "type": "library",
             "extra": {
             "extra": {
                 "branch-alias": {
                 "branch-alias": {
@@ -189,6 +188,25 @@
                 "validation",
                 "validation",
                 "versioning"
                 "versioning"
             ],
             ],
+            "support": {
+                "irc": "irc://irc.freenode.org/composer",
+                "issues": "https://github.com/composer/semver/issues",
+                "source": "https://github.com/composer/semver/tree/1.7.2"
+            },
+            "funding": [
+                {
+                    "url": "https://packagist.com",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/composer",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+                    "type": "tidelift"
+                }
+            ],
             "install-path": "./semver"
             "install-path": "./semver"
         },
         },
         {
         {
@@ -455,33 +473,34 @@
         },
         },
         {
         {
             "name": "guzzlehttp/guzzle",
             "name": "guzzlehttp/guzzle",
-            "version": "7.1.1",
-            "version_normalized": "7.1.1.0",
+            "version": "7.3.0",
+            "version_normalized": "7.3.0.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/guzzle/guzzle.git",
                 "url": "https://github.com/guzzle/guzzle.git",
-                "reference": "7427d6f99df41cc01f33cd59832f721c150ffdf3"
+                "reference": "7008573787b430c1c1f650e3722d9bba59967628"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7427d6f99df41cc01f33cd59832f721c150ffdf3",
-                "reference": "7427d6f99df41cc01f33cd59832f721c150ffdf3",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7008573787b430c1c1f650e3722d9bba59967628",
+                "reference": "7008573787b430c1c1f650e3722d9bba59967628",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
                 "ext-json": "*",
                 "ext-json": "*",
-                "guzzlehttp/promises": "^1.0",
-                "guzzlehttp/psr7": "^1.6.1",
-                "php": "^7.2.5",
+                "guzzlehttp/promises": "^1.4",
+                "guzzlehttp/psr7": "^1.7 || ^2.0",
+                "php": "^7.2.5 || ^8.0",
                 "psr/http-client": "^1.0"
                 "psr/http-client": "^1.0"
             },
             },
             "provide": {
             "provide": {
                 "psr/http-client-implementation": "1.0"
                 "psr/http-client-implementation": "1.0"
             },
             },
             "require-dev": {
             "require-dev": {
+                "bamarni/composer-bin-plugin": "^1.4.1",
                 "ext-curl": "*",
                 "ext-curl": "*",
-                "php-http/client-integration-tests": "dev-phpunit8",
-                "phpunit/phpunit": "^8.5.5",
+                "php-http/client-integration-tests": "^3.0",
+                "phpunit/phpunit": "^8.5.5 || ^9.3.5",
                 "psr/log": "^1.1"
                 "psr/log": "^1.1"
             },
             },
             "suggest": {
             "suggest": {
@@ -489,11 +508,11 @@
                 "ext-intl": "Required for Internationalized Domain Name (IDN) support",
                 "ext-intl": "Required for Internationalized Domain Name (IDN) support",
                 "psr/log": "Required for using the Log middleware"
                 "psr/log": "Required for using the Log middleware"
             },
             },
-            "time": "2020-09-30T08:51:17+00:00",
+            "time": "2021-03-23T11:33:13+00:00",
             "type": "library",
             "type": "library",
             "extra": {
             "extra": {
                 "branch-alias": {
                 "branch-alias": {
-                    "dev-master": "7.1-dev"
+                    "dev-master": "7.3-dev"
                 }
                 }
             },
             },
             "installation-source": "dist",
             "installation-source": "dist",
@@ -536,7 +555,7 @@
             ],
             ],
             "support": {
             "support": {
                 "issues": "https://github.com/guzzle/guzzle/issues",
                 "issues": "https://github.com/guzzle/guzzle/issues",
-                "source": "https://github.com/guzzle/guzzle/tree/7.1.1"
+                "source": "https://github.com/guzzle/guzzle/tree/7.3.0"
             },
             },
             "funding": [
             "funding": [
                 {
                 {
@@ -560,26 +579,26 @@
         },
         },
         {
         {
             "name": "guzzlehttp/promises",
             "name": "guzzlehttp/promises",
-            "version": "v1.3.1",
-            "version_normalized": "1.3.1.0",
+            "version": "1.4.1",
+            "version_normalized": "1.4.1.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/guzzle/promises.git",
                 "url": "https://github.com/guzzle/promises.git",
-                "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
+                "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
-                "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
+                "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
+                "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
-                "php": ">=5.5.0"
+                "php": ">=5.5"
             },
             },
             "require-dev": {
             "require-dev": {
-                "phpunit/phpunit": "^4.0"
+                "symfony/phpunit-bridge": "^4.4 || ^5.1"
             },
             },
-            "time": "2016-12-20T10:07:11+00:00",
+            "time": "2021-03-07T09:25:29+00:00",
             "type": "library",
             "type": "library",
             "extra": {
             "extra": {
                 "branch-alias": {
                 "branch-alias": {
@@ -610,21 +629,25 @@
             "keywords": [
             "keywords": [
                 "promise"
                 "promise"
             ],
             ],
+            "support": {
+                "issues": "https://github.com/guzzle/promises/issues",
+                "source": "https://github.com/guzzle/promises/tree/1.4.1"
+            },
             "install-path": "../guzzlehttp/promises"
             "install-path": "../guzzlehttp/promises"
         },
         },
         {
         {
             "name": "guzzlehttp/psr7",
             "name": "guzzlehttp/psr7",
-            "version": "1.6.1",
-            "version_normalized": "1.6.1.0",
+            "version": "1.8.2",
+            "version_normalized": "1.8.2.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/guzzle/psr7.git",
                 "url": "https://github.com/guzzle/psr7.git",
-                "reference": "239400de7a173fe9901b9ac7c06497751f00727a"
+                "reference": "dc960a912984efb74d0a90222870c72c87f10c91"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
-                "reference": "239400de7a173fe9901b9ac7c06497751f00727a",
+                "url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91",
+                "reference": "dc960a912984efb74d0a90222870c72c87f10c91",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
@@ -637,16 +660,16 @@
             },
             },
             "require-dev": {
             "require-dev": {
                 "ext-zlib": "*",
                 "ext-zlib": "*",
-                "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
+                "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
             },
             },
             "suggest": {
             "suggest": {
-                "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
+                "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
             },
             },
-            "time": "2019-07-01T23:21:34+00:00",
+            "time": "2021-04-26T09:17:50+00:00",
             "type": "library",
             "type": "library",
             "extra": {
             "extra": {
                 "branch-alias": {
                 "branch-alias": {
-                    "dev-master": "1.6-dev"
+                    "dev-master": "1.7-dev"
                 }
                 }
             },
             },
             "installation-source": "dist",
             "installation-source": "dist",
@@ -684,6 +707,10 @@
                 "uri",
                 "uri",
                 "url"
                 "url"
             ],
             ],
+            "support": {
+                "issues": "https://github.com/guzzle/psr7/issues",
+                "source": "https://github.com/guzzle/psr7/tree/1.8.2"
+            },
             "install-path": "../guzzlehttp/psr7"
             "install-path": "../guzzlehttp/psr7"
         },
         },
         {
         {
@@ -906,6 +933,10 @@
                 "JWS",
                 "JWS",
                 "jwt"
                 "jwt"
             ],
             ],
+            "support": {
+                "issues": "https://github.com/lcobucci/jwt/issues",
+                "source": "https://github.com/lcobucci/jwt/tree/3.3"
+            },
             "install-path": "../lcobucci/jwt"
             "install-path": "../lcobucci/jwt"
         },
         },
         {
         {
@@ -1284,21 +1315,21 @@
         },
         },
         {
         {
             "name": "paragonie/random_compat",
             "name": "paragonie/random_compat",
-            "version": "v9.99.99",
-            "version_normalized": "9.99.99.0",
+            "version": "v9.99.100",
+            "version_normalized": "9.99.100.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/paragonie/random_compat.git",
                 "url": "https://github.com/paragonie/random_compat.git",
-                "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95"
+                "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
-                "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
+                "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a",
+                "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
-                "php": "^7"
+                "php": ">= 7"
             },
             },
             "require-dev": {
             "require-dev": {
                 "phpunit/phpunit": "4.*|5.*",
                 "phpunit/phpunit": "4.*|5.*",
@@ -1307,7 +1338,7 @@
             "suggest": {
             "suggest": {
                 "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
                 "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
             },
             },
-            "time": "2018-07-02T15:55:56+00:00",
+            "time": "2020-10-15T08:29:30+00:00",
             "type": "library",
             "type": "library",
             "installation-source": "dist",
             "installation-source": "dist",
             "notification-url": "https://packagist.org/downloads/",
             "notification-url": "https://packagist.org/downloads/",
@@ -1328,6 +1359,11 @@
                 "pseudorandom",
                 "pseudorandom",
                 "random"
                 "random"
             ],
             ],
+            "support": {
+                "email": "info@paragonie.com",
+                "issues": "https://github.com/paragonie/random_compat/issues",
+                "source": "https://github.com/paragonie/random_compat"
+            },
             "install-path": "../paragonie/random_compat"
             "install-path": "../paragonie/random_compat"
         },
         },
         {
         {
@@ -1542,17 +1578,17 @@
         },
         },
         {
         {
             "name": "phpmailer/phpmailer",
             "name": "phpmailer/phpmailer",
-            "version": "v6.2.0",
-            "version_normalized": "6.2.0.0",
+            "version": "v6.4.1",
+            "version_normalized": "6.4.1.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/PHPMailer/PHPMailer.git",
                 "url": "https://github.com/PHPMailer/PHPMailer.git",
-                "reference": "e38888a75c070304ca5514197d4847a59a5c853f"
+                "reference": "9256f12d8fb0cd0500f93b19e18c356906cbed3d"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e38888a75c070304ca5514197d4847a59a5c853f",
-                "reference": "e38888a75c070304ca5514197d4847a59a5c853f",
+                "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/9256f12d8fb0cd0500f93b19e18c356906cbed3d",
+                "reference": "9256f12d8fb0cd0500f93b19e18c356906cbed3d",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
@@ -1570,14 +1606,14 @@
                 "yoast/phpunit-polyfills": "^0.2.0"
                 "yoast/phpunit-polyfills": "^0.2.0"
             },
             },
             "suggest": {
             "suggest": {
-                "ext-mbstring": "Needed to send email in multibyte encoding charset",
+                "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
                 "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
                 "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
                 "league/oauth2-google": "Needed for Google XOAUTH2 authentication",
                 "league/oauth2-google": "Needed for Google XOAUTH2 authentication",
                 "psr/log": "For optional PSR-3 debug logging",
                 "psr/log": "For optional PSR-3 debug logging",
                 "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
                 "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
                 "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
                 "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
             },
             },
-            "time": "2020-11-25T15:24:57+00:00",
+            "time": "2021-04-29T12:25:04+00:00",
             "type": "library",
             "type": "library",
             "installation-source": "dist",
             "installation-source": "dist",
             "autoload": {
             "autoload": {
@@ -1609,7 +1645,7 @@
             "description": "PHPMailer is a full-featured email creation and transfer class for PHP",
             "description": "PHPMailer is a full-featured email creation and transfer class for PHP",
             "support": {
             "support": {
                 "issues": "https://github.com/PHPMailer/PHPMailer/issues",
                 "issues": "https://github.com/PHPMailer/PHPMailer/issues",
-                "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.2.0"
+                "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.4.1"
             },
             },
             "funding": [
             "funding": [
                 {
                 {
@@ -1685,29 +1721,24 @@
         },
         },
         {
         {
             "name": "psr/container",
             "name": "psr/container",
-            "version": "1.0.0",
-            "version_normalized": "1.0.0.0",
+            "version": "1.1.1",
+            "version_normalized": "1.1.1.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/php-fig/container.git",
                 "url": "https://github.com/php-fig/container.git",
-                "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
+                "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
-                "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
+                "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
+                "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
-                "php": ">=5.3.0"
+                "php": ">=7.2.0"
             },
             },
-            "time": "2017-02-14T16:28:37+00:00",
+            "time": "2021-03-05T17:36:06+00:00",
             "type": "library",
             "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.0.x-dev"
-                }
-            },
             "installation-source": "dist",
             "installation-source": "dist",
             "autoload": {
             "autoload": {
                 "psr-4": {
                 "psr-4": {
@@ -1721,7 +1752,7 @@
             "authors": [
             "authors": [
                 {
                 {
                     "name": "PHP-FIG",
                     "name": "PHP-FIG",
-                    "homepage": "http://www.php-fig.org/"
+                    "homepage": "https://www.php-fig.org/"
                 }
                 }
             ],
             ],
             "description": "Common Container Interface (PHP FIG PSR-11)",
             "description": "Common Container Interface (PHP FIG PSR-11)",
@@ -1733,6 +1764,10 @@
                 "container-interop",
                 "container-interop",
                 "psr"
                 "psr"
             ],
             ],
+            "support": {
+                "issues": "https://github.com/php-fig/container/issues",
+                "source": "https://github.com/php-fig/container/tree/1.1.1"
+            },
             "install-path": "../psr/container"
             "install-path": "../psr/container"
         },
         },
         {
         {
@@ -2012,27 +2047,27 @@
         },
         },
         {
         {
             "name": "psr/log",
             "name": "psr/log",
-            "version": "1.1.0",
-            "version_normalized": "1.1.0.0",
+            "version": "1.1.4",
+            "version_normalized": "1.1.4.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/php-fig/log.git",
                 "url": "https://github.com/php-fig/log.git",
-                "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd"
+                "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
-                "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
+                "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
+                "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
                 "php": ">=5.3.0"
                 "php": ">=5.3.0"
             },
             },
-            "time": "2018-11-20T15:27:04+00:00",
+            "time": "2021-05-03T11:20:27+00:00",
             "type": "library",
             "type": "library",
             "extra": {
             "extra": {
                 "branch-alias": {
                 "branch-alias": {
-                    "dev-master": "1.0.x-dev"
+                    "dev-master": "1.1.x-dev"
                 }
                 }
             },
             },
             "installation-source": "dist",
             "installation-source": "dist",
@@ -2048,7 +2083,7 @@
             "authors": [
             "authors": [
                 {
                 {
                     "name": "PHP-FIG",
                     "name": "PHP-FIG",
-                    "homepage": "http://www.php-fig.org/"
+                    "homepage": "https://www.php-fig.org/"
                 }
                 }
             ],
             ],
             "description": "Common interface for logging libraries",
             "description": "Common interface for logging libraries",
@@ -2058,6 +2093,9 @@
                 "psr",
                 "psr",
                 "psr-3"
                 "psr-3"
             ],
             ],
+            "support": {
+                "source": "https://github.com/php-fig/log/tree/1.1.4"
+            },
             "install-path": "../psr/log"
             "install-path": "../psr/log"
         },
         },
         {
         {
@@ -2217,26 +2255,33 @@
         },
         },
         {
         {
             "name": "rmccue/requests",
             "name": "rmccue/requests",
-            "version": "v1.7.0",
-            "version_normalized": "1.7.0.0",
+            "version": "v1.8.0",
+            "version_normalized": "1.8.0.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
-                "url": "https://github.com/rmccue/Requests.git",
-                "reference": "87932f52ffad70504d93f04f15690cf16a089546"
+                "url": "https://github.com/WordPress/Requests.git",
+                "reference": "afbe4790e4def03581c4a0963a1e8aa01f6030f1"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/rmccue/Requests/zipball/87932f52ffad70504d93f04f15690cf16a089546",
-                "reference": "87932f52ffad70504d93f04f15690cf16a089546",
+                "url": "https://api.github.com/repos/WordPress/Requests/zipball/afbe4790e4def03581c4a0963a1e8aa01f6030f1",
+                "reference": "afbe4790e4def03581c4a0963a1e8aa01f6030f1",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
                 "php": ">=5.2"
                 "php": ">=5.2"
             },
             },
             "require-dev": {
             "require-dev": {
-                "requests/test-server": "dev-master"
+                "dealerdirect/phpcodesniffer-composer-installer": "^0.7",
+                "php-parallel-lint/php-console-highlighter": "^0.5.0",
+                "php-parallel-lint/php-parallel-lint": "^1.3",
+                "phpcompatibility/php-compatibility": "^9.0",
+                "phpunit/phpunit": "^4.8 || ^5.7 || ^6.5 || ^7.5",
+                "requests/test-server": "dev-master",
+                "squizlabs/php_codesniffer": "^3.5",
+                "wp-coding-standards/wpcs": "^2.0"
             },
             },
-            "time": "2016-10-13T00:11:37+00:00",
+            "time": "2021-04-27T11:05:25+00:00",
             "type": "library",
             "type": "library",
             "installation-source": "dist",
             "installation-source": "dist",
             "autoload": {
             "autoload": {
@@ -2255,7 +2300,7 @@
                 }
                 }
             ],
             ],
             "description": "A HTTP library written in PHP, for human beings.",
             "description": "A HTTP library written in PHP, for human beings.",
-            "homepage": "http://github.com/rmccue/Requests",
+            "homepage": "http://github.com/WordPress/Requests",
             "keywords": [
             "keywords": [
                 "curl",
                 "curl",
                 "fsockopen",
                 "fsockopen",
@@ -2265,6 +2310,10 @@
                 "iri",
                 "iri",
                 "sockets"
                 "sockets"
             ],
             ],
+            "support": {
+                "issues": "https://github.com/WordPress/Requests/issues",
+                "source": "https://github.com/WordPress/Requests/tree/v1.8.0"
+            },
             "install-path": "../rmccue/requests"
             "install-path": "../rmccue/requests"
         },
         },
         {
         {
@@ -2575,30 +2624,30 @@
         },
         },
         {
         {
             "name": "symfony/polyfill-ctype",
             "name": "symfony/polyfill-ctype",
-            "version": "v1.18.0",
-            "version_normalized": "1.18.0.0",
+            "version": "v1.22.1",
+            "version_normalized": "1.22.1.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-ctype.git",
                 "url": "https://github.com/symfony/polyfill-ctype.git",
-                "reference": "1c302646f6efc070cd46856e600e5e0684d6b454"
+                "reference": "c6c942b1ac76c82448322025e084cadc56048b4e"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454",
-                "reference": "1c302646f6efc070cd46856e600e5e0684d6b454",
+                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e",
+                "reference": "c6c942b1ac76c82448322025e084cadc56048b4e",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
-                "php": ">=5.3.3"
+                "php": ">=7.1"
             },
             },
             "suggest": {
             "suggest": {
                 "ext-ctype": "For best performance"
                 "ext-ctype": "For best performance"
             },
             },
-            "time": "2020-07-14T12:35:20+00:00",
+            "time": "2021-01-07T16:49:33+00:00",
             "type": "library",
             "type": "library",
             "extra": {
             "extra": {
                 "branch-alias": {
                 "branch-alias": {
-                    "dev-master": "1.18-dev"
+                    "dev-main": "1.22-dev"
                 },
                 },
                 "thanks": {
                 "thanks": {
                     "name": "symfony/polyfill",
                     "name": "symfony/polyfill",
@@ -2636,34 +2685,55 @@
                 "polyfill",
                 "polyfill",
                 "portable"
                 "portable"
             ],
             ],
+            "support": {
+                "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1"
+            },
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "install-path": "../symfony/polyfill-ctype"
             "install-path": "../symfony/polyfill-ctype"
         },
         },
         {
         {
             "name": "symfony/polyfill-mbstring",
             "name": "symfony/polyfill-mbstring",
-            "version": "v1.14.0",
-            "version_normalized": "1.14.0.0",
+            "version": "v1.22.1",
+            "version_normalized": "1.22.1.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-mbstring.git",
                 "url": "https://github.com/symfony/polyfill-mbstring.git",
-                "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2"
+                "reference": "5232de97ee3b75b0360528dae24e73db49566ab1"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2",
-                "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2",
+                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1",
+                "reference": "5232de97ee3b75b0360528dae24e73db49566ab1",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
-                "php": ">=5.3.3"
+                "php": ">=7.1"
             },
             },
             "suggest": {
             "suggest": {
                 "ext-mbstring": "For best performance"
                 "ext-mbstring": "For best performance"
             },
             },
-            "time": "2020-01-13T11:15:53+00:00",
+            "time": "2021-01-22T09:19:47+00:00",
             "type": "library",
             "type": "library",
             "extra": {
             "extra": {
                 "branch-alias": {
                 "branch-alias": {
-                    "dev-master": "1.14-dev"
+                    "dev-main": "1.22-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
                 }
             },
             },
             "installation-source": "dist",
             "installation-source": "dist",
@@ -2698,6 +2768,23 @@
                 "portable",
                 "portable",
                 "shim"
                 "shim"
             ],
             ],
+            "support": {
+                "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1"
+            },
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "install-path": "../symfony/polyfill-mbstring"
             "install-path": "../symfony/polyfill-mbstring"
         },
         },
         {
         {
@@ -2761,27 +2848,31 @@
         },
         },
         {
         {
             "name": "symfony/polyfill-php72",
             "name": "symfony/polyfill-php72",
-            "version": "v1.10.0",
-            "version_normalized": "1.10.0.0",
+            "version": "v1.22.1",
+            "version_normalized": "1.22.1.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php72.git",
                 "url": "https://github.com/symfony/polyfill-php72.git",
-                "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631"
+                "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9"
             },
             },
             "dist": {
             "dist": {
                 "type": "zip",
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9050816e2ca34a8e916c3a0ae8b9c2fccf68b631",
-                "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631",
+                "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
+                "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
                 "shasum": ""
                 "shasum": ""
             },
             },
             "require": {
             "require": {
-                "php": ">=5.3.3"
+                "php": ">=7.1"
             },
             },
-            "time": "2018-09-21T13:07:52+00:00",
+            "time": "2021-01-07T16:49:33+00:00",
             "type": "library",
             "type": "library",
             "extra": {
             "extra": {
                 "branch-alias": {
                 "branch-alias": {
-                    "dev-master": "1.9-dev"
+                    "dev-main": "1.22-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
                 }
             },
             },
             "installation-source": "dist",
             "installation-source": "dist",
@@ -2815,12 +2906,29 @@
                 "portable",
                 "portable",
                 "shim"
                 "shim"
             ],
             ],
+            "support": {
+                "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1"
+            },
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "install-path": "../symfony/polyfill-php72"
             "install-path": "../symfony/polyfill-php72"
         },
         },
         {
         {
             "name": "symfony/polyfill-php80",
             "name": "symfony/polyfill-php80",
-            "version": "v1.22.0",
-            "version_normalized": "1.22.0.0",
+            "version": "v1.22.1",
+            "version_normalized": "1.22.1.0",
             "source": {
             "source": {
                 "type": "git",
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php80.git",
                 "url": "https://github.com/symfony/polyfill-php80.git",
@@ -2885,7 +2993,7 @@
                 "shim"
                 "shim"
             ],
             ],
             "support": {
             "support": {
-                "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.0"
+                "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1"
             },
             },
             "funding": [
             "funding": [
                 {
                 {

+ 40 - 40
api/vendor/composer/installed.php

@@ -6,7 +6,7 @@
     'aliases' => 
     'aliases' => 
     array (
     array (
     ),
     ),
-    'reference' => '7e9a4efa44fc1396837620eb2d675a4194d97cd5',
+    'reference' => 'd116a5555c0c9912ce0b22091539443ff3a9711a',
     'name' => '__root__',
     'name' => '__root__',
   ),
   ),
   'versions' => 
   'versions' => 
@@ -18,7 +18,7 @@
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => '7e9a4efa44fc1396837620eb2d675a4194d97cd5',
+      'reference' => 'd116a5555c0c9912ce0b22091539443ff3a9711a',
     ),
     ),
     'adldap2/adldap2' => 
     'adldap2/adldap2' => 
     array (
     array (
@@ -40,12 +40,12 @@
     ),
     ),
     'composer/semver' => 
     'composer/semver' => 
     array (
     array (
-      'pretty_version' => '1.4.2',
-      'version' => '1.4.2.0',
+      'pretty_version' => '1.7.2',
+      'version' => '1.7.2.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => 'c7cb9a2095a074d131b65a8a0cd294479d785573',
+      'reference' => '647490bbcaf7fc4891c58f47b825eb99d19c377a',
     ),
     ),
     'dg/dibi' => 
     'dg/dibi' => 
     array (
     array (
@@ -92,30 +92,30 @@
     ),
     ),
     'guzzlehttp/guzzle' => 
     'guzzlehttp/guzzle' => 
     array (
     array (
-      'pretty_version' => '7.1.1',
-      'version' => '7.1.1.0',
+      'pretty_version' => '7.3.0',
+      'version' => '7.3.0.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => '7427d6f99df41cc01f33cd59832f721c150ffdf3',
+      'reference' => '7008573787b430c1c1f650e3722d9bba59967628',
     ),
     ),
     'guzzlehttp/promises' => 
     'guzzlehttp/promises' => 
     array (
     array (
-      'pretty_version' => 'v1.3.1',
-      'version' => '1.3.1.0',
+      'pretty_version' => '1.4.1',
+      'version' => '1.4.1.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => 'a59da6cf61d80060647ff4d3eb2c03a2bc694646',
+      'reference' => '8e7d04f1f6450fef59366c399cfad4b9383aa30d',
     ),
     ),
     'guzzlehttp/psr7' => 
     'guzzlehttp/psr7' => 
     array (
     array (
-      'pretty_version' => '1.6.1',
-      'version' => '1.6.1.0',
+      'pretty_version' => '1.8.2',
+      'version' => '1.8.2.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => '239400de7a173fe9901b9ac7c06497751f00727a',
+      'reference' => 'dc960a912984efb74d0a90222870c72c87f10c91',
     ),
     ),
     'illuminate/contracts' => 
     'illuminate/contracts' => 
     array (
     array (
@@ -218,12 +218,12 @@
     ),
     ),
     'paragonie/random_compat' => 
     'paragonie/random_compat' => 
     array (
     array (
-      'pretty_version' => 'v9.99.99',
-      'version' => '9.99.99.0',
+      'pretty_version' => 'v9.99.100',
+      'version' => '9.99.100.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => '84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95',
+      'reference' => '996434e5492cb4c3edcb9168db6fbb1359ef965a',
     ),
     ),
     'paragonie/sodium_compat' => 
     'paragonie/sodium_compat' => 
     array (
     array (
@@ -254,12 +254,12 @@
     ),
     ),
     'phpmailer/phpmailer' => 
     'phpmailer/phpmailer' => 
     array (
     array (
-      'pretty_version' => 'v6.2.0',
-      'version' => '6.2.0.0',
+      'pretty_version' => 'v6.4.1',
+      'version' => '6.4.1.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => 'e38888a75c070304ca5514197d4847a59a5c853f',
+      'reference' => '9256f12d8fb0cd0500f93b19e18c356906cbed3d',
     ),
     ),
     'pragmarx/google2fa' => 
     'pragmarx/google2fa' => 
     array (
     array (
@@ -272,12 +272,12 @@
     ),
     ),
     'psr/container' => 
     'psr/container' => 
     array (
     array (
-      'pretty_version' => '1.0.0',
-      'version' => '1.0.0.0',
+      'pretty_version' => '1.1.1',
+      'version' => '1.1.1.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => 'b7ce3b176482dbbc1245ebf52b181af44c2cf55f',
+      'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf',
     ),
     ),
     'psr/http-client' => 
     'psr/http-client' => 
     array (
     array (
@@ -347,12 +347,12 @@
     ),
     ),
     'psr/log' => 
     'psr/log' => 
     array (
     array (
-      'pretty_version' => '1.1.0',
-      'version' => '1.1.0.0',
+      'pretty_version' => '1.1.4',
+      'version' => '1.1.4.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => '6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd',
+      'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
     ),
     ),
     'psr/simple-cache' => 
     'psr/simple-cache' => 
     array (
     array (
@@ -383,12 +383,12 @@
     ),
     ),
     'rmccue/requests' => 
     'rmccue/requests' => 
     array (
     array (
-      'pretty_version' => 'v1.7.0',
-      'version' => '1.7.0.0',
+      'pretty_version' => 'v1.8.0',
+      'version' => '1.8.0.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => '87932f52ffad70504d93f04f15690cf16a089546',
+      'reference' => 'afbe4790e4def03581c4a0963a1e8aa01f6030f1',
     ),
     ),
     'slim/psr7' => 
     'slim/psr7' => 
     array (
     array (
@@ -428,21 +428,21 @@
     ),
     ),
     'symfony/polyfill-ctype' => 
     'symfony/polyfill-ctype' => 
     array (
     array (
-      'pretty_version' => 'v1.18.0',
-      'version' => '1.18.0.0',
+      'pretty_version' => 'v1.22.1',
+      'version' => '1.22.1.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => '1c302646f6efc070cd46856e600e5e0684d6b454',
+      'reference' => 'c6c942b1ac76c82448322025e084cadc56048b4e',
     ),
     ),
     'symfony/polyfill-mbstring' => 
     'symfony/polyfill-mbstring' => 
     array (
     array (
-      'pretty_version' => 'v1.14.0',
-      'version' => '1.14.0.0',
+      'pretty_version' => 'v1.22.1',
+      'version' => '1.22.1.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => '34094cfa9abe1f0f14f48f490772db7a775559f2',
+      'reference' => '5232de97ee3b75b0360528dae24e73db49566ab1',
     ),
     ),
     'symfony/polyfill-php56' => 
     'symfony/polyfill-php56' => 
     array (
     array (
@@ -455,17 +455,17 @@
     ),
     ),
     'symfony/polyfill-php72' => 
     'symfony/polyfill-php72' => 
     array (
     array (
-      'pretty_version' => 'v1.10.0',
-      'version' => '1.10.0.0',
+      'pretty_version' => 'v1.22.1',
+      'version' => '1.22.1.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),
-      'reference' => '9050816e2ca34a8e916c3a0ae8b9c2fccf68b631',
+      'reference' => 'cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9',
     ),
     ),
     'symfony/polyfill-php80' => 
     'symfony/polyfill-php80' => 
     array (
     array (
-      'pretty_version' => 'v1.22.0',
-      'version' => '1.22.0.0',
+      'pretty_version' => 'v1.22.1',
+      'version' => '1.22.1.0',
       'aliases' => 
       'aliases' => 
       array (
       array (
       ),
       ),

+ 41 - 0
api/vendor/composer/semver/CHANGELOG.md

@@ -3,6 +3,39 @@
 All notable changes to this project will be documented in this file.
 All notable changes to this project will be documented in this file.
 This project adheres to [Semantic Versioning](http://semver.org/).
 This project adheres to [Semantic Versioning](http://semver.org/).
 
 
+### [1.7.2] 2020-12-03
+
+  * Fixed: Allow installing on php 8
+
+### [1.7.1] 2020-09-27
+
+  * Fixed: accidental validation of broken constraints combining ^/~ and wildcards, and -dev suffix allowing weird cases
+  * Fixed: normalization of beta0 and such which was dropping the 0
+
+### [1.7.0] 2020-09-09
+
+  * Added: support for `x || @dev`, not very useful but seen in the wild and failed to validate with 1.5.2/1.6.0
+  * Added: support for `foobar-dev` being equal to `dev-foobar`, dev-foobar is the official way to write it but we need to support the other for BC and convenience
+
+### [1.6.0] 2020-09-08
+
+  * Added: support for constraints like `^2.x-dev` and `~2.x-dev`, not very useful but seen in the wild and failed to validate with 1.5.2
+  * Fixed: invalid aliases will no longer throw, unless explicitly validated by Composer in the root package
+
+### [1.5.2] 2020-09-08
+
+  * Fixed: handling of some invalid -dev versions which were seen as valid
+  * Fixed: some doctypes
+
+### [1.5.1] 2020-01-13
+
+  * Fixed: Parsing of aliased version was not validating the alias to be a valid version
+
+### [1.5.0] 2019-03-19
+
+  * Added: some support for date versions (e.g. 201903) in `~` operator
+  * Fixed: support for stabilities in `~` operator was inconsistent
+
 ### [1.4.2] 2016-08-30
 ### [1.4.2] 2016-08-30
 
 
   * Fixed: collapsing of complex constraints lead to buggy constraints
   * Fixed: collapsing of complex constraints lead to buggy constraints
@@ -57,6 +90,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
     - Namespace: `Composer\Test\Package\LinkConstraint` -> `Composer\Test\Semver\Constraint`
     - Namespace: `Composer\Test\Package\LinkConstraint` -> `Composer\Test\Semver\Constraint`
   * Changed: code style using php-cs-fixer.
   * Changed: code style using php-cs-fixer.
 
 
+[1.7.2]: https://github.com/composer/semver/compare/1.7.1...1.7.2
+[1.7.1]: https://github.com/composer/semver/compare/1.7.0...1.7.1
+[1.7.0]: https://github.com/composer/semver/compare/1.6.0...1.7.0
+[1.6.0]: https://github.com/composer/semver/compare/1.5.2...1.6.0
+[1.5.2]: https://github.com/composer/semver/compare/1.5.1...1.5.2
+[1.5.1]: https://github.com/composer/semver/compare/1.5.0...1.5.1
+[1.5.0]: https://github.com/composer/semver/compare/1.4.2...1.5.0
+[1.4.2]: https://github.com/composer/semver/compare/1.4.1...1.4.2
 [1.4.1]: https://github.com/composer/semver/compare/1.4.0...1.4.1
 [1.4.1]: https://github.com/composer/semver/compare/1.4.0...1.4.1
 [1.4.0]: https://github.com/composer/semver/compare/1.3.0...1.4.0
 [1.4.0]: https://github.com/composer/semver/compare/1.3.0...1.4.0
 [1.3.0]: https://github.com/composer/semver/compare/1.2.0...1.3.0
 [1.3.0]: https://github.com/composer/semver/compare/1.2.0...1.3.0

+ 1 - 1
api/vendor/composer/semver/README.md

@@ -46,7 +46,7 @@ The `Composer\Semver\Comparator` class provides the following methods for compar
 * equalTo($v1, $v2)
 * equalTo($v1, $v2)
 * notEqualTo($v1, $v2)
 * notEqualTo($v1, $v2)
 
 
-Each function takes two version strings as arguments. For example:
+Each function takes two version strings as arguments and returns a boolean. For example:
 
 
 ```php
 ```php
 use Composer\Semver\Comparator;
 use Composer\Semver\Comparator;

+ 2 - 3
api/vendor/composer/semver/composer.json

@@ -31,11 +31,10 @@
         "issues": "https://github.com/composer/semver/issues"
         "issues": "https://github.com/composer/semver/issues"
     },
     },
     "require": {
     "require": {
-        "php": "^5.3.2 || ^7.0"
+        "php": "^5.3.2 || ^7.0 || ^8.0"
     },
     },
     "require-dev": {
     "require-dev": {
-        "phpunit/phpunit": "^4.5 || ^5.0.5",
-        "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0"
+        "phpunit/phpunit": "^4.5 || ^5.0.5"
     },
     },
     "autoload": {
     "autoload": {
         "psr-4": {
         "psr-4": {

+ 1 - 1
api/vendor/composer/semver/src/Constraint/AbstractConstraint.php

@@ -11,7 +11,7 @@
 
 
 namespace Composer\Semver\Constraint;
 namespace Composer\Semver\Constraint;
 
 
-trigger_error('The ' . __CLASS__ . ' abstract class is deprecated, there is no replacement for it, it will be removed in the next major version.', E_USER_DEPRECATED);
+trigger_error('The ' . __NAMESPACE__ . '\AbstractConstraint abstract class is deprecated, there is no replacement for it, it will be removed in the next major version.', E_USER_DEPRECATED);
 
 
 /**
 /**
  * Base constraint class.
  * Base constraint class.

+ 6 - 10
api/vendor/composer/semver/src/Constraint/Constraint.php

@@ -54,7 +54,7 @@ class Constraint implements ConstraintInterface
         self::OP_NE => '!=',
         self::OP_NE => '!=',
     );
     );
 
 
-    /** @var string */
+    /** @var int */
     protected $operator;
     protected $operator;
 
 
     /** @var string */
     /** @var string */
@@ -134,7 +134,7 @@ class Constraint implements ConstraintInterface
      * @param string $a
      * @param string $a
      * @param string $b
      * @param string $b
      * @param string $operator
      * @param string $operator
-     * @param bool $compareBranches
+     * @param bool   $compareBranches
      *
      *
      * @throws \InvalidArgumentException if invalid operator is given.
      * @throws \InvalidArgumentException if invalid operator is given.
      *
      *
@@ -167,7 +167,7 @@ class Constraint implements ConstraintInterface
 
 
     /**
     /**
      * @param Constraint $provider
      * @param Constraint $provider
-     * @param bool $compareBranches
+     * @param bool       $compareBranches
      *
      *
      * @return bool
      * @return bool
      */
      */
@@ -184,7 +184,7 @@ class Constraint implements ConstraintInterface
         // '!=' operator is match when other operator is not '==' operator or version is not match
         // '!=' operator is match when other operator is not '==' operator or version is not match
         // these kinds of comparisons always have a solution
         // these kinds of comparisons always have a solution
         if ($isNonEqualOp || $isProviderNonEqualOp) {
         if ($isNonEqualOp || $isProviderNonEqualOp) {
-            return !$isEqualOp && !$isProviderEqualOp
+            return (!$isEqualOp && !$isProviderEqualOp)
                 || $this->versionCompare($provider->version, $this->version, '!=', $compareBranches);
                 || $this->versionCompare($provider->version, $this->version, '!=', $compareBranches);
         }
         }
 
 
@@ -197,13 +197,9 @@ class Constraint implements ConstraintInterface
         if ($this->versionCompare($provider->version, $this->version, self::$transOpInt[$this->operator], $compareBranches)) {
         if ($this->versionCompare($provider->version, $this->version, self::$transOpInt[$this->operator], $compareBranches)) {
             // special case, e.g. require >= 1.0 and provide < 1.0
             // special case, e.g. require >= 1.0 and provide < 1.0
             // 1.0 >= 1.0 but 1.0 is outside of the provided interval
             // 1.0 >= 1.0 but 1.0 is outside of the provided interval
-            if ($provider->version === $this->version
+            return !($provider->version === $this->version
                 && self::$transOpInt[$provider->operator] === $providerNoEqualOp
                 && self::$transOpInt[$provider->operator] === $providerNoEqualOp
-                && self::$transOpInt[$this->operator] !== $noEqualOp) {
-                return false;
-            }
-
-            return true;
+                && self::$transOpInt[$this->operator] !== $noEqualOp);
         }
         }
 
 
         return false;
         return false;

+ 2 - 2
api/vendor/composer/semver/src/Constraint/EmptyConstraint.php

@@ -30,7 +30,7 @@ class EmptyConstraint implements ConstraintInterface
     }
     }
 
 
     /**
     /**
-     * @param $prettyString
+     * @param string $prettyString
      */
      */
     public function setPrettyString($prettyString)
     public function setPrettyString($prettyString)
     {
     {
@@ -46,7 +46,7 @@ class EmptyConstraint implements ConstraintInterface
             return $this->prettyString;
             return $this->prettyString;
         }
         }
 
 
-        return $this->__toString();
+        return (string) $this;
     }
     }
 
 
     /**
     /**

+ 4 - 4
api/vendor/composer/semver/src/Constraint/MultiConstraint.php

@@ -19,7 +19,7 @@ class MultiConstraint implements ConstraintInterface
     /** @var ConstraintInterface[] */
     /** @var ConstraintInterface[] */
     protected $constraints;
     protected $constraints;
 
 
-    /** @var string */
+    /** @var string|null */
     protected $prettyString;
     protected $prettyString;
 
 
     /** @var bool */
     /** @var bool */
@@ -27,7 +27,7 @@ class MultiConstraint implements ConstraintInterface
 
 
     /**
     /**
      * @param ConstraintInterface[] $constraints A set of constraints
      * @param ConstraintInterface[] $constraints A set of constraints
-     * @param bool $conjunctive Whether the constraints should be treated as conjunctive or disjunctive
+     * @param bool                  $conjunctive Whether the constraints should be treated as conjunctive or disjunctive
      */
      */
     public function __construct(array $constraints, $conjunctive = true)
     public function __construct(array $constraints, $conjunctive = true)
     {
     {
@@ -86,7 +86,7 @@ class MultiConstraint implements ConstraintInterface
     }
     }
 
 
     /**
     /**
-     * @param string $prettyString
+     * @param string|null $prettyString
      */
      */
     public function setPrettyString($prettyString)
     public function setPrettyString($prettyString)
     {
     {
@@ -102,7 +102,7 @@ class MultiConstraint implements ConstraintInterface
             return $this->prettyString;
             return $this->prettyString;
         }
         }
 
 
-        return $this->__toString();
+        return (string) $this;
     }
     }
 
 
     /**
     /**

+ 4 - 4
api/vendor/composer/semver/src/Semver.php

@@ -37,15 +37,15 @@ class Semver
 
 
         $versionParser = self::$versionParser;
         $versionParser = self::$versionParser;
         $provider = new Constraint('==', $versionParser->normalize($version));
         $provider = new Constraint('==', $versionParser->normalize($version));
-        $constraints = $versionParser->parseConstraints($constraints);
+        $parsedConstraints = $versionParser->parseConstraints($constraints);
 
 
-        return $constraints->matches($provider);
+        return $parsedConstraints->matches($provider);
     }
     }
 
 
     /**
     /**
      * Return all versions that satisfy given constraints.
      * Return all versions that satisfy given constraints.
      *
      *
-     * @param array $versions
+     * @param array  $versions
      * @param string $constraints
      * @param string $constraints
      *
      *
      * @return array
      * @return array
@@ -85,7 +85,7 @@ class Semver
 
 
     /**
     /**
      * @param array $versions
      * @param array $versions
-     * @param int $direction
+     * @param int   $direction
      *
      *
      * @return array
      * @return array
      */
      */

+ 84 - 54
api/vendor/composer/semver/src/VersionParser.php

@@ -38,8 +38,8 @@ class VersionParser
      */
      */
     private static $modifierRegex = '[._-]?(?:(stable|beta|b|RC|alpha|a|patch|pl|p)((?:[.-]?\d+)*+)?)?([.-]?dev)?';
     private static $modifierRegex = '[._-]?(?:(stable|beta|b|RC|alpha|a|patch|pl|p)((?:[.-]?\d+)*+)?)?([.-]?dev)?';
 
 
-    /** @var array */
-    private static $stabilities = array('stable', 'RC', 'beta', 'alpha', 'dev');
+    /** @var string */
+    private static $stabilitiesRegex = 'stable|RC|beta|alpha|dev';
 
 
     /**
     /**
      * Returns the stability of a version.
      * Returns the stability of a version.
@@ -52,11 +52,12 @@ class VersionParser
     {
     {
         $version = preg_replace('{#.+$}i', '', $version);
         $version = preg_replace('{#.+$}i', '', $version);
 
 
-        if ('dev-' === substr($version, 0, 4) || '-dev' === substr($version, -4)) {
+        if (strpos($version, 'dev-') === 0 || '-dev' === substr($version, -4)) {
             return 'dev';
             return 'dev';
         }
         }
 
 
         preg_match('{' . self::$modifierRegex . '(?:\+.*)?$}i', strtolower($version), $match);
         preg_match('{' . self::$modifierRegex . '(?:\+.*)?$}i', strtolower($version), $match);
+
         if (!empty($match[3])) {
         if (!empty($match[3])) {
             return 'dev';
             return 'dev';
         }
         }
@@ -101,6 +102,7 @@ class VersionParser
     public function normalize($version, $fullVersion = null)
     public function normalize($version, $fullVersion = null)
     {
     {
         $version = trim($version);
         $version = trim($version);
+        $origVersion = $version;
         if (null === $fullVersion) {
         if (null === $fullVersion) {
             $fullVersion = $version;
             $fullVersion = $version;
         }
         }
@@ -110,13 +112,18 @@ class VersionParser
             $version = $match[1];
             $version = $match[1];
         }
         }
 
 
+        // strip off stability flag
+        if (preg_match('{@(?:' . self::$stabilitiesRegex . ')$}i', $version, $match)) {
+            $version = substr($version, 0, strlen($version) - strlen($match[0]));
+        }
+
         // match master-like branches
         // match master-like branches
         if (preg_match('{^(?:dev-)?(?:master|trunk|default)$}i', $version)) {
         if (preg_match('{^(?:dev-)?(?:master|trunk|default)$}i', $version)) {
             return '9999999-dev';
             return '9999999-dev';
         }
         }
 
 
         // if requirement is branch-like, use full name
         // if requirement is branch-like, use full name
-        if ('dev-' === strtolower(substr($version, 0, 4))) {
+        if (stripos($version, 'dev-') === 0) {
             return 'dev-' . substr($version, 4);
             return 'dev-' . substr($version, 4);
         }
         }
 
 
@@ -144,7 +151,7 @@ class VersionParser
                 if ('stable' === $matches[$index]) {
                 if ('stable' === $matches[$index]) {
                     return $version;
                     return $version;
                 }
                 }
-                $version .= '-' . $this->expandStability($matches[$index]) . (!empty($matches[$index + 1]) ? ltrim($matches[$index + 1], '.-') : '');
+                $version .= '-' . $this->expandStability($matches[$index]) . (isset($matches[$index + 1]) && '' !== $matches[$index + 1] ? ltrim($matches[$index + 1], '.-') : '');
             }
             }
 
 
             if (!empty($matches[$index + 2])) {
             if (!empty($matches[$index + 2])) {
@@ -157,19 +164,25 @@ class VersionParser
         // match dev branches
         // match dev branches
         if (preg_match('{(.*?)[.-]?dev$}i', $version, $match)) {
         if (preg_match('{(.*?)[.-]?dev$}i', $version, $match)) {
             try {
             try {
-                return $this->normalizeBranch($match[1]);
+                $normalized = $this->normalizeBranch($match[1]);
+                // a branch ending with -dev is only valid if it is numeric
+                // if it gets prefixed with dev- it means the branch name should
+                // have had a dev- prefix already when passed to normalize
+                if (strpos($normalized, 'dev-') === false) {
+                    return $normalized;
+                }
             } catch (\Exception $e) {
             } catch (\Exception $e) {
             }
             }
         }
         }
 
 
         $extraMessage = '';
         $extraMessage = '';
-        if (preg_match('{ +as +' . preg_quote($version) . '$}', $fullVersion)) {
+        if (preg_match('{ +as +' . preg_quote($version) . '(?:@(?:'.self::$stabilitiesRegex.'))?$}', $fullVersion)) {
             $extraMessage = ' in "' . $fullVersion . '", the alias must be an exact version';
             $extraMessage = ' in "' . $fullVersion . '", the alias must be an exact version';
-        } elseif (preg_match('{^' . preg_quote($version) . ' +as +}', $fullVersion)) {
+        } elseif (preg_match('{^' . preg_quote($version) . '(?:@(?:'.self::$stabilitiesRegex.'))? +as +}', $fullVersion)) {
             $extraMessage = ' in "' . $fullVersion . '", the alias source must be an exact version, if it is a branch name you should prefix it with dev-';
             $extraMessage = ' in "' . $fullVersion . '", the alias source must be an exact version, if it is a branch name you should prefix it with dev-';
         }
         }
 
 
-        throw new \UnexpectedValueException('Invalid version string "' . $version . '"' . $extraMessage);
+        throw new \UnexpectedValueException('Invalid version string "' . $origVersion . '"' . $extraMessage);
     }
     }
 
 
     /**
     /**
@@ -226,16 +239,9 @@ class VersionParser
     {
     {
         $prettyConstraint = $constraints;
         $prettyConstraint = $constraints;
 
 
-        if (preg_match('{^([^,\s]*?)@(' . implode('|', self::$stabilities) . ')$}i', $constraints, $match)) {
-            $constraints = empty($match[1]) ? '*' : $match[1];
-        }
-
-        if (preg_match('{^(dev-[^,\s@]+?|[^,\s@]+?\.x-dev)#.+$}i', $constraints, $match)) {
-            $constraints = $match[1];
-        }
-
         $orConstraints = preg_split('{\s*\|\|?\s*}', trim($constraints));
         $orConstraints = preg_split('{\s*\|\|?\s*}', trim($constraints));
         $orGroups = array();
         $orGroups = array();
+
         foreach ($orConstraints as $constraints) {
         foreach ($orConstraints as $constraints) {
             $andConstraints = preg_split('{(?<!^|as|[=>< ,]) *(?<!-)[, ](?!-) *(?!,|as|$)}', $constraints);
             $andConstraints = preg_split('{(?<!^|as|[=>< ,]) *(?<!-)[, ](?!-) *(?!,|as|$)}', $constraints);
             if (count($andConstraints) > 1) {
             if (count($andConstraints) > 1) {
@@ -268,9 +274,9 @@ class VersionParser
             && 2 === count($orGroups[0]->getConstraints())
             && 2 === count($orGroups[0]->getConstraints())
             && 2 === count($orGroups[1]->getConstraints())
             && 2 === count($orGroups[1]->getConstraints())
             && ($a = (string) $orGroups[0])
             && ($a = (string) $orGroups[0])
-            && substr($a, 0, 3) === '[>=' && (false !== ($posA = strpos($a, '<', 4)))
+            && strpos($a, '[>=') === 0 && (false !== ($posA = strpos($a, '<', 4)))
             && ($b = (string) $orGroups[1])
             && ($b = (string) $orGroups[1])
-            && substr($b, 0, 3) === '[>=' && (false !== ($posB = strpos($b, '<', 4)))
+            && strpos($b, '[>=') === 0 && (false !== ($posB = strpos($b, '<', 4)))
             && substr($a, $posA + 2, -1) === substr($b, 4, $posB - 5)
             && substr($a, $posA + 2, -1) === substr($b, 4, $posB - 5)
         ) {
         ) {
             $constraint = new MultiConstraint(array(
             $constraint = new MultiConstraint(array(
@@ -295,18 +301,29 @@ class VersionParser
      */
      */
     private function parseConstraint($constraint)
     private function parseConstraint($constraint)
     {
     {
-        if (preg_match('{^([^,\s]+?)@(' . implode('|', self::$stabilities) . ')$}i', $constraint, $match)) {
+        // strip off aliasing
+        if (preg_match('{^([^,\s]++) ++as ++([^,\s]++)$}', $constraint, $match)) {
             $constraint = $match[1];
             $constraint = $match[1];
+        }
+
+        // strip @stability flags, and keep it for later use
+        if (preg_match('{^([^,\s]*?)@(' . self::$stabilitiesRegex . ')$}i', $constraint, $match)) {
+            $constraint = '' !== $match[1] ? $match[1] : '*';
             if ($match[2] !== 'stable') {
             if ($match[2] !== 'stable') {
                 $stabilityModifier = $match[2];
                 $stabilityModifier = $match[2];
             }
             }
         }
         }
 
 
+        // get rid of #refs as those are used by composer only
+        if (preg_match('{^(dev-[^,\s@]+?|[^,\s@]+?\.x-dev)#.+$}i', $constraint, $match)) {
+            $constraint = $match[1];
+        }
+
         if (preg_match('{^v?[xX*](\.[xX*])*$}i', $constraint)) {
         if (preg_match('{^v?[xX*](\.[xX*])*$}i', $constraint)) {
             return array(new EmptyConstraint());
             return array(new EmptyConstraint());
         }
         }
 
 
-        $versionRegex = 'v?(\d++)(?:\.(\d++))?(?:\.(\d++))?(?:\.(\d++))?' . self::$modifierRegex . '(?:\+[^\s]+)?';
+        $versionRegex = 'v?(\d++)(?:\.(\d++))?(?:\.(\d++))?(?:\.(\d++))?(?:' . self::$modifierRegex . '|\.([xX*][.-]?dev))(?:\+[^\s]+)?';
 
 
         // Tilde Range
         // Tilde Range
         //
         //
@@ -314,7 +331,7 @@ class VersionParser
         // version, to ensure that unstable instances of the current version are allowed. However, if a stability
         // version, to ensure that unstable instances of the current version are allowed. However, if a stability
         // suffix is added to the constraint, then a >= match on the current version is used instead.
         // suffix is added to the constraint, then a >= match on the current version is used instead.
         if (preg_match('{^~>?' . $versionRegex . '$}i', $constraint, $matches)) {
         if (preg_match('{^~>?' . $versionRegex . '$}i', $constraint, $matches)) {
-            if (substr($constraint, 0, 2) === '~>') {
+            if (strpos($constraint, '~>') === 0) {
                 throw new \UnexpectedValueException(
                 throw new \UnexpectedValueException(
                     'Could not parse version constraint ' . $constraint . ': ' .
                     'Could not parse version constraint ' . $constraint . ': ' .
                     'Invalid operator "~>", you probably meant to use the "~" operator'
                     'Invalid operator "~>", you probably meant to use the "~" operator'
@@ -322,31 +339,28 @@ class VersionParser
             }
             }
 
 
             // Work out which position in the version we are operating at
             // Work out which position in the version we are operating at
-            if (isset($matches[4]) && '' !== $matches[4]) {
+            if (isset($matches[4]) && '' !== $matches[4] && null !== $matches[4]) {
                 $position = 4;
                 $position = 4;
-            } elseif (isset($matches[3]) && '' !== $matches[3]) {
+            } elseif (isset($matches[3]) && '' !== $matches[3] && null !== $matches[3]) {
                 $position = 3;
                 $position = 3;
-            } elseif (isset($matches[2]) && '' !== $matches[2]) {
+            } elseif (isset($matches[2]) && '' !== $matches[2] && null !== $matches[2]) {
                 $position = 2;
                 $position = 2;
             } else {
             } else {
                 $position = 1;
                 $position = 1;
             }
             }
 
 
-            // Calculate the stability suffix
-            $stabilitySuffix = '';
-            if (!empty($matches[5])) {
-                $stabilitySuffix .= '-' . $this->expandStability($matches[5]) . (!empty($matches[6]) ? $matches[6] : '');
+            // when matching 2.x-dev or 3.0.x-dev we have to shift the second or third number, despite no second/third number matching above
+            if (!empty($matches[8])) {
+                $position++;
             }
             }
 
 
-            if (!empty($matches[7])) {
+            // Calculate the stability suffix
+            $stabilitySuffix = '';
+            if (empty($matches[5]) && empty($matches[7]) && empty($matches[8])) {
                 $stabilitySuffix .= '-dev';
                 $stabilitySuffix .= '-dev';
             }
             }
 
 
-            if (!$stabilitySuffix) {
-                $stabilitySuffix = '-dev';
-            }
-
-            $lowVersion = $this->manipulateVersionString($matches, $position, 0) . $stabilitySuffix;
+            $lowVersion = $this->normalize(substr($constraint . $stabilitySuffix, 1));
             $lowerBound = new Constraint('>=', $lowVersion);
             $lowerBound = new Constraint('>=', $lowVersion);
 
 
             // For upper bound, we increment the position of one more significance,
             // For upper bound, we increment the position of one more significance,
@@ -368,9 +382,9 @@ class VersionParser
         // versions 0.X >=0.1.0, and no updates for versions 0.0.X
         // versions 0.X >=0.1.0, and no updates for versions 0.0.X
         if (preg_match('{^\^' . $versionRegex . '($)}i', $constraint, $matches)) {
         if (preg_match('{^\^' . $versionRegex . '($)}i', $constraint, $matches)) {
             // Work out which position in the version we are operating at
             // Work out which position in the version we are operating at
-            if ('0' !== $matches[1] || '' === $matches[2]) {
+            if ('0' !== $matches[1] || '' === $matches[2] || null === $matches[2]) {
                 $position = 1;
                 $position = 1;
-            } elseif ('0' !== $matches[2] || '' === $matches[3]) {
+            } elseif ('0' !== $matches[2] || '' === $matches[3] || null === $matches[3]) {
                 $position = 2;
                 $position = 2;
             } else {
             } else {
                 $position = 3;
                 $position = 3;
@@ -378,7 +392,7 @@ class VersionParser
 
 
             // Calculate the stability suffix
             // Calculate the stability suffix
             $stabilitySuffix = '';
             $stabilitySuffix = '';
-            if (empty($matches[5]) && empty($matches[7])) {
+            if (empty($matches[5]) && empty($matches[7]) && empty($matches[8])) {
                 $stabilitySuffix .= '-dev';
                 $stabilitySuffix .= '-dev';
             }
             }
 
 
@@ -401,9 +415,9 @@ class VersionParser
         // Any of X, x, or * may be used to "stand in" for one of the numeric values in the [major, minor, patch] tuple.
         // Any of X, x, or * may be used to "stand in" for one of the numeric values in the [major, minor, patch] tuple.
         // A partial version range is treated as an X-Range, so the special character is in fact optional.
         // A partial version range is treated as an X-Range, so the special character is in fact optional.
         if (preg_match('{^v?(\d++)(?:\.(\d++))?(?:\.(\d++))?(?:\.[xX*])++$}', $constraint, $matches)) {
         if (preg_match('{^v?(\d++)(?:\.(\d++))?(?:\.(\d++))?(?:\.[xX*])++$}', $constraint, $matches)) {
-            if (isset($matches[3]) && '' !== $matches[3]) {
+            if (isset($matches[3]) && '' !== $matches[3] && null !== $matches[3]) {
                 $position = 3;
                 $position = 3;
-            } elseif (isset($matches[2]) && '' !== $matches[2]) {
+            } elseif (isset($matches[2]) && '' !== $matches[2] && null !== $matches[2]) {
                 $position = 2;
                 $position = 2;
             } else {
             } else {
                 $position = 1;
                 $position = 1;
@@ -431,7 +445,7 @@ class VersionParser
         if (preg_match('{^(?P<from>' . $versionRegex . ') +- +(?P<to>' . $versionRegex . ')($)}i', $constraint, $matches)) {
         if (preg_match('{^(?P<from>' . $versionRegex . ') +- +(?P<to>' . $versionRegex . ')($)}i', $constraint, $matches)) {
             // Calculate the stability suffix
             // Calculate the stability suffix
             $lowStabilitySuffix = '';
             $lowStabilitySuffix = '';
-            if (empty($matches[6]) && empty($matches[8])) {
+            if (empty($matches[6]) && empty($matches[8]) && empty($matches[9])) {
                 $lowStabilitySuffix = '-dev';
                 $lowStabilitySuffix = '-dev';
             }
             }
 
 
@@ -442,12 +456,16 @@ class VersionParser
                 return ($x === 0 || $x === '0') ? false : empty($x);
                 return ($x === 0 || $x === '0') ? false : empty($x);
             };
             };
 
 
-            if ((!$empty($matches[11]) && !$empty($matches[12])) || !empty($matches[14]) || !empty($matches[16])) {
+            if ((!$empty($matches[12]) && !$empty($matches[13])) || !empty($matches[15]) || !empty($matches[17]) || !empty($matches[18])) {
                 $highVersion = $this->normalize($matches['to']);
                 $highVersion = $this->normalize($matches['to']);
                 $upperBound = new Constraint('<=', $highVersion);
                 $upperBound = new Constraint('<=', $highVersion);
             } else {
             } else {
-                $highMatch = array('', $matches[10], $matches[11], $matches[12], $matches[13]);
-                $highVersion = $this->manipulateVersionString($highMatch, $empty($matches[11]) ? 1 : 2, 1) . '-dev';
+                $highMatch = array('', $matches[11], $matches[12], $matches[13], $matches[14]);
+
+                // validate to version
+                $this->normalize($matches['to']);
+
+                $highVersion = $this->manipulateVersionString($highMatch, $empty($matches[12]) ? 1 : 2, 1) . '-dev';
                 $upperBound = new Constraint('<', $highVersion);
                 $upperBound = new Constraint('<', $highVersion);
             }
             }
 
 
@@ -460,13 +478,25 @@ class VersionParser
         // Basic Comparators
         // Basic Comparators
         if (preg_match('{^(<>|!=|>=?|<=?|==?)?\s*(.*)}', $constraint, $matches)) {
         if (preg_match('{^(<>|!=|>=?|<=?|==?)?\s*(.*)}', $constraint, $matches)) {
             try {
             try {
-                $version = $this->normalize($matches[2]);
+                try {
+                    $version = $this->normalize($matches[2]);
+                } catch (\UnexpectedValueException $e) {
+                    // recover from an invalid constraint like foobar-dev which should be dev-foobar
+                    // except if the constraint uses a known operator, in which case it must be a parse error
+                    if (substr($matches[2], -4) === '-dev' && preg_match('{^[0-9a-zA-Z-./]+$}', $matches[2])) {
+                        $version = $this->normalize('dev-'.substr($matches[2], 0, -4));
+                    } else {
+                        throw $e;
+                    }
+                }
+
+                $op = $matches[1] ?: '=';
 
 
-                if (!empty($stabilityModifier) && $this->parseStability($version) === 'stable') {
+                if ($op !== '==' && $op !== '=' && !empty($stabilityModifier) && self::parseStability($version) === 'stable') {
                     $version .= '-' . $stabilityModifier;
                     $version .= '-' . $stabilityModifier;
-                } elseif ('<' === $matches[1] || '>=' === $matches[1]) {
+                } elseif ('<' === $op || '>=' === $op) {
                     if (!preg_match('/-' . self::$modifierRegex . '$/', strtolower($matches[2]))) {
                     if (!preg_match('/-' . self::$modifierRegex . '$/', strtolower($matches[2]))) {
-                        if (substr($matches[2], 0, 4) !== 'dev-') {
+                        if (strpos($matches[2], 'dev-') !== 0) {
                             $version .= '-dev';
                             $version .= '-dev';
                         }
                         }
                     }
                     }
@@ -490,12 +520,12 @@ class VersionParser
      *
      *
      * Support function for {@link parseConstraint()}
      * Support function for {@link parseConstraint()}
      *
      *
-     * @param array $matches Array with version parts in array indexes 1,2,3,4
-     * @param int $position 1,2,3,4 - which segment of the version to increment/decrement
-     * @param int $increment
-     * @param string $pad The string to pad version parts after $position
+     * @param array  $matches   Array with version parts in array indexes 1,2,3,4
+     * @param int    $position  1,2,3,4 - which segment of the version to increment/decrement
+     * @param int    $increment
+     * @param string $pad       The string to pad version parts after $position
      *
      *
-     * @return string The new version
+     * @return string|null The new version
      */
      */
     private function manipulateVersionString($matches, $position, $increment = 0, $pad = '0')
     private function manipulateVersionString($matches, $position, $increment = 0, $pad = '0')
     {
     {
@@ -511,7 +541,7 @@ class VersionParser
 
 
                     // Return null on a carry overflow
                     // Return null on a carry overflow
                     if ($i === 1) {
                     if ($i === 1) {
-                        return;
+                        return null;
                     }
                     }
                 }
                 }
             }
             }

+ 33 - 1
api/vendor/guzzlehttp/guzzle/CHANGELOG.md

@@ -2,7 +2,39 @@
 
 
 Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version.
 Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version.
 
 
-## UNRELEASED
+## 7.3.0 - 2021-03-23
+
+### Added
+
+- Support for DER and P12 certificates [#2413](https://github.com/guzzle/guzzle/pull/2413)
+- Support the cURL (http://) scheme for StreamHandler proxies [#2850](https://github.com/guzzle/guzzle/pull/2850)
+- Support for `guzzlehttp/psr7:^2.0` [#2878](https://github.com/guzzle/guzzle/pull/2878)
+
+### Fixed
+
+- Handle exceptions on invalid header consistently between PHP versions and handlers [#2872](https://github.com/guzzle/guzzle/pull/2872)
+
+## 7.2.0 - 2020-10-10
+
+### Added
+
+- Support for PHP 8 [#2712](https://github.com/guzzle/guzzle/pull/2712), [#2715](https://github.com/guzzle/guzzle/pull/2715), [#2789](https://github.com/guzzle/guzzle/pull/2789)
+- Support passing a body summarizer to the http errors middleware [#2795](https://github.com/guzzle/guzzle/pull/2795)
+
+### Fixed
+
+- Handle exceptions during response creation [#2591](https://github.com/guzzle/guzzle/pull/2591)
+- Fix CURLOPT_ENCODING not to be overwritten [#2595](https://github.com/guzzle/guzzle/pull/2595)
+- Make sure the Request always has a body object [#2804](https://github.com/guzzle/guzzle/pull/2804)
+
+### Changed
+
+- The `TooManyRedirectsException` has a response [#2660](https://github.com/guzzle/guzzle/pull/2660)
+- Avoid "functions" from dependencies [#2712](https://github.com/guzzle/guzzle/pull/2712)
+
+### Deprecated
+
+- Using environment variable GUZZLE_CURL_SELECT_TIMEOUT [#2786](https://github.com/guzzle/guzzle/pull/2786)
 
 
 ## 7.1.1 - 2020-09-30
 ## 7.1.1 - 2020-09-30
 
 

+ 7 - 6
api/vendor/guzzlehttp/guzzle/composer.json

@@ -28,10 +28,10 @@
         }
         }
     ],
     ],
     "require": {
     "require": {
-        "php": "^7.2.5",
+        "php": "^7.2.5 || ^8.0",
         "ext-json": "*",
         "ext-json": "*",
-        "guzzlehttp/promises": "^1.0",
-        "guzzlehttp/psr7": "^1.6.1",
+        "guzzlehttp/promises": "^1.4",
+        "guzzlehttp/psr7": "^1.7 || ^2.0",
         "psr/http-client": "^1.0"
         "psr/http-client": "^1.0"
     },
     },
     "provide": {
     "provide": {
@@ -39,8 +39,9 @@
     },
     },
     "require-dev": {
     "require-dev": {
         "ext-curl": "*",
         "ext-curl": "*",
-        "php-http/client-integration-tests": "dev-phpunit8",
-        "phpunit/phpunit": "^8.5.5",
+        "bamarni/composer-bin-plugin": "^1.4.1",
+        "php-http/client-integration-tests": "^3.0",
+        "phpunit/phpunit": "^8.5.5 || ^9.3.5",
         "psr/log": "^1.1"
         "psr/log": "^1.1"
     },
     },
     "suggest": {
     "suggest": {
@@ -53,7 +54,7 @@
     },
     },
     "extra": {
     "extra": {
         "branch-alias": {
         "branch-alias": {
-            "dev-master": "7.1-dev"
+            "dev-master": "7.3-dev"
         }
         }
     },
     },
     "autoload": {
     "autoload": {

+ 0 - 87
api/vendor/guzzlehttp/guzzle/psalm.baseline.xml

@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<files psalm-version="3.11.5@3c60609c218d4d4b3b257728b8089094e5c6c6c2">
-  <file src="src/Client.php">
-    <NullArgument occurrences="1">
-      <code>null</code>
-    </NullArgument>
-    <PossiblyUndefinedVariable occurrences="1">
-      <code>$options</code>
-    </PossiblyUndefinedVariable>
-    <UndefinedInterfaceMethod occurrences="1">
-      <code>getBoundary</code>
-    </UndefinedInterfaceMethod>
-  </file>
-  <file src="src/Cookie/CookieJar.php">
-    <PossiblyFalseOperand occurrences="1">
-      <code>$result</code>
-    </PossiblyFalseOperand>
-  </file>
-  <file src="src/Exception/RequestException.php">
-    <ImplicitToStringCast occurrences="1">
-      <code>$uri</code>
-    </ImplicitToStringCast>
-  </file>
-  <file src="src/Handler/CurlFactory.php">
-    <ImplicitToStringCast occurrences="1">
-      <code>$easy-&gt;request-&gt;getUri()</code>
-    </ImplicitToStringCast>
-    <TypeDoesNotContainType occurrences="1">
-      <code>$timeoutRequiresNoSignal &amp;&amp; \strtoupper(\substr(\PHP_OS, 0, 3)) !== 'WIN'</code>
-    </TypeDoesNotContainType>
-  </file>
-  <file src="src/Handler/CurlMultiHandler.php">
-    <InvalidArgument occurrences="1">
-      <code>$this-&gt;active</code>
-    </InvalidArgument>
-    <InvalidPropertyAssignmentValue occurrences="1">
-      <code>$this-&gt;active</code>
-    </InvalidPropertyAssignmentValue>
-    <UndefinedThisPropertyAssignment occurrences="1">
-      <code>$this-&gt;_mh</code>
-    </UndefinedThisPropertyAssignment>
-  </file>
-  <file src="src/Handler/MockHandler.php">
-    <InvalidScalarArgument occurrences="1">
-      <code>$options['delay'] * 1000</code>
-    </InvalidScalarArgument>
-  </file>
-  <file src="src/Handler/StreamHandler.php">
-    <ImplicitToStringCast occurrences="1">
-      <code>$uri</code>
-    </ImplicitToStringCast>
-  </file>
-  <file src="src/HandlerStack.php">
-    <PropertyTypeCoercion occurrences="4">
-      <code>$this-&gt;stack</code>
-      <code>$this-&gt;stack</code>
-      <code>$this-&gt;stack</code>
-      <code>$this-&gt;stack</code>
-    </PropertyTypeCoercion>
-  </file>
-  <file src="src/MessageFormatter.php">
-    <InvalidScalarArgument occurrences="1"/>
-  </file>
-  <file src="src/Middleware.php">
-    <InvalidArgument occurrences="1">
-      <code>$request</code>
-    </InvalidArgument>
-  </file>
-  <file src="src/RedirectMiddleware.php">
-    <ImplicitToStringCast occurrences="1">
-      <code>$location</code>
-    </ImplicitToStringCast>
-  </file>
-  <file src="src/RetryMiddleware.php">
-    <TooManyArguments occurrences="1">
-      <code>($this-&gt;delay)(++$options['retries'], $response)</code>
-    </TooManyArguments>
-  </file>
-  <file src="src/Utils.php">
-    <ForbiddenCode occurrences="1">
-      <code>\var_dump($input)</code>
-    </ForbiddenCode>
-    <PossiblyNullArgument occurrences="1">
-      <code>$info</code>
-    </PossiblyNullArgument>
-  </file>
-</files>

+ 0 - 16
api/vendor/guzzlehttp/guzzle/psalm.xml

@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-<psalm
-    errorLevel="3"
-    resolveFromConfigFile="true"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns="https://getpsalm.org/schema/config"
-    xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
-    errorBaseline="psalm.baseline.xml"
->
-    <projectFiles>
-        <directory name="src" />
-        <ignoreFiles>
-            <directory name="vendor" />
-        </ignoreFiles>
-    </projectFiles>
-</psalm>

+ 28 - 0
api/vendor/guzzlehttp/guzzle/src/BodySummarizer.php

@@ -0,0 +1,28 @@
+<?php
+
+namespace GuzzleHttp;
+
+use Psr\Http\Message\MessageInterface;
+
+final class BodySummarizer implements BodySummarizerInterface
+{
+    /**
+     * @var int|null
+     */
+    private $truncateAt;
+
+    public function __construct(int $truncateAt = null)
+    {
+        $this->truncateAt = $truncateAt;
+    }
+
+    /**
+     * Returns a summarized message body.
+     */
+    public function summarize(MessageInterface $message): ?string
+    {
+        return $this->truncateAt === null
+            ? \GuzzleHttp\Psr7\Message::bodySummary($message)
+            : \GuzzleHttp\Psr7\Message::bodySummary($message, $this->truncateAt);
+    }
+}

+ 13 - 0
api/vendor/guzzlehttp/guzzle/src/BodySummarizerInterface.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace GuzzleHttp;
+
+use Psr\Http\Message\MessageInterface;
+
+interface BodySummarizerInterface
+{
+    /**
+     * Returns a summarized message body.
+     */
+    public function summarize(MessageInterface $message): ?string;
+}

+ 15 - 14
api/vendor/guzzlehttp/guzzle/src/Client.php

@@ -5,6 +5,7 @@ namespace GuzzleHttp;
 use GuzzleHttp\Cookie\CookieJar;
 use GuzzleHttp\Cookie\CookieJar;
 use GuzzleHttp\Exception\GuzzleException;
 use GuzzleHttp\Exception\GuzzleException;
 use GuzzleHttp\Exception\InvalidArgumentException;
 use GuzzleHttp\Exception\InvalidArgumentException;
+use GuzzleHttp\Promise as P;
 use GuzzleHttp\Promise\PromiseInterface;
 use GuzzleHttp\Promise\PromiseInterface;
 use Psr\Http\Message\RequestInterface;
 use Psr\Http\Message\RequestInterface;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ResponseInterface;
@@ -63,7 +64,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
 
 
         // Convert the base_uri to a UriInterface
         // Convert the base_uri to a UriInterface
         if (isset($config['base_uri'])) {
         if (isset($config['base_uri'])) {
-            $config['base_uri'] = Psr7\uri_for($config['base_uri']);
+            $config['base_uri'] = Psr7\Utils::uriFor($config['base_uri']);
         }
         }
 
 
         $this->configureDefaults($config);
         $this->configureDefaults($config);
@@ -156,7 +157,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
         $body = $options['body'] ?? null;
         $body = $options['body'] ?? null;
         $version = $options['version'] ?? '1.1';
         $version = $options['version'] ?? '1.1';
         // Merge the URI into the base URI.
         // Merge the URI into the base URI.
-        $uri = $this->buildUri(Psr7\uri_for($uri), $options);
+        $uri = $this->buildUri(Psr7\Utils::uriFor($uri), $options);
         if (\is_array($body)) {
         if (\is_array($body)) {
             throw $this->invalidBody();
             throw $this->invalidBody();
         }
         }
@@ -203,13 +204,13 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
     {
     {
         return $option === null
         return $option === null
             ? $this->config
             ? $this->config
-            : (isset($this->config[$option]) ? $this->config[$option] : null);
+            : ($this->config[$option] ?? null);
     }
     }
 
 
     private function buildUri(UriInterface $uri, array $config): UriInterface
     private function buildUri(UriInterface $uri, array $config): UriInterface
     {
     {
         if (isset($config['base_uri'])) {
         if (isset($config['base_uri'])) {
-            $uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri);
+            $uri = Psr7\UriResolver::resolve(Psr7\Utils::uriFor($config['base_uri']), $uri);
         }
         }
 
 
         if (isset($config['idn_conversion']) && ($config['idn_conversion'] !== false)) {
         if (isset($config['idn_conversion']) && ($config['idn_conversion'] !== false)) {
@@ -327,9 +328,9 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
         $handler = $options['handler'];
         $handler = $options['handler'];
 
 
         try {
         try {
-            return Promise\promise_for($handler($request, $options));
+            return P\Create::promiseFor($handler($request, $options));
         } catch (\Exception $e) {
         } catch (\Exception $e) {
-            return Promise\rejection_for($e);
+            return P\Create::rejectionFor($e);
         }
         }
     }
     }
 
 
@@ -358,7 +359,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
             $options['body'] = \http_build_query($options['form_params'], '', '&');
             $options['body'] = \http_build_query($options['form_params'], '', '&');
             unset($options['form_params']);
             unset($options['form_params']);
             // Ensure that we don't have the header in different case and set the new value.
             // Ensure that we don't have the header in different case and set the new value.
-            $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
+            $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']);
             $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded';
             $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded';
         }
         }
 
 
@@ -371,7 +372,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
             $options['body'] = Utils::jsonEncode($options['json']);
             $options['body'] = Utils::jsonEncode($options['json']);
             unset($options['json']);
             unset($options['json']);
             // Ensure that we don't have the header in different case and set the new value.
             // Ensure that we don't have the header in different case and set the new value.
-            $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
+            $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']);
             $options['_conditional']['Content-Type'] = 'application/json';
             $options['_conditional']['Content-Type'] = 'application/json';
         }
         }
 
 
@@ -379,7 +380,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
             && $options['decode_content'] !== true
             && $options['decode_content'] !== true
         ) {
         ) {
             // Ensure that we don't have the header in different case and set the new value.
             // Ensure that we don't have the header in different case and set the new value.
-            $options['_conditional'] = Psr7\_caseless_remove(['Accept-Encoding'], $options['_conditional']);
+            $options['_conditional'] = Psr7\Utils::caselessRemove(['Accept-Encoding'], $options['_conditional']);
             $modify['set_headers']['Accept-Encoding'] = $options['decode_content'];
             $modify['set_headers']['Accept-Encoding'] = $options['decode_content'];
         }
         }
 
 
@@ -387,7 +388,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
             if (\is_array($options['body'])) {
             if (\is_array($options['body'])) {
                 throw $this->invalidBody();
                 throw $this->invalidBody();
             }
             }
-            $modify['body'] = Psr7\stream_for($options['body']);
+            $modify['body'] = Psr7\Utils::streamFor($options['body']);
             unset($options['body']);
             unset($options['body']);
         }
         }
 
 
@@ -397,7 +398,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
             switch ($type) {
             switch ($type) {
                 case 'basic':
                 case 'basic':
                     // Ensure that we don't have the header in different case and set the new value.
                     // Ensure that we don't have the header in different case and set the new value.
-                    $modify['set_headers'] = Psr7\_caseless_remove(['Authorization'], $modify['set_headers']);
+                    $modify['set_headers'] = Psr7\Utils::caselessRemove(['Authorization'], $modify['set_headers']);
                     $modify['set_headers']['Authorization'] = 'Basic '
                     $modify['set_headers']['Authorization'] = 'Basic '
                         . \base64_encode("$value[0]:$value[1]");
                         . \base64_encode("$value[0]:$value[1]");
                     break;
                     break;
@@ -433,11 +434,11 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
             }
             }
         }
         }
 
 
-        $request = Psr7\modify_request($request, $modify);
+        $request = Psr7\Utils::modifyRequest($request, $modify);
         if ($request->getBody() instanceof Psr7\MultipartStream) {
         if ($request->getBody() instanceof Psr7\MultipartStream) {
             // Use a multipart/form-data POST if a Content-Type is not set.
             // 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.
             // Ensure that we don't have the header in different case and set the new value.
-            $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
+            $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']);
             $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary='
             $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary='
                 . $request->getBody()->getBoundary();
                 . $request->getBody()->getBoundary();
         }
         }
@@ -451,7 +452,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
                     $modify['set_headers'][$k] = $v;
                     $modify['set_headers'][$k] = $v;
                 }
                 }
             }
             }
-            $request = Psr7\modify_request($request, $modify);
+            $request = Psr7\Utils::modifyRequest($request, $modify);
             // Don't pass this internal value along to middleware/handlers.
             // Don't pass this internal value along to middleware/handlers.
             unset($options['_conditional']);
             unset($options['_conditional']);
         }
         }

+ 1 - 4
api/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php

@@ -36,10 +36,7 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate
      * @param RequestInterface  $request  Request that was sent
      * @param RequestInterface  $request  Request that was sent
      * @param ResponseInterface $response Response that was received
      * @param ResponseInterface $response Response that was received
      */
      */
-    public function extractCookies(
-        RequestInterface $request,
-        ResponseInterface $response
-    ): void;
+    public function extractCookies(RequestInterface $request, ResponseInterface $response): void;
 
 
     /**
     /**
      * Sets a cookie in the cookie jar.
      * Sets a cookie in the cookie jar.

+ 13 - 11
api/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php

@@ -2,6 +2,8 @@
 
 
 namespace GuzzleHttp\Exception;
 namespace GuzzleHttp\Exception;
 
 
+use GuzzleHttp\BodySummarizer;
+use GuzzleHttp\BodySummarizerInterface;
 use Psr\Http\Client\RequestExceptionInterface;
 use Psr\Http\Client\RequestExceptionInterface;
 use Psr\Http\Message\RequestInterface;
 use Psr\Http\Message\RequestInterface;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ResponseInterface;
@@ -47,24 +49,24 @@ class RequestException extends TransferException implements RequestExceptionInte
      */
      */
     public static function wrapException(RequestInterface $request, \Throwable $e): RequestException
     public static function wrapException(RequestInterface $request, \Throwable $e): RequestException
     {
     {
-        return $e instanceof RequestException
-            ? $e
-            : new RequestException($e->getMessage(), $request, null, $e);
+        return $e instanceof RequestException ? $e : new RequestException($e->getMessage(), $request, null, $e);
     }
     }
 
 
     /**
     /**
      * Factory method to create a new exception with a normalized error message
      * Factory method to create a new exception with a normalized error message
      *
      *
-     * @param RequestInterface  $request  Request
-     * @param ResponseInterface $response Response received
-     * @param \Throwable        $previous Previous exception
-     * @param array             $ctx      Optional handler context.
+     * @param RequestInterface             $request        Request sent
+     * @param ResponseInterface            $response       Response received
+     * @param \Throwable|null              $previous       Previous exception
+     * @param array                        $handlerContext Optional handler context
+     * @param BodySummarizerInterface|null $bodySummarizer Optional body summarizer
      */
      */
     public static function create(
     public static function create(
         RequestInterface $request,
         RequestInterface $request,
         ResponseInterface $response = null,
         ResponseInterface $response = null,
         \Throwable $previous = null,
         \Throwable $previous = null,
-        array $ctx = []
+        array $handlerContext = [],
+        BodySummarizerInterface $bodySummarizer = null
     ): self {
     ): self {
         if (!$response) {
         if (!$response) {
             return new self(
             return new self(
@@ -72,7 +74,7 @@ class RequestException extends TransferException implements RequestExceptionInte
                 $request,
                 $request,
                 null,
                 null,
                 $previous,
                 $previous,
-                $ctx
+                $handlerContext
             );
             );
         }
         }
 
 
@@ -102,13 +104,13 @@ class RequestException extends TransferException implements RequestExceptionInte
             $response->getReasonPhrase()
             $response->getReasonPhrase()
         );
         );
 
 
-        $summary = \GuzzleHttp\Psr7\get_message_body_summary($response);
+        $summary = ($bodySummarizer ?? new BodySummarizer())->summarize($response);
 
 
         if ($summary !== null) {
         if ($summary !== null) {
             $message .= ":\n{$summary}\n";
             $message .= ":\n{$summary}\n";
         }
         }
 
 
-        return new $className($message, $request, $response, $previous, $ctx);
+        return new $className($message, $request, $response, $previous, $handlerContext);
     }
     }
 
 
     /**
     /**

+ 59 - 67
api/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php

@@ -4,6 +4,7 @@ namespace GuzzleHttp\Handler;
 
 
 use GuzzleHttp\Exception\ConnectException;
 use GuzzleHttp\Exception\ConnectException;
 use GuzzleHttp\Exception\RequestException;
 use GuzzleHttp\Exception\RequestException;
+use GuzzleHttp\Promise as P;
 use GuzzleHttp\Promise\FulfilledPromise;
 use GuzzleHttp\Promise\FulfilledPromise;
 use GuzzleHttp\Promise\PromiseInterface;
 use GuzzleHttp\Promise\PromiseInterface;
 use GuzzleHttp\Psr7\LazyOpenStream;
 use GuzzleHttp\Psr7\LazyOpenStream;
@@ -26,7 +27,7 @@ class CurlFactory implements CurlFactoryInterface
     public const LOW_CURL_VERSION_NUMBER = '7.21.2';
     public const LOW_CURL_VERSION_NUMBER = '7.21.2';
 
 
     /**
     /**
-     * @var resource[]
+     * @var resource[]|\CurlHandle[]
      */
      */
     private $handles = [];
     private $handles = [];
 
 
@@ -65,9 +66,7 @@ class CurlFactory implements CurlFactoryInterface
         }
         }
 
 
         $conf[\CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy);
         $conf[\CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy);
-        $easy->handle = $this->handles
-            ? \array_pop($this->handles)
-            : \curl_init();
+        $easy->handle = $this->handles ? \array_pop($this->handles) : \curl_init();
         curl_setopt_array($easy->handle, $conf);
         curl_setopt_array($easy->handle, $conf);
 
 
         return $easy;
         return $easy;
@@ -101,11 +100,8 @@ class CurlFactory implements CurlFactoryInterface
      * @param callable(RequestInterface, array): PromiseInterface $handler
      * @param callable(RequestInterface, array): PromiseInterface $handler
      * @param CurlFactoryInterface                                $factory Dictates how the handle is released
      * @param CurlFactoryInterface                                $factory Dictates how the handle is released
      */
      */
-    public static function finish(
-        callable $handler,
-        EasyHandle $easy,
-        CurlFactoryInterface $factory
-    ): PromiseInterface {
+    public static function finish(callable $handler, EasyHandle $easy, CurlFactoryInterface $factory): PromiseInterface
+    {
         if (isset($easy->options['on_stats'])) {
         if (isset($easy->options['on_stats'])) {
             self::invokeStats($easy);
             self::invokeStats($easy);
         }
         }
@@ -143,11 +139,8 @@ class CurlFactory implements CurlFactoryInterface
     /**
     /**
      * @param callable(RequestInterface, array): PromiseInterface $handler
      * @param callable(RequestInterface, array): PromiseInterface $handler
      */
      */
-    private static function finishError(
-        callable $handler,
-        EasyHandle $easy,
-        CurlFactoryInterface $factory
-    ): PromiseInterface {
+    private static function finishError(callable $handler, EasyHandle $easy, CurlFactoryInterface $factory): PromiseInterface
+    {
         // Get error information and release the handle to the factory.
         // Get error information and release the handle to the factory.
         $ctx = [
         $ctx = [
             'errno' => $easy->errno,
             'errno' => $easy->errno,
@@ -158,9 +151,7 @@ class CurlFactory implements CurlFactoryInterface
         $factory->release($easy);
         $factory->release($easy);
 
 
         // Retry when nothing is present or when curl failed to rewind.
         // Retry when nothing is present or when curl failed to rewind.
-        if (empty($easy->options['_err_message'])
-            && (!$easy->errno || $easy->errno == 65)
-        ) {
+        if (empty($easy->options['_err_message']) && (!$easy->errno || $easy->errno == 65)) {
             return self::retryFailedRewind($handler, $easy, $ctx);
             return self::retryFailedRewind($handler, $easy, $ctx);
         }
         }
 
 
@@ -177,10 +168,22 @@ class CurlFactory implements CurlFactoryInterface
             \CURLE_GOT_NOTHING          => true,
             \CURLE_GOT_NOTHING          => true,
         ];
         ];
 
 
+        if ($easy->createResponseException) {
+            return P\Create::rejectionFor(
+                new RequestException(
+                    'An error was encountered while creating the response',
+                    $easy->request,
+                    $easy->response,
+                    $easy->createResponseException,
+                    $ctx
+                )
+            );
+        }
+
         // If an exception was encountered during the onHeaders event, then
         // If an exception was encountered during the onHeaders event, then
         // return a rejected promise that wraps that exception.
         // return a rejected promise that wraps that exception.
         if ($easy->onHeadersException) {
         if ($easy->onHeadersException) {
-            return \GuzzleHttp\Promise\rejection_for(
+            return P\Create::rejectionFor(
                 new RequestException(
                 new RequestException(
                     'An error was encountered during the on_headers event',
                     'An error was encountered during the on_headers event',
                     $easy->request,
                     $easy->request,
@@ -207,7 +210,7 @@ class CurlFactory implements CurlFactoryInterface
             ? new ConnectException($message, $easy->request, null, $ctx)
             ? new ConnectException($message, $easy->request, null, $ctx)
             : new RequestException($message, $easy->request, $easy->response, null, $ctx);
             : new RequestException($message, $easy->request, $easy->response, null, $ctx);
 
 
-        return \GuzzleHttp\Promise\rejection_for($error);
+        return P\Create::rejectionFor($error);
     }
     }
 
 
     /**
     /**
@@ -275,9 +278,7 @@ class CurlFactory implements CurlFactoryInterface
 
 
         // Send the body as a string if the size is less than 1MB OR if the
         // Send the body as a string if the size is less than 1MB OR if the
         // [curl][body_as_string] request value is set.
         // [curl][body_as_string] request value is set.
-        if (($size !== null && $size < 1000000) ||
-            !empty($options['_body_as_string'])
-        ) {
+        if (($size !== null && $size < 1000000) || !empty($options['_body_as_string'])) {
             $conf[\CURLOPT_POSTFIELDS] = (string) $request->getBody();
             $conf[\CURLOPT_POSTFIELDS] = (string) $request->getBody();
             // Don't duplicate the Content-Length header
             // Don't duplicate the Content-Length header
             $this->removeHeader('Content-Length', $conf);
             $this->removeHeader('Content-Length', $conf);
@@ -359,9 +360,7 @@ class CurlFactory implements CurlFactoryInterface
                 if (\is_string($options['verify'])) {
                 if (\is_string($options['verify'])) {
                     // Throw an error if the file/folder/link path is not valid or doesn't exist.
                     // Throw an error if the file/folder/link path is not valid or doesn't exist.
                     if (!\file_exists($options['verify'])) {
                     if (!\file_exists($options['verify'])) {
-                        throw new \InvalidArgumentException(
-                            "SSL CA bundle not found: {$options['verify']}"
-                        );
+                        throw new \InvalidArgumentException("SSL CA bundle not found: {$options['verify']}");
                     }
                     }
                     // If it's a directory or a link to a directory use CURLOPT_CAPATH.
                     // If it's a directory or a link to a directory use CURLOPT_CAPATH.
                     // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO.
                     // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO.
@@ -381,7 +380,7 @@ class CurlFactory implements CurlFactoryInterface
             }
             }
         }
         }
 
 
-        if (!empty($options['decode_content'])) {
+        if (!isset($options['curl'][\CURLOPT_ENCODING]) && !empty($options['decode_content'])) {
             $accept = $easy->request->getHeaderLine('Accept-Encoding');
             $accept = $easy->request->getHeaderLine('Accept-Encoding');
             if ($accept) {
             if ($accept) {
                 $conf[\CURLOPT_ENCODING] = $accept;
                 $conf[\CURLOPT_ENCODING] = $accept;
@@ -392,30 +391,23 @@ class CurlFactory implements CurlFactoryInterface
             }
             }
         }
         }
 
 
-        // Do not connect a sink for HEAD requests.
-        if ($easy->request->getMethod() !== 'HEAD') {
-            if (!isset($options['sink'])) {
-                // Use a default temp stream if no sink was set.
-                $options['sink'] = \fopen('php://temp', 'w+');
-            }
-            $sink = $options['sink'];
-            if (!\is_string($sink)) {
-                $sink = \GuzzleHttp\Psr7\stream_for($sink);
-            } elseif (!\is_dir(\dirname($sink))) {
-                // Ensure that the directory exists before failing in curl.
-                throw new \RuntimeException(\sprintf(
-                    'Directory %s does not exist for sink value of %s',
-                    \dirname($sink),
-                    $sink
-                ));
-            } else {
-                $sink = new LazyOpenStream($sink, 'w+');
-            }
-            $easy->sink = $sink;
-            $conf[\CURLOPT_WRITEFUNCTION] = static function ($ch, $write) use ($sink): int {
-                return $sink->write($write);
-            };
+        if (!isset($options['sink'])) {
+            // Use a default temp stream if no sink was set.
+            $options['sink'] = \GuzzleHttp\Psr7\Utils::tryFopen('php://temp', 'w+');
+        }
+        $sink = $options['sink'];
+        if (!\is_string($sink)) {
+            $sink = \GuzzleHttp\Psr7\Utils::streamFor($sink);
+        } elseif (!\is_dir(\dirname($sink))) {
+            // Ensure that the directory exists before failing in curl.
+            throw new \RuntimeException(\sprintf('Directory %s does not exist for sink value of %s', \dirname($sink), $sink));
+        } else {
+            $sink = new LazyOpenStream($sink, 'w+');
         }
         }
+        $easy->sink = $sink;
+        $conf[\CURLOPT_WRITEFUNCTION] = static function ($ch, $write) use ($sink): int {
+            return $sink->write($write);
+        };
 
 
         $timeoutRequiresNoSignal = false;
         $timeoutRequiresNoSignal = false;
         if (isset($options['timeout'])) {
         if (isset($options['timeout'])) {
@@ -448,9 +440,7 @@ class CurlFactory implements CurlFactoryInterface
                 $scheme = $easy->request->getUri()->getScheme();
                 $scheme = $easy->request->getUri()->getScheme();
                 if (isset($options['proxy'][$scheme])) {
                 if (isset($options['proxy'][$scheme])) {
                     $host = $easy->request->getUri()->getHost();
                     $host = $easy->request->getUri()->getHost();
-                    if (!isset($options['proxy']['no']) ||
-                        !Utils::isHostInNoProxy($host, $options['proxy']['no'])
-                    ) {
+                    if (!isset($options['proxy']['no']) || !Utils::isHostInNoProxy($host, $options['proxy']['no'])) {
                         $conf[\CURLOPT_PROXY] = $options['proxy'][$scheme];
                         $conf[\CURLOPT_PROXY] = $options['proxy'][$scheme];
                     }
                     }
                 }
                 }
@@ -464,9 +454,13 @@ class CurlFactory implements CurlFactoryInterface
                 $cert = $cert[0];
                 $cert = $cert[0];
             }
             }
             if (!\file_exists($cert)) {
             if (!\file_exists($cert)) {
-                throw new \InvalidArgumentException(
-                    "SSL certificate not found: {$cert}"
-                );
+                throw new \InvalidArgumentException("SSL certificate not found: {$cert}");
+            }
+            # OpenSSL (versions 0.9.3 and later) also support "P12" for PKCS#12-encoded files.
+            # see https://curl.se/libcurl/c/CURLOPT_SSLCERTTYPE.html
+            $ext = pathinfo($cert, \PATHINFO_EXTENSION);
+            if (preg_match('#^(der|p12)$#i', $ext)) {
+                $conf[\CURLOPT_SSLCERTTYPE] = strtoupper($ext);
             }
             }
             $conf[\CURLOPT_SSLCERT] = $cert;
             $conf[\CURLOPT_SSLCERT] = $cert;
         }
         }
@@ -483,9 +477,7 @@ class CurlFactory implements CurlFactoryInterface
             $sslKey = $sslKey ?? $options['ssl_key'];
             $sslKey = $sslKey ?? $options['ssl_key'];
 
 
             if (!\file_exists($sslKey)) {
             if (!\file_exists($sslKey)) {
-                throw new \InvalidArgumentException(
-                    "SSL private key not found: {$sslKey}"
-                );
+                throw new \InvalidArgumentException("SSL private key not found: {$sslKey}");
             }
             }
             $conf[\CURLOPT_SSLKEY] = $sslKey;
             $conf[\CURLOPT_SSLKEY] = $sslKey;
         }
         }
@@ -493,9 +485,7 @@ class CurlFactory implements CurlFactoryInterface
         if (isset($options['progress'])) {
         if (isset($options['progress'])) {
             $progress = $options['progress'];
             $progress = $options['progress'];
             if (!\is_callable($progress)) {
             if (!\is_callable($progress)) {
-                throw new \InvalidArgumentException(
-                    'progress client option must be callable'
-                );
+                throw new \InvalidArgumentException('progress client option must be callable');
             }
             }
             $conf[\CURLOPT_NOPROGRESS] = false;
             $conf[\CURLOPT_NOPROGRESS] = false;
             $conf[\CURLOPT_PROGRESSFUNCTION] = static function ($resource, int $downloadSize, int $downloaded, int $uploadSize, int $uploaded) use ($progress) {
             $conf[\CURLOPT_PROGRESSFUNCTION] = static function ($resource, int $downloadSize, int $downloaded, int $uploadSize, int $uploaded) use ($progress) {
@@ -520,11 +510,8 @@ class CurlFactory implements CurlFactoryInterface
      *
      *
      * @param callable(RequestInterface, array): PromiseInterface $handler
      * @param callable(RequestInterface, array): PromiseInterface $handler
      */
      */
-    private static function retryFailedRewind(
-        callable $handler,
-        EasyHandle $easy,
-        array $ctx
-    ): PromiseInterface {
+    private static function retryFailedRewind(callable $handler, EasyHandle $easy, array $ctx): PromiseInterface
+    {
         try {
         try {
             // Only rewind if the body has been read from.
             // Only rewind if the body has been read from.
             $body = $easy->request->getBody();
             $body = $easy->request->getBody();
@@ -577,7 +564,12 @@ class CurlFactory implements CurlFactoryInterface
             $value = \trim($h);
             $value = \trim($h);
             if ($value === '') {
             if ($value === '') {
                 $startingResponse = true;
                 $startingResponse = true;
-                $easy->createResponse();
+                try {
+                    $easy->createResponse();
+                } catch (\Exception $e) {
+                    $easy->createResponseException = $e;
+                    return -1;
+                }
                 if ($onHeaders !== null) {
                 if ($onHeaders !== null) {
                     try {
                     try {
                         $onHeaders($easy->response);
                         $onHeaders($easy->response);

+ 8 - 13
api/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php

@@ -15,7 +15,7 @@ use Psr\Http\Message\RequestInterface;
  * associative array of curl option constants mapping to values in the
  * associative array of curl option constants mapping to values in the
  * **curl** key of the provided request options.
  * **curl** key of the provided request options.
  *
  *
- * @property resource $_mh Internal use only. Lazy loaded multi-handle.
+ * @property resource|\CurlMultiHandle $_mh Internal use only. Lazy loaded multi-handle.
  *
  *
  * @final
  * @final
  */
  */
@@ -32,7 +32,7 @@ class CurlMultiHandler
     private $selectTimeout;
     private $selectTimeout;
 
 
     /**
     /**
-     * @var resource|null the currently executing resource in `curl_multi_exec`.
+     * @var resource|\CurlMultiHandle|null the currently executing resource in `curl_multi_exec`.
      */
      */
     private $active;
     private $active;
 
 
@@ -71,6 +71,7 @@ class CurlMultiHandler
         if (isset($options['select_timeout'])) {
         if (isset($options['select_timeout'])) {
             $this->selectTimeout = $options['select_timeout'];
             $this->selectTimeout = $options['select_timeout'];
         } elseif ($selectTimeout = Utils::getenv('GUZZLE_CURL_SELECT_TIMEOUT')) {
         } elseif ($selectTimeout = Utils::getenv('GUZZLE_CURL_SELECT_TIMEOUT')) {
+            @trigger_error('Since guzzlehttp/guzzle 7.2.0: Using environment variable GUZZLE_CURL_SELECT_TIMEOUT is deprecated. Use option "select_timeout" instead.', \E_USER_DEPRECATED);
             $this->selectTimeout = (int) $selectTimeout;
             $this->selectTimeout = (int) $selectTimeout;
         } else {
         } else {
             $this->selectTimeout = 1;
             $this->selectTimeout = 1;
@@ -82,7 +83,7 @@ class CurlMultiHandler
     /**
     /**
      * @param string $name
      * @param string $name
      *
      *
-     * @return resource
+     * @return resource|\CurlMultiHandle
      *
      *
      * @throws \BadMethodCallException when another field as `_mh` will be gotten
      * @throws \BadMethodCallException when another field as `_mh` will be gotten
      * @throws \RuntimeException       when curl can not initialize a multi handle
      * @throws \RuntimeException       when curl can not initialize a multi handle
@@ -154,11 +155,9 @@ class CurlMultiHandler
         }
         }
 
 
         // Step through the task queue which may add additional requests.
         // Step through the task queue which may add additional requests.
-        P\queue()->run();
+        P\Utils::queue()->run();
 
 
-        if ($this->active &&
-            \curl_multi_select($this->_mh, $this->selectTimeout) === -1
-        ) {
+        if ($this->active && \curl_multi_select($this->_mh, $this->selectTimeout) === -1) {
             // Perform a usleep if a select returns -1.
             // Perform a usleep if a select returns -1.
             // See: https://bugs.php.net/bug.php?id=61141
             // See: https://bugs.php.net/bug.php?id=61141
             \usleep(250);
             \usleep(250);
@@ -174,7 +173,7 @@ class CurlMultiHandler
      */
      */
     public function execute(): void
     public function execute(): void
     {
     {
-        $queue = P\queue();
+        $queue = P\Utils::queue();
 
 
         while ($this->handles || !$queue->isEmpty()) {
         while ($this->handles || !$queue->isEmpty()) {
             // If there are no transfers, then sleep for the next delay
             // If there are no transfers, then sleep for the next delay
@@ -234,11 +233,7 @@ class CurlMultiHandler
             unset($this->handles[$id], $this->delays[$id]);
             unset($this->handles[$id], $this->delays[$id]);
             $entry['easy']->errno = $done['result'];
             $entry['easy']->errno = $done['result'];
             $entry['deferred']->resolve(
             $entry['deferred']->resolve(
-                CurlFactory::finish(
-                    $this,
-                    $entry['easy'],
-                    $this->factory
-                )
+                CurlFactory::finish($this, $entry['easy'], $this->factory)
             );
             );
         }
         }
     }
     }

+ 16 - 23
api/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php

@@ -16,7 +16,7 @@ use Psr\Http\Message\StreamInterface;
 final class EasyHandle
 final class EasyHandle
 {
 {
     /**
     /**
-     * @var resource cURL resource
+     * @var resource|\CurlHandle cURL resource
      */
      */
     public $handle;
     public $handle;
 
 
@@ -55,31 +55,28 @@ final class EasyHandle
      */
      */
     public $onHeadersException;
     public $onHeadersException;
 
 
+    /**
+     * @var \Exception|null Exception during createResponse (if any)
+     */
+    public $createResponseException;
+
     /**
     /**
      * Attach a response to the easy handle based on the received headers.
      * Attach a response to the easy handle based on the received headers.
      *
      *
-     * @throws \RuntimeException if no headers have been received.
+     * @throws \RuntimeException if no headers have been received or the first
+     *                           header line is invalid.
      */
      */
     public function createResponse(): void
     public function createResponse(): void
     {
     {
-        if (empty($this->headers)) {
-            throw new \RuntimeException('No headers have been received');
-        }
+        [$ver, $status, $reason, $headers] = HeaderProcessor::parseHeaders($this->headers);
 
 
-        // HTTP-version SP status-code SP reason-phrase
-        $startLine = \explode(' ', \array_shift($this->headers), 3);
-        $headers = Utils::headersFromLines($this->headers);
         $normalizedKeys = Utils::normalizeHeaderKeys($headers);
         $normalizedKeys = Utils::normalizeHeaderKeys($headers);
 
 
-        if (!empty($this->options['decode_content'])
-            && isset($normalizedKeys['content-encoding'])
-        ) {
-            $headers['x-encoded-content-encoding']
-                = $headers[$normalizedKeys['content-encoding']];
+        if (!empty($this->options['decode_content']) && isset($normalizedKeys['content-encoding'])) {
+            $headers['x-encoded-content-encoding'] = $headers[$normalizedKeys['content-encoding']];
             unset($headers[$normalizedKeys['content-encoding']]);
             unset($headers[$normalizedKeys['content-encoding']]);
             if (isset($normalizedKeys['content-length'])) {
             if (isset($normalizedKeys['content-length'])) {
-                $headers['x-encoded-content-length']
-                    = $headers[$normalizedKeys['content-length']];
+                $headers['x-encoded-content-length'] = $headers[$normalizedKeys['content-length']];
 
 
                 $bodyLength = (int) $this->sink->getSize();
                 $bodyLength = (int) $this->sink->getSize();
                 if ($bodyLength) {
                 if ($bodyLength) {
@@ -90,15 +87,13 @@ final class EasyHandle
             }
             }
         }
         }
 
 
-        $statusCode = (int) $startLine[1];
-
         // Attach a response to the easy handle with the parsed headers.
         // Attach a response to the easy handle with the parsed headers.
         $this->response = new Response(
         $this->response = new Response(
-            $statusCode,
+            $status,
             $headers,
             $headers,
             $this->sink,
             $this->sink,
-            \substr($startLine[0], 5),
-            isset($startLine[2]) ? (string) $startLine[2] : null
+            $ver,
+            $reason
         );
         );
     }
     }
 
 
@@ -111,9 +106,7 @@ final class EasyHandle
      */
      */
     public function __get($name)
     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);
         throw new \BadMethodCallException($msg);
     }
     }
 }
 }

+ 42 - 0
api/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php

@@ -0,0 +1,42 @@
+<?php
+
+namespace GuzzleHttp\Handler;
+
+use GuzzleHttp\Utils;
+
+/**
+ * @internal
+ */
+final class HeaderProcessor
+{
+    /**
+     * Returns the HTTP version, status code, reason phrase, and headers.
+     *
+     * @param string[] $headers
+     *
+     * @throws \RuntimeException
+     *
+     * @return array{0:string, 1:int, 2:?string, 3:array}
+     */
+    public static function parseHeaders(array $headers): array
+    {
+        if ($headers === []) {
+            throw new \RuntimeException('Expected a non-empty array of header data');
+        }
+
+        $parts = \explode(' ', \array_shift($headers), 3);
+        $version = \explode('/', $parts[0])[1] ?? null;
+
+        if ($version === null) {
+            throw new \RuntimeException('HTTP version missing from header data');
+        }
+
+        $status = $parts[1] ?? null;
+
+        if ($status === null) {
+            throw new \RuntimeException('HTTP status code missing from header data');
+        }
+
+        return [$version, (int) $status, $parts[2] ?? null, Utils::headersFromLines($headers)];
+    }
+}

+ 8 - 13
api/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php

@@ -4,6 +4,7 @@ namespace GuzzleHttp\Handler;
 
 
 use GuzzleHttp\Exception\RequestException;
 use GuzzleHttp\Exception\RequestException;
 use GuzzleHttp\HandlerStack;
 use GuzzleHttp\HandlerStack;
+use GuzzleHttp\Promise as P;
 use GuzzleHttp\Promise\PromiseInterface;
 use GuzzleHttp\Promise\PromiseInterface;
 use GuzzleHttp\TransferStats;
 use GuzzleHttp\TransferStats;
 use GuzzleHttp\Utils;
 use GuzzleHttp\Utils;
@@ -51,11 +52,8 @@ class MockHandler implements \Countable
      * @param callable|null $onFulfilled Callback to invoke when the return value is fulfilled.
      * @param callable|null $onFulfilled Callback to invoke when the return value is fulfilled.
      * @param callable|null $onRejected  Callback to invoke when the return value is rejected.
      * @param callable|null $onRejected  Callback to invoke when the return value is rejected.
      */
      */
-    public static function createWithMiddleware(
-        array $queue = null,
-        callable $onFulfilled = null,
-        callable $onRejected = null
-    ): HandlerStack {
+    public static function createWithMiddleware(array $queue = null, callable $onFulfilled = null, callable $onRejected = null): HandlerStack
+    {
         return HandlerStack::create(new self($queue, $onFulfilled, $onRejected));
         return HandlerStack::create(new self($queue, $onFulfilled, $onRejected));
     }
     }
 
 
@@ -68,11 +66,8 @@ class MockHandler implements \Countable
      * @param callable|null          $onFulfilled Callback to invoke when the return value is fulfilled.
      * @param callable|null          $onFulfilled Callback to invoke when the return value is fulfilled.
      * @param callable|null          $onRejected  Callback to invoke when the return value is rejected.
      * @param callable|null          $onRejected  Callback to invoke when the return value is rejected.
      */
      */
-    public function __construct(
-        array $queue = null,
-        callable $onFulfilled = null,
-        callable $onRejected = null
-    ) {
+    public function __construct(array $queue = null, callable $onFulfilled = null, callable $onRejected = null)
+    {
         $this->onFulfilled = $onFulfilled;
         $this->onFulfilled = $onFulfilled;
         $this->onRejected = $onRejected;
         $this->onRejected = $onRejected;
 
 
@@ -113,8 +108,8 @@ class MockHandler implements \Countable
         }
         }
 
 
         $response = $response instanceof \Throwable
         $response = $response instanceof \Throwable
-            ? \GuzzleHttp\Promise\rejection_for($response)
-            : \GuzzleHttp\Promise\promise_for($response);
+            ? P\Create::rejectionFor($response)
+            : P\Create::promiseFor($response);
 
 
         return $response->then(
         return $response->then(
             function (?ResponseInterface $value) use ($request, $options) {
             function (?ResponseInterface $value) use ($request, $options) {
@@ -143,7 +138,7 @@ class MockHandler implements \Countable
                 if ($this->onRejected) {
                 if ($this->onRejected) {
                     ($this->onRejected)($reason);
                     ($this->onRejected)($reason);
                 }
                 }
-                return \GuzzleHttp\Promise\rejection_for($reason);
+                return P\Create::rejectionFor($reason);
             }
             }
         );
         );
     }
     }

+ 6 - 14
api/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php

@@ -22,14 +22,10 @@ class Proxy
      *
      *
      * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.
      * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.
      */
      */
-    public static function wrapSync(
-        callable $default,
-        callable $sync
-    ): callable {
+    public static function wrapSync(callable $default, callable $sync): callable
+    {
         return static function (RequestInterface $request, array $options) use ($default, $sync): PromiseInterface {
         return static function (RequestInterface $request, array $options) use ($default, $sync): PromiseInterface {
-            return empty($options[RequestOptions::SYNCHRONOUS])
-                ? $default($request, $options)
-                : $sync($request, $options);
+            return empty($options[RequestOptions::SYNCHRONOUS]) ? $default($request, $options) : $sync($request, $options);
         };
         };
     }
     }
 
 
@@ -46,14 +42,10 @@ class Proxy
      *
      *
      * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.
      * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.
      */
      */
-    public static function wrapStreaming(
-        callable $default,
-        callable $streaming
-    ): callable {
+    public static function wrapStreaming(callable $default, callable $streaming): callable
+    {
         return static function (RequestInterface $request, array $options) use ($default, $streaming): PromiseInterface {
         return static function (RequestInterface $request, array $options) use ($default, $streaming): PromiseInterface {
-            return empty($options['stream'])
-                ? $default($request, $options)
-                : $streaming($request, $options);
+            return empty($options['stream']) ? $default($request, $options) : $streaming($request, $options);
         };
         };
     }
     }
 }
 }

+ 89 - 83
api/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php

@@ -4,6 +4,7 @@ namespace GuzzleHttp\Handler;
 
 
 use GuzzleHttp\Exception\ConnectException;
 use GuzzleHttp\Exception\ConnectException;
 use GuzzleHttp\Exception\RequestException;
 use GuzzleHttp\Exception\RequestException;
+use GuzzleHttp\Promise as P;
 use GuzzleHttp\Promise\FulfilledPromise;
 use GuzzleHttp\Promise\FulfilledPromise;
 use GuzzleHttp\Promise\PromiseInterface;
 use GuzzleHttp\Promise\PromiseInterface;
 use GuzzleHttp\Psr7;
 use GuzzleHttp\Psr7;
@@ -74,7 +75,7 @@ class StreamHandler
             }
             }
             $this->invokeStats($options, $request, $startTime, null, $e);
             $this->invokeStats($options, $request, $startTime, null, $e);
 
 
-            return \GuzzleHttp\Promise\rejection_for($e);
+            return P\Create::rejectionFor($e);
         }
         }
     }
     }
 
 
@@ -86,13 +87,7 @@ class StreamHandler
         \Throwable $error = null
         \Throwable $error = null
     ): void {
     ): void {
         if (isset($options['on_stats'])) {
         if (isset($options['on_stats'])) {
-            $stats = new TransferStats(
-                $request,
-                $response,
-                Utils::currentTime() - $startTime,
-                $error,
-                []
-            );
+            $stats = new TransferStats($request, $response, Utils::currentTime() - $startTime, $error, []);
             ($options['on_stats'])($stats);
             ($options['on_stats'])($stats);
         }
         }
     }
     }
@@ -100,47 +95,49 @@ class StreamHandler
     /**
     /**
      * @param resource $stream
      * @param resource $stream
      */
      */
-    private function createResponse(
-        RequestInterface $request,
-        array $options,
-        $stream,
-        ?float $startTime
-    ): PromiseInterface {
+    private function createResponse(RequestInterface $request, array $options, $stream, ?float $startTime): PromiseInterface
+    {
         $hdrs = $this->lastHeaders;
         $hdrs = $this->lastHeaders;
         $this->lastHeaders = [];
         $this->lastHeaders = [];
-        $parts = \explode(' ', \array_shift($hdrs), 3);
-        $ver = \explode('/', $parts[0])[1];
-        $status = (int) $parts[1];
-        $reason = $parts[2] ?? null;
-        $headers = Utils::headersFromLines($hdrs);
+
+        try {
+            [$ver, $status, $reason, $headers] = HeaderProcessor::parseHeaders($hdrs);
+        } catch (\Exception $e) {
+            return P\Create::rejectionFor(
+                new RequestException('An error was encountered while creating the response', $request, null, $e)
+            );
+        }
+
         [$stream, $headers] = $this->checkDecode($options, $headers, $stream);
         [$stream, $headers] = $this->checkDecode($options, $headers, $stream);
-        $stream = Psr7\stream_for($stream);
+        $stream = Psr7\Utils::streamFor($stream);
         $sink = $stream;
         $sink = $stream;
 
 
         if (\strcasecmp('HEAD', $request->getMethod())) {
         if (\strcasecmp('HEAD', $request->getMethod())) {
             $sink = $this->createSink($stream, $options);
             $sink = $this->createSink($stream, $options);
         }
         }
 
 
-        $response = new Psr7\Response($status, $headers, $sink, $ver, $reason);
+        try {
+            $response = new Psr7\Response($status, $headers, $sink, $ver, $reason);
+        } catch (\Exception $e) {
+            return P\Create::rejectionFor(
+                new RequestException('An error was encountered while creating the response', $request, null, $e)
+            );
+        }
 
 
         if (isset($options['on_headers'])) {
         if (isset($options['on_headers'])) {
             try {
             try {
                 $options['on_headers']($response);
                 $options['on_headers']($response);
             } catch (\Exception $e) {
             } catch (\Exception $e) {
-                $msg = 'An error was encountered during the on_headers event';
-                $ex = new RequestException($msg, $request, $response, $e);
-                return \GuzzleHttp\Promise\rejection_for($ex);
+                return P\Create::rejectionFor(
+                    new RequestException('An error was encountered during the on_headers event', $request, $response, $e)
+                );
             }
             }
         }
         }
 
 
         // Do not drain when the request is a HEAD request because they have
         // Do not drain when the request is a HEAD request because they have
         // no body.
         // no body.
         if ($sink !== $stream) {
         if ($sink !== $stream) {
-            $this->drain(
-                $stream,
-                $sink,
-                $response->getHeaderLine('Content-Length')
-            );
+            $this->drain($stream, $sink, $response->getHeaderLine('Content-Length'));
         }
         }
 
 
         $this->invokeStats($options, $request, $startTime, $response, null);
         $this->invokeStats($options, $request, $startTime, $response, null);
@@ -154,12 +151,9 @@ class StreamHandler
             return $stream;
             return $stream;
         }
         }
 
 
-        $sink = $options['sink']
-            ?? \fopen('php://temp', 'r+');
+        $sink = $options['sink'] ?? Psr7\Utils::tryFopen('php://temp', 'r+');
 
 
-        return \is_string($sink)
-            ? new Psr7\LazyOpenStream($sink, 'w+')
-            : Psr7\stream_for($sink);
+        return \is_string($sink) ? new Psr7\LazyOpenStream($sink, 'w+') : Psr7\Utils::streamFor($sink);
     }
     }
 
 
     /**
     /**
@@ -173,18 +167,15 @@ class StreamHandler
             if (isset($normalizedKeys['content-encoding'])) {
             if (isset($normalizedKeys['content-encoding'])) {
                 $encoding = $headers[$normalizedKeys['content-encoding']];
                 $encoding = $headers[$normalizedKeys['content-encoding']];
                 if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') {
                 if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') {
-                    $stream = new Psr7\InflateStream(
-                        Psr7\stream_for($stream)
-                    );
-                    $headers['x-encoded-content-encoding']
-                        = $headers[$normalizedKeys['content-encoding']];
+                    $stream = new Psr7\InflateStream(Psr7\Utils::streamFor($stream));
+                    $headers['x-encoded-content-encoding'] = $headers[$normalizedKeys['content-encoding']];
+
                     // Remove content-encoding header
                     // Remove content-encoding header
                     unset($headers[$normalizedKeys['content-encoding']]);
                     unset($headers[$normalizedKeys['content-encoding']]);
+
                     // Fix content-length header
                     // Fix content-length header
                     if (isset($normalizedKeys['content-length'])) {
                     if (isset($normalizedKeys['content-length'])) {
-                        $headers['x-encoded-content-length']
-                            = $headers[$normalizedKeys['content-length']];
-
+                        $headers['x-encoded-content-length'] = $headers[$normalizedKeys['content-length']];
                         $length = (int) $stream->getSize();
                         $length = (int) $stream->getSize();
                         if ($length === 0) {
                         if ($length === 0) {
                             unset($headers[$normalizedKeys['content-length']]);
                             unset($headers[$normalizedKeys['content-length']]);
@@ -207,16 +198,13 @@ class StreamHandler
      *
      *
      * @throws \RuntimeException when the sink option is invalid.
      * @throws \RuntimeException when the sink option is invalid.
      */
      */
-    private function drain(
-        StreamInterface $source,
-        StreamInterface $sink,
-        string $contentLength
-    ): StreamInterface {
+    private function drain(StreamInterface $source, StreamInterface $sink, string $contentLength): StreamInterface
+    {
         // If a content-length header is provided, then stop reading once
         // If a content-length header is provided, then stop reading once
         // that number of bytes has been read. This can prevent infinitely
         // that number of bytes has been read. This can prevent infinitely
         // reading from a stream when dealing with servers that do not honor
         // reading from a stream when dealing with servers that do not honor
         // Connection: Close headers.
         // Connection: Close headers.
-        Psr7\copy_to_stream(
+        Psr7\Utils::copyToStream(
             $source,
             $source,
             $sink,
             $sink,
             (\strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1
             (\strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1
@@ -308,10 +296,7 @@ class StreamHandler
             if (!\is_array($options['stream_context'])) {
             if (!\is_array($options['stream_context'])) {
                 throw new \InvalidArgumentException('stream_context must be an array');
                 throw new \InvalidArgumentException('stream_context must be an array');
             }
             }
-            $context = \array_replace_recursive(
-                $context,
-                $options['stream_context']
-            );
+            $context = \array_replace_recursive($context, $options['stream_context']);
         }
         }
 
 
         // Microsoft NTLM authentication only supported with curl handler
         // Microsoft NTLM authentication only supported with curl handler
@@ -329,16 +314,11 @@ class StreamHandler
 
 
         return $this->createResource(
         return $this->createResource(
             function () use ($uri, &$http_response_header, $contextResource, $context, $options, $request) {
             function () use ($uri, &$http_response_header, $contextResource, $context, $options, $request) {
-                $resource = \fopen((string) $uri, 'r', false, $contextResource);
+                $resource = @\fopen((string) $uri, 'r', false, $contextResource);
                 $this->lastHeaders = $http_response_header;
                 $this->lastHeaders = $http_response_header;
 
 
                 if (false === $resource) {
                 if (false === $resource) {
-                    throw new ConnectException(
-                        sprintf('Connection refused for URI %s', $uri),
-                        $request,
-                        null,
-                        $context
-                    );
+                    throw new ConnectException(sprintf('Connection refused for URI %s', $uri), $request, null, $context);
                 }
                 }
 
 
                 if (isset($options['read_timeout'])) {
                 if (isset($options['read_timeout'])) {
@@ -361,26 +341,14 @@ class StreamHandler
             if ('v4' === $options['force_ip_resolve']) {
             if ('v4' === $options['force_ip_resolve']) {
                 $records = \dns_get_record($uri->getHost(), \DNS_A);
                 $records = \dns_get_record($uri->getHost(), \DNS_A);
                 if (false === $records || !isset($records[0]['ip'])) {
                 if (false === $records || !isset($records[0]['ip'])) {
-                    throw new ConnectException(
-                        \sprintf(
-                            "Could not resolve IPv4 address for host '%s'",
-                            $uri->getHost()
-                        ),
-                        $request
-                    );
+                    throw new ConnectException(\sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request);
                 }
                 }
                 return $uri->withHost($records[0]['ip']);
                 return $uri->withHost($records[0]['ip']);
             }
             }
             if ('v6' === $options['force_ip_resolve']) {
             if ('v6' === $options['force_ip_resolve']) {
                 $records = \dns_get_record($uri->getHost(), \DNS_AAAA);
                 $records = \dns_get_record($uri->getHost(), \DNS_AAAA);
                 if (false === $records || !isset($records[0]['ipv6'])) {
                 if (false === $records || !isset($records[0]['ipv6'])) {
-                    throw new ConnectException(
-                        \sprintf(
-                            "Could not resolve IPv6 address for host '%s'",
-                            $uri->getHost()
-                        ),
-                        $request
-                    );
+                    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'] . ']');
             }
             }
@@ -428,21 +396,60 @@ class StreamHandler
      */
      */
     private function add_proxy(RequestInterface $request, array &$options, $value, array &$params): void
     private function add_proxy(RequestInterface $request, array &$options, $value, array &$params): void
     {
     {
+        $uri = null;
+
         if (!\is_array($value)) {
         if (!\is_array($value)) {
-            $options['http']['proxy'] = $value;
+            $uri = $value;
         } else {
         } else {
             $scheme = $request->getUri()->getScheme();
             $scheme = $request->getUri()->getScheme();
             if (isset($value[$scheme])) {
             if (isset($value[$scheme])) {
-                if (!isset($value['no'])
-                    || !Utils::isHostInNoProxy(
-                        $request->getUri()->getHost(),
-                        $value['no']
-                    )
-                ) {
-                    $options['http']['proxy'] = $value[$scheme];
+                if (!isset($value['no']) || !Utils::isHostInNoProxy($request->getUri()->getHost(), $value['no'])) {
+                    $uri = $value[$scheme];
+                }
+            }
+        }
+
+        if (!$uri) {
+            return;
+        }
+
+        $parsed = $this->parse_proxy($uri);
+        $options['http']['proxy'] = $parsed['proxy'];
+
+        if ($parsed['auth']) {
+            if (!isset($options['http']['header'])) {
+                $options['http']['header'] = [];
+            }
+            $options['http']['header'] .= "\r\nProxy-Authorization: {$parsed['auth']}";
+        }
+    }
+
+    /**
+     * Parses the given proxy URL to make it compatible with the format PHP's stream context expects.
+     */
+    private function parse_proxy(string $url): array
+    {
+        $parsed = \parse_url($url);
+
+        if ($parsed !== false && isset($parsed['scheme']) && $parsed['scheme'] === 'http') {
+            if (isset($parsed['host']) && isset($parsed['port'])) {
+                $auth = null;
+                if (isset($parsed['user']) && isset($parsed['pass'])) {
+                    $auth = \base64_encode("{$parsed['user']}:{$parsed['pass']}");
                 }
                 }
+
+                return [
+                    'proxy' => "tcp://{$parsed['host']}:{$parsed['port']}",
+                    'auth' => $auth ? "Basic {$auth}" : null,
+                ];
             }
             }
         }
         }
+
+        // Return proxy as-is.
+        return [
+            'proxy' => $url,
+            'auth' => null,
+        ];
     }
     }
 
 
     /**
     /**
@@ -534,8 +541,7 @@ class StreamHandler
             \STREAM_NOTIFY_COMPLETED     => 'COMPLETED',
             \STREAM_NOTIFY_COMPLETED     => 'COMPLETED',
             \STREAM_NOTIFY_RESOLVE       => 'RESOLVE',
             \STREAM_NOTIFY_RESOLVE       => 'RESOLVE',
         ];
         ];
-        static $args = ['severity', 'message', 'message_code',
-            'bytes_transferred', 'bytes_max'];
+        static $args = ['severity', 'message', 'message_code', 'bytes_transferred', 'bytes_max'];
 
 
         $value = Utils::debugResource($value);
         $value = Utils::debugResource($value);
         $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment('');
         $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment('');

+ 4 - 7
api/vendor/guzzlehttp/guzzle/src/MessageFormatter.php

@@ -68,11 +68,8 @@ class MessageFormatter implements MessageFormatterInterface
      * @param ResponseInterface|null $response Response that was received
      * @param ResponseInterface|null $response Response that was received
      * @param \Throwable|null        $error    Exception that was received
      * @param \Throwable|null        $error    Exception that was received
      */
      */
-    public function format(
-        RequestInterface $request,
-        ?ResponseInterface $response = null,
-        ?\Throwable $error = null
-    ): string {
+    public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string
+    {
         $cache = [];
         $cache = [];
 
 
         /** @var string */
         /** @var string */
@@ -86,10 +83,10 @@ class MessageFormatter implements MessageFormatterInterface
                 $result = '';
                 $result = '';
                 switch ($matches[1]) {
                 switch ($matches[1]) {
                     case 'request':
                     case 'request':
-                        $result = Psr7\str($request);
+                        $result = Psr7\Message::toString($request);
                         break;
                         break;
                     case 'response':
                     case 'response':
-                        $result = $response ? Psr7\str($response) : '';
+                        $result = $response ? Psr7\Message::toString($response) : '';
                         break;
                         break;
                     case 'req_headers':
                     case 'req_headers':
                         $result = \trim($request->getMethod()
                         $result = \trim($request->getMethod()

+ 1 - 5
api/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php

@@ -14,9 +14,5 @@ interface MessageFormatterInterface
      * @param ResponseInterface|null $response Response that was received
      * @param ResponseInterface|null $response Response that was received
      * @param \Throwable|null        $error    Exception that was received
      * @param \Throwable|null        $error    Exception that was received
      */
      */
-    public function format(
-        RequestInterface $request,
-        ?ResponseInterface $response = null,
-        ?\Throwable $error = null
-    ): string;
+    public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string;
 }
 }

+ 13 - 12
api/vendor/guzzlehttp/guzzle/src/Middleware.php

@@ -4,6 +4,7 @@ namespace GuzzleHttp;
 
 
 use GuzzleHttp\Cookie\CookieJarInterface;
 use GuzzleHttp\Cookie\CookieJarInterface;
 use GuzzleHttp\Exception\RequestException;
 use GuzzleHttp\Exception\RequestException;
+use GuzzleHttp\Promise as P;
 use GuzzleHttp\Promise\PromiseInterface;
 use GuzzleHttp\Promise\PromiseInterface;
 use Psr\Http\Message\RequestInterface;
 use Psr\Http\Message\RequestInterface;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ResponseInterface;
@@ -46,24 +47,26 @@ final class Middleware
 
 
     /**
     /**
      * Middleware that throws exceptions for 4xx or 5xx responses when the
      * Middleware that throws exceptions for 4xx or 5xx responses when the
-     * "http_error" request option is set to true.
+     * "http_errors" request option is set to true.
+     *
+     * @param BodySummarizerInterface|null $bodySummarizer The body summarizer to use in exception messages.
      *
      *
      * @return callable(callable): callable Returns a function that accepts the next handler.
      * @return callable(callable): callable Returns a function that accepts the next handler.
      */
      */
-    public static function httpErrors(): callable
+    public static function httpErrors(BodySummarizerInterface $bodySummarizer = null): callable
     {
     {
-        return static function (callable $handler): callable {
-            return static function ($request, array $options) use ($handler) {
+        return static function (callable $handler) use ($bodySummarizer): callable {
+            return static function ($request, array $options) use ($handler, $bodySummarizer) {
                 if (empty($options['http_errors'])) {
                 if (empty($options['http_errors'])) {
                     return $handler($request, $options);
                     return $handler($request, $options);
                 }
                 }
                 return $handler($request, $options)->then(
                 return $handler($request, $options)->then(
-                    static function (ResponseInterface $response) use ($request) {
+                    static function (ResponseInterface $response) use ($request, $bodySummarizer) {
                         $code = $response->getStatusCode();
                         $code = $response->getStatusCode();
                         if ($code < 400) {
                         if ($code < 400) {
                             return $response;
                             return $response;
                         }
                         }
-                        throw RequestException::create($request, $response);
+                        throw RequestException::create($request, $response, null, [], $bodySummarizer);
                     }
                     }
                 );
                 );
             };
             };
@@ -104,7 +107,7 @@ final class Middleware
                             'error'    => $reason,
                             'error'    => $reason,
                             'options'  => $options
                             'options'  => $options
                         ];
                         ];
-                        return \GuzzleHttp\Promise\rejection_for($reason);
+                        return P\Create::rejectionFor($reason);
                     }
                     }
                 );
                 );
             };
             };
@@ -202,12 +205,10 @@ final class Middleware
                         return $response;
                         return $response;
                     },
                     },
                     static function ($reason) use ($logger, $request, $formatter): PromiseInterface {
                     static function ($reason) use ($logger, $request, $formatter): PromiseInterface {
-                        $response = $reason instanceof RequestException
-                            ? $reason->getResponse()
-                            : null;
-                        $message = $formatter->format($request, $response, \GuzzleHttp\Promise\exception_for($reason));
+                        $response = $reason instanceof RequestException ? $reason->getResponse() : null;
+                        $message = $formatter->format($request, $response, P\Create::exceptionFor($reason));
                         $logger->error($message);
                         $logger->error($message);
-                        return \GuzzleHttp\Promise\rejection_for($reason);
+                        return P\Create::rejectionFor($reason);
                     }
                     }
                 );
                 );
             };
             };

+ 7 - 15
api/vendor/guzzlehttp/guzzle/src/Pool.php

@@ -2,6 +2,7 @@
 
 
 namespace GuzzleHttp;
 namespace GuzzleHttp;
 
 
+use GuzzleHttp\Promise as P;
 use GuzzleHttp\Promise\EachPromise;
 use GuzzleHttp\Promise\EachPromise;
 use GuzzleHttp\Promise\PromiseInterface;
 use GuzzleHttp\Promise\PromiseInterface;
 use GuzzleHttp\Promise\PromisorInterface;
 use GuzzleHttp\Promise\PromisorInterface;
@@ -37,11 +38,8 @@ class Pool implements PromisorInterface
      *                                  - fulfilled: (callable) Function to invoke when a request completes.
      *                                  - fulfilled: (callable) Function to invoke when a request completes.
      *                                  - rejected: (callable) Function to invoke when a request is rejected.
      *                                  - rejected: (callable) Function to invoke when a request is rejected.
      */
      */
-    public function __construct(
-        ClientInterface $client,
-        $requests,
-        array $config = []
-    ) {
+    public function __construct(ClientInterface $client, $requests, array $config = [])
+    {
         if (!isset($config['concurrency'])) {
         if (!isset($config['concurrency'])) {
             $config['concurrency'] = 25;
             $config['concurrency'] = 25;
         }
         }
@@ -53,7 +51,7 @@ class Pool implements PromisorInterface
             $opts = [];
             $opts = [];
         }
         }
 
 
-        $iterable = \GuzzleHttp\Promise\iter_for($requests);
+        $iterable = P\Create::iterFor($requests);
         $requests = static function () use ($iterable, $client, $opts) {
         $requests = static function () use ($iterable, $client, $opts) {
             foreach ($iterable as $key => $rfn) {
             foreach ($iterable as $key => $rfn) {
                 if ($rfn instanceof RequestInterface) {
                 if ($rfn instanceof RequestInterface) {
@@ -61,10 +59,7 @@ class Pool implements PromisorInterface
                 } elseif (\is_callable($rfn)) {
                 } elseif (\is_callable($rfn)) {
                     yield $key => $rfn($opts);
                     yield $key => $rfn($opts);
                 } else {
                 } else {
-                    throw new \InvalidArgumentException('Each value yielded by '
-                        . 'the iterator must be a Psr7\Http\Message\RequestInterface '
-                        . 'or a callable that returns a promise that fulfills '
-                        . 'with a Psr7\Message\Http\ResponseInterface object.');
+                    throw new \InvalidArgumentException('Each value yielded by the iterator must be a Psr7\Http\Message\RequestInterface or a callable that returns a promise that fulfills with a Psr7\Message\Http\ResponseInterface object.');
                 }
                 }
             }
             }
         };
         };
@@ -98,11 +93,8 @@ class Pool implements PromisorInterface
      *
      *
      * @throws \InvalidArgumentException if the event format is incorrect.
      * @throws \InvalidArgumentException if the event format is incorrect.
      */
      */
-    public static function batch(
-        ClientInterface $client,
-        $requests,
-        array $options = []
-    ): array {
+    public static function batch(ClientInterface $client, $requests, array $options = []): array
+    {
         $res = [];
         $res = [];
         self::cmpCallback($options, 'fulfilled', $res);
         self::cmpCallback($options, 'fulfilled', $res);
         self::cmpCallback($options, 'rejected', $res);
         self::cmpCallback($options, 'rejected', $res);

+ 4 - 7
api/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php

@@ -40,7 +40,7 @@ class PrepareBodyMiddleware
         // Add a default content-type if possible.
         // Add a default content-type if possible.
         if (!$request->hasHeader('Content-Type')) {
         if (!$request->hasHeader('Content-Type')) {
             if ($uri = $request->getBody()->getMetadata('uri')) {
             if ($uri = $request->getBody()->getMetadata('uri')) {
-                if (is_string($uri) && $type = Psr7\mimetype_from_filename($uri)) {
+                if (is_string($uri) && $type = Psr7\MimeType::fromFilename($uri)) {
                     $modify['set_headers']['Content-Type'] = $type;
                     $modify['set_headers']['Content-Type'] = $type;
                 }
                 }
             }
             }
@@ -61,17 +61,14 @@ class PrepareBodyMiddleware
         // Add the expect header if needed.
         // Add the expect header if needed.
         $this->addExpectHeader($request, $options, $modify);
         $this->addExpectHeader($request, $options, $modify);
 
 
-        return $fn(Psr7\modify_request($request, $modify), $options);
+        return $fn(Psr7\Utils::modifyRequest($request, $modify), $options);
     }
     }
 
 
     /**
     /**
      * Add expect header
      * Add expect header
      */
      */
-    private function addExpectHeader(
-        RequestInterface $request,
-        array $options,
-        array &$modify
-    ): void {
+    private function addExpectHeader(RequestInterface $request, array $options, array &$modify): void
+    {
         // Determine if the Expect header should be used
         // Determine if the Expect header should be used
         if ($request->hasHeader('Expect')) {
         if ($request->hasHeader('Expect')) {
             return;
             return;

+ 12 - 32
api/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php

@@ -77,18 +77,15 @@ class RedirectMiddleware
     /**
     /**
      * @return ResponseInterface|PromiseInterface
      * @return ResponseInterface|PromiseInterface
      */
      */
-    public function checkRedirect(
-        RequestInterface $request,
-        array $options,
-        ResponseInterface $response
-    ) {
+    public function checkRedirect(RequestInterface $request, array $options, ResponseInterface $response)
+    {
         if (\strpos((string) $response->getStatusCode(), '3') !== 0
         if (\strpos((string) $response->getStatusCode(), '3') !== 0
             || !$response->hasHeader('Location')
             || !$response->hasHeader('Location')
         ) {
         ) {
             return $response;
             return $response;
         }
         }
 
 
-        $this->guardMax($request, $options);
+        $this->guardMax($request, $response, $options);
         $nextRequest = $this->modifyRequest($request, $options, $response);
         $nextRequest = $this->modifyRequest($request, $options, $response);
 
 
         if (isset($options['allow_redirects']['on_redirect'])) {
         if (isset($options['allow_redirects']['on_redirect'])) {
@@ -139,7 +136,7 @@ class RedirectMiddleware
      *
      *
      * @throws TooManyRedirectsException Too many redirects.
      * @throws TooManyRedirectsException Too many redirects.
      */
      */
-    private function guardMax(RequestInterface $request, array &$options): void
+    private function guardMax(RequestInterface $request, ResponseInterface $response, array &$options): void
     {
     {
         $current = $options['__redirect_count']
         $current = $options['__redirect_count']
             ?? 0;
             ?? 0;
@@ -147,18 +144,12 @@ class RedirectMiddleware
         $max = $options['allow_redirects']['max'];
         $max = $options['allow_redirects']['max'];
 
 
         if ($options['__redirect_count'] > $max) {
         if ($options['__redirect_count'] > $max) {
-            throw new TooManyRedirectsException(
-                "Will not follow more than {$max} redirects",
-                $request
-            );
+            throw new TooManyRedirectsException("Will not follow more than {$max} redirects", $request, $response);
         }
         }
     }
     }
 
 
-    public function modifyRequest(
-        RequestInterface $request,
-        array $options,
-        ResponseInterface $response
-    ): RequestInterface {
+    public function modifyRequest(RequestInterface $request, array $options, ResponseInterface $response): RequestInterface
+    {
         // Request modifications to apply.
         // Request modifications to apply.
         $modify = [];
         $modify = [];
         $protocols = $options['allow_redirects']['protocols'];
         $protocols = $options['allow_redirects']['protocols'];
@@ -184,7 +175,7 @@ class RedirectMiddleware
         }
         }
 
 
         $modify['uri'] = $uri;
         $modify['uri'] = $uri;
-        Psr7\rewind_body($request);
+        Psr7\Message::rewindBody($request);
 
 
         // Add the Referer header if it is told to do so and only
         // Add the Referer header if it is told to do so and only
         // add the header if we are not redirecting from https to http.
         // add the header if we are not redirecting from https to http.
@@ -202,17 +193,14 @@ class RedirectMiddleware
             $modify['remove_headers'][] = 'Authorization';
             $modify['remove_headers'][] = 'Authorization';
         }
         }
 
 
-        return Psr7\modify_request($request, $modify);
+        return Psr7\Utils::modifyRequest($request, $modify);
     }
     }
 
 
     /**
     /**
      * Set the appropriate URL on the request based on the location header
      * Set the appropriate URL on the request based on the location header
      */
      */
-    private function redirectUri(
-        RequestInterface $request,
-        ResponseInterface $response,
-        array $protocols
-    ): UriInterface {
+    private function redirectUri(RequestInterface $request, ResponseInterface $response, array $protocols): UriInterface
+    {
         $location = Psr7\UriResolver::resolve(
         $location = Psr7\UriResolver::resolve(
             $request->getUri(),
             $request->getUri(),
             new Psr7\Uri($response->getHeaderLine('Location'))
             new Psr7\Uri($response->getHeaderLine('Location'))
@@ -220,15 +208,7 @@ class RedirectMiddleware
 
 
         // Ensure that the redirect URI is allowed based on the protocols.
         // Ensure that the redirect URI is allowed based on the protocols.
         if (!\in_array($location->getScheme(), $protocols)) {
         if (!\in_array($location->getScheme(), $protocols)) {
-            throw new BadResponseException(
-                \sprintf(
-                    'Redirect URI, %s, does not use one of the allowed redirect protocols: %s',
-                    $location,
-                    \implode(', ', $protocols)
-                ),
-                $request,
-                $response
-            );
+            throw new BadResponseException(\sprintf('Redirect URI, %s, does not use one of the allowed redirect protocols: %s', $location, \implode(', ', $protocols)), $request, $response);
         }
         }
 
 
         return $location;
         return $location;

+ 4 - 6
api/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php

@@ -2,6 +2,7 @@
 
 
 namespace GuzzleHttp;
 namespace GuzzleHttp;
 
 
+use GuzzleHttp\Promise as P;
 use GuzzleHttp\Promise\PromiseInterface;
 use GuzzleHttp\Promise\PromiseInterface;
 use Psr\Http\Message\RequestInterface;
 use Psr\Http\Message\RequestInterface;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ResponseInterface;
@@ -39,11 +40,8 @@ class RetryMiddleware
      *                                                                         and returns the number of
      *                                                                         and returns the number of
      *                                                                         milliseconds to delay.
      *                                                                         milliseconds to delay.
      */
      */
-    public function __construct(
-        callable $decider,
-        callable $nextHandler,
-        callable $delay = null
-    ) {
+    public function __construct(callable $decider, callable $nextHandler, callable $delay = null)
+    {
         $this->decider = $decider;
         $this->decider = $decider;
         $this->nextHandler = $nextHandler;
         $this->nextHandler = $nextHandler;
         $this->delay = $delay ?: __CLASS__ . '::exponentialDelay';
         $this->delay = $delay ?: __CLASS__ . '::exponentialDelay';
@@ -103,7 +101,7 @@ class RetryMiddleware
                 null,
                 null,
                 $reason
                 $reason
             )) {
             )) {
-                return \GuzzleHttp\Promise\rejection_for($reason);
+                return P\Create::rejectionFor($reason);
             }
             }
             return $this->doRetry($req, $options);
             return $this->doRetry($req, $options);
         };
         };

+ 1 - 3
api/vendor/guzzlehttp/guzzle/src/TransferStats.php

@@ -128,8 +128,6 @@ final class TransferStats
      */
      */
     public function getHandlerStat(string $stat)
     public function getHandlerStat(string $stat)
     {
     {
-        return isset($this->handlerStats[$stat])
-            ? $this->handlerStats[$stat]
-            : null;
+        return $this->handlerStats[$stat] ?? null;
     }
     }
 }
 }

+ 6 - 18
api/vendor/guzzlehttp/guzzle/src/Utils.php

@@ -49,9 +49,7 @@ final class Utils
 
 
         foreach ($lines as $line) {
         foreach ($lines as $line) {
             $parts = \explode(':', $line, 2);
             $parts = \explode(':', $line, 2);
-            $headers[\trim($parts[0])][] = isset($parts[1])
-                ? \trim($parts[1])
-                : null;
+            $headers[\trim($parts[0])][] = isset($parts[1]) ? \trim($parts[1]) : null;
         }
         }
 
 
         return $headers;
         return $headers;
@@ -73,12 +71,7 @@ final class Utils
             return \STDOUT;
             return \STDOUT;
         }
         }
 
 
-        $resource = \fopen('php://output', 'w');
-        if (false === $resource) {
-            throw new \RuntimeException('Can not open php output for writing to debug the resource.');
-        }
-
-        return $resource;
+        return \GuzzleHttp\Psr7\Utils::tryFopen('php://output', 'w');
     }
     }
 
 
     /**
     /**
@@ -106,8 +99,7 @@ final class Utils
                 ? Proxy::wrapStreaming($handler, new StreamHandler())
                 ? Proxy::wrapStreaming($handler, new StreamHandler())
                 : new StreamHandler();
                 : new StreamHandler();
         } elseif (!$handler) {
         } elseif (!$handler) {
-            throw new \RuntimeException('GuzzleHttp requires cURL, the '
-                . 'allow_url_fopen ini setting, or a custom HTTP handler.');
+            throw new \RuntimeException('GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler.');
         }
         }
 
 
         return $handler;
         return $handler;
@@ -235,7 +227,7 @@ EOT
         // Strip port if present.
         // Strip port if present.
         if (\strpos($host, ':')) {
         if (\strpos($host, ':')) {
             /** @var string[] $hostParts will never be false because of the checks above */
             /** @var string[] $hostParts will never be false because of the checks above */
-            $hostParts = \explode($host, ':', 2);
+            $hostParts = \explode(':', $host, 2);
             $host = $hostParts[0];
             $host = $hostParts[0];
         }
         }
 
 
@@ -280,9 +272,7 @@ EOT
     {
     {
         $data = \json_decode($json, $assoc, $depth, $options);
         $data = \json_decode($json, $assoc, $depth, $options);
         if (\JSON_ERROR_NONE !== \json_last_error()) {
         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;
         return $data;
@@ -303,9 +293,7 @@ EOT
     {
     {
         $json = \json_encode($value, $options, $depth);
         $json = \json_encode($value, $options, $depth);
         if (\JSON_ERROR_NONE !== \json_last_error()) {
         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 */
         /** @var string */

+ 9 - 0
api/vendor/guzzlehttp/guzzle/vendor-bin/php-cs-fixer/composer.json

@@ -0,0 +1,9 @@
+{
+    "require": {
+        "php": "^7.2.5 || ^8.0",
+        "friendsofphp/php-cs-fixer": "2.18.3"
+    },
+    "config": {
+        "preferred-install": "dist"
+    }
+}

+ 10 - 0
api/vendor/guzzlehttp/guzzle/vendor-bin/phpstan/composer.json

@@ -0,0 +1,10 @@
+{
+    "require": {
+        "php": "^7.2.5 || ^8.0",
+        "phpstan/phpstan": "0.12.81",
+        "phpstan/phpstan-deprecation-rules": "0.12.6"
+    },
+    "config": {
+        "preferred-install": "dist"
+    }
+}

+ 9 - 0
api/vendor/guzzlehttp/guzzle/vendor-bin/psalm/composer.json

@@ -0,0 +1,9 @@
+{
+    "require": {
+        "php": "^7.2.5 || ^8.0",
+        "psalm/phar": "4.6.2"
+    },
+    "config": {
+        "preferred-install": "dist"
+    }
+}

+ 19 - 0
api/vendor/guzzlehttp/promises/CHANGELOG.md

@@ -1,5 +1,24 @@
 # CHANGELOG
 # CHANGELOG
 
 
+## 1.4.1 - 2021-02-18
+
+- Fixed `each_limit` skipping promises and failing
+
+## 1.4.0 - 2020-09-30
+
+### Added
+
+- Support for PHP 8
+- Optional `$recursive` flag to `all`
+- Replaced functions by static methods
+
+### Fixed
+
+- Fix empty `each` processing
+- Fix promise handling for Iterators of non-unique keys
+- Fixed `method_exists` crashes on PHP 8
+- Memory leak on exceptions
+
 
 
 ## 1.3.1 - 2016-12-20
 ## 1.3.1 - 2016-12-20
 
 

+ 35 - 7
api/vendor/guzzlehttp/promises/README.md

@@ -26,7 +26,7 @@ for a general introduction to promises.
 - Promises can be cancelled.
 - Promises can be cancelled.
 - Works with any object that has a `then` function.
 - Works with any object that has a `then` function.
 - C# style async/await coroutine promises using
 - C# style async/await coroutine promises using
-  `GuzzleHttp\Promise\coroutine()`.
+  `GuzzleHttp\Promise\Coroutine::of()`.
 
 
 
 
 # Quick start
 # Quick start
@@ -88,7 +88,7 @@ $promise
     });
     });
 
 
 // Resolving the promise triggers the $onFulfilled callbacks and outputs
 // Resolving the promise triggers the $onFulfilled callbacks and outputs
-// "Hello, reader".
+// "Hello, reader."
 $promise->resolve('reader.');
 $promise->resolve('reader.');
 ```
 ```
 
 
@@ -150,7 +150,7 @@ use GuzzleHttp\Promise\Promise;
 
 
 $promise = new Promise();
 $promise = new Promise();
 $promise->then(null, function ($reason) {
 $promise->then(null, function ($reason) {
-    throw new \Exception($reason);
+    throw new Exception($reason);
 })->then(null, function ($reason) {
 })->then(null, function ($reason) {
     assert($reason->getMessage() === 'Error!');
     assert($reason->getMessage() === 'Error!');
 });
 });
@@ -182,7 +182,6 @@ invoked using the value returned from the `$onRejected` callback.
 
 
 ```php
 ```php
 use GuzzleHttp\Promise\Promise;
 use GuzzleHttp\Promise\Promise;
-use GuzzleHttp\Promise\RejectedPromise;
 
 
 $promise = new Promise();
 $promise = new Promise();
 $promise
 $promise
@@ -220,7 +219,7 @@ the promise is rejected with the exception and the exception is thrown.
 
 
 ```php
 ```php
 $promise = new Promise(function () use (&$promise) {
 $promise = new Promise(function () use (&$promise) {
-    throw new \Exception('foo');
+    throw new Exception('foo');
 });
 });
 
 
 $promise->wait(); // throws the exception.
 $promise->wait(); // throws the exception.
@@ -397,7 +396,7 @@ $deferred = new React\Promise\Deferred();
 $reactPromise = $deferred->promise();
 $reactPromise = $deferred->promise();
 
 
 // Create a Guzzle promise that is fulfilled with a React promise.
 // Create a Guzzle promise that is fulfilled with a React promise.
-$guzzlePromise = new \GuzzleHttp\Promise\Promise();
+$guzzlePromise = new GuzzleHttp\Promise\Promise();
 $guzzlePromise->then(function ($value) use ($reactPromise) {
 $guzzlePromise->then(function ($value) use ($reactPromise) {
     // Do something something with the value...
     // Do something something with the value...
     // Return the React promise
     // Return the React promise
@@ -424,7 +423,7 @@ instance.
 
 
 ```php
 ```php
 // Get the global task queue
 // Get the global task queue
-$queue = \GuzzleHttp\Promise\queue();
+$queue = GuzzleHttp\Promise\Utils::queue();
 $queue->run();
 $queue->run();
 ```
 ```
 
 
@@ -502,3 +501,32 @@ $promise->then(function ($value) { echo $value; });
 $promise->resolve('foo');
 $promise->resolve('foo');
 // prints "foo"
 // prints "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:
+
+| Original Function | Replacement Method |
+|----------------|----------------|
+| `queue` | `Utils::queue` |
+| `task` | `Utils::task` |
+| `promise_for` | `Create::promiseFor` |
+| `rejection_for` | `Create::rejectionFor` |
+| `exception_for` | `Create::exceptionFor` |
+| `iter_for` | `Create::iterFor` |
+| `inspect` | `Utils::inspect` |
+| `inspect_all` | `Utils::inspectAll` |
+| `unwrap` | `Utils::unwrap` |
+| `all` | `Utils::all` |
+| `some` | `Utils::some` |
+| `any` | `Utils::any` |
+| `settle` | `Utils::settle` |
+| `each` | `Each::of` |
+| `each_limit` | `Each::ofLimit` |
+| `each_limit_all` | `Each::ofLimitAll` |
+| `!is_fulfilled` | `Is::pending` |
+| `is_fulfilled` | `Is::fulfilled` |
+| `is_rejected` | `Is::rejected` |
+| `is_settled` | `Is::settled` |
+| `coroutine` | `Coroutine::of` |

+ 9 - 4
api/vendor/guzzlehttp/promises/composer.json

@@ -11,10 +11,10 @@
         }
         }
     ],
     ],
     "require": {
     "require": {
-        "php": ">=5.5.0"
+        "php": ">=5.5"
     },
     },
     "require-dev": {
     "require-dev": {
-        "phpunit/phpunit": "^4.0"
+        "symfony/phpunit-bridge": "^4.4 || ^5.1"
     },
     },
     "autoload": {
     "autoload": {
         "psr-4": {
         "psr-4": {
@@ -22,9 +22,14 @@
         },
         },
         "files": ["src/functions_include.php"]
         "files": ["src/functions_include.php"]
     },
     },
+    "autoload-dev": {
+        "psr-4": {
+            "GuzzleHttp\\Promise\\Tests\\": "tests/"
+        }
+    },
     "scripts": {
     "scripts": {
-        "test": "vendor/bin/phpunit",
-        "test-ci": "vendor/bin/phpunit --coverage-text"
+        "test": "vendor/bin/simple-phpunit",
+        "test-ci": "vendor/bin/simple-phpunit --coverage-text"
     },
     },
     "extra": {
     "extra": {
         "branch-alias": {
         "branch-alias": {

+ 1 - 0
api/vendor/guzzlehttp/promises/src/AggregateException.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Promise;
 namespace GuzzleHttp\Promise;
 
 
 /**
 /**

+ 1 - 0
api/vendor/guzzlehttp/promises/src/CancellationException.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Promise;
 namespace GuzzleHttp\Promise;
 
 
 /**
 /**

+ 23 - 5
api/vendor/guzzlehttp/promises/src/Coroutine.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Promise;
 namespace GuzzleHttp\Promise;
 
 
 use Exception;
 use Exception;
@@ -9,7 +10,7 @@ use Throwable;
  * Creates a promise that is resolved using a generator that yields values or
  * Creates a promise that is resolved using a generator that yields values or
  * promises (somewhat similar to C#'s async keyword).
  * promises (somewhat similar to C#'s async keyword).
  *
  *
- * When called, the coroutine function will start an instance of the generator
+ * When called, the Coroutine::of method will start an instance of the generator
  * and returns a promise that is fulfilled with its final yielded value.
  * and returns a promise that is fulfilled with its final yielded value.
  *
  *
  * Control is returned back to the generator when the yielded promise settles.
  * Control is returned back to the generator when the yielded promise settles.
@@ -22,7 +23,7 @@ use Throwable;
  *         return new Promise\FulfilledPromise($value);
  *         return new Promise\FulfilledPromise($value);
  *     }
  *     }
  *
  *
- *     $promise = Promise\coroutine(function () {
+ *     $promise = Promise\Coroutine::of(function () {
  *         $value = (yield createPromise('a'));
  *         $value = (yield createPromise('a'));
  *         try {
  *         try {
  *             $value = (yield createPromise($value . 'b'));
  *             $value = (yield createPromise($value . 'b'));
@@ -38,6 +39,7 @@ use Throwable;
  * @param callable $generatorFn Generator function to wrap into a promise.
  * @param callable $generatorFn Generator function to wrap into a promise.
  *
  *
  * @return Promise
  * @return Promise
+ *
  * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration
  * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration
  */
  */
 final class Coroutine implements PromiseInterface
 final class Coroutine implements PromiseInterface
@@ -65,7 +67,23 @@ final class Coroutine implements PromiseInterface
                 $this->currentPromise->wait();
                 $this->currentPromise->wait();
             }
             }
         });
         });
-        $this->nextCoroutine($this->generator->current());
+        try {
+            $this->nextCoroutine($this->generator->current());
+        } catch (\Exception $exception) {
+            $this->result->reject($exception);
+        } catch (Throwable $throwable) {
+            $this->result->reject($throwable);
+        }
+    }
+
+    /**
+     * Create a new coroutine.
+     *
+     * @return self
+     */
+    public static function of(callable $generatorFn)
+    {
+        return new self($generatorFn);
     }
     }
 
 
     public function then(
     public function then(
@@ -108,7 +126,7 @@ final class Coroutine implements PromiseInterface
 
 
     private function nextCoroutine($yielded)
     private function nextCoroutine($yielded)
     {
     {
-        $this->currentPromise = promise_for($yielded)
+        $this->currentPromise = Create::promiseFor($yielded)
             ->then([$this, '_handleSuccess'], [$this, '_handleFailure']);
             ->then([$this, '_handleSuccess'], [$this, '_handleFailure']);
     }
     }
 
 
@@ -139,7 +157,7 @@ final class Coroutine implements PromiseInterface
     {
     {
         unset($this->currentPromise);
         unset($this->currentPromise);
         try {
         try {
-            $nextYield = $this->generator->throw(exception_for($reason));
+            $nextYield = $this->generator->throw(Create::exceptionFor($reason));
             // The throw was caught, so keep iterating on the coroutine
             // The throw was caught, so keep iterating on the coroutine
             $this->nextCoroutine($nextYield);
             $this->nextCoroutine($nextYield);
         } catch (Exception $exception) {
         } catch (Exception $exception) {

+ 84 - 0
api/vendor/guzzlehttp/promises/src/Create.php

@@ -0,0 +1,84 @@
+<?php
+
+namespace GuzzleHttp\Promise;
+
+final class Create
+{
+    /**
+     * Creates a promise for a value if the value is not a promise.
+     *
+     * @param mixed $value Promise or value.
+     *
+     * @return PromiseInterface
+     */
+    public static function promiseFor($value)
+    {
+        if ($value instanceof PromiseInterface) {
+            return $value;
+        }
+
+        // Return a Guzzle promise that shadows the given promise.
+        if (is_object($value) && method_exists($value, 'then')) {
+            $wfn = method_exists($value, 'wait') ? [$value, 'wait'] : null;
+            $cfn = method_exists($value, 'cancel') ? [$value, 'cancel'] : null;
+            $promise = new Promise($wfn, $cfn);
+            $value->then([$promise, 'resolve'], [$promise, 'reject']);
+            return $promise;
+        }
+
+        return new FulfilledPromise($value);
+    }
+
+    /**
+     * Creates a rejected promise for a reason if the reason is not a promise.
+     * If the provided reason is a promise, then it is returned as-is.
+     *
+     * @param mixed $reason Promise or reason.
+     *
+     * @return PromiseInterface
+     */
+    public static function rejectionFor($reason)
+    {
+        if ($reason instanceof PromiseInterface) {
+            return $reason;
+        }
+
+        return new RejectedPromise($reason);
+    }
+
+    /**
+     * Create an exception for a rejected promise value.
+     *
+     * @param mixed $reason
+     *
+     * @return \Exception|\Throwable
+     */
+    public static function exceptionFor($reason)
+    {
+        if ($reason instanceof \Exception || $reason instanceof \Throwable) {
+            return $reason;
+        }
+
+        return new RejectionException($reason);
+    }
+
+    /**
+     * Returns an iterator for the given value.
+     *
+     * @param mixed $value
+     *
+     * @return \Iterator
+     */
+    public static function iterFor($value)
+    {
+        if ($value instanceof \Iterator) {
+            return $value;
+        }
+
+        if (is_array($value)) {
+            return new \ArrayIterator($value);
+        }
+
+        return new \ArrayIterator([$value]);
+    }
+}

+ 90 - 0
api/vendor/guzzlehttp/promises/src/Each.php

@@ -0,0 +1,90 @@
+<?php
+
+namespace GuzzleHttp\Promise;
+
+final class Each
+{
+    /**
+     * Given an iterator that yields promises or values, returns a promise that
+     * is fulfilled with a null value when the iterator has been consumed or
+     * the aggregate promise has been fulfilled or rejected.
+     *
+     * $onFulfilled is a function that accepts the fulfilled value, iterator
+     * index, and the aggregate promise. The callback can invoke any necessary
+     * side effects and choose to resolve or reject the aggregate if needed.
+     *
+     * $onRejected is a function that accepts the rejection reason, iterator
+     * index, and the aggregate promise. The callback can invoke any necessary
+     * side effects and choose to resolve or reject the aggregate if needed.
+     *
+     * @param mixed    $iterable    Iterator or array to iterate over.
+     * @param callable $onFulfilled
+     * @param callable $onRejected
+     *
+     * @return PromiseInterface
+     */
+    public static function of(
+        $iterable,
+        callable $onFulfilled = null,
+        callable $onRejected = null
+    ) {
+        return (new EachPromise($iterable, [
+            'fulfilled' => $onFulfilled,
+            'rejected'  => $onRejected
+        ]))->promise();
+    }
+
+    /**
+     * Like of, but only allows a certain number of outstanding promises at any
+     * given time.
+     *
+     * $concurrency may be an integer or a function that accepts the number of
+     * pending promises and returns a numeric concurrency limit value to allow
+     * for dynamic a concurrency size.
+     *
+     * @param mixed        $iterable
+     * @param int|callable $concurrency
+     * @param callable     $onFulfilled
+     * @param callable     $onRejected
+     *
+     * @return PromiseInterface
+     */
+    public static function ofLimit(
+        $iterable,
+        $concurrency,
+        callable $onFulfilled = null,
+        callable $onRejected = null
+    ) {
+        return (new EachPromise($iterable, [
+            'fulfilled'   => $onFulfilled,
+            'rejected'    => $onRejected,
+            'concurrency' => $concurrency
+        ]))->promise();
+    }
+
+    /**
+     * Like limit, but ensures that no promise in the given $iterable argument
+     * is rejected. If any promise is rejected, then the aggregate promise is
+     * rejected with the encountered rejection.
+     *
+     * @param mixed        $iterable
+     * @param int|callable $concurrency
+     * @param callable     $onFulfilled
+     *
+     * @return PromiseInterface
+     */
+    public static function ofLimitAll(
+        $iterable,
+        $concurrency,
+        callable $onFulfilled = null
+    ) {
+        return each_limit(
+            $iterable,
+            $concurrency,
+            $onFulfilled,
+            function ($reason, $idx, PromiseInterface $aggregate) {
+                $aggregate->reject($reason);
+            }
+        );
+    }
+}

+ 48 - 23
api/vendor/guzzlehttp/promises/src/EachPromise.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Promise;
 namespace GuzzleHttp\Promise;
 
 
 /**
 /**
@@ -9,22 +10,24 @@ class EachPromise implements PromisorInterface
 {
 {
     private $pending = [];
     private $pending = [];
 
 
-    /** @var \Iterator */
+    private $nextPendingIndex = 0;
+
+    /** @var \Iterator|null */
     private $iterable;
     private $iterable;
 
 
-    /** @var callable|int */
+    /** @var callable|int|null */
     private $concurrency;
     private $concurrency;
 
 
-    /** @var callable */
+    /** @var callable|null */
     private $onFulfilled;
     private $onFulfilled;
 
 
-    /** @var callable */
+    /** @var callable|null */
     private $onRejected;
     private $onRejected;
 
 
-    /** @var Promise */
+    /** @var Promise|null */
     private $aggregate;
     private $aggregate;
 
 
-    /** @var bool */
+    /** @var bool|null */
     private $mutex;
     private $mutex;
 
 
     /**
     /**
@@ -45,12 +48,12 @@ class EachPromise implements PromisorInterface
      *   allowed number of outstanding concurrently executing promises,
      *   allowed number of outstanding concurrently executing promises,
      *   creating a capped pool of promises. There is no limit by default.
      *   creating a capped pool of promises. There is no limit by default.
      *
      *
-     * @param mixed    $iterable Promises or values to iterate.
-     * @param array    $config   Configuration options
+     * @param mixed $iterable Promises or values to iterate.
+     * @param array $config   Configuration options
      */
      */
     public function __construct($iterable, array $config = [])
     public function __construct($iterable, array $config = [])
     {
     {
-        $this->iterable = iter_for($iterable);
+        $this->iterable = Create::iterFor($iterable);
 
 
         if (isset($config['concurrency'])) {
         if (isset($config['concurrency'])) {
             $this->concurrency = $config['concurrency'];
             $this->concurrency = $config['concurrency'];
@@ -65,6 +68,7 @@ class EachPromise implements PromisorInterface
         }
         }
     }
     }
 
 
+    /** @psalm-suppress InvalidNullableReturnType */
     public function promise()
     public function promise()
     {
     {
         if ($this->aggregate) {
         if ($this->aggregate) {
@@ -73,14 +77,29 @@ class EachPromise implements PromisorInterface
 
 
         try {
         try {
             $this->createPromise();
             $this->createPromise();
+            /** @psalm-assert Promise $this->aggregate */
             $this->iterable->rewind();
             $this->iterable->rewind();
-            $this->refillPending();
+            if (!$this->checkIfFinished()) {
+                $this->refillPending();
+            }
         } catch (\Throwable $e) {
         } catch (\Throwable $e) {
+            /**
+             * @psalm-suppress NullReference
+             * @phpstan-ignore-next-line
+             */
             $this->aggregate->reject($e);
             $this->aggregate->reject($e);
         } catch (\Exception $e) {
         } catch (\Exception $e) {
+            /**
+             * @psalm-suppress NullReference
+             * @phpstan-ignore-next-line
+             */
             $this->aggregate->reject($e);
             $this->aggregate->reject($e);
         }
         }
 
 
+        /**
+         * @psalm-suppress NullableReturnStatement
+         * @phpstan-ignore-next-line
+         */
         return $this->aggregate;
         return $this->aggregate;
     }
     }
 
 
@@ -89,17 +108,12 @@ class EachPromise implements PromisorInterface
         $this->mutex = false;
         $this->mutex = false;
         $this->aggregate = new Promise(function () {
         $this->aggregate = new Promise(function () {
             reset($this->pending);
             reset($this->pending);
-            if (empty($this->pending) && !$this->iterable->valid()) {
-                $this->aggregate->resolve(null);
-                return;
-            }
-
             // Consume a potentially fluctuating list of promises while
             // Consume a potentially fluctuating list of promises while
             // ensuring that indexes are maintained (precluding array_shift).
             // ensuring that indexes are maintained (precluding array_shift).
             while ($promise = current($this->pending)) {
             while ($promise = current($this->pending)) {
                 next($this->pending);
                 next($this->pending);
                 $promise->wait();
                 $promise->wait();
-                if ($this->aggregate->getState() !== PromiseInterface::PENDING) {
+                if (Is::settled($this->aggregate)) {
                     return;
                     return;
                 }
                 }
             }
             }
@@ -109,6 +123,7 @@ class EachPromise implements PromisorInterface
         $clearFn = function () {
         $clearFn = function () {
             $this->iterable = $this->concurrency = $this->pending = null;
             $this->iterable = $this->concurrency = $this->pending = null;
             $this->onFulfilled = $this->onRejected = null;
             $this->onFulfilled = $this->onRejected = null;
+            $this->nextPendingIndex = 0;
         };
         };
 
 
         $this->aggregate->then($clearFn, $clearFn);
         $this->aggregate->then($clearFn, $clearFn);
@@ -148,22 +163,32 @@ class EachPromise implements PromisorInterface
             return false;
             return false;
         }
         }
 
 
-        $promise = promise_for($this->iterable->current());
-        $idx = $this->iterable->key();
+        $promise = Create::promiseFor($this->iterable->current());
+        $key = $this->iterable->key();
+
+        // Iterable keys may not be unique, so we use a counter to
+        // guarantee uniqueness
+        $idx = $this->nextPendingIndex++;
 
 
         $this->pending[$idx] = $promise->then(
         $this->pending[$idx] = $promise->then(
-            function ($value) use ($idx) {
+            function ($value) use ($idx, $key) {
                 if ($this->onFulfilled) {
                 if ($this->onFulfilled) {
                     call_user_func(
                     call_user_func(
-                        $this->onFulfilled, $value, $idx, $this->aggregate
+                        $this->onFulfilled,
+                        $value,
+                        $key,
+                        $this->aggregate
                     );
                     );
                 }
                 }
                 $this->step($idx);
                 $this->step($idx);
             },
             },
-            function ($reason) use ($idx) {
+            function ($reason) use ($idx, $key) {
                 if ($this->onRejected) {
                 if ($this->onRejected) {
                     call_user_func(
                     call_user_func(
-                        $this->onRejected, $reason, $idx, $this->aggregate
+                        $this->onRejected,
+                        $reason,
+                        $key,
+                        $this->aggregate
                     );
                     );
                 }
                 }
                 $this->step($idx);
                 $this->step($idx);
@@ -201,7 +226,7 @@ class EachPromise implements PromisorInterface
     private function step($idx)
     private function step($idx)
     {
     {
         // If the promise was already resolved, then ignore this step.
         // If the promise was already resolved, then ignore this step.
-        if ($this->aggregate->getState() !== PromiseInterface::PENDING) {
+        if (Is::settled($this->aggregate)) {
             return;
             return;
         }
         }
 
 

+ 6 - 4
api/vendor/guzzlehttp/promises/src/FulfilledPromise.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Promise;
 namespace GuzzleHttp\Promise;
 
 
 /**
 /**
@@ -13,9 +14,10 @@ class FulfilledPromise implements PromiseInterface
 
 
     public function __construct($value)
     public function __construct($value)
     {
     {
-        if (method_exists($value, 'then')) {
+        if (is_object($value) && method_exists($value, 'then')) {
             throw new \InvalidArgumentException(
             throw new \InvalidArgumentException(
-                'You cannot create a FulfilledPromise with a promise.');
+                'You cannot create a FulfilledPromise with a promise.'
+            );
         }
         }
 
 
         $this->value = $value;
         $this->value = $value;
@@ -30,11 +32,11 @@ class FulfilledPromise implements PromiseInterface
             return $this;
             return $this;
         }
         }
 
 
-        $queue = queue();
+        $queue = Utils::queue();
         $p = new Promise([$queue, 'run']);
         $p = new Promise([$queue, 'run']);
         $value = $this->value;
         $value = $this->value;
         $queue->add(static function () use ($p, $value, $onFulfilled) {
         $queue->add(static function () use ($p, $value, $onFulfilled) {
-            if ($p->getState() === self::PENDING) {
+            if (Is::pending($p)) {
                 try {
                 try {
                     $p->resolve($onFulfilled($value));
                     $p->resolve($onFulfilled($value));
                 } catch (\Throwable $e) {
                 } catch (\Throwable $e) {

+ 46 - 0
api/vendor/guzzlehttp/promises/src/Is.php

@@ -0,0 +1,46 @@
+<?php
+
+namespace GuzzleHttp\Promise;
+
+final class Is
+{
+    /**
+     * Returns true if a promise is pending.
+     *
+     * @return bool
+     */
+    public static function pending(PromiseInterface $promise)
+    {
+        return $promise->getState() === PromiseInterface::PENDING;
+    }
+
+    /**
+     * Returns true if a promise is fulfilled or rejected.
+     *
+     * @return bool
+     */
+    public static function settled(PromiseInterface $promise)
+    {
+        return $promise->getState() !== PromiseInterface::PENDING;
+    }
+
+    /**
+     * Returns true if a promise is fulfilled.
+     *
+     * @return bool
+     */
+    public static function fulfilled(PromiseInterface $promise)
+    {
+        return $promise->getState() === PromiseInterface::FULFILLED;
+    }
+
+    /**
+     * Returns true if a promise is rejected.
+     *
+     * @return bool
+     */
+    public static function rejected(PromiseInterface $promise)
+    {
+        return $promise->getState() === PromiseInterface::REJECTED;
+    }
+}

+ 33 - 35
api/vendor/guzzlehttp/promises/src/Promise.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Promise;
 namespace GuzzleHttp\Promise;
 
 
 /**
 /**
@@ -41,14 +42,13 @@ class Promise implements PromiseInterface
 
 
         // Return a fulfilled promise and immediately invoke any callbacks.
         // Return a fulfilled promise and immediately invoke any callbacks.
         if ($this->state === self::FULFILLED) {
         if ($this->state === self::FULFILLED) {
-            return $onFulfilled
-                ? promise_for($this->result)->then($onFulfilled)
-                : promise_for($this->result);
+            $promise = Create::promiseFor($this->result);
+            return $onFulfilled ? $promise->then($onFulfilled) : $promise;
         }
         }
 
 
         // It's either cancelled or rejected, so return a rejected promise
         // It's either cancelled or rejected, so return a rejected promise
         // and immediately invoke any callbacks.
         // and immediately invoke any callbacks.
-        $rejection = rejection_for($this->result);
+        $rejection = Create::rejectionFor($this->result);
         return $onRejected ? $rejection->then(null, $onRejected) : $rejection;
         return $onRejected ? $rejection->then(null, $onRejected) : $rejection;
     }
     }
 
 
@@ -61,19 +61,15 @@ class Promise implements PromiseInterface
     {
     {
         $this->waitIfPending();
         $this->waitIfPending();
 
 
-        $inner = $this->result instanceof PromiseInterface
-            ? $this->result->wait($unwrap)
-            : $this->result;
-
+        if ($this->result instanceof PromiseInterface) {
+            return $this->result->wait($unwrap);
+        }
         if ($unwrap) {
         if ($unwrap) {
-            if ($this->result instanceof PromiseInterface
-                || $this->state === self::FULFILLED
-            ) {
-                return $inner;
-            } else {
-                // It's rejected so "unwrap" and throw an exception.
-                throw exception_for($inner);
+            if ($this->state === self::FULFILLED) {
+                return $this->result;
             }
             }
+            // It's rejected so "unwrap" and throw an exception.
+            throw Create::exceptionFor($this->result);
         }
         }
     }
     }
 
 
@@ -103,6 +99,7 @@ class Promise implements PromiseInterface
         }
         }
 
 
         // Reject the promise only if it wasn't rejected in a then callback.
         // Reject the promise only if it wasn't rejected in a then callback.
+        /** @psalm-suppress RedundantCondition */
         if ($this->state === self::PENDING) {
         if ($this->state === self::PENDING) {
             $this->reject(new CancellationException('Promise has been cancelled'));
             $this->reject(new CancellationException('Promise has been cancelled'));
         }
         }
@@ -148,17 +145,15 @@ class Promise implements PromiseInterface
 
 
         // If the value was not a settled promise or a thenable, then resolve
         // If the value was not a settled promise or a thenable, then resolve
         // it in the task queue using the correct ID.
         // it in the task queue using the correct ID.
-        if (!method_exists($value, 'then')) {
+        if (!is_object($value) || !method_exists($value, 'then')) {
             $id = $state === self::FULFILLED ? 1 : 2;
             $id = $state === self::FULFILLED ? 1 : 2;
             // It's a success, so resolve the handlers in the queue.
             // It's a success, so resolve the handlers in the queue.
-            queue()->add(static function () use ($id, $value, $handlers) {
+            Utils::queue()->add(static function () use ($id, $value, $handlers) {
                 foreach ($handlers as $handler) {
                 foreach ($handlers as $handler) {
                     self::callHandler($id, $value, $handler);
                     self::callHandler($id, $value, $handler);
                 }
                 }
             });
             });
-        } elseif ($value instanceof Promise
-            && $value->getState() === self::PENDING
-        ) {
+        } elseif ($value instanceof Promise && Is::pending($value)) {
             // We can just merge our handlers onto the next promise.
             // We can just merge our handlers onto the next promise.
             $value->handlers = array_merge($value->handlers, $handlers);
             $value->handlers = array_merge($value->handlers, $handlers);
         } else {
         } else {
@@ -184,8 +179,6 @@ class Promise implements PromiseInterface
      * @param int   $index   1 (resolve) or 2 (reject).
      * @param int   $index   1 (resolve) or 2 (reject).
      * @param mixed $value   Value to pass to the callback.
      * @param mixed $value   Value to pass to the callback.
      * @param array $handler Array of handler data (promise and callbacks).
      * @param array $handler Array of handler data (promise and callbacks).
-     *
-     * @return array Returns the next group to resolve.
      */
      */
     private static function callHandler($index, $value, array $handler)
     private static function callHandler($index, $value, array $handler)
     {
     {
@@ -194,13 +187,21 @@ class Promise implements PromiseInterface
 
 
         // The promise may have been cancelled or resolved before placing
         // The promise may have been cancelled or resolved before placing
         // this thunk in the queue.
         // this thunk in the queue.
-        if ($promise->getState() !== self::PENDING) {
+        if (Is::settled($promise)) {
             return;
             return;
         }
         }
 
 
         try {
         try {
             if (isset($handler[$index])) {
             if (isset($handler[$index])) {
-                $promise->resolve($handler[$index]($value));
+                /*
+                 * If $f throws an exception, then $handler will be in the exception
+                 * stack trace. Since $handler contains a reference to the callable
+                 * itself we get a circular reference. We clear the $handler
+                 * here to avoid that memory leak.
+                 */
+                $f = $handler[$index];
+                unset($handler);
+                $promise->resolve($f($value));
             } elseif ($index === 1) {
             } elseif ($index === 1) {
                 // Forward resolution values as-is.
                 // Forward resolution values as-is.
                 $promise->resolve($value);
                 $promise->resolve($value);
@@ -224,15 +225,16 @@ class Promise implements PromiseInterface
         } elseif ($this->waitList) {
         } elseif ($this->waitList) {
             $this->invokeWaitList();
             $this->invokeWaitList();
         } else {
         } else {
-            // If there's not wait function, then reject the promise.
+            // If there's no wait function, then reject the promise.
             $this->reject('Cannot wait on a promise that has '
             $this->reject('Cannot wait on a promise that has '
                 . 'no internal wait function. You must provide a wait '
                 . 'no internal wait function. You must provide a wait '
                 . 'function when constructing the promise to be able to '
                 . 'function when constructing the promise to be able to '
                 . 'wait on a promise.');
                 . 'wait on a promise.');
         }
         }
 
 
-        queue()->run();
+        Utils::queue()->run();
 
 
+        /** @psalm-suppress RedundantCondition */
         if ($this->state === self::PENDING) {
         if ($this->state === self::PENDING) {
             $this->reject('Invoking the wait callback did not resolve the promise');
             $this->reject('Invoking the wait callback did not resolve the promise');
         }
         }
@@ -263,17 +265,13 @@ class Promise implements PromiseInterface
         $this->waitList = null;
         $this->waitList = null;
 
 
         foreach ($waitList as $result) {
         foreach ($waitList as $result) {
-            while (true) {
+            do {
                 $result->waitIfPending();
                 $result->waitIfPending();
+                $result = $result->result;
+            } while ($result instanceof Promise);
 
 
-                if ($result->result instanceof Promise) {
-                    $result = $result->result;
-                } else {
-                    if ($result->result instanceof PromiseInterface) {
-                        $result->result->wait(false);
-                    }
-                    break;
-                }
+            if ($result instanceof PromiseInterface) {
+                $result->wait(false);
             }
             }
         }
         }
     }
     }

+ 4 - 0
api/vendor/guzzlehttp/promises/src/PromiseInterface.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Promise;
 namespace GuzzleHttp\Promise;
 
 
 /**
 /**
@@ -56,6 +57,7 @@ interface PromiseInterface
      * Resolve the promise with the given value.
      * Resolve the promise with the given value.
      *
      *
      * @param mixed $value
      * @param mixed $value
+     *
      * @throws \RuntimeException if the promise is already resolved.
      * @throws \RuntimeException if the promise is already resolved.
      */
      */
     public function resolve($value);
     public function resolve($value);
@@ -64,6 +66,7 @@ interface PromiseInterface
      * Reject the promise with the given reason.
      * Reject the promise with the given reason.
      *
      *
      * @param mixed $reason
      * @param mixed $reason
+     *
      * @throws \RuntimeException if the promise is already resolved.
      * @throws \RuntimeException if the promise is already resolved.
      */
      */
     public function reject($reason);
     public function reject($reason);
@@ -86,6 +89,7 @@ interface PromiseInterface
      * @param bool $unwrap
      * @param bool $unwrap
      *
      *
      * @return mixed
      * @return mixed
+     *
      * @throws \LogicException if the promise has no wait function or if the
      * @throws \LogicException if the promise has no wait function or if the
      *                         promise does not settle after waiting.
      *                         promise does not settle after waiting.
      */
      */

+ 1 - 0
api/vendor/guzzlehttp/promises/src/PromisorInterface.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Promise;
 namespace GuzzleHttp\Promise;
 
 
 /**
 /**

+ 9 - 5
api/vendor/guzzlehttp/promises/src/RejectedPromise.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Promise;
 namespace GuzzleHttp\Promise;
 
 
 /**
 /**
@@ -13,9 +14,10 @@ class RejectedPromise implements PromiseInterface
 
 
     public function __construct($reason)
     public function __construct($reason)
     {
     {
-        if (method_exists($reason, 'then')) {
+        if (is_object($reason) && method_exists($reason, 'then')) {
             throw new \InvalidArgumentException(
             throw new \InvalidArgumentException(
-                'You cannot create a RejectedPromise with a promise.');
+                'You cannot create a RejectedPromise with a promise.'
+            );
         }
         }
 
 
         $this->reason = $reason;
         $this->reason = $reason;
@@ -30,11 +32,11 @@ class RejectedPromise implements PromiseInterface
             return $this;
             return $this;
         }
         }
 
 
-        $queue = queue();
+        $queue = Utils::queue();
         $reason = $this->reason;
         $reason = $this->reason;
         $p = new Promise([$queue, 'run']);
         $p = new Promise([$queue, 'run']);
         $queue->add(static function () use ($p, $reason, $onRejected) {
         $queue->add(static function () use ($p, $reason, $onRejected) {
-            if ($p->getState() === self::PENDING) {
+            if (Is::pending($p)) {
                 try {
                 try {
                     // Return a resolved promise if onRejected does not throw.
                     // Return a resolved promise if onRejected does not throw.
                     $p->resolve($onRejected($reason));
                     $p->resolve($onRejected($reason));
@@ -59,8 +61,10 @@ class RejectedPromise implements PromiseInterface
     public function wait($unwrap = true, $defaultDelivery = null)
     public function wait($unwrap = true, $defaultDelivery = null)
     {
     {
         if ($unwrap) {
         if ($unwrap) {
-            throw exception_for($this->reason);
+            throw Create::exceptionFor($this->reason);
         }
         }
+
+        return null;
     }
     }
 
 
     public function getState()
     public function getState()

+ 2 - 1
api/vendor/guzzlehttp/promises/src/RejectionException.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Promise;
 namespace GuzzleHttp\Promise;
 
 
 /**
 /**
@@ -12,7 +13,7 @@ class RejectionException extends \RuntimeException
     private $reason;
     private $reason;
 
 
     /**
     /**
-     * @param mixed $reason       Rejection reason.
+     * @param mixed  $reason      Rejection reason.
      * @param string $description Optional description
      * @param string $description Optional description
      */
      */
     public function __construct($reason, $description = null)
     public function __construct($reason, $description = null)

+ 3 - 2
api/vendor/guzzlehttp/promises/src/TaskQueue.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Promise;
 namespace GuzzleHttp\Promise;
 
 
 /**
 /**
@@ -8,7 +9,7 @@ namespace GuzzleHttp\Promise;
  * maintains a constant stack size. You can use the task queue asynchronously
  * maintains a constant stack size. You can use the task queue asynchronously
  * by calling the `run()` function of the global task queue in an event loop.
  * by calling the `run()` function of the global task queue in an event loop.
  *
  *
- *     GuzzleHttp\Promise\queue()->run();
+ *     GuzzleHttp\Promise\Utils::queue()->run();
  */
  */
 class TaskQueue implements TaskQueueInterface
 class TaskQueue implements TaskQueueInterface
 {
 {
@@ -42,8 +43,8 @@ class TaskQueue implements TaskQueueInterface
 
 
     public function run()
     public function run()
     {
     {
-        /** @var callable $task */
         while ($task = array_shift($this->queue)) {
         while ($task = array_shift($this->queue)) {
+            /** @var callable $task */
             $task();
             $task();
         }
         }
     }
     }

+ 1 - 2
api/vendor/guzzlehttp/promises/src/TaskQueueInterface.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Promise;
 namespace GuzzleHttp\Promise;
 
 
 interface TaskQueueInterface
 interface TaskQueueInterface
@@ -13,8 +14,6 @@ interface TaskQueueInterface
     /**
     /**
      * Adds a task to the queue that will be executed the next time run is
      * Adds a task to the queue that will be executed the next time run is
      * called.
      * called.
-     *
-     * @param callable $task
      */
      */
     public function add(callable $task);
     public function add(callable $task);
 
 

+ 274 - 0
api/vendor/guzzlehttp/promises/src/Utils.php

@@ -0,0 +1,274 @@
+<?php
+
+namespace GuzzleHttp\Promise;
+
+final class Utils
+{
+    /**
+     * Get the global task queue used for promise resolution.
+     *
+     * This task queue MUST be run in an event loop in order for promises to be
+     * settled asynchronously. It will be automatically run when synchronously
+     * waiting on a promise.
+     *
+     * <code>
+     * while ($eventLoop->isRunning()) {
+     *     GuzzleHttp\Promise\Utils::queue()->run();
+     * }
+     * </code>
+     *
+     * @param TaskQueueInterface $assign Optionally specify a new queue instance.
+     *
+     * @return TaskQueueInterface
+     */
+    public static function queue(TaskQueueInterface $assign = null)
+    {
+        static $queue;
+
+        if ($assign) {
+            $queue = $assign;
+        } elseif (!$queue) {
+            $queue = new TaskQueue();
+        }
+
+        return $queue;
+    }
+
+    /**
+     * Adds a function to run in the task queue when it is next `run()` and
+     * returns a promise that is fulfilled or rejected with the result.
+     *
+     * @param callable $task Task function to run.
+     *
+     * @return PromiseInterface
+     */
+    public static function task(callable $task)
+    {
+        $queue = self::queue();
+        $promise = new Promise([$queue, 'run']);
+        $queue->add(function () use ($task, $promise) {
+            try {
+                $promise->resolve($task());
+            } catch (\Throwable $e) {
+                $promise->reject($e);
+            } catch (\Exception $e) {
+                $promise->reject($e);
+            }
+        });
+
+        return $promise;
+    }
+
+    /**
+     * Synchronously waits on a promise to resolve and returns an inspection
+     * state array.
+     *
+     * Returns a state associative array containing a "state" key mapping to a
+     * valid promise state. If the state of the promise is "fulfilled", the
+     * array will contain a "value" key mapping to the fulfilled value of the
+     * promise. If the promise is rejected, the array will contain a "reason"
+     * key mapping to the rejection reason of the promise.
+     *
+     * @param PromiseInterface $promise Promise or value.
+     *
+     * @return array
+     */
+    public static function inspect(PromiseInterface $promise)
+    {
+        try {
+            return [
+                'state' => PromiseInterface::FULFILLED,
+                'value' => $promise->wait()
+            ];
+        } catch (RejectionException $e) {
+            return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()];
+        } catch (\Throwable $e) {
+            return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
+        } catch (\Exception $e) {
+            return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
+        }
+    }
+
+    /**
+     * Waits on all of the provided promises, but does not unwrap rejected
+     * promises as thrown exception.
+     *
+     * Returns an array of inspection state arrays.
+     *
+     * @see inspect for the inspection state array format.
+     *
+     * @param PromiseInterface[] $promises Traversable of promises to wait upon.
+     *
+     * @return array
+     */
+    public static function inspectAll($promises)
+    {
+        $results = [];
+        foreach ($promises as $key => $promise) {
+            $results[$key] = inspect($promise);
+        }
+
+        return $results;
+    }
+
+    /**
+     * Waits on all of the provided promises and returns the fulfilled values.
+     *
+     * Returns an array that contains the value of each promise (in the same
+     * order the promises were provided). An exception is thrown if any of the
+     * promises are rejected.
+     *
+     * @param iterable<PromiseInterface> $promises Iterable of PromiseInterface objects to wait on.
+     *
+     * @return array
+     *
+     * @throws \Exception on error
+     * @throws \Throwable on error in PHP >=7
+     */
+    public static function unwrap($promises)
+    {
+        $results = [];
+        foreach ($promises as $key => $promise) {
+            $results[$key] = $promise->wait();
+        }
+
+        return $results;
+    }
+
+    /**
+     * Given an array of promises, return a promise that is fulfilled when all
+     * the items in the array are fulfilled.
+     *
+     * The promise's fulfillment value is an array with fulfillment values at
+     * respective positions to the original array. If any promise in the array
+     * rejects, the returned promise is rejected with the rejection reason.
+     *
+     * @param mixed $promises  Promises or values.
+     * @param bool  $recursive If true, resolves new promises that might have been added to the stack during its own resolution.
+     *
+     * @return PromiseInterface
+     */
+    public static function all($promises, $recursive = false)
+    {
+        $results = [];
+        $promise = Each::of(
+            $promises,
+            function ($value, $idx) use (&$results) {
+                $results[$idx] = $value;
+            },
+            function ($reason, $idx, Promise $aggregate) {
+                $aggregate->reject($reason);
+            }
+        )->then(function () use (&$results) {
+            ksort($results);
+            return $results;
+        });
+
+        if (true === $recursive) {
+            $promise = $promise->then(function ($results) use ($recursive, &$promises) {
+                foreach ($promises as $promise) {
+                    if (Is::pending($promise)) {
+                        return self::all($promises, $recursive);
+                    }
+                }
+                return $results;
+            });
+        }
+
+        return $promise;
+    }
+
+    /**
+     * Initiate a competitive race between multiple promises or values (values
+     * will become immediately fulfilled promises).
+     *
+     * When count amount of promises have been fulfilled, the returned promise
+     * is fulfilled with an array that contains the fulfillment values of the
+     * winners in order of resolution.
+     *
+     * This promise is rejected with a {@see AggregateException} if the number
+     * of fulfilled promises is less than the desired $count.
+     *
+     * @param int   $count    Total number of promises.
+     * @param mixed $promises Promises or values.
+     *
+     * @return PromiseInterface
+     */
+    public static function some($count, $promises)
+    {
+        $results = [];
+        $rejections = [];
+
+        return Each::of(
+            $promises,
+            function ($value, $idx, PromiseInterface $p) use (&$results, $count) {
+                if (Is::settled($p)) {
+                    return;
+                }
+                $results[$idx] = $value;
+                if (count($results) >= $count) {
+                    $p->resolve(null);
+                }
+            },
+            function ($reason) use (&$rejections) {
+                $rejections[] = $reason;
+            }
+        )->then(
+            function () use (&$results, &$rejections, $count) {
+                if (count($results) !== $count) {
+                    throw new AggregateException(
+                        'Not enough promises to fulfill count',
+                        $rejections
+                    );
+                }
+                ksort($results);
+                return array_values($results);
+            }
+        );
+    }
+
+    /**
+     * Like some(), with 1 as count. However, if the promise fulfills, the
+     * fulfillment value is not an array of 1 but the value directly.
+     *
+     * @param mixed $promises Promises or values.
+     *
+     * @return PromiseInterface
+     */
+    public static function any($promises)
+    {
+        return self::some(1, $promises)->then(function ($values) {
+            return $values[0];
+        });
+    }
+
+    /**
+     * Returns a promise that is fulfilled when all of the provided promises have
+     * been fulfilled or rejected.
+     *
+     * The returned promise is fulfilled with an array of inspection state arrays.
+     *
+     * @see inspect for the inspection state array format.
+     *
+     * @param mixed $promises Promises or values.
+     *
+     * @return PromiseInterface
+     */
+    public static function settle($promises)
+    {
+        $results = [];
+
+        return Each::of(
+            $promises,
+            function ($value, $idx) use (&$results) {
+                $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value];
+            },
+            function ($reason, $idx) use (&$results) {
+                $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason];
+            }
+        )->then(function () use (&$results) {
+            ksort($results);
+            return $results;
+        });
+    }
+}

+ 80 - 174
api/vendor/guzzlehttp/promises/src/functions.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Promise;
 namespace GuzzleHttp\Promise;
 
 
 /**
 /**
@@ -17,18 +18,12 @@ namespace GuzzleHttp\Promise;
  * @param TaskQueueInterface $assign Optionally specify a new queue instance.
  * @param TaskQueueInterface $assign Optionally specify a new queue instance.
  *
  *
  * @return TaskQueueInterface
  * @return TaskQueueInterface
+ *
+ * @deprecated queue will be removed in guzzlehttp/promises:2.0. Use Utils::queue instead.
  */
  */
 function queue(TaskQueueInterface $assign = null)
 function queue(TaskQueueInterface $assign = null)
 {
 {
-    static $queue;
-
-    if ($assign) {
-        $queue = $assign;
-    } elseif (!$queue) {
-        $queue = new TaskQueue();
-    }
-
-    return $queue;
+    return Utils::queue($assign);
 }
 }
 
 
 /**
 /**
@@ -38,22 +33,12 @@ function queue(TaskQueueInterface $assign = null)
  * @param callable $task Task function to run.
  * @param callable $task Task function to run.
  *
  *
  * @return PromiseInterface
  * @return PromiseInterface
+ *
+ * @deprecated task will be removed in guzzlehttp/promises:2.0. Use Utils::task instead.
  */
  */
 function task(callable $task)
 function task(callable $task)
 {
 {
-    $queue = queue();
-    $promise = new Promise([$queue, 'run']);
-    $queue->add(function () use ($task, $promise) {
-        try {
-            $promise->resolve($task());
-        } catch (\Throwable $e) {
-            $promise->reject($e);
-        } catch (\Exception $e) {
-            $promise->reject($e);
-        }
-    });
-
-    return $promise;
+    return Utils::task($task);
 }
 }
 
 
 /**
 /**
@@ -62,23 +47,12 @@ function task(callable $task)
  * @param mixed $value Promise or value.
  * @param mixed $value Promise or value.
  *
  *
  * @return PromiseInterface
  * @return PromiseInterface
+ *
+ * @deprecated promise_for will be removed in guzzlehttp/promises:2.0. Use Create::promiseFor instead.
  */
  */
 function promise_for($value)
 function promise_for($value)
 {
 {
-    if ($value instanceof PromiseInterface) {
-        return $value;
-    }
-
-    // Return a Guzzle promise that shadows the given promise.
-    if (method_exists($value, 'then')) {
-        $wfn = method_exists($value, 'wait') ? [$value, 'wait'] : null;
-        $cfn = method_exists($value, 'cancel') ? [$value, 'cancel'] : null;
-        $promise = new Promise($wfn, $cfn);
-        $value->then([$promise, 'resolve'], [$promise, 'reject']);
-        return $promise;
-    }
-
-    return new FulfilledPromise($value);
+    return Create::promiseFor($value);
 }
 }
 
 
 /**
 /**
@@ -88,14 +62,12 @@ function promise_for($value)
  * @param mixed $reason Promise or reason.
  * @param mixed $reason Promise or reason.
  *
  *
  * @return PromiseInterface
  * @return PromiseInterface
+ *
+ * @deprecated rejection_for will be removed in guzzlehttp/promises:2.0. Use Create::rejectionFor instead.
  */
  */
 function rejection_for($reason)
 function rejection_for($reason)
 {
 {
-    if ($reason instanceof PromiseInterface) {
-        return $reason;
-    }
-
-    return new RejectedPromise($reason);
+    return Create::rejectionFor($reason);
 }
 }
 
 
 /**
 /**
@@ -104,12 +76,12 @@ function rejection_for($reason)
  * @param mixed $reason
  * @param mixed $reason
  *
  *
  * @return \Exception|\Throwable
  * @return \Exception|\Throwable
+ *
+ * @deprecated exception_for will be removed in guzzlehttp/promises:2.0. Use Create::exceptionFor instead.
  */
  */
 function exception_for($reason)
 function exception_for($reason)
 {
 {
-    return $reason instanceof \Exception || $reason instanceof \Throwable
-        ? $reason
-        : new RejectionException($reason);
+    return Create::exceptionFor($reason);
 }
 }
 
 
 /**
 /**
@@ -118,16 +90,12 @@ function exception_for($reason)
  * @param mixed $value
  * @param mixed $value
  *
  *
  * @return \Iterator
  * @return \Iterator
+ *
+ * @deprecated iter_for will be removed in guzzlehttp/promises:2.0. Use Create::iterFor instead.
  */
  */
 function iter_for($value)
 function iter_for($value)
 {
 {
-    if ($value instanceof \Iterator) {
-        return $value;
-    } elseif (is_array($value)) {
-        return new \ArrayIterator($value);
-    } else {
-        return new \ArrayIterator([$value]);
-    }
+    return Create::iterFor($value);
 }
 }
 
 
 /**
 /**
@@ -143,21 +111,12 @@ function iter_for($value)
  * @param PromiseInterface $promise Promise or value.
  * @param PromiseInterface $promise Promise or value.
  *
  *
  * @return array
  * @return array
+ *
+ * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspect instead.
  */
  */
 function inspect(PromiseInterface $promise)
 function inspect(PromiseInterface $promise)
 {
 {
-    try {
-        return [
-            'state' => PromiseInterface::FULFILLED,
-            'value' => $promise->wait()
-        ];
-    } catch (RejectionException $e) {
-        return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()];
-    } catch (\Throwable $e) {
-        return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
-    } catch (\Exception $e) {
-        return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
-    }
+    return Utils::inspect($promise);
 }
 }
 
 
 /**
 /**
@@ -166,19 +125,17 @@ function inspect(PromiseInterface $promise)
  *
  *
  * Returns an array of inspection state arrays.
  * Returns an array of inspection state arrays.
  *
  *
+ * @see inspect for the inspection state array format.
+ *
  * @param PromiseInterface[] $promises Traversable of promises to wait upon.
  * @param PromiseInterface[] $promises Traversable of promises to wait upon.
  *
  *
  * @return array
  * @return array
- * @see GuzzleHttp\Promise\inspect for the inspection state array format.
+ *
+ * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspectAll instead.
  */
  */
 function inspect_all($promises)
 function inspect_all($promises)
 {
 {
-    $results = [];
-    foreach ($promises as $key => $promise) {
-        $results[$key] = inspect($promise);
-    }
-
-    return $results;
+    return Utils::inspectAll($promises);
 }
 }
 
 
 /**
 /**
@@ -188,20 +145,18 @@ function inspect_all($promises)
  * the promises were provided). An exception is thrown if any of the promises
  * the promises were provided). An exception is thrown if any of the promises
  * are rejected.
  * are rejected.
  *
  *
- * @param mixed $promises Iterable of PromiseInterface objects to wait on.
+ * @param iterable<PromiseInterface> $promises Iterable of PromiseInterface objects to wait on.
  *
  *
  * @return array
  * @return array
+ *
  * @throws \Exception on error
  * @throws \Exception on error
  * @throws \Throwable on error in PHP >=7
  * @throws \Throwable on error in PHP >=7
+ *
+ * @deprecated unwrap will be removed in guzzlehttp/promises:2.0. Use Utils::unwrap instead.
  */
  */
 function unwrap($promises)
 function unwrap($promises)
 {
 {
-    $results = [];
-    foreach ($promises as $key => $promise) {
-        $results[$key] = $promise->wait();
-    }
-
-    return $results;
+    return Utils::unwrap($promises);
 }
 }
 
 
 /**
 /**
@@ -212,25 +167,16 @@ function unwrap($promises)
  * respective positions to the original array. If any promise in the array
  * respective positions to the original array. If any promise in the array
  * rejects, the returned promise is rejected with the rejection reason.
  * rejects, the returned promise is rejected with the rejection reason.
  *
  *
- * @param mixed $promises Promises or values.
+ * @param mixed $promises  Promises or values.
+ * @param bool  $recursive If true, resolves new promises that might have been added to the stack during its own resolution.
  *
  *
  * @return PromiseInterface
  * @return PromiseInterface
+ *
+ * @deprecated all will be removed in guzzlehttp/promises:2.0. Use Utils::all instead.
  */
  */
-function all($promises)
+function all($promises, $recursive = false)
 {
 {
-    $results = [];
-    return each(
-        $promises,
-        function ($value, $idx) use (&$results) {
-            $results[$idx] = $value;
-        },
-        function ($reason, $idx, Promise $aggregate) {
-            $aggregate->reject($reason);
-        }
-    )->then(function () use (&$results) {
-        ksort($results);
-        return $results;
-    });
+    return Utils::all($promises, $recursive);
 }
 }
 
 
 /**
 /**
@@ -241,45 +187,19 @@ function all($promises)
  * fulfilled with an array that contains the fulfillment values of the winners
  * fulfilled with an array that contains the fulfillment values of the winners
  * in order of resolution.
  * in order of resolution.
  *
  *
- * This prommise is rejected with a {@see GuzzleHttp\Promise\AggregateException}
- * if the number of fulfilled promises is less than the desired $count.
+ * This promise is rejected with a {@see AggregateException} if the number of
+ * fulfilled promises is less than the desired $count.
  *
  *
  * @param int   $count    Total number of promises.
  * @param int   $count    Total number of promises.
  * @param mixed $promises Promises or values.
  * @param mixed $promises Promises or values.
  *
  *
  * @return PromiseInterface
  * @return PromiseInterface
+ *
+ * @deprecated some will be removed in guzzlehttp/promises:2.0. Use Utils::some instead.
  */
  */
 function some($count, $promises)
 function some($count, $promises)
 {
 {
-    $results = [];
-    $rejections = [];
-
-    return each(
-        $promises,
-        function ($value, $idx, PromiseInterface $p) use (&$results, $count) {
-            if ($p->getState() !== PromiseInterface::PENDING) {
-                return;
-            }
-            $results[$idx] = $value;
-            if (count($results) >= $count) {
-                $p->resolve(null);
-            }
-        },
-        function ($reason) use (&$rejections) {
-            $rejections[] = $reason;
-        }
-    )->then(
-        function () use (&$results, &$rejections, $count) {
-            if (count($results) !== $count) {
-                throw new AggregateException(
-                    'Not enough promises to fulfill count',
-                    $rejections
-                );
-            }
-            ksort($results);
-            return array_values($results);
-        }
-    );
+    return Utils::some($count, $promises);
 }
 }
 
 
 /**
 /**
@@ -289,10 +209,12 @@ function some($count, $promises)
  * @param mixed $promises Promises or values.
  * @param mixed $promises Promises or values.
  *
  *
  * @return PromiseInterface
  * @return PromiseInterface
+ *
+ * @deprecated any will be removed in guzzlehttp/promises:2.0. Use Utils::any instead.
  */
  */
 function any($promises)
 function any($promises)
 {
 {
-    return some(1, $promises)->then(function ($values) { return $values[0]; });
+    return Utils::any($promises);
 }
 }
 
 
 /**
 /**
@@ -301,27 +223,17 @@ function any($promises)
  *
  *
  * The returned promise is fulfilled with an array of inspection state arrays.
  * The returned promise is fulfilled with an array of inspection state arrays.
  *
  *
+ * @see inspect for the inspection state array format.
+ *
  * @param mixed $promises Promises or values.
  * @param mixed $promises Promises or values.
  *
  *
  * @return PromiseInterface
  * @return PromiseInterface
- * @see GuzzleHttp\Promise\inspect for the inspection state array format.
+ *
+ * @deprecated settle will be removed in guzzlehttp/promises:2.0. Use Utils::settle instead.
  */
  */
 function settle($promises)
 function settle($promises)
 {
 {
-    $results = [];
-
-    return each(
-        $promises,
-        function ($value, $idx) use (&$results) {
-            $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value];
-        },
-        function ($reason, $idx) use (&$results) {
-            $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason];
-        }
-    )->then(function () use (&$results) {
-        ksort($results);
-        return $results;
-    });
+    return Utils::settle($promises);
 }
 }
 
 
 /**
 /**
@@ -329,29 +241,28 @@ function settle($promises)
  * fulfilled with a null value when the iterator has been consumed or the
  * fulfilled with a null value when the iterator has been consumed or the
  * aggregate promise has been fulfilled or rejected.
  * aggregate promise has been fulfilled or rejected.
  *
  *
- * $onFulfilled is a function that accepts the fulfilled value, iterator
- * index, and the aggregate promise. The callback can invoke any necessary side
- * effects and choose to resolve or reject the aggregate promise if needed.
+ * $onFulfilled is a function that accepts the fulfilled value, iterator index,
+ * and the aggregate promise. The callback can invoke any necessary side
+ * effects and choose to resolve or reject the aggregate if needed.
  *
  *
- * $onRejected is a function that accepts the rejection reason, iterator
- * index, and the aggregate promise. The callback can invoke any necessary side
- * effects and choose to resolve or reject the aggregate promise if needed.
+ * $onRejected is a function that accepts the rejection reason, iterator index,
+ * and the aggregate promise. The callback can invoke any necessary side
+ * effects and choose to resolve or reject the aggregate if needed.
  *
  *
  * @param mixed    $iterable    Iterator or array to iterate over.
  * @param mixed    $iterable    Iterator or array to iterate over.
  * @param callable $onFulfilled
  * @param callable $onFulfilled
  * @param callable $onRejected
  * @param callable $onRejected
  *
  *
  * @return PromiseInterface
  * @return PromiseInterface
+ *
+ * @deprecated each will be removed in guzzlehttp/promises:2.0. Use Each::of instead.
  */
  */
 function each(
 function each(
     $iterable,
     $iterable,
     callable $onFulfilled = null,
     callable $onFulfilled = null,
     callable $onRejected = null
     callable $onRejected = null
 ) {
 ) {
-    return (new EachPromise($iterable, [
-        'fulfilled' => $onFulfilled,
-        'rejected'  => $onRejected
-    ]))->promise();
+    return Each::of($iterable, $onFulfilled, $onRejected);
 }
 }
 
 
 /**
 /**
@@ -368,6 +279,8 @@ function each(
  * @param callable     $onRejected
  * @param callable     $onRejected
  *
  *
  * @return PromiseInterface
  * @return PromiseInterface
+ *
+ * @deprecated each_limit will be removed in guzzlehttp/promises:2.0. Use Each::ofLimit instead.
  */
  */
 function each_limit(
 function each_limit(
     $iterable,
     $iterable,
@@ -375,11 +288,7 @@ function each_limit(
     callable $onFulfilled = null,
     callable $onFulfilled = null,
     callable $onRejected = null
     callable $onRejected = null
 ) {
 ) {
-    return (new EachPromise($iterable, [
-        'fulfilled'   => $onFulfilled,
-        'rejected'    => $onRejected,
-        'concurrency' => $concurrency
-    ]))->promise();
+    return Each::ofLimit($iterable, $concurrency, $onFulfilled, $onRejected);
 }
 }
 
 
 /**
 /**
@@ -392,66 +301,63 @@ function each_limit(
  * @param callable     $onFulfilled
  * @param callable     $onFulfilled
  *
  *
  * @return PromiseInterface
  * @return PromiseInterface
+ *
+ * @deprecated each_limit_all will be removed in guzzlehttp/promises:2.0. Use Each::ofLimitAll instead.
  */
  */
 function each_limit_all(
 function each_limit_all(
     $iterable,
     $iterable,
     $concurrency,
     $concurrency,
     callable $onFulfilled = null
     callable $onFulfilled = null
 ) {
 ) {
-    return each_limit(
-        $iterable,
-        $concurrency,
-        $onFulfilled,
-        function ($reason, $idx, PromiseInterface $aggregate) {
-            $aggregate->reject($reason);
-        }
-    );
+    return Each::ofLimitAll($iterable, $concurrency, $onFulfilled);
 }
 }
 
 
 /**
 /**
  * Returns true if a promise is fulfilled.
  * Returns true if a promise is fulfilled.
  *
  *
- * @param PromiseInterface $promise
- *
  * @return bool
  * @return bool
+ *
+ * @deprecated is_fulfilled will be removed in guzzlehttp/promises:2.0. Use Is::fulfilled instead.
  */
  */
 function is_fulfilled(PromiseInterface $promise)
 function is_fulfilled(PromiseInterface $promise)
 {
 {
-    return $promise->getState() === PromiseInterface::FULFILLED;
+    return Is::fulfilled($promise);
 }
 }
 
 
 /**
 /**
  * Returns true if a promise is rejected.
  * Returns true if a promise is rejected.
  *
  *
- * @param PromiseInterface $promise
- *
  * @return bool
  * @return bool
+ *
+ * @deprecated is_rejected will be removed in guzzlehttp/promises:2.0. Use Is::rejected instead.
  */
  */
 function is_rejected(PromiseInterface $promise)
 function is_rejected(PromiseInterface $promise)
 {
 {
-    return $promise->getState() === PromiseInterface::REJECTED;
+    return Is::rejected($promise);
 }
 }
 
 
 /**
 /**
  * Returns true if a promise is fulfilled or rejected.
  * Returns true if a promise is fulfilled or rejected.
  *
  *
- * @param PromiseInterface $promise
- *
  * @return bool
  * @return bool
+ *
+ * @deprecated is_settled will be removed in guzzlehttp/promises:2.0. Use Is::settled instead.
  */
  */
 function is_settled(PromiseInterface $promise)
 function is_settled(PromiseInterface $promise)
 {
 {
-    return $promise->getState() !== PromiseInterface::PENDING;
+    return Is::settled($promise);
 }
 }
 
 
 /**
 /**
- * @see Coroutine
+ * Create a new coroutine.
  *
  *
- * @param callable $generatorFn
+ * @see Coroutine
  *
  *
  * @return PromiseInterface
  * @return PromiseInterface
+ *
+ * @deprecated coroutine will be removed in guzzlehttp/promises:2.0. Use Coroutine::of instead.
  */
  */
 function coroutine(callable $generatorFn)
 function coroutine(callable $generatorFn)
 {
 {
-    return new Coroutine($generatorFn);
+    return Coroutine::of($generatorFn);
 }
 }

+ 16 - 0
api/vendor/guzzlehttp/psr7/.github/workflows/bc.yml

@@ -0,0 +1,16 @@
+name: BC Check
+
+on:
+  pull_request:
+
+jobs:
+  roave-bc-check:
+    name: Roave BC Check
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v2
+
+      - name: Roave BC Check
+        uses: docker://nyholm/roave-bc-check-ga

+ 30 - 0
api/vendor/guzzlehttp/psr7/.github/workflows/ci.yml

@@ -0,0 +1,30 @@
+name: CI
+
+on:
+  pull_request:
+
+jobs:
+  build:
+    name: Build
+    runs-on: ubuntu-latest
+    strategy:
+      max-parallel: 10
+      matrix:
+        php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
+
+    steps:
+      - name: Set up PHP
+        uses: shivammathur/setup-php@v2
+        with:
+          php-version: ${{ matrix.php }}
+          coverage: 'none'
+          extensions: mbstring
+
+      - name: Checkout code
+        uses: actions/checkout@v2
+
+      - name: Install dependencies
+        run: composer update --no-interaction --no-progress --prefer-dist
+
+      - name: Run tests
+        run: make test

+ 37 - 0
api/vendor/guzzlehttp/psr7/.github/workflows/integration.yml

@@ -0,0 +1,37 @@
+name: Integration
+
+on:
+  pull_request:
+
+jobs:
+
+  build:
+    name: Test
+    runs-on: ubuntu-latest
+    strategy:
+      max-parallel: 10
+      matrix:
+        php: ['7.2', '7.3', '7.4', '8.0']
+
+    steps:
+      - name: Set up PHP
+        uses: shivammathur/setup-php@v2
+        with:
+          php-version: ${{ matrix.php }}
+          coverage: none
+
+      - name: Checkout code
+        uses: actions/checkout@v2
+
+      - name: Download dependencies
+        uses: ramsey/composer-install@v1
+        with:
+          composer-options: --no-interaction --prefer-dist --optimize-autoloader
+
+      - name: Start server
+        run: php -S 127.0.0.1:10002 tests/Integration/server.php &
+
+      - name: Run tests
+        env:
+          TEST_SERVER: 127.0.0.1:10002
+        run: ./vendor/bin/phpunit --testsuite Integration

+ 29 - 0
api/vendor/guzzlehttp/psr7/.github/workflows/static.yml

@@ -0,0 +1,29 @@
+name: Static analysis
+
+on:
+  pull_request:
+
+jobs:
+  php-cs-fixer:
+    name: PHP-CS-Fixer
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v2
+
+      - name: Setup PHP
+        uses: shivammathur/setup-php@v2
+        with:
+          php-version: '7.4'
+          coverage: none
+          extensions: mbstring
+
+      - name: Download dependencies
+        run: composer update --no-interaction --no-progress
+
+      - name: Download PHP CS Fixer
+        run: composer require "friendsofphp/php-cs-fixer:2.18.4"
+
+      - name: Execute PHP CS Fixer
+        run: vendor/bin/php-cs-fixer fix --diff-format udiff --dry-run

+ 56 - 0
api/vendor/guzzlehttp/psr7/.php_cs.dist

@@ -0,0 +1,56 @@
+<?php
+
+$config = PhpCsFixer\Config::create()
+    ->setRiskyAllowed(true)
+    ->setRules([
+        '@PSR2' => true,
+        'array_syntax' => ['syntax' => 'short'],
+        'concat_space' => ['spacing' => 'one'],
+        'declare_strict_types' => false,
+        'final_static_access' => true,
+        'fully_qualified_strict_types' => true,
+        'header_comment' => false,
+        'is_null' => ['use_yoda_style' => true],
+        'list_syntax' => ['syntax' => 'long'],
+        'lowercase_cast' => true,
+        'magic_method_casing' => true,
+        'modernize_types_casting' => true,
+        'multiline_comment_opening_closing' => true,
+        'no_alias_functions' => true,
+        'no_alternative_syntax' => true,
+        'no_blank_lines_after_phpdoc' => true,
+        'no_empty_comment' => true,
+        'no_empty_phpdoc' => true,
+        'no_empty_statement' => true,
+        'no_extra_blank_lines' => true,
+        'no_leading_import_slash' => true,
+        'no_trailing_comma_in_singleline_array' => true,
+        'no_unset_cast' => true,
+        'no_unused_imports' => true,
+        'no_whitespace_in_blank_line' => true,
+        'ordered_imports' => true,
+        'php_unit_ordered_covers' => true,
+        'php_unit_test_annotation' => ['style' => 'prefix'],
+        'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
+        'phpdoc_align' => ['align' => 'vertical'],
+        'phpdoc_no_useless_inheritdoc' => true,
+        'phpdoc_scalar' => true,
+        'phpdoc_separation' => true,
+        'phpdoc_single_line_var_spacing' => true,
+        'phpdoc_trim' => true,
+        'phpdoc_trim_consecutive_blank_line_separation' => true,
+        'phpdoc_types' => true,
+        'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
+        'phpdoc_var_without_name' => true,
+        'single_trait_insert_per_statement' => true,
+        'standardize_not_equals' => true,
+    ])
+    ->setFinder(
+        PhpCsFixer\Finder::create()
+            ->in(__DIR__.'/src')
+            ->in(__DIR__.'/tests')
+            ->name('*.php')
+    )
+;
+
+return $config;

+ 51 - 3
api/vendor/guzzlehttp/psr7/CHANGELOG.md

@@ -7,10 +7,59 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
 and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
 and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
 
 
 
 
-## [Unreleased]
+## Unreleased
 
 
+## 1.8.2 - 2021-04-26
 
 
-## [1.6.0]
+### Fixed
+
+- Handle possibly unset `url` in `stream_get_meta_data`
+
+## 1.8.1 - 2021-03-21
+
+### Fixed
+
+- Issue parsing IPv6 URLs
+- Issue modifying ServerRequest lost all its attributes
+
+## 1.8.0 - 2021-03-21
+
+### Added
+
+- Locale independent URL parsing
+- Most classes got a `@final` annotation to prepare for 2.0
+
+### Fixed
+
+- Issue when creating stream from `php://input` and curl-ext is not installed
+- Broken `Utils::tryFopen()` on PHP 8
+
+## 1.7.0 - 2020-09-30
+
+### Added
+
+- Replaced functions by static methods
+
+### Fixed
+
+- Converting a non-seekable stream to a string
+- Handle multiple Set-Cookie correctly
+- Ignore array keys in header values when merging
+- Allow multibyte characters to be parsed in `Message:bodySummary()`
+
+### Changed
+
+- Restored partial HHVM 3 support
+
+
+## [1.6.1] - 2019-07-02
+
+### Fixed
+
+- Accept null and bool header values again
+
+
+## [1.6.0] - 2019-06-30
 
 
 ### Added
 ### Added
 
 
@@ -229,7 +278,6 @@ Currently unsupported:
 
 
 
 
 
 
-[Unreleased]: https://github.com/guzzle/psr7/compare/1.6.0...HEAD
 [1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0
 [1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0
 [1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2
 [1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2
 [1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1
 [1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1

+ 193 - 129
api/vendor/guzzlehttp/psr7/README.md

@@ -23,11 +23,11 @@ Reads from multiple streams, one after the other.
 ```php
 ```php
 use GuzzleHttp\Psr7;
 use GuzzleHttp\Psr7;
 
 
-$a = Psr7\stream_for('abc, ');
-$b = Psr7\stream_for('123.');
+$a = Psr7\Utils::streamFor('abc, ');
+$b = Psr7\Utils::streamFor('123.');
 $composed = new Psr7\AppendStream([$a, $b]);
 $composed = new Psr7\AppendStream([$a, $b]);
 
 
-$composed->addStream(Psr7\stream_for(' Above all listen to me'));
+$composed->addStream(Psr7\Utils::streamFor(' Above all listen to me'));
 
 
 echo $composed; // abc, 123. Above all listen to me.
 echo $composed; // abc, 123. Above all listen to me.
 ```
 ```
@@ -65,7 +65,7 @@ then on disk.
 ```php
 ```php
 use GuzzleHttp\Psr7;
 use GuzzleHttp\Psr7;
 
 
-$original = Psr7\stream_for(fopen('http://www.google.com', 'r'));
+$original = Psr7\Utils::streamFor(fopen('http://www.google.com', 'r'));
 $stream = new Psr7\CachingStream($original);
 $stream = new Psr7\CachingStream($original);
 
 
 $stream->read(1024);
 $stream->read(1024);
@@ -89,7 +89,7 @@ stream becomes too full.
 use GuzzleHttp\Psr7;
 use GuzzleHttp\Psr7;
 
 
 // Create an empty stream
 // Create an empty stream
-$stream = Psr7\stream_for();
+$stream = Psr7\Utils::streamFor();
 
 
 // Start dropping data when the stream has more than 10 bytes
 // Start dropping data when the stream has more than 10 bytes
 $dropping = new Psr7\DroppingStream($stream, 10);
 $dropping = new Psr7\DroppingStream($stream, 10);
@@ -112,7 +112,7 @@ to create a concrete class for a simple extension point.
 
 
 use GuzzleHttp\Psr7;
 use GuzzleHttp\Psr7;
 
 
-$stream = Psr7\stream_for('hi');
+$stream = Psr7\Utils::streamFor('hi');
 $fnStream = Psr7\FnStream::decorate($stream, [
 $fnStream = Psr7\FnStream::decorate($stream, [
     'rewind' => function () use ($stream) {
     'rewind' => function () use ($stream) {
         echo 'About to rewind - ';
         echo 'About to rewind - ';
@@ -167,7 +167,7 @@ chunks (e.g. Amazon S3's multipart upload API).
 ```php
 ```php
 use GuzzleHttp\Psr7;
 use GuzzleHttp\Psr7;
 
 
-$original = Psr7\stream_for(fopen('/tmp/test.txt', 'r+'));
+$original = Psr7\Utils::streamFor(fopen('/tmp/test.txt', 'r+'));
 echo $original->getSize();
 echo $original->getSize();
 // >>> 1048576
 // >>> 1048576
 
 
@@ -197,7 +197,7 @@ NoSeekStream wraps a stream and does not allow seeking.
 ```php
 ```php
 use GuzzleHttp\Psr7;
 use GuzzleHttp\Psr7;
 
 
-$original = Psr7\stream_for('foo');
+$original = Psr7\Utils::streamFor('foo');
 $noSeek = new Psr7\NoSeekStream($original);
 $noSeek = new Psr7\NoSeekStream($original);
 
 
 echo $noSeek->read(3);
 echo $noSeek->read(3);
@@ -271,7 +271,7 @@ This decorator could be added to any existing stream and used like so:
 ```php
 ```php
 use GuzzleHttp\Psr7;
 use GuzzleHttp\Psr7;
 
 
-$original = Psr7\stream_for('foo');
+$original = Psr7\Utils::streamFor('foo');
 
 
 $eofStream = new EofCallbackStream($original, function () {
 $eofStream = new EofCallbackStream($original, function () {
     echo 'EOF!';
     echo 'EOF!';
@@ -297,228 +297,292 @@ stream from a PSR-7 stream.
 ```php
 ```php
 use GuzzleHttp\Psr7\StreamWrapper;
 use GuzzleHttp\Psr7\StreamWrapper;
 
 
-$stream = GuzzleHttp\Psr7\stream_for('hello!');
+$stream = GuzzleHttp\Psr7\Utils::streamFor('hello!');
 $resource = StreamWrapper::getResource($stream);
 $resource = StreamWrapper::getResource($stream);
 echo fread($resource, 6); // outputs hello!
 echo fread($resource, 6); // outputs hello!
 ```
 ```
 
 
 
 
-# Function API
+# Static API
 
 
-There are various functions available under the `GuzzleHttp\Psr7` namespace.
+There are various static methods available under the `GuzzleHttp\Psr7` namespace.
 
 
 
 
-## `function str`
+## `GuzzleHttp\Psr7\Message::toString`
 
 
-`function str(MessageInterface $message)`
+`public static function toString(MessageInterface $message): string`
 
 
 Returns the string representation of an HTTP message.
 Returns the string representation of an HTTP message.
 
 
 ```php
 ```php
 $request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com');
 $request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com');
-echo GuzzleHttp\Psr7\str($request);
+echo GuzzleHttp\Psr7\Message::toString($request);
 ```
 ```
 
 
 
 
-## `function uri_for`
+## `GuzzleHttp\Psr7\Message::bodySummary`
 
 
-`function uri_for($uri)`
+`public static function bodySummary(MessageInterface $message, int $truncateAt = 120): string|null`
 
 
-This function accepts a string or `Psr\Http\Message\UriInterface` and returns a
-UriInterface for the given value. If the value is already a `UriInterface`, it
-is returned as-is.
+Get a short summary of the message body.
 
 
-```php
-$uri = GuzzleHttp\Psr7\uri_for('http://example.com');
-assert($uri === GuzzleHttp\Psr7\uri_for($uri));
-```
+Will return `null` if the response is not printable.
 
 
 
 
-## `function stream_for`
+## `GuzzleHttp\Psr7\Message::rewindBody`
 
 
-`function stream_for($resource = '', array $options = [])`
+`public static function rewindBody(MessageInterface $message): void`
 
 
-Create a new stream based on the input type.
+Attempts to rewind a message body and throws an exception on failure.
 
 
-Options is an associative array that can contain the following keys:
+The body of the message will only be rewound if a call to `tell()`
+returns a value other than `0`.
 
 
-* - metadata: Array of custom metadata.
-* - size: Size of the stream.
 
 
-This method accepts the following `$resource` types:
+## `GuzzleHttp\Psr7\Message::parseMessage`
 
 
-- `Psr\Http\Message\StreamInterface`: Returns the value as-is.
-- `string`: Creates a stream object that uses the given string as the contents.
-- `resource`: Creates a stream object that wraps the given PHP stream resource.
-- `Iterator`: If the provided value implements `Iterator`, then a read-only
-  stream object will be created that wraps the given iterable. Each time the
-  stream is read from, data from the iterator will fill a buffer and will be
-  continuously called until the buffer is equal to the requested read size.
-  Subsequent read calls will first read from the buffer and then call `next`
-  on the underlying iterator until it is exhausted.
-- `object` with `__toString()`: If the object has the `__toString()` method,
-  the object will be cast to a string and then a stream will be returned that
-  uses the string value.
-- `NULL`: When `null` is passed, an empty stream object is returned.
-- `callable` When a callable is passed, a read-only stream object will be
-  created that invokes the given callable. The callable is invoked with the
-  number of suggested bytes to read. The callable can return any number of
-  bytes, but MUST return `false` when there is no more data to return. The
-  stream object that wraps the callable will invoke the callable until the
-  number of requested bytes are available. Any additional bytes will be
-  buffered and used in subsequent reads.
+`public static function parseMessage(string $message): array`
 
 
-```php
-$stream = GuzzleHttp\Psr7\stream_for('foo');
-$stream = GuzzleHttp\Psr7\stream_for(fopen('/path/to/file', 'r'));
+Parses an HTTP message into an associative array.
 
 
-$generator = function ($bytes) {
-    for ($i = 0; $i < $bytes; $i++) {
-        yield ' ';
-    }
-}
+The array contains the "start-line" key containing the start line of
+the message, "headers" key containing an associative array of header
+array values, and a "body" key containing the body of the message.
 
 
-$stream = GuzzleHttp\Psr7\stream_for($generator(100));
-```
 
 
+## `GuzzleHttp\Psr7\Message::parseRequestUri`
 
 
-## `function parse_header`
+`public static function parseRequestUri(string $path, array $headers): string`
 
 
-`function parse_header($header)`
+Constructs a URI for an HTTP request message.
 
 
-Parse an array of header values containing ";" separated data into an array of
-associative arrays representing the header key value pair data 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\Message::parseRequest`
 
 
-## `function normalize_header`
+`public static function parseRequest(string $message): Request`
 
 
-`function normalize_header($header)`
+Parses a request message string into a request object.
 
 
-Converts an array of header values that may contain comma separated headers
-into an array of headers with no comma separated values.
 
 
+## `GuzzleHttp\Psr7\Message::parseResponse`
 
 
-## `function modify_request`
+`public static function parseResponse(string $message): Response`
 
 
-`function modify_request(RequestInterface $request, array $changes)`
+Parses a response message string into a response object.
 
 
-Clone and modify a request with the given changes. This method is useful for
-reducing the number of clones needed to mutate a message.
 
 
-The changes can be one of:
+## `GuzzleHttp\Psr7\Header::parse`
 
 
-- method: (string) Changes the HTTP method.
-- set_headers: (array) Sets the given headers.
-- remove_headers: (array) Remove the given headers.
-- body: (mixed) Sets the given body.
-- uri: (UriInterface) Set the URI.
-- query: (string) Set the query string value of the URI.
-- version: (string) Set the protocol version.
+`public static function parse(string|array $header): array`
 
 
+Parse an array of header values containing ";" separated data into an
+array of associative arrays representing the header key value pair data
+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.
 
 
-## `function rewind_body`
 
 
-`function rewind_body(MessageInterface $message)`
+## `GuzzleHttp\Psr7\Header::normalize`
 
 
-Attempts to rewind a message body and throws an exception on failure. The body
-of the message will only be rewound if a call to `tell()` returns a value other
-than `0`.
+`public static function normalize(string|array $header): array`
 
 
+Converts an array of header values that may contain comma separated
+headers into an array of headers with no comma separated values.
 
 
-## `function try_fopen`
 
 
-`function try_fopen($filename, $mode)`
+## `GuzzleHttp\Psr7\Query::parse`
 
 
-Safely opens a PHP stream resource using a filename.
+`public static function parse(string $str, int|bool $urlEncoding = true): array`
+
+Parse a query string into an associative array.
+
+If multiple values are found for the same key, the value of that key
+value pair will become an array. This function does not parse nested
+PHP style arrays into an associative array (e.g., `foo[a]=1&foo[b]=2`
+will be parsed into `['foo[a]' => '1', 'foo[b]' => '2'])`.
+
+
+## `GuzzleHttp\Psr7\Query::build`
+
+`public static function build(array $params, int|false $encoding = PHP_QUERY_RFC3986): string`
+
+Build a query string from an array of key value pairs.
+
+This function can use the return value of `parse()` to build a query
+string. This function does not modify the provided keys when an array is
+encountered (like `http_build_query()` would).
+
+
+## `GuzzleHttp\Psr7\Utils::caselessRemove`
+
+`public static function caselessRemove(iterable<string> $keys, $keys, array $data): array`
 
 
-When fopen fails, PHP normally raises a warning. This function adds an error
-handler that checks for errors and throws an exception instead.
+Remove the items given by the keys, case insensitively from the data.
 
 
 
 
-## `function copy_to_string`
+## `GuzzleHttp\Psr7\Utils::copyToStream`
 
 
-`function copy_to_string(StreamInterface $stream, $maxLen = -1)`
+`public static function copyToStream(StreamInterface $source, StreamInterface $dest, int $maxLen = -1): void`
 
 
-Copy the contents of a stream into a string until the given number of bytes
-have been read.
+Copy the contents of a stream into another stream until the given number
+of bytes have been read.
 
 
 
 
-## `function copy_to_stream`
+## `GuzzleHttp\Psr7\Utils::copyToString`
 
 
-`function copy_to_stream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)`
+`public static function copyToString(StreamInterface $stream, int $maxLen = -1): string`
 
 
-Copy the contents of a stream into another stream until the given number of
+Copy the contents of a stream into a string until the given number of
 bytes have been read.
 bytes have been read.
 
 
 
 
-## `function hash`
+## `GuzzleHttp\Psr7\Utils::hash`
 
 
-`function hash(StreamInterface $stream, $algo, $rawOutput = false)`
+`public static function hash(StreamInterface $stream, string $algo, bool $rawOutput = false): string`
 
 
-Calculate a hash of a Stream. This method reads the entire stream to calculate
-a rolling hash (based on PHP's hash_init functions).
+Calculate a hash of a stream.
 
 
+This method reads the entire stream to calculate a rolling hash, based on
+PHP's `hash_init` functions.
 
 
-## `function readline`
 
 
-`function readline(StreamInterface $stream, $maxLength = null)`
+## `GuzzleHttp\Psr7\Utils::modifyRequest`
+
+`public static function modifyRequest(RequestInterface $request, array $changes): RequestInterface`
+
+Clone and modify a request with the given changes.
+
+This method is useful for reducing the number of clones needed to mutate
+a message.
+
+- method: (string) Changes the HTTP method.
+- set_headers: (array) Sets the given headers.
+- remove_headers: (array) Remove the given headers.
+- body: (mixed) Sets the given body.
+- uri: (UriInterface) Set the URI.
+- query: (string) Set the query string value of the URI.
+- version: (string) Set the protocol version.
+
+
+## `GuzzleHttp\Psr7\Utils::readLine`
+
+`public static function readLine(StreamInterface $stream, int $maxLength = null): string`
 
 
 Read a line from the stream up to the maximum allowed buffer length.
 Read a line from the stream up to the maximum allowed buffer length.
 
 
 
 
-## `function parse_request`
+## `GuzzleHttp\Psr7\Utils::streamFor`
 
 
-`function parse_request($message)`
+`public static function streamFor(resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource = '', array $options = []): StreamInterface`
 
 
-Parses a request message string into a request object.
+Create a new stream based on the input type.
 
 
+Options is an associative array that can contain the following keys:
 
 
-## `function parse_response`
+- metadata: Array of custom metadata.
+- size: Size of the stream.
 
 
-`function parse_response($message)`
+This method accepts the following `$resource` types:
 
 
-Parses a response message string into a response object.
+- `Psr\Http\Message\StreamInterface`: Returns the value as-is.
+- `string`: Creates a stream object that uses the given string as the contents.
+- `resource`: Creates a stream object that wraps the given PHP stream resource.
+- `Iterator`: If the provided value implements `Iterator`, then a read-only
+  stream object will be created that wraps the given iterable. Each time the
+  stream is read from, data from the iterator will fill a buffer and will be
+  continuously called until the buffer is equal to the requested read size.
+  Subsequent read calls will first read from the buffer and then call `next`
+  on the underlying iterator until it is exhausted.
+- `object` with `__toString()`: If the object has the `__toString()` method,
+  the object will be cast to a string and then a stream will be returned that
+  uses the string value.
+- `NULL`: When `null` is passed, an empty stream object is returned.
+- `callable` When a callable is passed, a read-only stream object will be
+  created that invokes the given callable. The callable is invoked with the
+  number of suggested bytes to read. The callable can return any number of
+  bytes, but MUST return `false` when there is no more data to return. The
+  stream object that wraps the callable will invoke the callable until the
+  number of requested bytes are available. Any additional bytes will be
+  buffered and used in subsequent reads.
 
 
+```php
+$stream = GuzzleHttp\Psr7\Utils::streamFor('foo');
+$stream = GuzzleHttp\Psr7\Utils::streamFor(fopen('/path/to/file', 'r'));
 
 
-## `function parse_query`
+$generator = function ($bytes) {
+    for ($i = 0; $i < $bytes; $i++) {
+        yield ' ';
+    }
+}
 
 
-`function parse_query($str, $urlEncoding = true)`
+$stream = GuzzleHttp\Psr7\Utils::streamFor($generator(100));
+```
 
 
-Parse a query string into an associative array.
 
 
-If multiple values are found for the same key, the value of that key value pair
-will become an array. This function does not parse nested PHP style arrays into
-an associative array (e.g., `foo[a]=1&foo[b]=2` will be parsed into
-`['foo[a]' => '1', 'foo[b]' => '2']`).
+## `GuzzleHttp\Psr7\Utils::tryFopen`
 
 
+`public static function tryFopen(string $filename, string $mode): resource`
 
 
-## `function build_query`
+Safely opens a PHP stream resource using a filename.
 
 
-`function build_query(array $params, $encoding = PHP_QUERY_RFC3986)`
+When fopen fails, PHP normally raises a warning. This function adds an
+error handler that checks for errors and throws an exception instead.
 
 
-Build a query string from an array of key value pairs.
 
 
-This function can use the return value of parse_query() to build a query string.
-This function does not modify the provided keys when an array is encountered
-(like http_build_query would).
+## `GuzzleHttp\Psr7\Utils::uriFor`
+
+`public static function uriFor(string|UriInterface $uri): UriInterface`
+
+Returns a UriInterface for the given value.
 
 
+This function accepts a string or UriInterface and returns a
+UriInterface for the given value. If the value is already a
+UriInterface, it is returned as-is.
 
 
-## `function mimetype_from_filename`
 
 
-`function mimetype_from_filename($filename)`
+## `GuzzleHttp\Psr7\MimeType::fromFilename`
+
+`public static function fromFilename(string $filename): string|null`
 
 
 Determines the mimetype of a file by looking at its extension.
 Determines the mimetype of a file by looking at its extension.
 
 
 
 
-## `function mimetype_from_extension`
+## `GuzzleHttp\Psr7\MimeType::fromExtension`
 
 
-`function mimetype_from_extension($extension)`
+`public static function fromExtension(string $extension): string|null`
 
 
 Maps a file extensions to a mimetype.
 Maps a file extensions to a mimetype.
 
 
 
 
+## Upgrading from Function API
+
+The static API was first introduced in 1.7.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API will be removed in 2.0.0. A migration table has been provided here for your convenience:
+
+| Original Function | Replacement Method |
+|----------------|----------------|
+| `str` | `Message::toString` |
+| `uri_for` | `Utils::uriFor` |
+| `stream_for` | `Utils::streamFor` |
+| `parse_header` | `Header::parse` |
+| `normalize_header` | `Header::normalize` |
+| `modify_request` | `Utils::modifyRequest` |
+| `rewind_body` | `Message::rewindBody` |
+| `try_fopen` | `Utils::tryFopen` |
+| `copy_to_string` | `Utils::copyToString` |
+| `copy_to_stream` | `Utils::copyToStream` |
+| `hash` | `Utils::hash` |
+| `readline` | `Utils::readLine` |
+| `parse_request` | `Message::parseRequest` |
+| `parse_response` | `Message::parseResponse` |
+| `parse_query` | `Query::parse` |
+| `build_query` | `Query::build` |
+| `mimetype_from_filename` | `MimeType::fromFilename` |
+| `mimetype_from_extension` | `MimeType::fromExtension` |
+| `_parse_message` | `Message::parseMessage` |
+| `_parse_request_uri` | `Message::parseRequestUri` |
+| `get_message_body_summary` | `Message::bodySummary` |
+| `_caseless_remove` | `Utils::caselessRemove` |
+
+
 # Additional URI Methods
 # Additional URI Methods
 
 
 Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class,
 Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class,

+ 3 - 3
api/vendor/guzzlehttp/psr7/composer.json

@@ -21,14 +21,14 @@
         "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
         "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
     },
     },
     "require-dev": {
     "require-dev": {
-        "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8",
+        "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10",
         "ext-zlib": "*"
         "ext-zlib": "*"
     },
     },
     "provide": {
     "provide": {
         "psr/http-message-implementation": "1.0"
         "psr/http-message-implementation": "1.0"
     },
     },
     "suggest": {
     "suggest": {
-        "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
+        "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
     },
     },
     "autoload": {
     "autoload": {
         "psr-4": {
         "psr-4": {
@@ -43,7 +43,7 @@
     },
     },
     "extra": {
     "extra": {
         "branch-alias": {
         "branch-alias": {
-            "dev-master": "1.6-dev"
+            "dev-master": "1.7-dev"
         }
         }
     }
     }
 }
 }

+ 6 - 1
api/vendor/guzzlehttp/psr7/src/AppendStream.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Psr7;
 namespace GuzzleHttp\Psr7;
 
 
 use Psr\Http\Message\StreamInterface;
 use Psr\Http\Message\StreamInterface;
@@ -7,6 +8,8 @@ use Psr\Http\Message\StreamInterface;
  * Reads from multiple streams, one after the other.
  * Reads from multiple streams, one after the other.
  *
  *
  * This is a read-only stream decorator.
  * This is a read-only stream decorator.
+ *
+ * @final
  */
  */
 class AppendStream implements StreamInterface
 class AppendStream implements StreamInterface
 {
 {
@@ -61,7 +64,7 @@ class AppendStream implements StreamInterface
 
 
     public function getContents()
     public function getContents()
     {
     {
-        return copy_to_string($this);
+        return Utils::copyToString($this);
     }
     }
 
 
     /**
     /**
@@ -98,6 +101,8 @@ class AppendStream implements StreamInterface
         }
         }
 
 
         $this->streams = [];
         $this->streams = [];
+
+        return null;
     }
     }
 
 
     public function tell()
     public function tell()

+ 5 - 0
api/vendor/guzzlehttp/psr7/src/BufferStream.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Psr7;
 namespace GuzzleHttp\Psr7;
 
 
 use Psr\Http\Message\StreamInterface;
 use Psr\Http\Message\StreamInterface;
@@ -10,6 +11,8 @@ use Psr\Http\Message\StreamInterface;
  * This stream returns a "hwm" metadata value that tells upstream consumers
  * This stream returns a "hwm" metadata value that tells upstream consumers
  * what the configured high water mark of the stream is, or the maximum
  * what the configured high water mark of the stream is, or the maximum
  * preferred size of the buffer.
  * preferred size of the buffer.
+ *
+ * @final
  */
  */
 class BufferStream implements StreamInterface
 class BufferStream implements StreamInterface
 {
 {
@@ -49,6 +52,8 @@ class BufferStream implements StreamInterface
     public function detach()
     public function detach()
     {
     {
         $this->close();
         $this->close();
+
+        return null;
     }
     }
 
 
     public function getSize()
     public function getSize()

+ 6 - 3
api/vendor/guzzlehttp/psr7/src/CachingStream.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Psr7;
 namespace GuzzleHttp\Psr7;
 
 
 use Psr\Http\Message\StreamInterface;
 use Psr\Http\Message\StreamInterface;
@@ -6,6 +7,8 @@ use Psr\Http\Message\StreamInterface;
 /**
 /**
  * Stream decorator that can cache previously read bytes from a sequentially
  * Stream decorator that can cache previously read bytes from a sequentially
  * read stream.
  * read stream.
+ *
+ * @final
  */
  */
 class CachingStream implements StreamInterface
 class CachingStream implements StreamInterface
 {
 {
@@ -20,7 +23,7 @@ class CachingStream implements StreamInterface
     /**
     /**
      * We will treat the buffer object as the body of the stream
      * We will treat the buffer object as the body of the stream
      *
      *
-     * @param StreamInterface $stream Stream to cache
+     * @param StreamInterface $stream Stream to cache. The cursor is assumed to be at the beginning of the stream.
      * @param StreamInterface $target Optionally specify where data is cached
      * @param StreamInterface $target Optionally specify where data is cached
      */
      */
     public function __construct(
     public function __construct(
@@ -28,7 +31,7 @@ class CachingStream implements StreamInterface
         StreamInterface $target = null
         StreamInterface $target = null
     ) {
     ) {
         $this->remoteStream = $stream;
         $this->remoteStream = $stream;
-        $this->stream = $target ?: new Stream(fopen('php://temp', 'r+'));
+        $this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+'));
     }
     }
 
 
     public function getSize()
     public function getSize()
@@ -131,7 +134,7 @@ class CachingStream implements StreamInterface
     private function cacheEntireStream()
     private function cacheEntireStream()
     {
     {
         $target = new FnStream(['write' => 'strlen']);
         $target = new FnStream(['write' => 'strlen']);
-        copy_to_stream($this, $target);
+        Utils::copyToStream($this, $target);
 
 
         return $this->tell();
         return $this->tell();
     }
     }

+ 3 - 0
api/vendor/guzzlehttp/psr7/src/DroppingStream.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Psr7;
 namespace GuzzleHttp\Psr7;
 
 
 use Psr\Http\Message\StreamInterface;
 use Psr\Http\Message\StreamInterface;
@@ -6,6 +7,8 @@ use Psr\Http\Message\StreamInterface;
 /**
 /**
  * Stream decorator that begins dropping data once the size of the underlying
  * Stream decorator that begins dropping data once the size of the underlying
  * stream becomes too full.
  * stream becomes too full.
+ *
+ * @final
  */
  */
 class DroppingStream implements StreamInterface
 class DroppingStream implements StreamInterface
 {
 {

+ 5 - 0
api/vendor/guzzlehttp/psr7/src/FnStream.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Psr7;
 namespace GuzzleHttp\Psr7;
 
 
 use Psr\Http\Message\StreamInterface;
 use Psr\Http\Message\StreamInterface;
@@ -8,6 +9,8 @@ use Psr\Http\Message\StreamInterface;
  *
  *
  * Allows for easy testing and extension of a provided stream without needing
  * Allows for easy testing and extension of a provided stream without needing
  * to create a concrete class for a simple extension point.
  * to create a concrete class for a simple extension point.
+ *
+ * @final
  */
  */
 class FnStream implements StreamInterface
 class FnStream implements StreamInterface
 {
 {
@@ -34,6 +37,7 @@ class FnStream implements StreamInterface
 
 
     /**
     /**
      * Lazily determine which methods are not implemented.
      * Lazily determine which methods are not implemented.
+     *
      * @throws \BadMethodCallException
      * @throws \BadMethodCallException
      */
      */
     public function __get($name)
     public function __get($name)
@@ -54,6 +58,7 @@ class FnStream implements StreamInterface
 
 
     /**
     /**
      * An unserialize would allow the __destruct to run when the unserialized value goes out of scope.
      * An unserialize would allow the __destruct to run when the unserialized value goes out of scope.
+     *
      * @throws \LogicException
      * @throws \LogicException
      */
      */
     public function __wakeup()
     public function __wakeup()

+ 71 - 0
api/vendor/guzzlehttp/psr7/src/Header.php

@@ -0,0 +1,71 @@
+<?php
+
+namespace GuzzleHttp\Psr7;
+
+final class Header
+{
+    /**
+     * Parse an array of header values containing ";" separated data into an
+     * array of associative arrays representing the header key value pair data
+     * 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.
+     *
+     * @param string|array $header Header to parse into components.
+     *
+     * @return array Returns the parsed header values.
+     */
+    public static function parse($header)
+    {
+        static $trimmed = "\"'  \n\t\r";
+        $params = $matches = [];
+
+        foreach (self::normalize($header) as $val) {
+            $part = [];
+            foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
+                if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
+                    $m = $matches[0];
+                    if (isset($m[1])) {
+                        $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed);
+                    } else {
+                        $part[] = trim($m[0], $trimmed);
+                    }
+                }
+            }
+            if ($part) {
+                $params[] = $part;
+            }
+        }
+
+        return $params;
+    }
+
+    /**
+     * Converts an array of header values that may contain comma separated
+     * headers into an array of headers with no comma separated values.
+     *
+     * @param string|array $header Header to normalize.
+     *
+     * @return array Returns the normalized header field values.
+     */
+    public static function normalize($header)
+    {
+        if (!is_array($header)) {
+            return array_map('trim', explode(',', $header));
+        }
+
+        $result = [];
+        foreach ($header as $value) {
+            foreach ((array) $value as $v) {
+                if (strpos($v, ',') === false) {
+                    $result[] = $v;
+                    continue;
+                }
+                foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) {
+                    $result[] = trim($vv);
+                }
+            }
+        }
+
+        return $result;
+    }
+}

+ 4 - 0
api/vendor/guzzlehttp/psr7/src/InflateStream.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Psr7;
 namespace GuzzleHttp\Psr7;
 
 
 use Psr\Http\Message\StreamInterface;
 use Psr\Http\Message\StreamInterface;
@@ -13,6 +14,8 @@ use Psr\Http\Message\StreamInterface;
  *
  *
  * @link http://tools.ietf.org/html/rfc1952
  * @link http://tools.ietf.org/html/rfc1952
  * @link http://php.net/manual/en/filters.compression.php
  * @link http://php.net/manual/en/filters.compression.php
+ *
+ * @final
  */
  */
 class InflateStream implements StreamInterface
 class InflateStream implements StreamInterface
 {
 {
@@ -33,6 +36,7 @@ class InflateStream implements StreamInterface
     /**
     /**
      * @param StreamInterface $stream
      * @param StreamInterface $stream
      * @param $header
      * @param $header
+     *
      * @return int
      * @return int
      */
      */
     private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header)
     private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header)

+ 5 - 2
api/vendor/guzzlehttp/psr7/src/LazyOpenStream.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Psr7;
 namespace GuzzleHttp\Psr7;
 
 
 use Psr\Http\Message\StreamInterface;
 use Psr\Http\Message\StreamInterface;
@@ -6,6 +7,8 @@ use Psr\Http\Message\StreamInterface;
 /**
 /**
  * Lazily reads or writes to a file that is opened only after an IO operation
  * Lazily reads or writes to a file that is opened only after an IO operation
  * take place on the stream.
  * take place on the stream.
+ *
+ * @final
  */
  */
 class LazyOpenStream implements StreamInterface
 class LazyOpenStream implements StreamInterface
 {
 {
@@ -14,7 +17,7 @@ class LazyOpenStream implements StreamInterface
     /** @var string File to open */
     /** @var string File to open */
     private $filename;
     private $filename;
 
 
-    /** @var string $mode */
+    /** @var string */
     private $mode;
     private $mode;
 
 
     /**
     /**
@@ -34,6 +37,6 @@ class LazyOpenStream implements StreamInterface
      */
      */
     protected function createStream()
     protected function createStream()
     {
     {
-        return stream_for(try_fopen($this->filename, $this->mode));
+        return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode));
     }
     }
 }
 }

+ 4 - 2
api/vendor/guzzlehttp/psr7/src/LimitStream.php

@@ -1,11 +1,13 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Psr7;
 namespace GuzzleHttp\Psr7;
 
 
 use Psr\Http\Message\StreamInterface;
 use Psr\Http\Message\StreamInterface;
 
 
-
 /**
 /**
- * Decorator used to return only a subset of a stream
+ * Decorator used to return only a subset of a stream.
+ *
+ * @final
  */
  */
 class LimitStream implements StreamInterface
 class LimitStream implements StreamInterface
 {
 {

+ 252 - 0
api/vendor/guzzlehttp/psr7/src/Message.php

@@ -0,0 +1,252 @@
+<?php
+
+namespace GuzzleHttp\Psr7;
+
+use Psr\Http\Message\MessageInterface;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
+
+final class Message
+{
+    /**
+     * Returns the string representation of an HTTP message.
+     *
+     * @param MessageInterface $message Message to convert to a string.
+     *
+     * @return string
+     */
+    public static function toString(MessageInterface $message)
+    {
+        if ($message instanceof RequestInterface) {
+            $msg = trim($message->getMethod() . ' '
+                    . $message->getRequestTarget())
+                . ' HTTP/' . $message->getProtocolVersion();
+            if (!$message->hasHeader('host')) {
+                $msg .= "\r\nHost: " . $message->getUri()->getHost();
+            }
+        } elseif ($message instanceof ResponseInterface) {
+            $msg = 'HTTP/' . $message->getProtocolVersion() . ' '
+                . $message->getStatusCode() . ' '
+                . $message->getReasonPhrase();
+        } else {
+            throw new \InvalidArgumentException('Unknown message type');
+        }
+
+        foreach ($message->getHeaders() as $name => $values) {
+            if (strtolower($name) === 'set-cookie') {
+                foreach ($values as $value) {
+                    $msg .= "\r\n{$name}: " . $value;
+                }
+            } else {
+                $msg .= "\r\n{$name}: " . implode(', ', $values);
+            }
+        }
+
+        return "{$msg}\r\n\r\n" . $message->getBody();
+    }
+
+    /**
+     * Get a short summary of the message body.
+     *
+     * Will return `null` if the response is not printable.
+     *
+     * @param MessageInterface $message    The message to get the body summary
+     * @param int              $truncateAt The maximum allowed size of the summary
+     *
+     * @return string|null
+     */
+    public static function bodySummary(MessageInterface $message, $truncateAt = 120)
+    {
+        $body = $message->getBody();
+
+        if (!$body->isSeekable() || !$body->isReadable()) {
+            return null;
+        }
+
+        $size = $body->getSize();
+
+        if ($size === 0) {
+            return null;
+        }
+
+        $summary = $body->read($truncateAt);
+        $body->rewind();
+
+        if ($size > $truncateAt) {
+            $summary .= ' (truncated...)';
+        }
+
+        // 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)) {
+            return null;
+        }
+
+        return $summary;
+    }
+
+    /**
+     * Attempts to rewind a message body and throws an exception on failure.
+     *
+     * The body of the message will only be rewound if a call to `tell()`
+     * returns a value other than `0`.
+     *
+     * @param MessageInterface $message Message to rewind
+     *
+     * @throws \RuntimeException
+     */
+    public static function rewindBody(MessageInterface $message)
+    {
+        $body = $message->getBody();
+
+        if ($body->tell()) {
+            $body->rewind();
+        }
+    }
+
+    /**
+     * Parses an HTTP message into an associative array.
+     *
+     * The array contains the "start-line" key containing the start line of
+     * the message, "headers" key containing an associative array of header
+     * array values, and a "body" key containing the body of the message.
+     *
+     * @param string $message HTTP request or response to parse.
+     *
+     * @return array
+     */
+    public static function parseMessage($message)
+    {
+        if (!$message) {
+            throw new \InvalidArgumentException('Invalid message');
+        }
+
+        $message = ltrim($message, "\r\n");
+
+        $messageParts = preg_split("/\r?\n\r?\n/", $message, 2);
+
+        if ($messageParts === false || count($messageParts) !== 2) {
+            throw new \InvalidArgumentException('Invalid message: Missing header delimiter');
+        }
+
+        list($rawHeaders, $body) = $messageParts;
+        $rawHeaders .= "\r\n"; // Put back the delimiter we split previously
+        $headerParts = preg_split("/\r?\n/", $rawHeaders, 2);
+
+        if ($headerParts === false || count($headerParts) !== 2) {
+            throw new \InvalidArgumentException('Invalid message: Missing status line');
+        }
+
+        list($startLine, $rawHeaders) = $headerParts;
+
+        if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') {
+            // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0
+            $rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders);
+        }
+
+        /** @var array[] $headerLines */
+        $count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER);
+
+        // If these aren't the same, then one line didn't match and there's an invalid header.
+        if ($count !== substr_count($rawHeaders, "\n")) {
+            // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4
+            if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) {
+                throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding');
+            }
+
+            throw new \InvalidArgumentException('Invalid header syntax');
+        }
+
+        $headers = [];
+
+        foreach ($headerLines as $headerLine) {
+            $headers[$headerLine[1]][] = $headerLine[2];
+        }
+
+        return [
+            'start-line' => $startLine,
+            'headers' => $headers,
+            'body' => $body,
+        ];
+    }
+
+    /**
+     * Constructs a URI for an HTTP request message.
+     *
+     * @param string $path    Path from the start-line
+     * @param array  $headers Array of headers (each value an array).
+     *
+     * @return string
+     */
+    public static function parseRequestUri($path, array $headers)
+    {
+        $hostKey = array_filter(array_keys($headers), function ($k) {
+            return strtolower($k) === 'host';
+        });
+
+        // If no host is found, then a full URI cannot be constructed.
+        if (!$hostKey) {
+            return $path;
+        }
+
+        $host = $headers[reset($hostKey)][0];
+        $scheme = substr($host, -4) === ':443' ? 'https' : 'http';
+
+        return $scheme . '://' . $host . '/' . ltrim($path, '/');
+    }
+
+    /**
+     * Parses a request message string into a request object.
+     *
+     * @param string $message Request message string.
+     *
+     * @return Request
+     */
+    public static function parseRequest($message)
+    {
+        $data = self::parseMessage($message);
+        $matches = [];
+        if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) {
+            throw new \InvalidArgumentException('Invalid request string');
+        }
+        $parts = explode(' ', $data['start-line'], 3);
+        $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1';
+
+        $request = new Request(
+            $parts[0],
+            $matches[1] === '/' ? self::parseRequestUri($parts[1], $data['headers']) : $parts[1],
+            $data['headers'],
+            $data['body'],
+            $version
+        );
+
+        return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]);
+    }
+
+    /**
+     * Parses a response message string into a response object.
+     *
+     * @param string $message Response message string.
+     *
+     * @return Response
+     */
+    public static function parseResponse($message)
+    {
+        $data = self::parseMessage($message);
+        // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space
+        // between status-code and reason-phrase is required. But browsers accept
+        // responses without space and reason as well.
+        if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
+            throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']);
+        }
+        $parts = explode(' ', $data['start-line'], 3);
+
+        return new Response(
+            (int) $parts[1],
+            $data['headers'],
+            $data['body'],
+            explode('/', $parts[0])[1],
+            isset($parts[2]) ? $parts[2] : null
+        );
+    }
+}

+ 4 - 3
api/vendor/guzzlehttp/psr7/src/MessageTrait.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Psr7;
 namespace GuzzleHttp\Psr7;
 
 
 use Psr\Http\Message\StreamInterface;
 use Psr\Http\Message\StreamInterface;
@@ -17,7 +18,7 @@ trait MessageTrait
     /** @var string */
     /** @var string */
     private $protocol = '1.1';
     private $protocol = '1.1';
 
 
-    /** @var StreamInterface */
+    /** @var StreamInterface|null */
     private $stream;
     private $stream;
 
 
     public function getProtocolVersion()
     public function getProtocolVersion()
@@ -117,7 +118,7 @@ trait MessageTrait
     public function getBody()
     public function getBody()
     {
     {
         if (!$this->stream) {
         if (!$this->stream) {
-            $this->stream = stream_for('');
+            $this->stream = Utils::streamFor('');
         }
         }
 
 
         return $this->stream;
         return $this->stream;
@@ -194,7 +195,7 @@ trait MessageTrait
             }
             }
 
 
             return trim((string) $value, " \t");
             return trim((string) $value, " \t");
-        }, $values);
+        }, array_values($values));
     }
     }
 
 
     private function assertHeader($header)
     private function assertHeader($header)

+ 140 - 0
api/vendor/guzzlehttp/psr7/src/MimeType.php

@@ -0,0 +1,140 @@
+<?php
+
+namespace GuzzleHttp\Psr7;
+
+final class MimeType
+{
+    /**
+     * Determines the mimetype of a file by looking at its extension.
+     *
+     * @param string $filename
+     *
+     * @return string|null
+     */
+    public static function fromFilename($filename)
+    {
+        return self::fromExtension(pathinfo($filename, PATHINFO_EXTENSION));
+    }
+
+    /**
+     * Maps a file extensions to a mimetype.
+     *
+     * @param string $extension string The file extension.
+     *
+     * @return string|null
+     *
+     * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types
+     */
+    public static function fromExtension($extension)
+    {
+        static $mimetypes = [
+            '3gp' => 'video/3gpp',
+            '7z' => 'application/x-7z-compressed',
+            'aac' => 'audio/x-aac',
+            'ai' => 'application/postscript',
+            'aif' => 'audio/x-aiff',
+            'asc' => 'text/plain',
+            'asf' => 'video/x-ms-asf',
+            'atom' => 'application/atom+xml',
+            'avi' => 'video/x-msvideo',
+            'bmp' => 'image/bmp',
+            'bz2' => 'application/x-bzip2',
+            'cer' => 'application/pkix-cert',
+            'crl' => 'application/pkix-crl',
+            'crt' => 'application/x-x509-ca-cert',
+            'css' => 'text/css',
+            'csv' => 'text/csv',
+            'cu' => 'application/cu-seeme',
+            'deb' => 'application/x-debian-package',
+            'doc' => 'application/msword',
+            'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+            'dvi' => 'application/x-dvi',
+            'eot' => 'application/vnd.ms-fontobject',
+            'eps' => 'application/postscript',
+            'epub' => 'application/epub+zip',
+            'etx' => 'text/x-setext',
+            'flac' => 'audio/flac',
+            'flv' => 'video/x-flv',
+            'gif' => 'image/gif',
+            'gz' => 'application/gzip',
+            'htm' => 'text/html',
+            'html' => 'text/html',
+            'ico' => 'image/x-icon',
+            'ics' => 'text/calendar',
+            'ini' => 'text/plain',
+            'iso' => 'application/x-iso9660-image',
+            'jar' => 'application/java-archive',
+            'jpe' => 'image/jpeg',
+            'jpeg' => 'image/jpeg',
+            'jpg' => 'image/jpeg',
+            'js' => 'text/javascript',
+            'json' => 'application/json',
+            'latex' => 'application/x-latex',
+            'log' => 'text/plain',
+            'm4a' => 'audio/mp4',
+            'm4v' => 'video/mp4',
+            'mid' => 'audio/midi',
+            'midi' => 'audio/midi',
+            'mov' => 'video/quicktime',
+            'mkv' => 'video/x-matroska',
+            'mp3' => 'audio/mpeg',
+            'mp4' => 'video/mp4',
+            'mp4a' => 'audio/mp4',
+            'mp4v' => 'video/mp4',
+            'mpe' => 'video/mpeg',
+            'mpeg' => 'video/mpeg',
+            'mpg' => 'video/mpeg',
+            'mpg4' => 'video/mp4',
+            'oga' => 'audio/ogg',
+            'ogg' => 'audio/ogg',
+            'ogv' => 'video/ogg',
+            'ogx' => 'application/ogg',
+            'pbm' => 'image/x-portable-bitmap',
+            'pdf' => 'application/pdf',
+            'pgm' => 'image/x-portable-graymap',
+            'png' => 'image/png',
+            'pnm' => 'image/x-portable-anymap',
+            'ppm' => 'image/x-portable-pixmap',
+            'ppt' => 'application/vnd.ms-powerpoint',
+            'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
+            'ps' => 'application/postscript',
+            'qt' => 'video/quicktime',
+            'rar' => 'application/x-rar-compressed',
+            'ras' => 'image/x-cmu-raster',
+            'rss' => 'application/rss+xml',
+            'rtf' => 'application/rtf',
+            'sgm' => 'text/sgml',
+            'sgml' => 'text/sgml',
+            'svg' => 'image/svg+xml',
+            'swf' => 'application/x-shockwave-flash',
+            'tar' => 'application/x-tar',
+            'tif' => 'image/tiff',
+            'tiff' => 'image/tiff',
+            'torrent' => 'application/x-bittorrent',
+            'ttf' => 'application/x-font-ttf',
+            'txt' => 'text/plain',
+            'wav' => 'audio/x-wav',
+            'webm' => 'video/webm',
+            'webp' => 'image/webp',
+            'wma' => 'audio/x-ms-wma',
+            'wmv' => 'video/x-ms-wmv',
+            'woff' => 'application/x-font-woff',
+            'wsdl' => 'application/wsdl+xml',
+            'xbm' => 'image/x-xbitmap',
+            'xls' => 'application/vnd.ms-excel',
+            'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+            'xml' => 'application/xml',
+            'xpm' => 'image/x-xpixmap',
+            'xwd' => 'image/x-xwindowdump',
+            'yaml' => 'text/yaml',
+            'yml' => 'text/yaml',
+            'zip' => 'application/zip',
+        ];
+
+        $extension = strtolower($extension);
+
+        return isset($mimetypes[$extension])
+            ? $mimetypes[$extension]
+            : null;
+    }
+}

+ 12 - 7
api/vendor/guzzlehttp/psr7/src/MultipartStream.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Psr7;
 namespace GuzzleHttp\Psr7;
 
 
 use Psr\Http\Message\StreamInterface;
 use Psr\Http\Message\StreamInterface;
@@ -6,6 +7,8 @@ use Psr\Http\Message\StreamInterface;
 /**
 /**
  * Stream that when read returns bytes for a streaming multipart or
  * Stream that when read returns bytes for a streaming multipart or
  * multipart/form-data stream.
  * multipart/form-data stream.
+ *
+ * @final
  */
  */
 class MultipartStream implements StreamInterface
 class MultipartStream implements StreamInterface
 {
 {
@@ -71,7 +74,7 @@ class MultipartStream implements StreamInterface
         }
         }
 
 
         // Add the trailing boundary with CRLF
         // Add the trailing boundary with CRLF
-        $stream->addStream(stream_for("--{$this->boundary}--\r\n"));
+        $stream->addStream(Utils::streamFor("--{$this->boundary}--\r\n"));
 
 
         return $stream;
         return $stream;
     }
     }
@@ -84,7 +87,7 @@ class MultipartStream implements StreamInterface
             }
             }
         }
         }
 
 
-        $element['contents'] = stream_for($element['contents']);
+        $element['contents'] = Utils::streamFor($element['contents']);
 
 
         if (empty($element['filename'])) {
         if (empty($element['filename'])) {
             $uri = $element['contents']->getMetadata('uri');
             $uri = $element['contents']->getMetadata('uri');
@@ -100,9 +103,9 @@ class MultipartStream implements StreamInterface
             isset($element['headers']) ? $element['headers'] : []
             isset($element['headers']) ? $element['headers'] : []
         );
         );
 
 
-        $stream->addStream(stream_for($this->getHeaders($headers)));
+        $stream->addStream(Utils::streamFor($this->getHeaders($headers)));
         $stream->addStream($body);
         $stream->addStream($body);
-        $stream->addStream(stream_for("\r\n"));
+        $stream->addStream(Utils::streamFor("\r\n"));
     }
     }
 
 
     /**
     /**
@@ -114,9 +117,11 @@ class MultipartStream implements StreamInterface
         $disposition = $this->getHeader($headers, 'content-disposition');
         $disposition = $this->getHeader($headers, 'content-disposition');
         if (!$disposition) {
         if (!$disposition) {
             $headers['Content-Disposition'] = ($filename === '0' || $filename)
             $headers['Content-Disposition'] = ($filename === '0' || $filename)
-                ? sprintf('form-data; name="%s"; filename="%s"',
+                ? sprintf(
+                    'form-data; name="%s"; filename="%s"',
                     $name,
                     $name,
-                    basename($filename))
+                    basename($filename)
+                )
                 : "form-data; name=\"{$name}\"";
                 : "form-data; name=\"{$name}\"";
         }
         }
 
 
@@ -131,7 +136,7 @@ class MultipartStream implements StreamInterface
         // Set a default Content-Type if one was not supplied
         // Set a default Content-Type if one was not supplied
         $type = $this->getHeader($headers, 'content-type');
         $type = $this->getHeader($headers, 'content-type');
         if (!$type && ($filename === '0' || $filename)) {
         if (!$type && ($filename === '0' || $filename)) {
-            if ($type = mimetype_from_filename($filename)) {
+            if ($type = MimeType::fromFilename($filename)) {
                 $headers['Content-Type'] = $type;
                 $headers['Content-Type'] = $type;
             }
             }
         }
         }

+ 4 - 1
api/vendor/guzzlehttp/psr7/src/NoSeekStream.php

@@ -1,10 +1,13 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Psr7;
 namespace GuzzleHttp\Psr7;
 
 
 use Psr\Http\Message\StreamInterface;
 use Psr\Http\Message\StreamInterface;
 
 
 /**
 /**
- * Stream decorator that prevents a stream from being seeked
+ * Stream decorator that prevents a stream from being seeked.
+ *
+ * @final
  */
  */
 class NoSeekStream implements StreamInterface
 class NoSeekStream implements StreamInterface
 {
 {

+ 14 - 9
api/vendor/guzzlehttp/psr7/src/PumpStream.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Psr7;
 namespace GuzzleHttp\Psr7;
 
 
 use Psr\Http\Message\StreamInterface;
 use Psr\Http\Message\StreamInterface;
@@ -12,6 +13,8 @@ use Psr\Http\Message\StreamInterface;
  * returned by the provided callable is buffered internally until drained using
  * returned by the provided callable is buffered internally until drained using
  * the read() function of the PumpStream. The provided callable MUST return
  * the read() function of the PumpStream. The provided callable MUST return
  * false when there is no more data to read.
  * false when there is no more data to read.
+ *
+ * @final
  */
  */
 class PumpStream implements StreamInterface
 class PumpStream implements StreamInterface
 {
 {
@@ -31,14 +34,14 @@ class PumpStream implements StreamInterface
     private $buffer;
     private $buffer;
 
 
     /**
     /**
-     * @param callable $source Source of the stream data. The callable MAY
-     *                         accept an integer argument used to control the
-     *                         amount of data to return. The callable MUST
-     *                         return a string when called, or false on error
-     *                         or EOF.
-     * @param array $options   Stream options:
-     *                         - metadata: Hash of metadata to use with stream.
-     *                         - size: Size of the stream, if known.
+     * @param callable $source  Source of the stream data. The callable MAY
+     *                          accept an integer argument used to control the
+     *                          amount of data to return. The callable MUST
+     *                          return a string when called, or false on error
+     *                          or EOF.
+     * @param array    $options Stream options:
+     *                          - metadata: Hash of metadata to use with stream.
+     *                          - size: Size of the stream, if known.
      */
      */
     public function __construct(callable $source, array $options = [])
     public function __construct(callable $source, array $options = [])
     {
     {
@@ -51,7 +54,7 @@ class PumpStream implements StreamInterface
     public function __toString()
     public function __toString()
     {
     {
         try {
         try {
-            return copy_to_string($this);
+            return Utils::copyToString($this);
         } catch (\Exception $e) {
         } catch (\Exception $e) {
             return '';
             return '';
         }
         }
@@ -66,6 +69,8 @@ class PumpStream implements StreamInterface
     {
     {
         $this->tellPos = false;
         $this->tellPos = false;
         $this->source = null;
         $this->source = null;
+
+        return null;
     }
     }
 
 
     public function getSize()
     public function getSize()

+ 113 - 0
api/vendor/guzzlehttp/psr7/src/Query.php

@@ -0,0 +1,113 @@
+<?php
+
+namespace GuzzleHttp\Psr7;
+
+final class Query
+{
+    /**
+     * Parse a query string into an associative array.
+     *
+     * If multiple values are found for the same key, the value of that key
+     * value pair will become an array. This function does not parse nested
+     * PHP style arrays into an associative array (e.g., `foo[a]=1&foo[b]=2`
+     * will be parsed into `['foo[a]' => '1', 'foo[b]' => '2'])`.
+     *
+     * @param string   $str         Query string to parse
+     * @param int|bool $urlEncoding How the query string is encoded
+     *
+     * @return array
+     */
+    public static function parse($str, $urlEncoding = true)
+    {
+        $result = [];
+
+        if ($str === '') {
+            return $result;
+        }
+
+        if ($urlEncoding === true) {
+            $decoder = function ($value) {
+                return rawurldecode(str_replace('+', ' ', $value));
+            };
+        } elseif ($urlEncoding === PHP_QUERY_RFC3986) {
+            $decoder = 'rawurldecode';
+        } elseif ($urlEncoding === PHP_QUERY_RFC1738) {
+            $decoder = 'urldecode';
+        } else {
+            $decoder = function ($str) {
+                return $str;
+            };
+        }
+
+        foreach (explode('&', $str) as $kvp) {
+            $parts = explode('=', $kvp, 2);
+            $key = $decoder($parts[0]);
+            $value = isset($parts[1]) ? $decoder($parts[1]) : null;
+            if (!isset($result[$key])) {
+                $result[$key] = $value;
+            } else {
+                if (!is_array($result[$key])) {
+                    $result[$key] = [$result[$key]];
+                }
+                $result[$key][] = $value;
+            }
+        }
+
+        return $result;
+    }
+
+    /**
+     * Build a query string from an array of key value pairs.
+     *
+     * This function can use the return value of `parse()` to build a query
+     * string. This function does not modify the provided keys when an array is
+     * encountered (like `http_build_query()` would).
+     *
+     * @param array     $params   Query string parameters.
+     * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
+     *                            to encode using RFC3986, or PHP_QUERY_RFC1738
+     *                            to encode using RFC1738.
+     *
+     * @return string
+     */
+    public static function build(array $params, $encoding = PHP_QUERY_RFC3986)
+    {
+        if (!$params) {
+            return '';
+        }
+
+        if ($encoding === false) {
+            $encoder = function ($str) {
+                return $str;
+            };
+        } elseif ($encoding === PHP_QUERY_RFC3986) {
+            $encoder = 'rawurlencode';
+        } elseif ($encoding === PHP_QUERY_RFC1738) {
+            $encoder = 'urlencode';
+        } else {
+            throw new \InvalidArgumentException('Invalid type');
+        }
+
+        $qs = '';
+        foreach ($params as $k => $v) {
+            $k = $encoder($k);
+            if (!is_array($v)) {
+                $qs .= $k;
+                if ($v !== null) {
+                    $qs .= '=' . $encoder($v);
+                }
+                $qs .= '&';
+            } else {
+                foreach ($v as $vv) {
+                    $qs .= $k;
+                    if ($vv !== null) {
+                        $qs .= '=' . $encoder($vv);
+                    }
+                    $qs .= '&';
+                }
+            }
+        }
+
+        return $qs ? (string) substr($qs, 0, -1) : '';
+    }
+}

+ 4 - 3
api/vendor/guzzlehttp/psr7/src/Request.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Psr7;
 namespace GuzzleHttp\Psr7;
 
 
 use InvalidArgumentException;
 use InvalidArgumentException;
@@ -16,7 +17,7 @@ class Request implements RequestInterface
     /** @var string */
     /** @var string */
     private $method;
     private $method;
 
 
-    /** @var null|string */
+    /** @var string|null */
     private $requestTarget;
     private $requestTarget;
 
 
     /** @var UriInterface */
     /** @var UriInterface */
@@ -26,7 +27,7 @@ class Request implements RequestInterface
      * @param string                               $method  HTTP method
      * @param string                               $method  HTTP method
      * @param string|UriInterface                  $uri     URI
      * @param string|UriInterface                  $uri     URI
      * @param array                                $headers Request headers
      * @param array                                $headers Request headers
-     * @param string|null|resource|StreamInterface $body    Request body
+     * @param string|resource|StreamInterface|null $body    Request body
      * @param string                               $version Protocol version
      * @param string                               $version Protocol version
      */
      */
     public function __construct(
     public function __construct(
@@ -51,7 +52,7 @@ class Request implements RequestInterface
         }
         }
 
 
         if ($body !== '' && $body !== null) {
         if ($body !== '' && $body !== null) {
-            $this->stream = stream_for($body);
+            $this->stream = Utils::streamFor($body);
         }
         }
     }
     }
 
 

+ 4 - 3
api/vendor/guzzlehttp/psr7/src/Response.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+
 namespace GuzzleHttp\Psr7;
 namespace GuzzleHttp\Psr7;
 
 
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ResponseInterface;
@@ -82,7 +83,7 @@ class Response implements ResponseInterface
     /**
     /**
      * @param int                                  $status  Status code
      * @param int                                  $status  Status code
      * @param array                                $headers Response headers
      * @param array                                $headers Response headers
-     * @param string|null|resource|StreamInterface $body    Response body
+     * @param string|resource|StreamInterface|null $body    Response body
      * @param string                               $version Protocol version
      * @param string                               $version Protocol version
      * @param string|null                          $reason  Reason phrase (when empty a default will be used based on the status code)
      * @param string|null                          $reason  Reason phrase (when empty a default will be used based on the status code)
      */
      */
@@ -100,7 +101,7 @@ class Response implements ResponseInterface
         $this->statusCode = $status;
         $this->statusCode = $status;
 
 
         if ($body !== '' && $body !== null) {
         if ($body !== '' && $body !== null) {
-            $this->stream = stream_for($body);
+            $this->stream = Utils::streamFor($body);
         }
         }
 
 
         $this->setHeaders($headers);
         $this->setHeaders($headers);
@@ -134,7 +135,7 @@ class Response implements ResponseInterface
         if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) {
         if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) {
             $reasonPhrase = self::$phrases[$new->statusCode];
             $reasonPhrase = self::$phrases[$new->statusCode];
         }
         }
-        $new->reasonPhrase = $reasonPhrase;
+        $new->reasonPhrase = (string) $reasonPhrase;
         return $new;
         return $new;
     }
     }
 
 

+ 1 - 0
api/vendor/guzzlehttp/psr7/src/Rfc7230.php

@@ -11,6 +11,7 @@ final class Rfc7230
      * Note: header delimiter (\r\n) is modified to \r?\n to accept line feed only delimiters for BC reasons.
      * Note: header delimiter (\r\n) is modified to \r?\n to accept line feed only delimiters for BC reasons.
      *
      *
      * @link    https://github.com/amphp/http/blob/v1.0.1/src/Rfc7230.php#L12-L15
      * @link    https://github.com/amphp/http/blob/v1.0.1/src/Rfc7230.php#L12-L15
+     *
      * @license https://github.com/amphp/http/blob/v1.0.1/LICENSE
      * @license https://github.com/amphp/http/blob/v1.0.1/LICENSE
      */
      */
     const HEADER_REGEX = "(^([^()<>@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m";
     const HEADER_REGEX = "(^([^()<>@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m";

+ 9 - 6
api/vendor/guzzlehttp/psr7/src/ServerRequest.php

@@ -4,9 +4,9 @@ namespace GuzzleHttp\Psr7;
 
 
 use InvalidArgumentException;
 use InvalidArgumentException;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Message\ServerRequestInterface;
-use Psr\Http\Message\UriInterface;
 use Psr\Http\Message\StreamInterface;
 use Psr\Http\Message\StreamInterface;
 use Psr\Http\Message\UploadedFileInterface;
 use Psr\Http\Message\UploadedFileInterface;
+use Psr\Http\Message\UriInterface;
 
 
 /**
 /**
  * Server-side HTTP request
  * Server-side HTTP request
@@ -35,7 +35,7 @@ class ServerRequest extends Request implements ServerRequestInterface
     private $cookieParams = [];
     private $cookieParams = [];
 
 
     /**
     /**
-     * @var null|array|object
+     * @var array|object|null
      */
      */
     private $parsedBody;
     private $parsedBody;
 
 
@@ -58,7 +58,7 @@ class ServerRequest extends Request implements ServerRequestInterface
      * @param string                               $method       HTTP method
      * @param string                               $method       HTTP method
      * @param string|UriInterface                  $uri          URI
      * @param string|UriInterface                  $uri          URI
      * @param array                                $headers      Request headers
      * @param array                                $headers      Request headers
-     * @param string|null|resource|StreamInterface $body         Request body
+     * @param string|resource|StreamInterface|null $body         Request body
      * @param string                               $version      Protocol version
      * @param string                               $version      Protocol version
      * @param array                                $serverParams Typically the $_SERVER superglobal
      * @param array                                $serverParams Typically the $_SERVER superglobal
      */
      */
@@ -79,8 +79,10 @@ class ServerRequest extends Request implements ServerRequestInterface
      * Return an UploadedFile instance array.
      * Return an UploadedFile instance array.
      *
      *
      * @param array $files A array which respect $_FILES structure
      * @param array $files A array which respect $_FILES structure
-     * @throws InvalidArgumentException for unrecognized values
+     *
      * @return array
      * @return array
+     *
+     * @throws InvalidArgumentException for unrecognized values
      */
      */
     public static function normalizeFiles(array $files)
     public static function normalizeFiles(array $files)
     {
     {
@@ -109,6 +111,7 @@ class ServerRequest extends Request implements ServerRequestInterface
      * delegate to normalizeNestedFileSpec() and return that return value.
      * delegate to normalizeNestedFileSpec() and return that return value.
      *
      *
      * @param array $value $_FILES struct
      * @param array $value $_FILES struct
+     *
      * @return array|UploadedFileInterface
      * @return array|UploadedFileInterface
      */
      */
     private static function createUploadedFileFromSpec(array $value)
     private static function createUploadedFileFromSpec(array $value)
@@ -133,6 +136,7 @@ class ServerRequest extends Request implements ServerRequestInterface
      * UploadedFileInterface instances.
      * UploadedFileInterface instances.
      *
      *
      * @param array $files
      * @param array $files
+     *
      * @return UploadedFileInterface[]
      * @return UploadedFileInterface[]
      */
      */
     private static function normalizeNestedFileSpec(array $files = [])
     private static function normalizeNestedFileSpec(array $files = [])
@@ -182,7 +186,7 @@ class ServerRequest extends Request implements ServerRequestInterface
 
 
     private static function extractHostAndPortFromAuthority($authority)
     private static function extractHostAndPortFromAuthority($authority)
     {
     {
-        $uri = 'http://'.$authority;
+        $uri = 'http://' . $authority;
         $parts = parse_url($uri);
         $parts = parse_url($uri);
         if (false === $parts) {
         if (false === $parts) {
             return [null, null];
             return [null, null];
@@ -243,7 +247,6 @@ class ServerRequest extends Request implements ServerRequestInterface
         return $uri;
         return $uri;
     }
     }
 
 
-
     /**
     /**
      * {@inheritdoc}
      * {@inheritdoc}
      */
      */

Some files were not shown because too many files changed in this diff