Make sure http_build_query() uses & as argument separator when assemble query params in URL.
Why?
By default, http_build_query() uses arg_separator.output from php.ini. But this may be set to anything (most often & because of some legacy apps), which will then silently break URLs assembled by the plugin.
For example Guzzle does this as well by default when assembling query strings.
Without the fix this also obviously breaks unit tests when run on our system:
---- broken examples
Http/Message/Authentication/QueryParam
29 ! authenticates a request
method call:
- withQuery("param1=value1&param2%5B0%5D=value2&userna"...)
on Double\UriInterface\P34 was not expected, expected calls were:
- getQuery()
- withQuery(exact("param1=value1¶m2%5B0%5D=value2&username=usern"...))
Checklist
[x] Updated CHANGELOG.md to describe BC breaks / deprecations | new feature | bugfix
What's in this PR?
Make sure
http_build_query()
uses&
as argument separator when assemble query params in URL.Why?
By default,
http_build_query()
uses arg_separator.output from php.ini. But this may be set to anything (most often&
because of some legacy apps), which will then silently break URLs assembled by the plugin.For example Guzzle does this as well by default when assembling query strings.
Without the fix this also obviously breaks unit tests when run on our system:
Checklist