<p dir="auto">see discussion here:</p>
<p dir="auto"><a href="https://groups.google.com/group/symfony-devs/browse_thread/thread/92ae24eafd13e29e?hl=en" rel="nofollow">https://groups.google.com/group/symfony-devs/browse_thread/thread/92ae24eafd13e29e?hl=en</a></p>
<p dir="auto">Is there a reason why Request class doesn't have a setUrl method? I really wish to do this:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$request = Request::createFromGlobals();
$request-&gt;setUrl(&quot;http://www.yahoo.com&quot;);"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>request</span> = <span class="pl-v">Request</span>::<span class="pl-en">createFromGlobals</span>();
<span class="pl-s1"><span class="pl-c1">$</span>request</span>-&gt;<span class="pl-en">setUrl</span>("<span class="pl-s">http://www.yahoo.com</span>");</pre></div>
<p dir="auto">but I can't without creating another instance of Request and copying all of its data minus the URL into the new.</p>