core-bundle/src/Routing/Matcher/UrlMatcher.php
public function finalMatch(RouteCollection $collection, Request $request)
    {
        $this->routes = $collection;

        $context = new RequestContext();
        $context->fromRequest($request);
        $context->setHost($request->getHttpHost());

        $this->setContext($context);

        return $this->matchRequest($request);
    }
public function finalMatch(RouteCollection $collection, Request $request)
    {
        $this->routes = $collection;

        $context = new RequestContext();
        $context->fromRequest($request);
        $context->setHost($request->getHttpHost());

        $this->setContext($context);

        return $this->matchRequest($request);
    }
{@inheritdoc}