From 69094c8a1deea787663070306fe144daa5b891dc Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 13 Nov 2024 19:22:20 +0100 Subject: [PATCH 1/3] [Notifier] Fix GoIpTransport --- Tests/RequestTest.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Tests/RequestTest.php b/Tests/RequestTest.php index 1424da5b3..1897b3f57 100644 --- a/Tests/RequestTest.php +++ b/Tests/RequestTest.php @@ -2668,16 +2668,6 @@ public function testReservedFlags() $this->assertNotSame(0b10000000, $value, sprintf('The constant "%s" should not use the reserved value "0b10000000".', $constant)); } } - - /** - * @group legacy - */ - public function testInvalidUriCreationDeprecated() - { - $this->expectDeprecation('Since symfony/http-foundation 6.3: Calling "Symfony\Component\HttpFoundation\Request::create()" with an invalid URI is deprecated.'); - $request = Request::create('/invalid-path:123'); - $this->assertEquals('http://localhost/invalid-path:123', $request->getUri()); - } } class RequestContentProxy extends Request From 897e8a21a582989e511fb7627229f10f7d83f634 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 13 Nov 2024 19:49:08 +0100 Subject: [PATCH 2/3] [HttpFoundation] Revert risk change --- Request.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Request.php b/Request.php index 8fe7cff0d..d1103cf8a 100644 --- a/Request.php +++ b/Request.php @@ -381,11 +381,9 @@ public static function create(string $uri, string $method = 'GET', array $parame if ('https' === $components['scheme']) { $server['HTTPS'] = 'on'; $server['SERVER_PORT'] = 443; - } elseif ('http' === $components['scheme']) { + } else { unset($server['HTTPS']); $server['SERVER_PORT'] = 80; - } else { - throw new BadRequestException('Invalid URI: http(s) scheme expected.'); } } From 3f38b8af283b830e1363acd79e5bc3412d055341 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 13 Nov 2024 19:58:02 +0100 Subject: [PATCH 3/3] [HttpFoundation] Fix test --- Tests/RequestTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Tests/RequestTest.php b/Tests/RequestTest.php index 3743d9d9c..789119b6a 100644 --- a/Tests/RequestTest.php +++ b/Tests/RequestTest.php @@ -311,7 +311,6 @@ public function testCreateWithRequestUri() * [" foo"] * ["foo "] * ["//"] - * ["foo:bar"] */ public function testCreateWithBadRequestUri(string $uri) {