Skip to content

Commit 329f0cf

Browse files
Merge branch '7.3' into 7.4
* 7.3: [HttpClient] Fix PHP 8.5 deprecation using str_increment() [FrameworkBundle] Don’t collect CLI profiles if the profiler is disabled
2 parents b0f0bdf + 22a97c4 commit 329f0cf

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"symfony/polyfill-intl-idn": "^1.10",
5555
"symfony/polyfill-intl-normalizer": "~1.0",
5656
"symfony/polyfill-mbstring": "~1.0",
57-
"symfony/polyfill-php83": "^1.28",
57+
"symfony/polyfill-php83": "^1.29",
5858
"symfony/polyfill-php84": "^1.30",
5959
"symfony/polyfill-php85": "^1.32",
6060
"symfony/polyfill-uuid": "^1.15"

src/Symfony/Bundle/FrameworkBundle/EventListener/ConsoleProfilerListener.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ public function profile(ConsoleTerminateEvent $event): void
109109
return;
110110
}
111111

112+
if (!$this->profiler->isEnabled()) {
113+
return;
114+
}
115+
112116
if (null !== $sectionId = $request->attributes->get('_stopwatch_token')) {
113117
// we must close the section before saving the profile to allow late collect
114118
try {

src/Symfony/Component/HttpClient/Response/AmpResponseV4.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ public function __construct(
101101

102102
$throttleWatcher = null;
103103

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

src/Symfony/Component/HttpClient/Response/AmpResponseV5.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ public function __construct(
9696
};
9797

9898
$pause = 0.0;
99-
$this->id = $id = self::$nextId++;
99+
$this->id = $id = self::$nextId;
100+
self::$nextId = str_increment(self::$nextId);
100101

101102
$info['pause_handler'] = static function (float $duration) use (&$pause) {
102103
$pause = $duration;

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)