Skip to content

Commit 3bb26da

Browse files
Merge branch '7.3' into 7.4
* 7.3: [Filesystem] Unify logic for isAbsolute() in Path [Twig] Ensure WrappedTemplatedEmail::getReturnPath() returns a string [Console] Add missing VERBOSITY_SILENT case in CommandDataCollector [HttpClient] Reject 3xx pushed responses [ProxyManagerBridge] Remove comment that reference github discussion [ErrorHandler] Improve PHPDoc precision in SerializerErrorRenderer [Routing] Fix matching the "0" URL [Form] Fix EnumType choice_label logic for grouped choices The BrowserKit history with parameter separator without slash.
2 parents abec2fa + e9a9fd6 commit 3bb26da

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

AbstractBrowser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ protected function getAbsoluteUri(string $uri): string
669669
$uri = $path.$uri;
670670
}
671671

672-
return preg_replace('#^(.*?//[^/]+)\/.*$#', '$1', $currentUri).$uri;
672+
return preg_replace('#^(.*?//[^/?]+)[/?].*$#', '$1', $currentUri).$uri;
673673
}
674674

675675
/**

Tests/AbstractBrowserTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,15 @@ public function testInternalRequestNull()
893893
$client->getInternalRequest();
894894
}
895895

896+
public function testHistoryWithParametersAndNoSlash()
897+
{
898+
$client = $this->getBrowser();
899+
$client->request('GET', 'https://www.example.com?the=value');
900+
$client->request('GET', '/path/?parameter=value');
901+
902+
$this->assertSame('https://www.example.com/path/?parameter=value', $client->getRequest()->getUri(), '->request() history provides proper base.');
903+
}
904+
896905
public function testFollowRedirectWithoutRequest()
897906
{
898907
$browser = $this->getBrowser();

0 commit comments

Comments
 (0)