From 114fdefbc093649105b6a40767762edf30a696f6 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Mon, 5 Aug 2024 09:12:25 +0200 Subject: [PATCH 1/5] Fix multiple CS errors --- Test/HttpClientTestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Test/HttpClientTestCase.php b/Test/HttpClientTestCase.php index 39fd701..12d1c87 100644 --- a/Test/HttpClientTestCase.php +++ b/Test/HttpClientTestCase.php @@ -25,7 +25,7 @@ abstract class HttpClientTestCase extends TestCase { public static function setUpBeforeClass(): void { - if (!function_exists('ob_gzhandler')) { + if (!\function_exists('ob_gzhandler')) { static::markTestSkipped('The "ob_gzhandler" function is not available.'); } From c0ab4b1d5e1fef0aac02ce57517f51cda082753f Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 5 Sep 2024 11:40:18 +0200 Subject: [PATCH 2/5] make test case classes compatible with PHPUnit 10+ --- Test/HttpClientTestCase.php | 4 ++++ composer.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Test/HttpClientTestCase.php b/Test/HttpClientTestCase.php index 12d1c87..14a7c1d 100644 --- a/Test/HttpClientTestCase.php +++ b/Test/HttpClientTestCase.php @@ -11,6 +11,7 @@ namespace Symfony\Contracts\HttpClient\Test; +use PHPUnit\Framework\Attributes\RequiresPhpExtension; use PHPUnit\Framework\TestCase; use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface; @@ -1013,6 +1014,7 @@ public function testNoProxy() /** * @requires extension zlib */ + #[RequiresPhpExtension('zlib')] public function testAutoEncodingRequest() { $client = $this->getHttpClient(__FUNCTION__); @@ -1086,6 +1088,7 @@ public function testInformationalResponseStream() /** * @requires extension zlib */ + #[RequiresPhpExtension('zlib')] public function testUserlandEncodingRequest() { $client = $this->getHttpClient(__FUNCTION__); @@ -1108,6 +1111,7 @@ public function testUserlandEncodingRequest() /** * @requires extension zlib */ + #[RequiresPhpExtension('zlib')] public function testGzipBroken() { $client = $this->getHttpClient(__FUNCTION__); diff --git a/composer.json b/composer.json index efb146e..a67a753 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" }, "thanks": { "name": "symfony/contracts", From 075fadd18649068440dae4667a0ab98293535235 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Thu, 26 Sep 2024 10:09:09 +0200 Subject: [PATCH 3/5] Remove unused imports --- ResponseInterface.php | 1 - 1 file changed, 1 deletion(-) diff --git a/ResponseInterface.php b/ResponseInterface.php index 387345c..a425590 100644 --- a/ResponseInterface.php +++ b/ResponseInterface.php @@ -13,7 +13,6 @@ use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface; -use Symfony\Contracts\HttpClient\Exception\ExceptionInterface; use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface; use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface; use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; From a9ba2374583cf6cb157aca5e3b1f10ec83e5d814 Mon Sep 17 00:00:00 2001 From: Kurt Thiemann Date: Thu, 5 Dec 2024 14:35:19 +0100 Subject: [PATCH 4/5] [HttpClient] Test POST to GET redirects --- Test/Fixtures/web/index.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Test/Fixtures/web/index.php b/Test/Fixtures/web/index.php index 59033d5..399f8bd 100644 --- a/Test/Fixtures/web/index.php +++ b/Test/Fixtures/web/index.php @@ -199,6 +199,16 @@ ]); exit; + + case '/custom': + if (isset($_GET['status'])) { + http_response_code((int) $_GET['status']); + } + if (isset($_GET['headers']) && is_array($_GET['headers'])) { + foreach ($_GET['headers'] as $header) { + header($header); + } + } } header('Content-Type: application/json', true); From 75d7043853a42837e68111812f4d964b01e5101c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Mon, 28 Apr 2025 17:14:25 +0200 Subject: [PATCH 5/5] align the type to the one in the human description --- ResponseInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ResponseInterface.php b/ResponseInterface.php index a425590..44611cd 100644 --- a/ResponseInterface.php +++ b/ResponseInterface.php @@ -36,7 +36,7 @@ public function getStatusCode(): int; * * @param bool $throw Whether an exception should be thrown on 3/4/5xx status codes * - * @return string[][] The headers of the response keyed by header names in lowercase + * @return array> The headers of the response keyed by header names in lowercase * * @throws TransportExceptionInterface When a network error occurs * @throws RedirectionExceptionInterface On a 3xx when $throw is true and the "max_redirects" option has been reached pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy