5
* Address HTTP_PROXY security vulnerability, CVE-2016-5385:
7
* Event name fix: https://github.com/guzzle/guzzle/commit/fcae91ff31de41e312fe113ec3acbcda31b2622e
8
* Response header case sensitivity fix: https://github.com/guzzle/guzzle/commit/043eeadf20ee40ddc6712faee4d3957a91f2b041
12
* Mock now supports `save_to`
13
* Marked `AbstractRequestEvent::getTransaction()` as public.
14
* Fixed a bug in which multiple headers using different casing would overwrite
15
previous headers in the associative array.
16
* Added `Utils::getDefaultHandler()`
17
* Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated.
18
* URL scheme is now always lowercased.
22
* Added `AppliesHeadersInterface` to make applying headers to a request based
23
on the body more generic and not specific to `PostBodyInterface`.
24
* Reduced the number of stack frames needed to send requests.
25
* Nested futures are now resolved in the client rather than the RequestFsm
26
* Finishing state transitions is now handled in the RequestFsm rather than the
28
* Added a guard in the Pool class to not use recursion for request retries.
32
* Pool class no longer uses recursion when a request is intercepted.
33
* The size of a Pool can now be dynamically adjusted using a callback.
34
See https://github.com/guzzle/guzzle/pull/943.
35
* Setting a request option to `null` when creating a request with a client will
36
ensure that the option is not set. This allows you to overwrite default
37
request options on a per-request basis.
38
See https://github.com/guzzle/guzzle/pull/937.
39
* Added the ability to limit which protocols are allowed for redirects by
40
specifying a `protocols` array in the `allow_redirects` request option.
41
* Nested futures due to retries are now resolved when waiting for synchronous
42
responses. See https://github.com/guzzle/guzzle/pull/947.
43
* `"0"` is now an allowed URI path. See
44
https://github.com/guzzle/guzzle/pull/935.
45
* `Query` no longer typehints on the `$query` argument in the constructor,
46
allowing for strings and arrays.
47
* Exceptions thrown in the `end` event are now correctly wrapped with Guzzle
48
specific exceptions if necessary.
52
This change updates query strings so that they are treated as un-encoded values
53
by default where the value represents an un-encoded value to send over the
54
wire. A Query object then encodes the value before sending over the wire. This
55
means that even value query string values (e.g., ":") are url encoded. This
56
makes the Query class match PHP's http_build_query function. However, if you
57
want to send requests over the wire using valid query string characters that do
58
not need to be encoded, then you can provide a string to Url::setQuery() and
59
pass true as the second argument to specify that the query string is a raw
60
string that should not be parsed or encoded (unless a call to getQuery() is
61
subsequently made, forcing the query-string to be converted into a Query
66
* Added a trailing `\r\n` to multipart/form-data payloads. See
67
https://github.com/guzzle/guzzle/pull/871
68
* Added a `GuzzleHttp\Pool::send()` convenience method to match the docs.
69
* Status codes are now returned as integers. See
70
https://github.com/guzzle/guzzle/issues/881
71
* No longer overwriting an existing `application/x-www-form-urlencoded` header
72
when sending POST requests, allowing for customized headers. See
73
https://github.com/guzzle/guzzle/issues/877
74
* Improved path URL serialization.
76
* No longer double percent-encoding characters in the path or query string if
77
they are already encoded.
78
* Now properly encoding the supplied path to a URL object, instead of only
80
* Note: This has been changed in 5.0.3 to now encode query string values by
81
default unless the `rawString` argument is provided when setting the query
82
string on a URL: Now allowing many more characters to be present in the
83
query string without being percent encoded. See http://tools.ietf.org/html/rfc3986#appendix-A
89
* Fixed an issue where connection errors still returned response object in
90
error and end events event though the response is unusable. This has been
91
corrected so that a response is not returned in the `getResponse` method of
92
these events if the response did not complete. https://github.com/guzzle/guzzle/issues/867
93
* Fixed an issue where transfer statistics were not being populated in the
94
RingBridge. https://github.com/guzzle/guzzle/issues/866
98
Adding support for non-blocking responses and some minor API cleanup.
102
* Added support for non-blocking responses based on `guzzlehttp/guzzle-ring`.
103
* Added a public API for creating a default HTTP adapter.
104
* Updated the redirect plugin to be non-blocking so that redirects are sent
105
concurrently. Other plugins like this can now be updated to be non-blocking.
106
* Added a "progress" event so that you can get upload and download progress
108
* Added `GuzzleHttp\Pool` which implements FutureInterface and transfers
109
requests concurrently using a capped pool size as efficiently as possible.
110
* Added `hasListeners()` to EmitterInterface.
111
* Removed `GuzzleHttp\ClientInterface::sendAll` and marked
112
`GuzzleHttp\Client::sendAll` as deprecated (it's still there, just not the
117
The breaking changes in this release are relatively minor. The biggest thing to
118
look out for is that request and response objects no longer implement fluent
121
* Removed the fluent interfaces (i.e., `return $this`) from requests,
122
responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`,
123
`GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and
124
`GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of
125
why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/.
126
This also makes the Guzzle message interfaces compatible with the current
127
PSR-7 message proposal.
128
* Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except
129
for the HTTP request functions from function.php, these functions are now
130
implemented in `GuzzleHttp\Utils` using camelCase. `GuzzleHttp\json_decode`
131
moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to
132
`GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to
133
`GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be
134
`GuzzleHttp\Pool::batch`, which returns an `objectStorage`. Using functions.php
135
caused problems for many users: they aren't PSR-4 compliant, require an
136
explicit include, and needed an if-guard to ensure that the functions are not
137
declared multiple times.
138
* Rewrote adapter layer.
139
* Removing all classes from `GuzzleHttp\Adapter`, these are now
140
implemented as callables that are stored in `GuzzleHttp\Ring\Client`.
141
* Removed the concept of "parallel adapters". Sending requests serially or
142
concurrently is now handled using a single adapter.
143
* Moved `GuzzleHttp\Adapter\Transaction` to `GuzzleHttp\Transaction`. The
144
Transaction object now exposes the request, response, and client as public
145
properties. The getters and setters have been removed.
146
* Removed the "headers" event. This event was only useful for changing the
147
body a response once the headers of the response were known. You can implement
148
a similar behavior in a number of ways. One example might be to use a
149
FnStream that has access to the transaction being sent. For example, when the
150
first byte is written, you could check if the response headers match your
151
expectations, and if so, change the actual stream body that is being
153
* Removed the `asArray` parameter from
154
`GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header
155
value as an array, then use the newly added `getHeaderAsArray()` method of
156
`MessageInterface`. This change makes the Guzzle interfaces compatible with
157
the PSR-7 interfaces.
158
* `GuzzleHttp\Message\MessageFactory` no longer allows subclasses to add
159
custom request options using double-dispatch (this was an implementation
160
detail). Instead, you should now provide an associative array to the
161
constructor which is a mapping of the request option name mapping to a
162
function that applies the option value to a request.
163
* Removed the concept of "throwImmediately" from exceptions and error events.
164
This control mechanism was used to stop a transfer of concurrent requests
165
from completing. This can now be handled by throwing the exception or by
166
cancelling a pool of requests or each outstanding future request individually.
167
* Updated to "GuzzleHttp\Streams" 3.0.
168
* `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a
169
`maxLen` parameter. This update makes the Guzzle streams project
170
compatible with the current PSR-7 proposal.
171
* `GuzzleHttp\Stream\Stream::__construct`,
172
`GuzzleHttp\Stream\Stream::factory`, and
173
`GuzzleHttp\Stream\Utils::create` no longer accept a size in the second
174
argument. They now accept an associative array of options, including the
175
"size" key and "metadata" key which can be used to provide custom metadata.
177
## 4.2.2 - 2014-09-08
7
* Using `getenv` rather than `$_SERVER` for proxy settings to prevent a
8
potential security issue.
9
* Cookies now use a space between semicolons.
10
* Curl adapters now rewind the response body stream to match the behavior of
12
* The body of a request in the MockAdapter is now only read after invoking a
14
* Can now configure the maximum number of open curl multi handles.
15
* Added an XmlException for more XML parsing error information.
16
* Using STDOUT for debug only when it is available.
179
21
* Fixed a memory leak in the CurlAdapter when reusing cURL handles.
180
22
* No longer using `request_fulluri` in stream adapter proxies.
181
23
* Relative redirects are now based on the last response, not the first response.
183
## 4.2.1 - 2014-08-19
185
28
* Ensuring that the StreamAdapter does not always add a Content-Type header
186
29
* Adding automated github releases with a phar and zip
188
## 4.2.0 - 2014-08-17
190
34
* Now merging in default options using a case-insensitive comparison.
191
35
Closes https://github.com/guzzle/guzzle/issues/767