title: symfony/Routing and request context
body: <p>Reading symfony/Routing <a href="https://github.com/symfony/Routing" rel="nofollow">readme</a>:</p>
  
  <pre><code>// ...
  
  $context = new RequestContext();
  
  // this is optional and can be done without a Request instance
  $context-&gt;fromRequest(Request::createFromGlobals());
  
  $matcher = new UrlMatcher($routes, $context);
  </code></pre>
  
  <p>What does it mean it's optional? Matcher functionality is somehow limited without it? How Request object is used by matcher?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I found that RouteListener takes care of updating context with current request information (host, method etc.). So this optional step is not needed when route matching is done via event dispatcher.</p>