Skip to content

Commit b9758c6

Browse files
Merge branch '7.4' into 8.0
* 7.4: (21 commits) [ObjectMapper] lazy loading [Filesystem] Unify logic for isAbsolute() in Path [DependencyInjection] Include return type in AppReference shape [Finder] Make method calls explicit in ExcludeDirectoryFilterIterator [Cache] Remove unset call on undefined variable in PhpArrayAdapter [Twig] Ensure WrappedTemplatedEmail::getReturnPath() returns a string [Routing] Simplify importing routes defined on controller services Fix tests [DependendcyInjection] Improve shape for "from_callable" definitions [PHPDoc] Fix various PHPDoc syntax errors [Console] Add missing VERBOSITY_SILENT case in CommandDataCollector [Notifier] Remove unused $transportName argument in EmailChannel::notify() [Translation] Remove an unused argument passed to parseNode() method [HttpClient] Reject 3xx pushed responses [Serializer] Use Asia/Tokyo instead of Japan in tests [ProxyManagerBridge] Remove comment that reference github discussion [JsonPath] Remove unused "nothing" property from JsonCrawler [ErrorHandler] Improve PHPDoc precision in SerializerErrorRenderer [Routing] Fix matching the "0" URL [Form] Fix EnumType choice_label logic for grouped choices ...
2 parents 33746d8 + 3bb26da commit b9758c6

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
@@ -639,7 +639,7 @@ protected function getAbsoluteUri(string $uri): string
639639
$uri = $path.$uri;
640640
}
641641

642-
return preg_replace('#^(.*?//[^/]+)\/.*$#', '$1', $currentUri).$uri;
642+
return preg_replace('#^(.*?//[^/?]+)[/?].*$#', '$1', $currentUri).$uri;
643643
}
644644

645645
/**

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)