AppliesHeadersInterfaceto make applying headers to a request based on the body more generic and not specific to
nullwhen creating a request with a client will ensure that the option is not set. This allows you to overwrite default request options on a per-request basis. See https://github.com/guzzle/guzzle/pull/937.
protocolsarray in the
"0"is now an allowed URI path. See https://github.com/guzzle/guzzle/pull/935.
Queryno longer typehints on the
$queryargument in the constructor, allowing for strings and arrays.
endevent are now correctly wrapped with Guzzle specific exceptions if necessary.
This change updates query strings so that they are treated as un-encoded values by default where the value represents an un-encoded value to send over the wire. A Query object then encodes the value before sending over the wire. This means that even value query string values (e.g., ":") are url encoded. This makes the Query class match PHP's http_build_query function. However, if you want to send requests over the wire using valid query string characters that do not need to be encoded, then you can provide a string to Url::setQuery() and pass true as the second argument to specify that the query string is a raw string that should not be parsed or encoded (unless a call to getQuery() is subsequently made, forcing the query-string to be converted into a Query object).
to multipart/form-data payloads. See https://github.com/guzzle/guzzle/pull/871
GuzzleHttp\Pool::send()convenience method to match the docs.
application/x-www-form-urlencodedheader when sending POST requests, allowing for customized headers. See https://github.com/guzzle/guzzle/issues/877
rawStringargument is provided when setting the query string on a URL: Now allowing many more characters to be present in the query string without being percent encoded. See http://tools.ietf.org/html/rfc3986#appendix-A
getResponsemethod of these events if the response did not complete. https://github.com/guzzle/guzzle/issues/867
Adding support for non-blocking responses and some minor API cleanup.
GuzzleHttp\Poolwhich implements FutureInterface and transfers requests concurrently using a capped pool size as efficiently as possible.
GuzzleHttp\Client::sendAllas deprecated (it's still there, just not the recommended way).
The breaking changes in this release are relatively minor. The biggest thing to look out for is that request and response objects no longer implement fluent interfaces.
return $this) from requests, responses,
GuzzleHttp\Cookie\SetCookie. This blog post provides a good outline of why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/. This also makes the Guzzle message interfaces compatible with the current PSR-7 message proposal.
GuzzleHttpBatchshould now be
GuzzleHttp\Pool::batch, which returns an
objectStorage. Using functions.php caused problems for many users: they aren't PSR-4 compliant, require an explicit include, and needed an if-guard to ensure that the functions are not declared multiple times.
GuzzleHttp\Adapter, these are now implemented as callables that are stored in
GuzzleHttp\Transaction. The Transaction object now exposes the request, response, and client as public properties. The getters and setters have been removed.
GuzzleHttp\Message\MessageInterface::getHeader. If you want to get a header value as an array, then use the newly added
MessageInterface. This change makes the Guzzle interfaces compatible with the PSR-7 interfaces.
GuzzleHttp\Message\MessageFactoryno longer allows subclasses to add custom request options using double-dispatch (this was an implementation detail). Instead, you should now provide an associative array to the constructor which is a mapping of the request option name mapping to a function that applies the option value to a request.
GuzzleHttp\Stream\StreamInterface::getContents()no longer accepts a
maxLenparameter. This update makes the Guzzle streams project compatible with the current PSR-7 proposal.
GuzzleHttp\Stream\Utils::createno longer accept a size in the second argument. They now accept an associative array of options, including the "size" key and "metadata" key which can be used to provide custom metadata.
request_fulluriin stream adapter proxies.
Content-Encodingresponse bodies using the
decode_contentrequest option. This is set to
trueby default to decode the response body if it comes over the wire with a
Content-Encoding. Set this value to
falseto disable decoding the response content, and pass a string to provide a request
Accept-Encodingheader and turn on automatic response decoding. This feature now allows you to pass an
Accept-Encodingheader in the headers of a request but still disable automatic response decoding. Closes https://github.com/guzzle/guzzle/issues/764
Please login to add feedback.
This update has been submitted for testing by siwinski.
This update is currently being pushed to the Fedora EPEL 7 testing updates repository.
This update has been pushed to testing
This update has reached 14 days in testing and can be pushed to stable now if the maintainer wishes
This update has been submitted for stable by siwinski.
This update is currently being pushed to the Fedora EPEL 7 stable updates repository.
This update has been pushed to stable