Skip to content

Commit b8e9dce

Browse files
[HttpClient] Fix PHP 8.5 deprecation using str_increment()
1 parent e9683ee commit b8e9dce

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Response/AmpResponse.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ public function __construct(AmpClientState $multi, Request $request, array $opti
9999

100100
$throttleWatcher = null;
101101

102-
$this->id = $id = self::$nextId++;
102+
$this->id = $id = self::$nextId;
103+
self::$nextId = str_increment(self::$nextId);
103104
Loop::defer(static function () use ($request, $multi, $id, &$info, &$headers, $canceller, &$options, $onProgress, &$handle, $logger, &$pause) {
104105
return new Coroutine(self::generateResponse($request, $multi, $id, $info, $headers, $canceller, $options, $onProgress, $handle, $logger, $pause));
105106
});

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"psr/log": "^1|^2|^3",
2727
"symfony/deprecation-contracts": "^2.5|^3",
2828
"symfony/http-client-contracts": "~3.4.4|^3.5.2",
29+
"symfony/polyfill-php83": "^1.29",
2930
"symfony/service-contracts": "^2.5|^3"
3031
},
3132
"require-dev": {

0 commit comments

Comments
 (0)