guzzle/guzzle — pull request #544 by mtdowling (2014-01-30 21:39:57+00:00)
Title: Changes empty query string value serialization

Previously, the only way to se empty query string variables that had no value (e.g., "foo" rather than "foo=") was to use the magic `"_guzzle_blank_"` variable. This variable was then added in 3.8.1 to query string values when parsing a query string so that when the query string is again cast to a string it would not include the "=" sign. This works, but introduces pain points when working with these parsed query strings because the data contained in the query string object now needs special handling (you must check if the value is `"_guzzle_blank_"` to see if it should actually be empty). This change introduced an asymmetry between how a query string is serialized vs how it is inspected.

The `"_guzzle_blank_"` logic was introduced due to #96. I believe the change introduced as a result was the wrong decision and this commit hopes to address it.

This change now makes `false`, `null`, and `"_guzzle_blank_"` all act as query string fields that contain no value (meaning no trailing equal sign). This change marked the use of `"_guzzle_blank_"` as deprecated. If you still wish for an emtpy query string value that includes a trailing "=", then use an empty string (i.e., `""`).

Here's an example of how the proposed change will affect query string serialization:

Given a `Guzzle\Http\QueryString` object `$q`, adding the values on left will serialize to the string on the right:

* `$q->set('foo', null)` => `"foo"` (previously `"foo="`)
* `$q->set('foo', false)` => `"foo"` (previously `"foo="`)
* `$q->set('foo', '_guzzle_blank_')` => `"foo"` (unchanged)
* `$q->set('foo', '')` => `"foo="` (unchanged)