Changeset 3225789
- Timestamp:
- 01/20/2025 07:06:37 PM (13 months ago)
- Location:
- mosparo-integration
- Files:
-
- 81 edited
- 17 copied
-
tags/1.12.2 (copied) (copied from mosparo-integration/trunk)
-
tags/1.12.2/LICENSE (copied) (copied from mosparo-integration/trunk/LICENSE)
-
tags/1.12.2/assets/css/mosparo-admin.css (copied) (copied from mosparo-integration/trunk/assets/css/mosparo-admin.css)
-
tags/1.12.2/assets/module/jetformbuilder/build (copied) (copied from mosparo-integration/trunk/assets/module/jetformbuilder/build)
-
tags/1.12.2/assets/module/jetformbuilder/yarn.lock (copied) (copied from mosparo-integration/trunk/assets/module/jetformbuilder/yarn.lock)
-
tags/1.12.2/assets/module/memberpress/css/login.css (copied) (copied from mosparo-integration/trunk/assets/module/memberpress/css/login.css)
-
tags/1.12.2/mosparo-integration.php (copied) (copied from mosparo-integration/trunk/mosparo-integration.php) (1 diff)
-
tags/1.12.2/readme.txt (copied) (copied from mosparo-integration/trunk/readme.txt) (2 diffs)
-
tags/1.12.2/src/MosparoIntegration/Helper/ConfigHelper.php (copied) (copied from mosparo-integration/trunk/src/MosparoIntegration/Helper/ConfigHelper.php)
-
tags/1.12.2/src/MosparoIntegration/Helper/ModuleHelper.php (copied) (copied from mosparo-integration/trunk/src/MosparoIntegration/Helper/ModuleHelper.php)
-
tags/1.12.2/src/MosparoIntegration/Module/Forminator (copied) (copied from mosparo-integration/trunk/src/MosparoIntegration/Module/Forminator)
-
tags/1.12.2/src/MosparoIntegration/Module/GravityForms/MosparoField.php (copied) (copied from mosparo-integration/trunk/src/MosparoIntegration/Module/GravityForms/MosparoField.php) (1 diff)
-
tags/1.12.2/src/MosparoIntegration/Module/JetFormBuilder/JetFormBuilderModule.php (copied) (copied from mosparo-integration/trunk/src/MosparoIntegration/Module/JetFormBuilder/JetFormBuilderModule.php)
-
tags/1.12.2/src/MosparoIntegration/Module/JetFormBuilder/Mosparo.php (copied) (copied from mosparo-integration/trunk/src/MosparoIntegration/Module/JetFormBuilder/Mosparo.php)
-
tags/1.12.2/src/MosparoIntegration/Module/MemberpressAccount/AccountLoginForm.php (copied) (copied from mosparo-integration/trunk/src/MosparoIntegration/Module/MemberpressAccount/AccountLoginForm.php)
-
tags/1.12.2/src/MosparoIntegration/Module/MemberpressAccount/AccountLostPasswordForm.php (copied) (copied from mosparo-integration/trunk/src/MosparoIntegration/Module/MemberpressAccount/AccountLostPasswordForm.php)
-
tags/1.12.2/src/MosparoIntegration/Module/WPForms/WPFormsModule.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/BodySummarizer.php (modified) (2 diffs)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Client.php (modified) (2 diffs)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/ClientInterface.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Cookie/CookieJar.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Exception/BadResponseException.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Exception/ConnectException.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Exception/RequestException.php (modified) (5 diffs)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Handler/CurlFactory.php (modified) (10 diffs)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php (modified) (3 diffs)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Handler/MockHandler.php (modified) (4 diffs)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Handler/StreamHandler.php (modified) (3 diffs)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/HandlerStack.php (modified) (3 diffs)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/MessageFormatter.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/MessageFormatterInterface.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Middleware.php (modified) (3 diffs)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/RequestOptions.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/RetryMiddleware.php (modified) (2 diffs)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/TransferStats.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Utils.php (modified) (2 diffs)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/promises/src/Coroutine.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/promises/src/Each.php (modified) (3 diffs)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/promises/src/FulfilledPromise.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/promises/src/Promise.php (modified) (2 diffs)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/promises/src/PromiseInterface.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/promises/src/RejectedPromise.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/promises/src/RejectionException.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/promises/src/Utils.php (modified) (2 diffs)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/psr7/src/CachingStream.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/psr7/src/HttpFactory.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/psr7/src/MultipartStream.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/psr7/src/Query.php (modified) (4 diffs)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/psr7/src/Response.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/psr7/src/StreamWrapper.php (modified) (3 diffs)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/psr7/src/UploadedFile.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/psr7/src/Uri.php (modified) (1 diff)
-
tags/1.12.2/vendor-prefixed/guzzlehttp/psr7/src/Utils.php (modified) (2 diffs)
-
tags/1.12.2/views/admin/module-settings.php (copied) (copied from mosparo-integration/trunk/views/admin/module-settings.php)
-
trunk/mosparo-integration.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/MosparoIntegration/Module/GravityForms/MosparoField.php (modified) (1 diff)
-
trunk/src/MosparoIntegration/Module/WPForms/WPFormsModule.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/BodySummarizer.php (modified) (2 diffs)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/Client.php (modified) (2 diffs)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/ClientInterface.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/Cookie/CookieJar.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/Exception/BadResponseException.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/Exception/ConnectException.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/Exception/RequestException.php (modified) (5 diffs)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/Handler/CurlFactory.php (modified) (10 diffs)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php (modified) (3 diffs)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/Handler/MockHandler.php (modified) (4 diffs)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/Handler/StreamHandler.php (modified) (3 diffs)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/HandlerStack.php (modified) (3 diffs)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/MessageFormatter.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/MessageFormatterInterface.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/Middleware.php (modified) (3 diffs)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/RequestOptions.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/RetryMiddleware.php (modified) (2 diffs)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/TransferStats.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/guzzle/src/Utils.php (modified) (2 diffs)
-
trunk/vendor-prefixed/guzzlehttp/promises/src/Coroutine.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/promises/src/Each.php (modified) (3 diffs)
-
trunk/vendor-prefixed/guzzlehttp/promises/src/FulfilledPromise.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/promises/src/Promise.php (modified) (2 diffs)
-
trunk/vendor-prefixed/guzzlehttp/promises/src/PromiseInterface.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/promises/src/RejectedPromise.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/promises/src/RejectionException.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/promises/src/Utils.php (modified) (2 diffs)
-
trunk/vendor-prefixed/guzzlehttp/psr7/src/CachingStream.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/psr7/src/HttpFactory.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/psr7/src/MultipartStream.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/psr7/src/Query.php (modified) (4 diffs)
-
trunk/vendor-prefixed/guzzlehttp/psr7/src/Response.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/psr7/src/StreamWrapper.php (modified) (3 diffs)
-
trunk/vendor-prefixed/guzzlehttp/psr7/src/UploadedFile.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/psr7/src/Uri.php (modified) (1 diff)
-
trunk/vendor-prefixed/guzzlehttp/psr7/src/Utils.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mosparo-integration/tags/1.12.2/mosparo-integration.php
r3224805 r3225789 15 15 * Author URI: https://mosparo.io/ 16 16 * License: MIT 17 * Version: 1.12. 117 * Version: 1.12.2 18 18 * Text Domain: mosparo-integration 19 19 * Domain Path: /languages -
mosparo-integration/tags/1.12.2/readme.txt
r3224805 r3225789 5 5 Tested up to: 6.7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1.12. 17 Stable tag: 1.12.2 8 8 License: MIT 9 9 … … 104 104 == Changelog == 105 105 106 = 1.12.2 = 107 *Release Date: 20th January 2025* 108 109 * [Bugfix] Gravity Forms: Fixed another issue with the handling of conditionally hidden fields. 110 * [Bugfix] WPForms: Fixed the initialization of the module in some cases where WPForms is not fully loaded. 111 106 112 = 1.12.1 = 107 113 *Release Date: 18th January 2025* 108 114 109 115 * [Bugfix] Gravity Forms: Fixed the selector and logic to handle conditionally hidden fields correctly. 116 * [Maintenance] Updated the backend dependencies 110 117 111 118 = 1.12.0 = -
mosparo-integration/tags/1.12.2/src/MosparoIntegration/Module/GravityForms/MosparoField.php
r3224805 r3225789 143 143 144 144 foreach ($form['fields'] as $field) { 145 if (in_array($field['type'], $ignoredTypes) || strpos($field['cssClass'] ?? '', 'mosparo__ignored-field') !== false) { 145 if ( 146 in_array($field['type'], $ignoredTypes) || 147 strpos($field['cssClass'] ?? '', 'mosparo__ignored-field') !== false || 148 GFFormsModel::is_field_hidden($form, $field, []) 149 ) { 146 150 continue; 147 151 } -
mosparo-integration/tags/1.12.2/src/MosparoIntegration/Module/WPForms/WPFormsModule.php
r3113145 r3225789 20 20 public function canInitialize() 21 21 { 22 return defined('WPFORMS_VERSION') ;22 return defined('WPFORMS_VERSION') && class_exists('WPForms_Field'); 23 23 } 24 24 -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/BodySummarizer.php
r3042153 r3225789 18 18 private $truncateAt; 19 19 20 public function __construct( int $truncateAt = null)20 public function __construct(?int $truncateAt = null) 21 21 { 22 22 $this->truncateAt = $truncateAt; … … 29 29 { 30 30 return $this->truncateAt === null 31 ? \MosparoDependencies\GuzzleHttp\Psr7\Message::bodySummary($message)32 : \MosparoDependencies\GuzzleHttp\Psr7\Message::bodySummary($message, $this->truncateAt);31 ? Psr7\Message::bodySummary($message) 32 : Psr7\Message::bodySummary($message, $this->truncateAt); 33 33 } 34 34 } -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Client.php
r3042153 r3225789 59 59 * @param array $config Client configuration settings. 60 60 * 61 * @see \MosparoDependencies\GuzzleHttp\RequestOptions for a list of available request options.61 * @see RequestOptions for a list of available request options. 62 62 */ 63 63 public function __construct(array $config = []) … … 209 209 * @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0. 210 210 */ 211 public function getConfig( string $option = null)211 public function getConfig(?string $option = null) 212 212 { 213 213 return $option === null -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/ClientInterface.php
r3042153 r3225789 87 87 * @deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0. 88 88 */ 89 public function getConfig( string $option = null);89 public function getConfig(?string $option = null); 90 90 } -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Cookie/CookieJar.php
r3042153 r3225789 110 110 } 111 111 112 public function clear( string $domain = null, string $path = null,string $name = null): void112 public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void 113 113 { 114 114 if (!$domain) { -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php
r3042153 r3225789 69 69 * @param string|null $name Clears cookies matching a domain, path, and name 70 70 */ 71 public function clear( string $domain = null, string $path = null,string $name = null): void;71 public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void; 72 72 73 73 /** -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Exception/BadResponseException.php
r3042153 r3225789 21 21 RequestInterface $request, 22 22 ResponseInterface $response, 23 \Throwable $previous = null,23 ?\Throwable $previous = null, 24 24 array $handlerContext = [] 25 25 ) { -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Exception/ConnectException.php
r3042153 r3225789 32 32 string $message, 33 33 RequestInterface $request, 34 \Throwable $previous = null,34 ?\Throwable $previous = null, 35 35 array $handlerContext = [] 36 36 ) { -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Exception/RequestException.php
r3042153 r3225789 14 14 use MosparoDependencies\Psr\Http\Message\RequestInterface; 15 15 use MosparoDependencies\Psr\Http\Message\ResponseInterface; 16 use MosparoDependencies\Psr\Http\Message\UriInterface;17 16 18 17 /** … … 39 38 string $message, 40 39 RequestInterface $request, 41 ResponseInterface $response = null,42 \Throwable $previous = null,40 ?ResponseInterface $response = null, 41 ?\Throwable $previous = null, 43 42 array $handlerContext = [] 44 43 ) { … … 70 69 public static function create( 71 70 RequestInterface $request, 72 ResponseInterface $response = null,73 \Throwable $previous = null,71 ?ResponseInterface $response = null, 72 ?\Throwable $previous = null, 74 73 array $handlerContext = [], 75 BodySummarizerInterface $bodySummarizer = null74 ?BodySummarizerInterface $bodySummarizer = null 76 75 ): self { 77 76 if (!$response) { … … 97 96 } 98 97 99 $uri = $request->getUri(); 100 $uri = static::obfuscateUri($uri); 98 $uri = \MosparoDependencies\GuzzleHttp\Psr7\Utils::redactUserInfo($request->getUri()); 101 99 102 100 // Client Error: `GET /` resulted in a `404 Not Found` response: … … 118 116 119 117 return new $className($message, $request, $response, $previous, $handlerContext); 120 }121 122 /**123 * Obfuscates URI if there is a username and a password present124 */125 private static function obfuscateUri(UriInterface $uri): UriInterface126 {127 $userInfo = $uri->getUserInfo();128 129 if (false !== ($pos = \strpos($userInfo, ':'))) {130 return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***');131 }132 133 return $uri;134 118 } 135 119 -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Handler/CurlFactory.php
r3042153 r3225789 18 18 use MosparoDependencies\GuzzleHttp\Utils; 19 19 use MosparoDependencies\Psr\Http\Message\RequestInterface; 20 use MosparoDependencies\Psr\Http\Message\UriInterface; 20 21 21 22 /** … … 53 54 public function create(RequestInterface $request, array $options): EasyHandle 54 55 { 56 $protocolVersion = $request->getProtocolVersion(); 57 58 if ('2' === $protocolVersion || '2.0' === $protocolVersion) { 59 if (!self::supportsHttp2()) { 60 throw new ConnectException('HTTP/2 is supported by the cURL handler, however libcurl is built without HTTP/2 support.', $request); 61 } 62 } elseif ('1.0' !== $protocolVersion && '1.1' !== $protocolVersion) { 63 throw new ConnectException(sprintf('HTTP/%s is not supported by the cURL handler.', $protocolVersion), $request); 64 } 65 55 66 if (isset($options['curl']['body_as_string'])) { 56 67 $options['_body_as_string'] = $options['curl']['body_as_string']; … … 77 88 78 89 return $easy; 90 } 91 92 private static function supportsHttp2(): bool 93 { 94 static $supportsHttp2 = null; 95 96 if (null === $supportsHttp2) { 97 $supportsHttp2 = self::supportsTls12() 98 && defined('CURL_VERSION_HTTP2') 99 && (\CURL_VERSION_HTTP2 & \curl_version()['features']); 100 } 101 102 return $supportsHttp2; 103 } 104 105 private static function supportsTls12(): bool 106 { 107 static $supportsTls12 = null; 108 109 if (null === $supportsTls12) { 110 $supportsTls12 = \CURL_SSLVERSION_TLSv1_2 & \curl_version()['features']; 111 } 112 113 return $supportsTls12; 114 } 115 116 private static function supportsTls13(): bool 117 { 118 static $supportsTls13 = null; 119 120 if (null === $supportsTls13) { 121 $supportsTls13 = defined('CURL_SSLVERSION_TLSv1_3') 122 && (\CURL_SSLVERSION_TLSv1_3 & \curl_version()['features']); 123 } 124 125 return $supportsTls13; 79 126 } 80 127 … … 154 201 'appconnect_time' => \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME), 155 202 ] + \curl_getinfo($easy->handle); 156 $ctx[self::CURL_VERSION_STR] = \curl_version()['version'];203 $ctx[self::CURL_VERSION_STR] = self::getCurlVersion(); 157 204 $factory->release($easy); 158 205 … … 163 210 164 211 return self::createRejection($easy, $ctx); 212 } 213 214 private static function getCurlVersion(): string 215 { 216 static $curlVersion = null; 217 218 if (null === $curlVersion) { 219 $curlVersion = \curl_version()['version']; 220 } 221 222 return $curlVersion; 165 223 } 166 224 … … 201 259 } 202 260 261 $uri = $easy->request->getUri(); 262 263 $sanitizedError = self::sanitizeCurlError($ctx['error'] ?? '', $uri); 264 203 265 $message = \sprintf( 204 266 'cURL error %s: %s (%s)', 205 267 $ctx['errno'], 206 $ ctx['error'],268 $sanitizedError, 207 269 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html' 208 270 ); 209 $uriString = (string) $easy->request->getUri(); 210 if ($uriString !== '' && false === \strpos($ctx['error'], $uriString)) { 211 $message .= \sprintf(' for %s', $uriString); 271 272 if ('' !== $sanitizedError) { 273 $redactedUriString = \MosparoDependencies\GuzzleHttp\Psr7\Utils::redactUserInfo($uri)->__toString(); 274 if ($redactedUriString !== '' && false === \strpos($sanitizedError, $redactedUriString)) { 275 $message .= \sprintf(' for %s', $redactedUriString); 276 } 212 277 } 213 278 … … 218 283 219 284 return P\Create::rejectionFor($error); 285 } 286 287 private static function sanitizeCurlError(string $error, UriInterface $uri): string 288 { 289 if ('' === $error) { 290 return $error; 291 } 292 293 $baseUri = $uri->withQuery('')->withFragment(''); 294 $baseUriString = $baseUri->__toString(); 295 296 if ('' === $baseUriString) { 297 return $error; 298 } 299 300 $redactedUriString = \MosparoDependencies\GuzzleHttp\Psr7\Utils::redactUserInfo($baseUri)->__toString(); 301 302 return str_replace($baseUriString, $redactedUriString, $error); 220 303 } 221 304 … … 239 322 240 323 $version = $easy->request->getProtocolVersion(); 241 if ($version == 1.1) { 324 325 if ('2' === $version || '2.0' === $version) { 326 $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0; 327 } elseif ('1.1' === $version) { 242 328 $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1; 243 } elseif ($version == 2.0) {244 $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0;245 329 } else { 246 330 $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_0; … … 397 481 // sets a matching 'Accept-Encoding' header. 398 482 $conf[\CURLOPT_ENCODING] = ''; 399 // But as the user did not specify any acceptable encodings we need 400 // to overwrite this implicit header with an empty one. 483 // But as the user did not specify any encoding preference, 484 // let's leave it up to server by preventing curl from sending 485 // the header, which will be interpreted as 'Accept-Encoding: *'. 486 // https://www.rfc-editor.org/rfc/rfc9110#field.accept-encoding 401 487 $conf[\CURLOPT_HTTPHEADER][] = 'Accept-Encoding:'; 402 488 } … … 462 548 463 549 if (isset($options['crypto_method'])) { 464 if (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) { 465 if (!defined('CURL_SSLVERSION_TLSv1_0')) { 466 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.0 not supported by your version of cURL'); 467 } 550 $protocolVersion = $easy->request->getProtocolVersion(); 551 552 // If HTTP/2, upgrade TLS 1.0 and 1.1 to 1.2 553 if ('2' === $protocolVersion || '2.0' === $protocolVersion) { 554 if ( 555 \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method'] 556 || \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method'] 557 || \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method'] 558 ) { 559 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2; 560 } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) { 561 if (!self::supportsTls13()) { 562 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL'); 563 } 564 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_3; 565 } else { 566 throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); 567 } 568 } elseif (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) { 468 569 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_0; 469 570 } elseif (\STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method']) { 470 if (!defined('CURL_SSLVERSION_TLSv1_1')) {471 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.1 not supported by your version of cURL');472 }473 571 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_1; 474 572 } elseif (\STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']) { 475 if (! defined('CURL_SSLVERSION_TLSv1_2')) {573 if (!self::supportsTls12()) { 476 574 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.2 not supported by your version of cURL'); 477 575 } 478 576 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2; 479 577 } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) { 480 if (! defined('CURL_SSLVERSION_TLSv1_3')) {578 if (!self::supportsTls13()) { 481 579 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL'); 482 580 } -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
r3042153 r3225789 9 9 namespace MosparoDependencies\GuzzleHttp\Handler; 10 10 11 use Closure; 11 12 use MosparoDependencies\GuzzleHttp\Promise as P; 12 13 use MosparoDependencies\GuzzleHttp\Promise\Promise; … … 166 167 } 167 168 169 // Run curl_multi_exec in the queue to enable other async tasks to run 170 P\Utils::queue()->add(Closure::fromCallable([$this, 'tickInQueue'])); 171 168 172 // Step through the task queue which may add additional requests. 169 173 P\Utils::queue()->run(); … … 176 180 177 181 while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) { 182 // Prevent busy looping for slow HTTP requests. 183 \curl_multi_select($this->_mh, $this->selectTimeout); 178 184 } 179 185 180 186 $this->processMessages(); 187 } 188 189 /** 190 * Runs \curl_multi_exec() inside the event loop, to prevent busy looping 191 */ 192 private function tickInQueue(): void 193 { 194 if (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) { 195 \curl_multi_select($this->_mh, 0); 196 P\Utils::queue()->add(Closure::fromCallable([$this, 'tickInQueue'])); 197 } 181 198 } 182 199 -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Handler/MockHandler.php
r3042153 r3225789 59 59 * @param callable|null $onRejected Callback to invoke when the return value is rejected. 60 60 */ 61 public static function createWithMiddleware( array $queue = null, callable $onFulfilled = null,callable $onRejected = null): HandlerStack61 public static function createWithMiddleware(?array $queue = null, ?callable $onFulfilled = null, ?callable $onRejected = null): HandlerStack 62 62 { 63 63 return HandlerStack::create(new self($queue, $onFulfilled, $onRejected)); … … 66 66 /** 67 67 * The passed in value must be an array of 68 * {@see \Psr\Http\Message\ResponseInterface} objects, Exceptions,68 * {@see ResponseInterface} objects, Exceptions, 69 69 * callables, or Promises. 70 70 * … … 73 73 * @param callable|null $onRejected Callback to invoke when the return value is rejected. 74 74 */ 75 public function __construct( array $queue = null, callable $onFulfilled = null,callable $onRejected = null)75 public function __construct(?array $queue = null, ?callable $onFulfilled = null, ?callable $onRejected = null) 76 76 { 77 77 $this->onFulfilled = $onFulfilled; … … 207 207 RequestInterface $request, 208 208 array $options, 209 ResponseInterface $response = null,209 ?ResponseInterface $response = null, 210 210 $reason = null 211 211 ): void { -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Handler/StreamHandler.php
r3042153 r3225789 45 45 if (isset($options['delay'])) { 46 46 \usleep($options['delay'] * 1000); 47 } 48 49 $protocolVersion = $request->getProtocolVersion(); 50 51 if ('1.0' !== $protocolVersion && '1.1' !== $protocolVersion) { 52 throw new ConnectException(sprintf('HTTP/%s is not supported by the stream handler.', $protocolVersion), $request); 47 53 } 48 54 … … 90 96 RequestInterface $request, 91 97 ?float $startTime, 92 ResponseInterface $response = null,93 \Throwable $error = null98 ?ResponseInterface $response = null, 99 ?\Throwable $error = null 94 100 ): void { 95 101 if (isset($options['on_stats'])) { … … 280 286 // HTTP/1.1 streams using the PHP stream wrapper require a 281 287 // Connection: close header 282 if ($request->getProtocolVersion() == '1.1'288 if ($request->getProtocolVersion() === '1.1' 283 289 && !$request->hasHeader('Connection') 284 290 ) { -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/HandlerStack.php
r3042153 r3225789 51 51 * system will be utilized. 52 52 */ 53 public static function create( callable $handler = null): self53 public static function create(?callable $handler = null): self 54 54 { 55 55 $stack = new self($handler ?: Utils::chooseHandler()); … … 65 65 * @param (callable(RequestInterface, array): PromiseInterface)|null $handler Underlying HTTP handler. 66 66 */ 67 public function __construct( callable $handler = null)67 public function __construct(?callable $handler = null) 68 68 { 69 69 $this->handler = $handler; … … 138 138 * @param string $name Name to register for this middleware. 139 139 */ 140 public function unshift(callable $middleware, string $name = null): void140 public function unshift(callable $middleware, ?string $name = null): void 141 141 { 142 142 \array_unshift($this->stack, [$middleware, $name]); -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/MessageFormatter.php
r3042153 r3225789 75 75 * @param \Throwable|null $error Exception that was received 76 76 */ 77 public function format(RequestInterface $request, ResponseInterface $response = null,\Throwable $error = null): string77 public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string 78 78 { 79 79 $cache = []; -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/MessageFormatterInterface.php
r3042153 r3225789 21 21 * @param \Throwable|null $error Exception that was received 22 22 */ 23 public function format(RequestInterface $request, ResponseInterface $response = null,\Throwable $error = null): string;23 public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string; 24 24 } -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Middleware.php
r3042153 r3225789 62 62 * @return callable(callable): callable Returns a function that accepts the next handler. 63 63 */ 64 public static function httpErrors( BodySummarizerInterface $bodySummarizer = null): callable64 public static function httpErrors(?BodySummarizerInterface $bodySummarizer = null): callable 65 65 { 66 66 return static function (callable $handler) use ($bodySummarizer): callable { … … 139 139 * @return callable Returns a function that accepts the next handler. 140 140 */ 141 public static function tap( callable $before = null,callable $after = null): callable141 public static function tap(?callable $before = null, ?callable $after = null): callable 142 142 { 143 143 return static function (callable $handler) use ($before, $after): callable { … … 183 183 * @return callable Returns a function that accepts the next handler. 184 184 */ 185 public static function retry(callable $decider, callable $delay = null): callable185 public static function retry(callable $decider, ?callable $delay = null): callable 186 186 { 187 187 return static function (callable $handler) use ($decider, $delay): RetryMiddleware { -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php
r3042153 r3225789 83 83 $expect = $options['expect'] ?? null; 84 84 85 // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.086 if ($expect === false || $request->getProtocolVersion() < 1.1) {85 // Return if disabled or using HTTP/1.0 86 if ($expect === false || $request->getProtocolVersion() === '1.0') { 87 87 return; 88 88 } -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/RequestOptions.php
r3042153 r3225789 68 68 * jar to use or what cookies to send. This option only works if your 69 69 * handler has the `cookie` middleware. Valid values are `false` and 70 * an instance of {@see \GuzzleHttp\Cookie\CookieJarInterface}.70 * an instance of {@see Cookie\CookieJarInterface}. 71 71 */ 72 72 public const COOKIES = 'cookies'; -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/RetryMiddleware.php
r3042153 r3225789 47 47 * milliseconds to delay. 48 48 */ 49 public function __construct(callable $decider, callable $nextHandler, callable $delay = null)49 public function __construct(callable $decider, callable $nextHandler, ?callable $delay = null) 50 50 { 51 51 $this->decider = $decider; … … 117 117 } 118 118 119 private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null): PromiseInterface119 private function doRetry(RequestInterface $request, array $options, ?ResponseInterface $response = null): PromiseInterface 120 120 { 121 121 $options['delay'] = ($this->delay)(++$options['retries'], $response, $request); -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/TransferStats.php
r3042153 r3225789 53 53 public function __construct( 54 54 RequestInterface $request, 55 ResponseInterface $response = null,56 float $transferTime = null,55 ?ResponseInterface $response = null, 56 ?float $transferTime = null, 57 57 $handlerErrorData = null, 58 58 array $handlerStats = [] -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/guzzle/src/Utils.php
r3042153 r3225789 78 78 } 79 79 80 return \MosparoDependencies\GuzzleHttp\Psr7\Utils::tryFopen('php://output', 'w');80 return Psr7\Utils::tryFopen('php://output', 'w'); 81 81 } 82 82 … … 94 94 $handler = null; 95 95 96 if (\defined('CURLOPT_CUSTOMREQUEST') ) {96 if (\defined('CURLOPT_CUSTOMREQUEST') && \function_exists('curl_version') && version_compare(curl_version()['version'], '7.21.2') >= 0) { 97 97 if (\function_exists('curl_multi_exec') && \function_exists('curl_exec')) { 98 98 $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler()); -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/promises/src/Coroutine.php
r3042153 r3225789 91 91 92 92 public function then( 93 callable $onFulfilled = null,94 callable $onRejected = null93 ?callable $onFulfilled = null, 94 ?callable $onRejected = null 95 95 ): PromiseInterface { 96 96 return $this->result->then($onFulfilled, $onRejected); -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/promises/src/Each.php
r3042153 r3225789 30 30 public static function of( 31 31 $iterable, 32 callable $onFulfilled = null,33 callable $onRejected = null32 ?callable $onFulfilled = null, 33 ?callable $onRejected = null 34 34 ): PromiseInterface { 35 35 return (new EachPromise($iterable, [ … … 53 53 $iterable, 54 54 $concurrency, 55 callable $onFulfilled = null,56 callable $onRejected = null55 ?callable $onFulfilled = null, 56 ?callable $onRejected = null 57 57 ): PromiseInterface { 58 58 return (new EachPromise($iterable, [ … … 74 74 $iterable, 75 75 $concurrency, 76 callable $onFulfilled = null76 ?callable $onFulfilled = null 77 77 ): PromiseInterface { 78 78 return self::ofLimit( -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/promises/src/FulfilledPromise.php
r3042153 r3225789 38 38 39 39 public function then( 40 callable $onFulfilled = null,41 callable $onRejected = null40 ?callable $onFulfilled = null, 41 ?callable $onRejected = null 42 42 ): PromiseInterface { 43 43 // Return itself if there is no onFulfilled function. -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/promises/src/Promise.php
r3042153 r3225789 32 32 */ 33 33 public function __construct( 34 callable $waitFn = null,35 callable $cancelFn = null34 ?callable $waitFn = null, 35 ?callable $cancelFn = null 36 36 ) { 37 37 $this->waitFn = $waitFn; … … 40 40 41 41 public function then( 42 callable $onFulfilled = null,43 callable $onRejected = null42 ?callable $onFulfilled = null, 43 ?callable $onRejected = null 44 44 ): PromiseInterface { 45 45 if ($this->state === self::PENDING) { -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/promises/src/PromiseInterface.php
r3042153 r3225789 34 34 */ 35 35 public function then( 36 callable $onFulfilled = null,37 callable $onRejected = null36 ?callable $onFulfilled = null, 37 ?callable $onRejected = null 38 38 ): PromiseInterface; 39 39 -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/promises/src/RejectedPromise.php
r3042153 r3225789 38 38 39 39 public function then( 40 callable $onFulfilled = null,41 callable $onRejected = null40 ?callable $onFulfilled = null, 41 ?callable $onRejected = null 42 42 ): PromiseInterface { 43 43 // If there's no onRejected callback then just return self. -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/promises/src/RejectionException.php
r3042153 r3225789 25 25 * @param string|null $description Optional description. 26 26 */ 27 public function __construct($reason, string $description = null)27 public function __construct($reason, ?string $description = null) 28 28 { 29 29 $this->reason = $reason; -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/promises/src/Utils.php
r3042153 r3225789 28 28 * @param TaskQueueInterface|null $assign Optionally specify a new queue instance. 29 29 */ 30 public static function queue( TaskQueueInterface $assign = null): TaskQueueInterface30 public static function queue(?TaskQueueInterface $assign = null): TaskQueueInterface 31 31 { 32 32 static $queue; … … 151 151 }, 152 152 function ($reason, $idx, Promise $aggregate): void { 153 $aggregate->reject($reason); 153 if (Is::pending($aggregate)) { 154 $aggregate->reject($reason); 155 } 154 156 } 155 157 )->then(function () use (&$results) { -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/psr7/src/CachingStream.php
r3042153 r3225789 40 40 public function __construct( 41 41 StreamInterface $stream, 42 StreamInterface $target = null42 ?StreamInterface $target = null 43 43 ) { 44 44 $this->remoteStream = $stream; -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/psr7/src/HttpFactory.php
r3042153 r3225789 34 34 public function createUploadedFile( 35 35 StreamInterface $stream, 36 int $size = null,36 ?int $size = null, 37 37 int $error = \UPLOAD_ERR_OK, 38 string $clientFilename = null,39 string $clientMediaType = null38 ?string $clientFilename = null, 39 ?string $clientMediaType = null 40 40 ): UploadedFileInterface { 41 41 if ($size === null) { -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/psr7/src/MultipartStream.php
r3042153 r3225789 39 39 * @throws \InvalidArgumentException 40 40 */ 41 public function __construct(array $elements = [], string $boundary = null)41 public function __construct(array $elements = [], ?string $boundary = null) 42 42 { 43 43 $this->boundary = $boundary ?: bin2hex(random_bytes(20)); -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/psr7/src/Query.php
r3042153 r3225789 70 70 * encountered (like `http_build_query()` would). 71 71 * 72 * @param array $params Query string parameters. 73 * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 74 * to encode using RFC3986, or PHP_QUERY_RFC1738 75 * to encode using RFC1738. 72 * @param array $params Query string parameters. 73 * @param int|false $encoding Set to false to not encode, 74 * PHP_QUERY_RFC3986 to encode using 75 * RFC3986, or PHP_QUERY_RFC1738 to 76 * encode using RFC1738. 77 * @param bool $treatBoolsAsInts Set to true to encode as 0/1, and 78 * false as false/true. 76 79 */ 77 public static function build(array $params, $encoding = PHP_QUERY_RFC3986 ): string80 public static function build(array $params, $encoding = PHP_QUERY_RFC3986, bool $treatBoolsAsInts = true): string 78 81 { 79 82 if (!$params) { … … 93 96 } 94 97 98 $castBool = $treatBoolsAsInts ? static function ($v) { return (int) $v; } : static function ($v) { return $v ? 'true' : 'false'; }; 99 95 100 $qs = ''; 96 101 foreach ($params as $k => $v) { … … 98 103 if (!is_array($v)) { 99 104 $qs .= $k; 100 $v = is_bool($v) ? (int) $v: $v;105 $v = is_bool($v) ? $castBool($v) : $v; 101 106 if ($v !== null) { 102 107 $qs .= '='.$encoder((string) $v); … … 106 111 foreach ($v as $vv) { 107 112 $qs .= $k; 108 $vv = is_bool($vv) ? (int) $vv: $vv;113 $vv = is_bool($vv) ? $castBool($vv) : $vv; 109 114 if ($vv !== null) { 110 115 $qs .= '='.$encoder((string) $vv); -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/psr7/src/Response.php
r3042153 r3225789 103 103 $body = null, 104 104 string $version = '1.1', 105 string $reason = null105 ?string $reason = null 106 106 ) { 107 107 $this->assertStatusCodeRange($status); -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/psr7/src/StreamWrapper.php
r3042153 r3225789 76 76 } 77 77 78 public function stream_open(string $path, string $mode, int $options, string &$opened_path = null): bool78 public function stream_open(string $path, string $mode, int $options, ?string &$opened_path = null): bool 79 79 { 80 80 $options = stream_context_get_options($this->context); … … 126 126 127 127 return $resource ?? false; 128 } 129 130 /** 131 * @return array{ 132 * dev: int, 133 * ino: int, 134 * mode: int, 135 * nlink: int, 136 * uid: int, 137 * gid: int, 138 * rdev: int, 139 * size: int, 140 * atime: int, 141 * mtime: int, 142 * ctime: int, 143 * blksize: int, 144 * blocks: int 145 * }|false 146 */ 147 public function stream_stat() 148 { 149 if ($this->stream->getSize() === null) { 150 return false; 151 } 152 153 static $modeMap = [ 154 'r' => 33060, 155 'rb' => 33060, 156 'r+' => 33206, 157 'w' => 33188, 158 'wb' => 33188, 159 ]; 160 161 return [ 162 'dev' => 0, 163 'ino' => 0, 164 'mode' => $modeMap[$this->mode], 165 'nlink' => 0, 166 'uid' => 0, 167 'gid' => 0, 168 'rdev' => 0, 169 'size' => $this->stream->getSize() ?: 0, 170 'atime' => 0, 171 'mtime' => 0, 172 'ctime' => 0, 173 'blksize' => 0, 174 'blocks' => 0, 175 ]; 128 176 } 129 177 … … 145 193 * } 146 194 */ 147 public function stream_stat(): array148 {149 static $modeMap = [150 'r' => 33060,151 'rb' => 33060,152 'r+' => 33206,153 'w' => 33188,154 'wb' => 33188,155 ];156 157 return [158 'dev' => 0,159 'ino' => 0,160 'mode' => $modeMap[$this->mode],161 'nlink' => 0,162 'uid' => 0,163 'gid' => 0,164 'rdev' => 0,165 'size' => $this->stream->getSize() ?: 0,166 'atime' => 0,167 'mtime' => 0,168 'ctime' => 0,169 'blksize' => 0,170 'blocks' => 0,171 ];172 }173 174 /**175 * @return array{176 * dev: int,177 * ino: int,178 * mode: int,179 * nlink: int,180 * uid: int,181 * gid: int,182 * rdev: int,183 * size: int,184 * atime: int,185 * mtime: int,186 * ctime: int,187 * blksize: int,188 * blocks: int189 * }190 */191 195 public function url_stat(string $path, int $flags): array 192 196 { -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/psr7/src/UploadedFile.php
r3042153 r3225789 71 71 ?int $size, 72 72 int $errorStatus, 73 string $clientFilename = null,74 string $clientMediaType = null73 ?string $clientFilename = null, 74 ?string $clientMediaType = null 75 75 ) { 76 76 $this->setError($errorStatus); -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/psr7/src/Uri.php
r3042153 r3225789 286 286 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.4 287 287 */ 288 public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool288 public static function isSameDocumentReference(UriInterface $uri, ?UriInterface $base = null): bool 289 289 { 290 290 if ($base !== null) { -
mosparo-integration/tags/1.12.2/vendor-prefixed/guzzlehttp/psr7/src/Utils.php
r3042153 r3225789 238 238 * @param int|null $maxLength Maximum buffer length 239 239 */ 240 public static function readLine(StreamInterface $stream, int $maxLength = null): string240 public static function readLine(StreamInterface $stream, ?int $maxLength = null): string 241 241 { 242 242 $buffer = ''; … … 255 255 256 256 return $buffer; 257 } 258 259 /** 260 * Redact the password in the user info part of a URI. 261 */ 262 public static function redactUserInfo(UriInterface $uri): UriInterface 263 { 264 $userInfo = $uri->getUserInfo(); 265 266 if (false !== ($pos = \strpos($userInfo, ':'))) { 267 return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***'); 268 } 269 270 return $uri; 257 271 } 258 272 -
mosparo-integration/trunk/mosparo-integration.php
r3224805 r3225789 15 15 * Author URI: https://mosparo.io/ 16 16 * License: MIT 17 * Version: 1.12. 117 * Version: 1.12.2 18 18 * Text Domain: mosparo-integration 19 19 * Domain Path: /languages -
mosparo-integration/trunk/readme.txt
r3224805 r3225789 5 5 Tested up to: 6.7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1.12. 17 Stable tag: 1.12.2 8 8 License: MIT 9 9 … … 104 104 == Changelog == 105 105 106 = 1.12.2 = 107 *Release Date: 20th January 2025* 108 109 * [Bugfix] Gravity Forms: Fixed another issue with the handling of conditionally hidden fields. 110 * [Bugfix] WPForms: Fixed the initialization of the module in some cases where WPForms is not fully loaded. 111 106 112 = 1.12.1 = 107 113 *Release Date: 18th January 2025* 108 114 109 115 * [Bugfix] Gravity Forms: Fixed the selector and logic to handle conditionally hidden fields correctly. 116 * [Maintenance] Updated the backend dependencies 110 117 111 118 = 1.12.0 = -
mosparo-integration/trunk/src/MosparoIntegration/Module/GravityForms/MosparoField.php
r3224805 r3225789 143 143 144 144 foreach ($form['fields'] as $field) { 145 if (in_array($field['type'], $ignoredTypes) || strpos($field['cssClass'] ?? '', 'mosparo__ignored-field') !== false) { 145 if ( 146 in_array($field['type'], $ignoredTypes) || 147 strpos($field['cssClass'] ?? '', 'mosparo__ignored-field') !== false || 148 GFFormsModel::is_field_hidden($form, $field, []) 149 ) { 146 150 continue; 147 151 } -
mosparo-integration/trunk/src/MosparoIntegration/Module/WPForms/WPFormsModule.php
r3113145 r3225789 20 20 public function canInitialize() 21 21 { 22 return defined('WPFORMS_VERSION') ;22 return defined('WPFORMS_VERSION') && class_exists('WPForms_Field'); 23 23 } 24 24 -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/BodySummarizer.php
r3042153 r3225789 18 18 private $truncateAt; 19 19 20 public function __construct( int $truncateAt = null)20 public function __construct(?int $truncateAt = null) 21 21 { 22 22 $this->truncateAt = $truncateAt; … … 29 29 { 30 30 return $this->truncateAt === null 31 ? \MosparoDependencies\GuzzleHttp\Psr7\Message::bodySummary($message)32 : \MosparoDependencies\GuzzleHttp\Psr7\Message::bodySummary($message, $this->truncateAt);31 ? Psr7\Message::bodySummary($message) 32 : Psr7\Message::bodySummary($message, $this->truncateAt); 33 33 } 34 34 } -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/Client.php
r3042153 r3225789 59 59 * @param array $config Client configuration settings. 60 60 * 61 * @see \MosparoDependencies\GuzzleHttp\RequestOptions for a list of available request options.61 * @see RequestOptions for a list of available request options. 62 62 */ 63 63 public function __construct(array $config = []) … … 209 209 * @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0. 210 210 */ 211 public function getConfig( string $option = null)211 public function getConfig(?string $option = null) 212 212 { 213 213 return $option === null -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/ClientInterface.php
r3042153 r3225789 87 87 * @deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0. 88 88 */ 89 public function getConfig( string $option = null);89 public function getConfig(?string $option = null); 90 90 } -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/Cookie/CookieJar.php
r3042153 r3225789 110 110 } 111 111 112 public function clear( string $domain = null, string $path = null,string $name = null): void112 public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void 113 113 { 114 114 if (!$domain) { -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php
r3042153 r3225789 69 69 * @param string|null $name Clears cookies matching a domain, path, and name 70 70 */ 71 public function clear( string $domain = null, string $path = null,string $name = null): void;71 public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void; 72 72 73 73 /** -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/Exception/BadResponseException.php
r3042153 r3225789 21 21 RequestInterface $request, 22 22 ResponseInterface $response, 23 \Throwable $previous = null,23 ?\Throwable $previous = null, 24 24 array $handlerContext = [] 25 25 ) { -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/Exception/ConnectException.php
r3042153 r3225789 32 32 string $message, 33 33 RequestInterface $request, 34 \Throwable $previous = null,34 ?\Throwable $previous = null, 35 35 array $handlerContext = [] 36 36 ) { -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/Exception/RequestException.php
r3042153 r3225789 14 14 use MosparoDependencies\Psr\Http\Message\RequestInterface; 15 15 use MosparoDependencies\Psr\Http\Message\ResponseInterface; 16 use MosparoDependencies\Psr\Http\Message\UriInterface;17 16 18 17 /** … … 39 38 string $message, 40 39 RequestInterface $request, 41 ResponseInterface $response = null,42 \Throwable $previous = null,40 ?ResponseInterface $response = null, 41 ?\Throwable $previous = null, 43 42 array $handlerContext = [] 44 43 ) { … … 70 69 public static function create( 71 70 RequestInterface $request, 72 ResponseInterface $response = null,73 \Throwable $previous = null,71 ?ResponseInterface $response = null, 72 ?\Throwable $previous = null, 74 73 array $handlerContext = [], 75 BodySummarizerInterface $bodySummarizer = null74 ?BodySummarizerInterface $bodySummarizer = null 76 75 ): self { 77 76 if (!$response) { … … 97 96 } 98 97 99 $uri = $request->getUri(); 100 $uri = static::obfuscateUri($uri); 98 $uri = \MosparoDependencies\GuzzleHttp\Psr7\Utils::redactUserInfo($request->getUri()); 101 99 102 100 // Client Error: `GET /` resulted in a `404 Not Found` response: … … 118 116 119 117 return new $className($message, $request, $response, $previous, $handlerContext); 120 }121 122 /**123 * Obfuscates URI if there is a username and a password present124 */125 private static function obfuscateUri(UriInterface $uri): UriInterface126 {127 $userInfo = $uri->getUserInfo();128 129 if (false !== ($pos = \strpos($userInfo, ':'))) {130 return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***');131 }132 133 return $uri;134 118 } 135 119 -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/Handler/CurlFactory.php
r3042153 r3225789 18 18 use MosparoDependencies\GuzzleHttp\Utils; 19 19 use MosparoDependencies\Psr\Http\Message\RequestInterface; 20 use MosparoDependencies\Psr\Http\Message\UriInterface; 20 21 21 22 /** … … 53 54 public function create(RequestInterface $request, array $options): EasyHandle 54 55 { 56 $protocolVersion = $request->getProtocolVersion(); 57 58 if ('2' === $protocolVersion || '2.0' === $protocolVersion) { 59 if (!self::supportsHttp2()) { 60 throw new ConnectException('HTTP/2 is supported by the cURL handler, however libcurl is built without HTTP/2 support.', $request); 61 } 62 } elseif ('1.0' !== $protocolVersion && '1.1' !== $protocolVersion) { 63 throw new ConnectException(sprintf('HTTP/%s is not supported by the cURL handler.', $protocolVersion), $request); 64 } 65 55 66 if (isset($options['curl']['body_as_string'])) { 56 67 $options['_body_as_string'] = $options['curl']['body_as_string']; … … 77 88 78 89 return $easy; 90 } 91 92 private static function supportsHttp2(): bool 93 { 94 static $supportsHttp2 = null; 95 96 if (null === $supportsHttp2) { 97 $supportsHttp2 = self::supportsTls12() 98 && defined('CURL_VERSION_HTTP2') 99 && (\CURL_VERSION_HTTP2 & \curl_version()['features']); 100 } 101 102 return $supportsHttp2; 103 } 104 105 private static function supportsTls12(): bool 106 { 107 static $supportsTls12 = null; 108 109 if (null === $supportsTls12) { 110 $supportsTls12 = \CURL_SSLVERSION_TLSv1_2 & \curl_version()['features']; 111 } 112 113 return $supportsTls12; 114 } 115 116 private static function supportsTls13(): bool 117 { 118 static $supportsTls13 = null; 119 120 if (null === $supportsTls13) { 121 $supportsTls13 = defined('CURL_SSLVERSION_TLSv1_3') 122 && (\CURL_SSLVERSION_TLSv1_3 & \curl_version()['features']); 123 } 124 125 return $supportsTls13; 79 126 } 80 127 … … 154 201 'appconnect_time' => \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME), 155 202 ] + \curl_getinfo($easy->handle); 156 $ctx[self::CURL_VERSION_STR] = \curl_version()['version'];203 $ctx[self::CURL_VERSION_STR] = self::getCurlVersion(); 157 204 $factory->release($easy); 158 205 … … 163 210 164 211 return self::createRejection($easy, $ctx); 212 } 213 214 private static function getCurlVersion(): string 215 { 216 static $curlVersion = null; 217 218 if (null === $curlVersion) { 219 $curlVersion = \curl_version()['version']; 220 } 221 222 return $curlVersion; 165 223 } 166 224 … … 201 259 } 202 260 261 $uri = $easy->request->getUri(); 262 263 $sanitizedError = self::sanitizeCurlError($ctx['error'] ?? '', $uri); 264 203 265 $message = \sprintf( 204 266 'cURL error %s: %s (%s)', 205 267 $ctx['errno'], 206 $ ctx['error'],268 $sanitizedError, 207 269 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html' 208 270 ); 209 $uriString = (string) $easy->request->getUri(); 210 if ($uriString !== '' && false === \strpos($ctx['error'], $uriString)) { 211 $message .= \sprintf(' for %s', $uriString); 271 272 if ('' !== $sanitizedError) { 273 $redactedUriString = \MosparoDependencies\GuzzleHttp\Psr7\Utils::redactUserInfo($uri)->__toString(); 274 if ($redactedUriString !== '' && false === \strpos($sanitizedError, $redactedUriString)) { 275 $message .= \sprintf(' for %s', $redactedUriString); 276 } 212 277 } 213 278 … … 218 283 219 284 return P\Create::rejectionFor($error); 285 } 286 287 private static function sanitizeCurlError(string $error, UriInterface $uri): string 288 { 289 if ('' === $error) { 290 return $error; 291 } 292 293 $baseUri = $uri->withQuery('')->withFragment(''); 294 $baseUriString = $baseUri->__toString(); 295 296 if ('' === $baseUriString) { 297 return $error; 298 } 299 300 $redactedUriString = \MosparoDependencies\GuzzleHttp\Psr7\Utils::redactUserInfo($baseUri)->__toString(); 301 302 return str_replace($baseUriString, $redactedUriString, $error); 220 303 } 221 304 … … 239 322 240 323 $version = $easy->request->getProtocolVersion(); 241 if ($version == 1.1) { 324 325 if ('2' === $version || '2.0' === $version) { 326 $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0; 327 } elseif ('1.1' === $version) { 242 328 $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1; 243 } elseif ($version == 2.0) {244 $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0;245 329 } else { 246 330 $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_0; … … 397 481 // sets a matching 'Accept-Encoding' header. 398 482 $conf[\CURLOPT_ENCODING] = ''; 399 // But as the user did not specify any acceptable encodings we need 400 // to overwrite this implicit header with an empty one. 483 // But as the user did not specify any encoding preference, 484 // let's leave it up to server by preventing curl from sending 485 // the header, which will be interpreted as 'Accept-Encoding: *'. 486 // https://www.rfc-editor.org/rfc/rfc9110#field.accept-encoding 401 487 $conf[\CURLOPT_HTTPHEADER][] = 'Accept-Encoding:'; 402 488 } … … 462 548 463 549 if (isset($options['crypto_method'])) { 464 if (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) { 465 if (!defined('CURL_SSLVERSION_TLSv1_0')) { 466 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.0 not supported by your version of cURL'); 467 } 550 $protocolVersion = $easy->request->getProtocolVersion(); 551 552 // If HTTP/2, upgrade TLS 1.0 and 1.1 to 1.2 553 if ('2' === $protocolVersion || '2.0' === $protocolVersion) { 554 if ( 555 \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method'] 556 || \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method'] 557 || \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method'] 558 ) { 559 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2; 560 } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) { 561 if (!self::supportsTls13()) { 562 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL'); 563 } 564 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_3; 565 } else { 566 throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); 567 } 568 } elseif (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) { 468 569 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_0; 469 570 } elseif (\STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method']) { 470 if (!defined('CURL_SSLVERSION_TLSv1_1')) {471 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.1 not supported by your version of cURL');472 }473 571 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_1; 474 572 } elseif (\STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']) { 475 if (! defined('CURL_SSLVERSION_TLSv1_2')) {573 if (!self::supportsTls12()) { 476 574 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.2 not supported by your version of cURL'); 477 575 } 478 576 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2; 479 577 } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) { 480 if (! defined('CURL_SSLVERSION_TLSv1_3')) {578 if (!self::supportsTls13()) { 481 579 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL'); 482 580 } -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
r3042153 r3225789 9 9 namespace MosparoDependencies\GuzzleHttp\Handler; 10 10 11 use Closure; 11 12 use MosparoDependencies\GuzzleHttp\Promise as P; 12 13 use MosparoDependencies\GuzzleHttp\Promise\Promise; … … 166 167 } 167 168 169 // Run curl_multi_exec in the queue to enable other async tasks to run 170 P\Utils::queue()->add(Closure::fromCallable([$this, 'tickInQueue'])); 171 168 172 // Step through the task queue which may add additional requests. 169 173 P\Utils::queue()->run(); … … 176 180 177 181 while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) { 182 // Prevent busy looping for slow HTTP requests. 183 \curl_multi_select($this->_mh, $this->selectTimeout); 178 184 } 179 185 180 186 $this->processMessages(); 187 } 188 189 /** 190 * Runs \curl_multi_exec() inside the event loop, to prevent busy looping 191 */ 192 private function tickInQueue(): void 193 { 194 if (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) { 195 \curl_multi_select($this->_mh, 0); 196 P\Utils::queue()->add(Closure::fromCallable([$this, 'tickInQueue'])); 197 } 181 198 } 182 199 -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/Handler/MockHandler.php
r3042153 r3225789 59 59 * @param callable|null $onRejected Callback to invoke when the return value is rejected. 60 60 */ 61 public static function createWithMiddleware( array $queue = null, callable $onFulfilled = null,callable $onRejected = null): HandlerStack61 public static function createWithMiddleware(?array $queue = null, ?callable $onFulfilled = null, ?callable $onRejected = null): HandlerStack 62 62 { 63 63 return HandlerStack::create(new self($queue, $onFulfilled, $onRejected)); … … 66 66 /** 67 67 * The passed in value must be an array of 68 * {@see \Psr\Http\Message\ResponseInterface} objects, Exceptions,68 * {@see ResponseInterface} objects, Exceptions, 69 69 * callables, or Promises. 70 70 * … … 73 73 * @param callable|null $onRejected Callback to invoke when the return value is rejected. 74 74 */ 75 public function __construct( array $queue = null, callable $onFulfilled = null,callable $onRejected = null)75 public function __construct(?array $queue = null, ?callable $onFulfilled = null, ?callable $onRejected = null) 76 76 { 77 77 $this->onFulfilled = $onFulfilled; … … 207 207 RequestInterface $request, 208 208 array $options, 209 ResponseInterface $response = null,209 ?ResponseInterface $response = null, 210 210 $reason = null 211 211 ): void { -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/Handler/StreamHandler.php
r3042153 r3225789 45 45 if (isset($options['delay'])) { 46 46 \usleep($options['delay'] * 1000); 47 } 48 49 $protocolVersion = $request->getProtocolVersion(); 50 51 if ('1.0' !== $protocolVersion && '1.1' !== $protocolVersion) { 52 throw new ConnectException(sprintf('HTTP/%s is not supported by the stream handler.', $protocolVersion), $request); 47 53 } 48 54 … … 90 96 RequestInterface $request, 91 97 ?float $startTime, 92 ResponseInterface $response = null,93 \Throwable $error = null98 ?ResponseInterface $response = null, 99 ?\Throwable $error = null 94 100 ): void { 95 101 if (isset($options['on_stats'])) { … … 280 286 // HTTP/1.1 streams using the PHP stream wrapper require a 281 287 // Connection: close header 282 if ($request->getProtocolVersion() == '1.1'288 if ($request->getProtocolVersion() === '1.1' 283 289 && !$request->hasHeader('Connection') 284 290 ) { -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/HandlerStack.php
r3042153 r3225789 51 51 * system will be utilized. 52 52 */ 53 public static function create( callable $handler = null): self53 public static function create(?callable $handler = null): self 54 54 { 55 55 $stack = new self($handler ?: Utils::chooseHandler()); … … 65 65 * @param (callable(RequestInterface, array): PromiseInterface)|null $handler Underlying HTTP handler. 66 66 */ 67 public function __construct( callable $handler = null)67 public function __construct(?callable $handler = null) 68 68 { 69 69 $this->handler = $handler; … … 138 138 * @param string $name Name to register for this middleware. 139 139 */ 140 public function unshift(callable $middleware, string $name = null): void140 public function unshift(callable $middleware, ?string $name = null): void 141 141 { 142 142 \array_unshift($this->stack, [$middleware, $name]); -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/MessageFormatter.php
r3042153 r3225789 75 75 * @param \Throwable|null $error Exception that was received 76 76 */ 77 public function format(RequestInterface $request, ResponseInterface $response = null,\Throwable $error = null): string77 public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string 78 78 { 79 79 $cache = []; -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/MessageFormatterInterface.php
r3042153 r3225789 21 21 * @param \Throwable|null $error Exception that was received 22 22 */ 23 public function format(RequestInterface $request, ResponseInterface $response = null,\Throwable $error = null): string;23 public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string; 24 24 } -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/Middleware.php
r3042153 r3225789 62 62 * @return callable(callable): callable Returns a function that accepts the next handler. 63 63 */ 64 public static function httpErrors( BodySummarizerInterface $bodySummarizer = null): callable64 public static function httpErrors(?BodySummarizerInterface $bodySummarizer = null): callable 65 65 { 66 66 return static function (callable $handler) use ($bodySummarizer): callable { … … 139 139 * @return callable Returns a function that accepts the next handler. 140 140 */ 141 public static function tap( callable $before = null,callable $after = null): callable141 public static function tap(?callable $before = null, ?callable $after = null): callable 142 142 { 143 143 return static function (callable $handler) use ($before, $after): callable { … … 183 183 * @return callable Returns a function that accepts the next handler. 184 184 */ 185 public static function retry(callable $decider, callable $delay = null): callable185 public static function retry(callable $decider, ?callable $delay = null): callable 186 186 { 187 187 return static function (callable $handler) use ($decider, $delay): RetryMiddleware { -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php
r3042153 r3225789 83 83 $expect = $options['expect'] ?? null; 84 84 85 // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.086 if ($expect === false || $request->getProtocolVersion() < 1.1) {85 // Return if disabled or using HTTP/1.0 86 if ($expect === false || $request->getProtocolVersion() === '1.0') { 87 87 return; 88 88 } -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/RequestOptions.php
r3042153 r3225789 68 68 * jar to use or what cookies to send. This option only works if your 69 69 * handler has the `cookie` middleware. Valid values are `false` and 70 * an instance of {@see \GuzzleHttp\Cookie\CookieJarInterface}.70 * an instance of {@see Cookie\CookieJarInterface}. 71 71 */ 72 72 public const COOKIES = 'cookies'; -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/RetryMiddleware.php
r3042153 r3225789 47 47 * milliseconds to delay. 48 48 */ 49 public function __construct(callable $decider, callable $nextHandler, callable $delay = null)49 public function __construct(callable $decider, callable $nextHandler, ?callable $delay = null) 50 50 { 51 51 $this->decider = $decider; … … 117 117 } 118 118 119 private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null): PromiseInterface119 private function doRetry(RequestInterface $request, array $options, ?ResponseInterface $response = null): PromiseInterface 120 120 { 121 121 $options['delay'] = ($this->delay)(++$options['retries'], $response, $request); -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/TransferStats.php
r3042153 r3225789 53 53 public function __construct( 54 54 RequestInterface $request, 55 ResponseInterface $response = null,56 float $transferTime = null,55 ?ResponseInterface $response = null, 56 ?float $transferTime = null, 57 57 $handlerErrorData = null, 58 58 array $handlerStats = [] -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/guzzle/src/Utils.php
r3042153 r3225789 78 78 } 79 79 80 return \MosparoDependencies\GuzzleHttp\Psr7\Utils::tryFopen('php://output', 'w');80 return Psr7\Utils::tryFopen('php://output', 'w'); 81 81 } 82 82 … … 94 94 $handler = null; 95 95 96 if (\defined('CURLOPT_CUSTOMREQUEST') ) {96 if (\defined('CURLOPT_CUSTOMREQUEST') && \function_exists('curl_version') && version_compare(curl_version()['version'], '7.21.2') >= 0) { 97 97 if (\function_exists('curl_multi_exec') && \function_exists('curl_exec')) { 98 98 $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler()); -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/promises/src/Coroutine.php
r3042153 r3225789 91 91 92 92 public function then( 93 callable $onFulfilled = null,94 callable $onRejected = null93 ?callable $onFulfilled = null, 94 ?callable $onRejected = null 95 95 ): PromiseInterface { 96 96 return $this->result->then($onFulfilled, $onRejected); -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/promises/src/Each.php
r3042153 r3225789 30 30 public static function of( 31 31 $iterable, 32 callable $onFulfilled = null,33 callable $onRejected = null32 ?callable $onFulfilled = null, 33 ?callable $onRejected = null 34 34 ): PromiseInterface { 35 35 return (new EachPromise($iterable, [ … … 53 53 $iterable, 54 54 $concurrency, 55 callable $onFulfilled = null,56 callable $onRejected = null55 ?callable $onFulfilled = null, 56 ?callable $onRejected = null 57 57 ): PromiseInterface { 58 58 return (new EachPromise($iterable, [ … … 74 74 $iterable, 75 75 $concurrency, 76 callable $onFulfilled = null76 ?callable $onFulfilled = null 77 77 ): PromiseInterface { 78 78 return self::ofLimit( -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/promises/src/FulfilledPromise.php
r3042153 r3225789 38 38 39 39 public function then( 40 callable $onFulfilled = null,41 callable $onRejected = null40 ?callable $onFulfilled = null, 41 ?callable $onRejected = null 42 42 ): PromiseInterface { 43 43 // Return itself if there is no onFulfilled function. -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/promises/src/Promise.php
r3042153 r3225789 32 32 */ 33 33 public function __construct( 34 callable $waitFn = null,35 callable $cancelFn = null34 ?callable $waitFn = null, 35 ?callable $cancelFn = null 36 36 ) { 37 37 $this->waitFn = $waitFn; … … 40 40 41 41 public function then( 42 callable $onFulfilled = null,43 callable $onRejected = null42 ?callable $onFulfilled = null, 43 ?callable $onRejected = null 44 44 ): PromiseInterface { 45 45 if ($this->state === self::PENDING) { -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/promises/src/PromiseInterface.php
r3042153 r3225789 34 34 */ 35 35 public function then( 36 callable $onFulfilled = null,37 callable $onRejected = null36 ?callable $onFulfilled = null, 37 ?callable $onRejected = null 38 38 ): PromiseInterface; 39 39 -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/promises/src/RejectedPromise.php
r3042153 r3225789 38 38 39 39 public function then( 40 callable $onFulfilled = null,41 callable $onRejected = null40 ?callable $onFulfilled = null, 41 ?callable $onRejected = null 42 42 ): PromiseInterface { 43 43 // If there's no onRejected callback then just return self. -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/promises/src/RejectionException.php
r3042153 r3225789 25 25 * @param string|null $description Optional description. 26 26 */ 27 public function __construct($reason, string $description = null)27 public function __construct($reason, ?string $description = null) 28 28 { 29 29 $this->reason = $reason; -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/promises/src/Utils.php
r3042153 r3225789 28 28 * @param TaskQueueInterface|null $assign Optionally specify a new queue instance. 29 29 */ 30 public static function queue( TaskQueueInterface $assign = null): TaskQueueInterface30 public static function queue(?TaskQueueInterface $assign = null): TaskQueueInterface 31 31 { 32 32 static $queue; … … 151 151 }, 152 152 function ($reason, $idx, Promise $aggregate): void { 153 $aggregate->reject($reason); 153 if (Is::pending($aggregate)) { 154 $aggregate->reject($reason); 155 } 154 156 } 155 157 )->then(function () use (&$results) { -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/psr7/src/CachingStream.php
r3042153 r3225789 40 40 public function __construct( 41 41 StreamInterface $stream, 42 StreamInterface $target = null42 ?StreamInterface $target = null 43 43 ) { 44 44 $this->remoteStream = $stream; -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/psr7/src/HttpFactory.php
r3042153 r3225789 34 34 public function createUploadedFile( 35 35 StreamInterface $stream, 36 int $size = null,36 ?int $size = null, 37 37 int $error = \UPLOAD_ERR_OK, 38 string $clientFilename = null,39 string $clientMediaType = null38 ?string $clientFilename = null, 39 ?string $clientMediaType = null 40 40 ): UploadedFileInterface { 41 41 if ($size === null) { -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/psr7/src/MultipartStream.php
r3042153 r3225789 39 39 * @throws \InvalidArgumentException 40 40 */ 41 public function __construct(array $elements = [], string $boundary = null)41 public function __construct(array $elements = [], ?string $boundary = null) 42 42 { 43 43 $this->boundary = $boundary ?: bin2hex(random_bytes(20)); -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/psr7/src/Query.php
r3042153 r3225789 70 70 * encountered (like `http_build_query()` would). 71 71 * 72 * @param array $params Query string parameters. 73 * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 74 * to encode using RFC3986, or PHP_QUERY_RFC1738 75 * to encode using RFC1738. 72 * @param array $params Query string parameters. 73 * @param int|false $encoding Set to false to not encode, 74 * PHP_QUERY_RFC3986 to encode using 75 * RFC3986, or PHP_QUERY_RFC1738 to 76 * encode using RFC1738. 77 * @param bool $treatBoolsAsInts Set to true to encode as 0/1, and 78 * false as false/true. 76 79 */ 77 public static function build(array $params, $encoding = PHP_QUERY_RFC3986 ): string80 public static function build(array $params, $encoding = PHP_QUERY_RFC3986, bool $treatBoolsAsInts = true): string 78 81 { 79 82 if (!$params) { … … 93 96 } 94 97 98 $castBool = $treatBoolsAsInts ? static function ($v) { return (int) $v; } : static function ($v) { return $v ? 'true' : 'false'; }; 99 95 100 $qs = ''; 96 101 foreach ($params as $k => $v) { … … 98 103 if (!is_array($v)) { 99 104 $qs .= $k; 100 $v = is_bool($v) ? (int) $v: $v;105 $v = is_bool($v) ? $castBool($v) : $v; 101 106 if ($v !== null) { 102 107 $qs .= '='.$encoder((string) $v); … … 106 111 foreach ($v as $vv) { 107 112 $qs .= $k; 108 $vv = is_bool($vv) ? (int) $vv: $vv;113 $vv = is_bool($vv) ? $castBool($vv) : $vv; 109 114 if ($vv !== null) { 110 115 $qs .= '='.$encoder((string) $vv); -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/psr7/src/Response.php
r3042153 r3225789 103 103 $body = null, 104 104 string $version = '1.1', 105 string $reason = null105 ?string $reason = null 106 106 ) { 107 107 $this->assertStatusCodeRange($status); -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/psr7/src/StreamWrapper.php
r3042153 r3225789 76 76 } 77 77 78 public function stream_open(string $path, string $mode, int $options, string &$opened_path = null): bool78 public function stream_open(string $path, string $mode, int $options, ?string &$opened_path = null): bool 79 79 { 80 80 $options = stream_context_get_options($this->context); … … 126 126 127 127 return $resource ?? false; 128 } 129 130 /** 131 * @return array{ 132 * dev: int, 133 * ino: int, 134 * mode: int, 135 * nlink: int, 136 * uid: int, 137 * gid: int, 138 * rdev: int, 139 * size: int, 140 * atime: int, 141 * mtime: int, 142 * ctime: int, 143 * blksize: int, 144 * blocks: int 145 * }|false 146 */ 147 public function stream_stat() 148 { 149 if ($this->stream->getSize() === null) { 150 return false; 151 } 152 153 static $modeMap = [ 154 'r' => 33060, 155 'rb' => 33060, 156 'r+' => 33206, 157 'w' => 33188, 158 'wb' => 33188, 159 ]; 160 161 return [ 162 'dev' => 0, 163 'ino' => 0, 164 'mode' => $modeMap[$this->mode], 165 'nlink' => 0, 166 'uid' => 0, 167 'gid' => 0, 168 'rdev' => 0, 169 'size' => $this->stream->getSize() ?: 0, 170 'atime' => 0, 171 'mtime' => 0, 172 'ctime' => 0, 173 'blksize' => 0, 174 'blocks' => 0, 175 ]; 128 176 } 129 177 … … 145 193 * } 146 194 */ 147 public function stream_stat(): array148 {149 static $modeMap = [150 'r' => 33060,151 'rb' => 33060,152 'r+' => 33206,153 'w' => 33188,154 'wb' => 33188,155 ];156 157 return [158 'dev' => 0,159 'ino' => 0,160 'mode' => $modeMap[$this->mode],161 'nlink' => 0,162 'uid' => 0,163 'gid' => 0,164 'rdev' => 0,165 'size' => $this->stream->getSize() ?: 0,166 'atime' => 0,167 'mtime' => 0,168 'ctime' => 0,169 'blksize' => 0,170 'blocks' => 0,171 ];172 }173 174 /**175 * @return array{176 * dev: int,177 * ino: int,178 * mode: int,179 * nlink: int,180 * uid: int,181 * gid: int,182 * rdev: int,183 * size: int,184 * atime: int,185 * mtime: int,186 * ctime: int,187 * blksize: int,188 * blocks: int189 * }190 */191 195 public function url_stat(string $path, int $flags): array 192 196 { -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/psr7/src/UploadedFile.php
r3042153 r3225789 71 71 ?int $size, 72 72 int $errorStatus, 73 string $clientFilename = null,74 string $clientMediaType = null73 ?string $clientFilename = null, 74 ?string $clientMediaType = null 75 75 ) { 76 76 $this->setError($errorStatus); -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/psr7/src/Uri.php
r3042153 r3225789 286 286 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.4 287 287 */ 288 public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool288 public static function isSameDocumentReference(UriInterface $uri, ?UriInterface $base = null): bool 289 289 { 290 290 if ($base !== null) { -
mosparo-integration/trunk/vendor-prefixed/guzzlehttp/psr7/src/Utils.php
r3042153 r3225789 238 238 * @param int|null $maxLength Maximum buffer length 239 239 */ 240 public static function readLine(StreamInterface $stream, int $maxLength = null): string240 public static function readLine(StreamInterface $stream, ?int $maxLength = null): string 241 241 { 242 242 $buffer = ''; … … 255 255 256 256 return $buffer; 257 } 258 259 /** 260 * Redact the password in the user info part of a URI. 261 */ 262 public static function redactUserInfo(UriInterface $uri): UriInterface 263 { 264 $userInfo = $uri->getUserInfo(); 265 266 if (false !== ($pos = \strpos($userInfo, ':'))) { 267 return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***'); 268 } 269 270 return $uri; 257 271 } 258 272
Note: See TracChangeset
for help on using the changeset viewer.