Closed nikita2206 closed 8 years ago
I had the same issue after update to 4.5.0
Rewrite all my client->get($uri)
where $uri had a query string (/api?someparam=value) with client->get($uriWithoutQueryString, array('query' => array('someparam' => 'value')));
Okay, that's a bug, cause it was not planned to change the behavior. Will check that later.
We just ran into the same regression. For now, we rolled back to v4.4.1, which worked fine for us.
Released new version: https://github.com/8p/GuzzleBundle/releases/tag/v4.5.1
Apparently commit d79f2fc324c5f7d58e1169fb857fd14beb5e760b (in version 4.5.0) indirectly broke a simple use case when not using this option at all.
If you try to pass a
$uri
to theClient#request()
method (or any of therequest
family for that matter) which containsquery
, Guzzle will disregard it and instead it will usequery
from the$options
array. Even though we didn't putquery
in the$options
array, GuzzleBundle put it in the default options array (or default config - Client constructor's first argument) as an emptyarray()
(because symfony configuration component provides default value if one is not present) and after guzzle merges$options
with$this->config
it now has aquery
element.Should be easy to fix in GuzzleExtension by unsetting
query
from$options
array after line 54 if it is an empty array.