From 293074d44973e6d047edf0bc0d0443d5588d1feb Mon Sep 17 00:00:00 2001 From: soyuka Date: Sat, 8 May 2021 17:02:38 +0200 Subject: [PATCH] chore: symfony/http-client:^5.3 implements HttpClientInterface::withOptions in the HttpClientTrait --- src/Bridge/Symfony/Bundle/Test/Client.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Bridge/Symfony/Bundle/Test/Client.php b/src/Bridge/Symfony/Bundle/Test/Client.php index 68071863333..1a08ca6b385 100644 --- a/src/Bridge/Symfony/Bundle/Test/Client.php +++ b/src/Bridge/Symfony/Bundle/Test/Client.php @@ -244,4 +244,16 @@ private static function extractHeaders(array $options): array return $headers; } + + /** + * {@inheritdoc} + * TODO: Delete this when we can use symfony/http-client:^5.3. + */ + public function withOptions(array $options): self + { + $clone = clone $this; + $clone->defaultOptions = self::mergeDefaultOptions($options, $this->defaultOptions); + + return $clone; + } }