You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR was merged into the 2.2 branch.
Commits
-------
30b0c37 [Router] Fix TraceableUrlMatcher
Discussion
----------
[BugFix][Router] Fix TraceableUrlMatcher
TraceableUrlMatcher does not take care with new host route features
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6744
| License | MIT
| Doc PR | n/a
Copy file name to clipboardExpand all lines: src/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,14 @@ protected function matchCollection($pathinfo, RouteCollection $routes)
70
70
continue;
71
71
}
72
72
73
+
// check host requirement
74
+
$hostMatches = array();
75
+
if ($compiledRoute->getHostRegex() && !preg_match($compiledRoute->getHostRegex(), $this->context->getHost(), $hostMatches)) {
76
+
$this->addTrace(sprintf('Host "%s" does not match the required ("%s")', $route->getHost(), $this->context->getHost()), self::ROUTE_ALMOST_MATCHES, $name, $route);
0 commit comments