symfony/symfony — Issue #3314: [HttpFoundation][Request] Passed GET params to Request::create not in toUri()
Author: christiaan
Created: 2012-02-09 15:10:11+00:00
State: open

Is the following behaviour intended?

toUri(); // http://localhost/test?page=1
Request::create('/test', 'GET', array('page', 2))->toUri(); // http://localhost/test
Request::create('/test?page=1')->query->all(); // array('page' => 1)
Request::create('/test?page=1', 'GET', array('page', 2))->query->all(); // array('page' => 2)

I'm trying to use Request::create() to generate a uri but I now have to resort to http_build_query to append an array of GET variables to the uri.