From e9683ee97c0585cae64776d9a8ebd5017ff23488 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 13 Aug 2025 11:47:18 +0200 Subject: [PATCH 1/2] Remove calls to no-op functions, deprecated in PHP 8.5 --- Internal/CurlClientState.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Internal/CurlClientState.php b/Internal/CurlClientState.php index 8af4c75..60aab71 100644 --- a/Internal/CurlClientState.php +++ b/Internal/CurlClientState.php @@ -83,7 +83,6 @@ public function reset(): void foreach ($this->pushedResponses as $url => $response) { $this->logger?->debug(\sprintf('Unused pushed response: "%s"', $url)); curl_multi_remove_handle($this->handle, $response->handle); - curl_close($response->handle); } $this->pushedResponses = []; From b8e9dce2d8acba3c32af467bb58e0c3656886181 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 27 Aug 2025 09:00:16 +0200 Subject: [PATCH 2/2] [HttpClient] Fix PHP 8.5 deprecation using str_increment() --- Response/AmpResponse.php | 3 ++- composer.json | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Response/AmpResponse.php b/Response/AmpResponse.php index 3983cd8..de949b3 100644 --- a/Response/AmpResponse.php +++ b/Response/AmpResponse.php @@ -99,7 +99,8 @@ public function __construct(AmpClientState $multi, Request $request, array $opti $throttleWatcher = null; - $this->id = $id = self::$nextId++; + $this->id = $id = self::$nextId; + self::$nextId = str_increment(self::$nextId); Loop::defer(static function () use ($request, $multi, $id, &$info, &$headers, $canceller, &$options, $onProgress, &$handle, $logger, &$pause) { return new Coroutine(self::generateResponse($request, $multi, $id, $info, $headers, $canceller, $options, $onProgress, $handle, $logger, $pause)); }); diff --git a/composer.json b/composer.json index 9c9ee14..d36276c 100644 --- a/composer.json +++ b/composer.json @@ -26,6 +26,7 @@ "psr/log": "^1|^2|^3", "symfony/deprecation-contracts": "^2.5|^3", "symfony/http-client-contracts": "~3.4.4|^3.5.2", + "symfony/polyfill-php83": "^1.29", "symfony/service-contracts": "^2.5|^3" }, "require-dev": {