Skip to content

Commit 1fc42d8

Browse files
bug symfony#61534 [HttpClient] Fix PHP 8.5 deprecation using str_increment() (nicolas-grekas)
This PR was merged into the 6.4 branch. Discussion ---------- [HttpClient] Fix PHP 8.5 deprecation using str_increment() | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | - | License | MIT > Increment on non-numeric string is deprecated, use str_increment() instead Commits ------- 3e999e3 [HttpClient] Fix PHP 8.5 deprecation using str_increment()
2 parents 179b553 + 3e999e3 commit 1fc42d8

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"symfony/polyfill-intl-idn": "^1.10",
5656
"symfony/polyfill-intl-normalizer": "~1.0",
5757
"symfony/polyfill-mbstring": "~1.0",
58-
"symfony/polyfill-php83": "^1.28",
58+
"symfony/polyfill-php83": "^1.29",
5959
"symfony/polyfill-uuid": "^1.15"
6060
},
6161
"replace": {

src/Symfony/Component/HttpClient/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
});

src/Symfony/Component/HttpClient/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)