From 2ddf09b6645564d2b7dd4e2358e28de81c3a87e4 Mon Sep 17 00:00:00 2001 From: Philipp Date: Fri, 6 Oct 2023 12:08:56 +0200 Subject: [PATCH] [HttpClient] Fix type error with http_version 1.1 Fix a type error by removing a nested setProtocolVersions() call in AmpHttpClient::request() --- src/Symfony/Component/HttpClient/AmpHttpClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpClient/AmpHttpClient.php b/src/Symfony/Component/HttpClient/AmpHttpClient.php index 26b1977314deb..341961ee7fa9e 100644 --- a/src/Symfony/Component/HttpClient/AmpHttpClient.php +++ b/src/Symfony/Component/HttpClient/AmpHttpClient.php @@ -122,7 +122,7 @@ public function request(string $method, string $url, array $options = []): Respo if ($options['http_version']) { $request->setProtocolVersions(match ((float) $options['http_version']) { 1.0 => ['1.0'], - 1.1 => $request->setProtocolVersions(['1.1', '1.0']), + 1.1 => ['1.1', '1.0'], default => ['2', '1.1', '1.0'], }); }