From 95b4f443a4778f7bf4e9efefed8048964b7b4dd9 Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Sun, 9 Aug 2026 16:41:55 +0200 Subject: [PATCH 1/3] drop php 8.4 support --- CHANGELOG.md | 6 ++++++ composer.json | 2 +- psalm.xml | 3 --- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed642ea..e7d7cc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [Unreleased] + +### Changed + +- Requires PHP `8.5` + ## 9.1.0 - 2026-04-09 ### Added diff --git a/composer.json b/composer.json index 3b999e1..04f04eb 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "issues": "http://github.com/Innmind/HttpTransport/issues" }, "require": { - "php": "~8.4", + "php": "~8.5", "ext-curl": "*", "innmind/http": "~9.0", "innmind/filesystem": "~9.0", diff --git a/psalm.xml b/psalm.xml index fa1d427..6b4a878 100644 --- a/psalm.xml +++ b/psalm.xml @@ -14,7 +14,4 @@ - - - From 947e7bba12e0e68b9ca50c2cf1db961da507fbb3 Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Sun, 9 Aug 2026 16:50:26 +0200 Subject: [PATCH 2/3] httpbin requires a user agent now --- tests/CurlTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/CurlTest.php b/tests/CurlTest.php index 4c1fd70..ba540ba 100644 --- a/tests/CurlTest.php +++ b/tests/CurlTest.php @@ -19,6 +19,8 @@ Method, ProtocolVersion, Headers, + Header, + Header\Value, Header\Date, Header\Location, }; @@ -503,6 +505,9 @@ public function testTimeout() Url::of("https://http$server.org/delay/2"), Method::get, ProtocolVersion::v11, + Headers::of( + Header::of('User-Agent', Value::of('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5.2 Safari/605.1.15')), + ) ); $result = ($this->curl)($request)->match( From 3145049278f54f4cb312a0616146b899e7ce3461 Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Sun, 9 Aug 2026 16:51:29 +0200 Subject: [PATCH 3/3] add user agent on both requests --- tests/CurlTest.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/CurlTest.php b/tests/CurlTest.php index ba540ba..6cbf5b8 100644 --- a/tests/CurlTest.php +++ b/tests/CurlTest.php @@ -498,16 +498,17 @@ public function testReleaseResources() $this->assertSame($initialCount, \count(\get_resources('stream'))); } + #[\PHPUnit\Framework\Attributes\Group('wip')] public function testTimeout() { + $userAgent = Header::of('User-Agent', Value::of('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5.2 Safari/605.1.15')); + foreach (['bin', 'bun'] as $server) { $request = Request::of( Url::of("https://http$server.org/delay/2"), Method::get, ProtocolVersion::v11, - Headers::of( - Header::of('User-Agent', Value::of('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5.2 Safari/605.1.15')), - ) + Headers::of($userAgent), ); $result = ($this->curl)($request)->match( @@ -528,6 +529,7 @@ public function testTimeout() ProtocolVersion::v11, Headers::of( Timeout::of(1), + $userAgent, ), );