10000 [HttpClient] Fix deprecation on PHP 8.3 · symfony/symfony@9407a1b · GitHub
[go: up one dir, main page]

Skip to content

Commit 9407a1b

Browse files
[HttpClient] Fix deprecation on PHP 8.3
1 parent ac07f3e commit 9407a1b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Component/HttpClient/NativeHttpClient.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,11 @@ private static function createRedirectResolver(array $options, string $host, ?ar
406406
$redirectHeaders['no_auth'] = array_filter($redirectHeaders['no_auth'], $filterContentHeaders);
407407
$redirectHeaders['with_auth'] = array_filter($redirectHeaders['with_auth'], $filterContentHeaders);
408408

409-
stream_context_set_option($context, ['http' => $options]);
409+
if (\PHP_VERSION_ID >= 80300) {
410+
stream_context_set_options($context, ['http' => $options]);
411+
} else {
412+
stream_context_set_option($context, ['http' => $options]);
413+
}
410414
}
411415
}
412416

0 commit comments

Comments
 (0)
0