<p dir="auto">Hi,<br>
I am sure this will not be for 2.x series. Somethings that I like if you are making the 3.0 move.</p>
<p dir="auto">I have been looking the <a href="https://github.com/symfony/Routing/blob/48c201da53b7c3b787609b0f6702456b86939577/Matcher/RequestMatcherInterface.php#L38">https://github.com/symfony/Routing/blob/48c201da53b7c3b787609b0f6702456b86939577/Matcher/RequestMatcherInterface.php#L38</a></p>
<p dir="auto">and the method</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="     public function matchRequest(Request $request)
    {
        $this-&gt;request = $request;

        $ret = $this-&gt;match($request-&gt;getPathInfo());

        $this-&gt;request = null;

        return $ret;
    }"><pre class="notranslate">     <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">matchRequest</span>(<span class="pl-smi"><span class="pl-smi">Request</span></span> <span class="pl-s1"><span class="pl-c1">$</span>request</span>)
    {
        <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">request</span> = <span class="pl-s1"><span class="pl-c1">$</span>request</span>;

        <span class="pl-s1"><span class="pl-c1">$</span>ret</span> = <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-en">match</span>(<span class="pl-s1"><span class="pl-c1">$</span>request</span>-&gt;<span class="pl-en">getPathInfo</span>());

        <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">request</span> = <span class="pl-c1">null</span>;

        <span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span>ret</span>;
    }</pre></div>
<p dir="auto">defined in <a href="https://github.com/symfony/Routing/blob/48c201da53b7c3b787609b0f6702456b86939577/Matcher/RequestMatcherInterface.php#L38">https://github.com/symfony/Routing/blob/48c201da53b7c3b787609b0f6702456b86939577/Matcher/RequestMatcherInterface.php#L38</a></p>
<p dir="auto">for the request is made to null. And the only functionality is to get the path and pass to the match method.</p>
<p dir="auto">Why not remove the matchRequest itself ?</p>
<p dir="auto">So it can be made like</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$parameters = $matcher-&gt;match($request-&gt;getPathInfo());"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>parameters</span> = <span class="pl-s1"><span class="pl-c1">$</span>matcher</span>-&gt;<span class="pl-en">match</span>(<span class="pl-s1"><span class="pl-c1">$</span>request</span>-&gt;<span class="pl-en">getPathInfo</span>());</pre></div>
<p dir="auto">Also I am seeing the Request from Context can be moved out to make a bundle to wrap the Router and Http rather than keeping inside the class.</p>
<p dir="auto">I would like to see Symfony 3.0 as much more better standalone components. And bundles which wraps the components so they can use Symfony/RouterHttpFoundationBundle/Router or something like that for easy usage. So others who make use of standalone don't need to bother too much.</p>
<p dir="auto">Thank you for hearing.</p>
<p dir="auto">this will make it possible to do content type negotiation inside the Routing.<br>
will try to implement this on todays train ride :)</p>
<p dir="auto">/cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/couac/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/couac">@couac</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/liuggio/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/liuggio">@liuggio</a></p>