aboutsummaryrefslogtreecommitdiff
path: root/vendor/guzzlehttp/guzzle/src
diff options
context:
space:
mode:
authorwn_ <invalid@email.com>2025-08-24 14:40:07 +0000
committerwn_ <invalid@email.com>2025-08-24 14:40:07 +0000
commit618cb5bf7830d90e670e8cd1fd114b06173ab374 (patch)
treef74a50e6f5e2579af2c962892e91534725054c9d /vendor/guzzlehttp/guzzle/src
parentf7fc00326e2f51f269f26b24a54d34e07a36846e (diff)
Bump Guzzle to 7.10.0 for PHP 8.5 compatibility.
https://github.com/guzzle/guzzle/compare/7.9.2...7.10.0
Diffstat (limited to 'vendor/guzzlehttp/guzzle/src')
-rw-r--r--vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php4
-rw-r--r--vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php9
-rw-r--r--vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php5
-rw-r--r--vendor/guzzlehttp/guzzle/src/Handler/Proxy.php12
-rw-r--r--vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php19
-rw-r--r--vendor/guzzlehttp/guzzle/src/Middleware.php4
-rw-r--r--vendor/guzzlehttp/guzzle/src/Pool.php2
-rw-r--r--vendor/guzzlehttp/guzzle/src/Utils.php2
-rw-r--r--vendor/guzzlehttp/guzzle/src/functions.php2
9 files changed, 42 insertions, 17 deletions
diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php
index c9806da88..47c4d10ae 100644
--- a/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php
+++ b/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php
@@ -62,6 +62,10 @@ class SetCookie
if (is_numeric($value)) {
$data[$search] = (int) $value;
}
+ } elseif ($search === 'Secure' || $search === 'Discard' || $search === 'HttpOnly') {
+ if ($value) {
+ $data[$search] = true;
+ }
} else {
$data[$search] = $value;
}
diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php
index fe3613751..3c1fa9c13 100644
--- a/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php
+++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php
@@ -125,7 +125,9 @@ class CurlFactory implements CurlFactoryInterface
unset($easy->handle);
if (\count($this->handles) >= $this->maxHandles) {
- \curl_close($resource);
+ if (PHP_VERSION_ID < 80000) {
+ \curl_close($resource);
+ }
} else {
// Remove all callback functions as they can hold onto references
// and are not cleaned up by curl_reset. Using curl_setopt_array
@@ -729,7 +731,10 @@ class CurlFactory implements CurlFactoryInterface
public function __destruct()
{
foreach ($this->handles as $id => $handle) {
- \curl_close($handle);
+ if (PHP_VERSION_ID < 80000) {
+ \curl_close($handle);
+ }
+
unset($this->handles[$id]);
}
}
diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
index 73a6abe33..21abbedf3 100644
--- a/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
+++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
@@ -240,7 +240,10 @@ class CurlMultiHandler
$handle = $this->handles[$id]['easy']->handle;
unset($this->delays[$id], $this->handles[$id]);
\curl_multi_remove_handle($this->_mh, $handle);
- \curl_close($handle);
+
+ if (PHP_VERSION_ID < 80000) {
+ \curl_close($handle);
+ }
return true;
}
diff --git a/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php b/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php
index f045b526c..9df70cf23 100644
--- a/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php
+++ b/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php
@@ -17,10 +17,10 @@ class Proxy
* Sends synchronous requests to a specific handler while sending all other
* requests to another handler.
*
- * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default Handler used for normal responses
- * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $sync Handler used for synchronous responses.
+ * @param callable(RequestInterface, array): PromiseInterface $default Handler used for normal responses
+ * @param callable(RequestInterface, array): PromiseInterface $sync Handler used for synchronous responses.
*
- * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.
+ * @return callable(RequestInterface, array): PromiseInterface Returns the composed handler.
*/
public static function wrapSync(callable $default, callable $sync): callable
{
@@ -37,10 +37,10 @@ class Proxy
* performance benefits of curl while still supporting true streaming
* through the StreamHandler.
*
- * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default Handler used for non-streaming responses
- * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $streaming Handler used for streaming responses
+ * @param callable(RequestInterface, array): PromiseInterface $default Handler used for non-streaming responses
+ * @param callable(RequestInterface, array): PromiseInterface $streaming Handler used for streaming responses
*
- * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.
+ * @return callable(RequestInterface, array): PromiseInterface Returns the composed handler.
*/
public static function wrapStreaming(callable $default, callable $streaming): callable
{
diff --git a/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php
index 1d89a8fbc..f24921f47 100644
--- a/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php
+++ b/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php
@@ -53,8 +53,14 @@ class StreamHandler
$request = $request->withoutHeader('Expect');
// Append a content-length header if body size is zero to match
- // cURL's behavior.
- if (0 === $request->getBody()->getSize()) {
+ // the behavior of `CurlHandler`
+ if (
+ (
+ 0 === \strcasecmp('PUT', $request->getMethod())
+ || 0 === \strcasecmp('POST', $request->getMethod())
+ )
+ && 0 === $request->getBody()->getSize()
+ ) {
$request = $request->withHeader('Content-Length', '0');
}
@@ -327,8 +333,15 @@ class StreamHandler
);
return $this->createResource(
- function () use ($uri, &$http_response_header, $contextResource, $context, $options, $request) {
+ function () use ($uri, $contextResource, $context, $options, $request) {
$resource = @\fopen((string) $uri, 'r', false, $contextResource);
+
+ // See https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_http_response_header_predefined_variable
+ if (function_exists('http_get_last_response_headers')) {
+ /** @var array|null */
+ $http_response_header = \http_get_last_response_headers();
+ }
+
$this->lastHeaders = $http_response_header ?? [];
if (false === $resource) {
diff --git a/vendor/guzzlehttp/guzzle/src/Middleware.php b/vendor/guzzlehttp/guzzle/src/Middleware.php
index 6edbb3fe4..9901da44a 100644
--- a/vendor/guzzlehttp/guzzle/src/Middleware.php
+++ b/vendor/guzzlehttp/guzzle/src/Middleware.php
@@ -187,12 +187,12 @@ final class Middleware
* Middleware that logs requests, responses, and errors using a message
* formatter.
*
- * @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests.
- *
* @param LoggerInterface $logger Logs messages.
* @param MessageFormatterInterface|MessageFormatter $formatter Formatter used to create message strings.
* @param string $logLevel Level at which to log requests.
*
+ * @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests.
+ *
* @return callable Returns a function that accepts the next handler.
*/
public static function log(LoggerInterface $logger, $formatter, string $logLevel = 'info'): callable
diff --git a/vendor/guzzlehttp/guzzle/src/Pool.php b/vendor/guzzlehttp/guzzle/src/Pool.php
index 6277c61fb..ddc304bb1 100644
--- a/vendor/guzzlehttp/guzzle/src/Pool.php
+++ b/vendor/guzzlehttp/guzzle/src/Pool.php
@@ -86,7 +86,7 @@ class Pool implements PromisorInterface
* @param ClientInterface $client Client used to send the requests
* @param array|\Iterator $requests Requests to send concurrently.
* @param array $options Passes through the options available in
- * {@see \GuzzleHttp\Pool::__construct}
+ * {@see Pool::__construct}
*
* @return array Returns an array containing the response or an exception
* in the same order that the requests were sent.
diff --git a/vendor/guzzlehttp/guzzle/src/Utils.php b/vendor/guzzlehttp/guzzle/src/Utils.php
index df529270e..c6a5893dd 100644
--- a/vendor/guzzlehttp/guzzle/src/Utils.php
+++ b/vendor/guzzlehttp/guzzle/src/Utils.php
@@ -79,7 +79,7 @@ final class Utils
*
* The returned handler is not wrapped by any default middlewares.
*
- * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
+ * @return callable(\Psr\Http\Message\RequestInterface, array): Promise\PromiseInterface Returns the best handler for the given system.
*
* @throws \RuntimeException if no viable Handler is available.
*/
diff --git a/vendor/guzzlehttp/guzzle/src/functions.php b/vendor/guzzlehttp/guzzle/src/functions.php
index 5edc66ab1..9ab4b9649 100644
--- a/vendor/guzzlehttp/guzzle/src/functions.php
+++ b/vendor/guzzlehttp/guzzle/src/functions.php
@@ -50,7 +50,7 @@ function debug_resource($value = null)
*
* The returned handler is not wrapped by any default middlewares.
*
- * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
+ * @return callable(\Psr\Http\Message\RequestInterface, array): Promise\PromiseInterface Returns the best handler for the given system.
*
* @throws \RuntimeException if no viable Handler is available.
*