1# Change Log
2
3All notable changes to this project will be documented in this file.
4
5The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
8## 2.6.2 - 2023-12-03
9
10### Fixed
11
12- Fixed another issue with the fact that PHP transforms numeric strings in array keys to ints
13
14### Changed
15
16- Updated links in docs to their canonical versions
17- Replaced `call_user_func*` with native calls
18
19## 2.6.1 - 2023-08-27
20
21### Fixed
22
23- Properly handle the fact that PHP transforms numeric strings in array keys to ints
24
25## 2.6.0 - 2023-08-03
26
27### Changed
28
29- Updated the mime type map to add some new entries, fix a couple of invalid entries, and remove an invalid entry
30- Fallback to `application/octet-stream` if we are unable to guess the content type for a multipart file upload
31
32## 2.5.1 - 2023-08-03
33
34### Fixed
35
36- Corrected mime type for `.acc` files to `audio/aac`
37
38### Changed
39
40- PHP 8.3 support
41
42## 2.5.0 - 2023-04-17
43
44### Changed
45
46- Adjusted `psr/http-message` version constraint to `^1.1 || ^2.0`
47
48## 2.4.5 - 2023-04-17
49
50### Fixed
51
52- Prevent possible warnings on unset variables in `ServerRequest::normalizeNestedFileSpec`
53- Fixed `Message::bodySummary` when `preg_match` fails
54- Fixed header validation issue
55
56## 2.4.4 - 2023-03-09
57
58### Changed
59
60- Removed the need for `AllowDynamicProperties` in `LazyOpenStream`
61
62## 2.4.3 - 2022-10-26
63
64### Changed
65
66- Replaced `sha1(uniqid())` by `bin2hex(random_bytes(20))`
67
68## 2.4.2 - 2022-10-25
69
70### Fixed
71
72- Fixed erroneous behaviour when combining host and relative path
73
74## 2.4.1 - 2022-08-28
75
76### Fixed
77
78- Rewind body before reading in `Message::bodySummary`
79
80## 2.4.0 - 2022-06-20
81
82### Added
83
84- Added provisional PHP 8.2 support
85- Added `UriComparator::isCrossOrigin` method
86
87## 2.3.0 - 2022-06-09
88
89### Fixed
90
91- Added `Header::splitList` method
92- Added `Utils::tryGetContents` method
93- Improved `Stream::getContents` method
94- Updated mimetype mappings
95
96## 2.2.2 - 2022-06-08
97
98### Fixed
99
100- Fix `Message::parseRequestUri` for numeric headers
101- Re-wrap exceptions thrown in `fread` into runtime exceptions
102- Throw an exception when multipart options is misformatted
103
104## 2.2.1 - 2022-03-20
105
106### Fixed
107
108- Correct header value validation
109
110## 2.2.0 - 2022-03-20
111
112### Added
113
114- A more compressive list of mime types
115- Add JsonSerializable to Uri
116- Missing return types
117
118### Fixed
119
120- Bug MultipartStream no `uri` metadata
121- Bug MultipartStream with filename for `data://` streams
122- Fixed new line handling in MultipartStream
123- Reduced RAM usage when copying streams
124- Updated parsing in `Header::normalize()`
125
126## 2.1.1 - 2022-03-20
127
128### Fixed
129
130- Validate header values properly
131
132## 2.1.0 - 2021-10-06
133
134### Changed
135
136- Attempting to create a `Uri` object from a malformed URI will no longer throw a generic
137  `InvalidArgumentException`, but rather a `MalformedUriException`, which inherits from the former
138  for backwards compatibility. Callers relying on the exception being thrown to detect invalid
139  URIs should catch the new exception.
140
141### Fixed
142
143- Return `null` in caching stream size if remote size is `null`
144
145## 2.0.0 - 2021-06-30
146
147Identical to the RC release.
148
149## 2.0.0@RC-1 - 2021-04-29
150
151### Fixed
152
153- Handle possibly unset `url` in `stream_get_meta_data`
154
155## 2.0.0@beta-1 - 2021-03-21
156
157### Added
158
159- PSR-17 factories
160- Made classes final
161- PHP7 type hints
162
163### Changed
164
165- When building a query string, booleans are represented as 1 and 0.
166
167### Removed
168
169- PHP < 7.2 support
170- All functions in the `GuzzleHttp\Psr7` namespace
171
172## 1.8.1 - 2021-03-21
173
174### Fixed
175
176- Issue parsing IPv6 URLs
177- Issue modifying ServerRequest lost all its attributes
178
179## 1.8.0 - 2021-03-21
180
181### Added
182
183- Locale independent URL parsing
184- Most classes got a `@final` annotation to prepare for 2.0
185
186### Fixed
187
188- Issue when creating stream from `php://input` and curl-ext is not installed
189- Broken `Utils::tryFopen()` on PHP 8
190
191## 1.7.0 - 2020-09-30
192
193### Added
194
195- Replaced functions by static methods
196
197### Fixed
198
199- Converting a non-seekable stream to a string
200- Handle multiple Set-Cookie correctly
201- Ignore array keys in header values when merging
202- Allow multibyte characters to be parsed in `Message:bodySummary()`
203
204### Changed
205
206- Restored partial HHVM 3 support
207
208
209## [1.6.1] - 2019-07-02
210
211### Fixed
212
213- Accept null and bool header values again
214
215
216## [1.6.0] - 2019-06-30
217
218### Added
219
220- Allowed version `^3.0` of `ralouphie/getallheaders` dependency (#244)
221- Added MIME type for WEBP image format (#246)
222- Added more validation of values according to PSR-7 and RFC standards, e.g. status code range (#250, #272)
223
224### Changed
225
226- Tests don't pass with HHVM 4.0, so HHVM support got dropped. Other libraries like composer have done the same. (#262)
227- Accept port number 0 to be valid (#270)
228
229### Fixed
230
231- Fixed subsequent reads from `php://input` in ServerRequest (#247)
232- Fixed readable/writable detection for certain stream modes (#248)
233- Fixed encoding of special characters in the `userInfo` component of an URI (#253)
234
235
236## [1.5.2] - 2018-12-04
237
238### Fixed
239
240- Check body size when getting the message summary
241
242
243## [1.5.1] - 2018-12-04
244
245### Fixed
246
247- Get the summary of a body only if it is readable
248
249
250## [1.5.0] - 2018-12-03
251
252### Added
253
254- Response first-line to response string exception (fixes #145)
255- A test for #129 behavior
256- `get_message_body_summary` function in order to get the message summary
257- `3gp` and `mkv` mime types
258
259### Changed
260
261- Clarify exception message when stream is detached
262
263### Deprecated
264
265- Deprecated parsing folded header lines as per RFC 7230
266
267### Fixed
268
269- Fix `AppendStream::detach` to not close streams
270- `InflateStream` preserves `isSeekable` attribute of the underlying stream
271- `ServerRequest::getUriFromGlobals` to support URLs in query parameters
272
273
274Several other fixes and improvements.
275
276
277## [1.4.2] - 2017-03-20
278
279### Fixed
280
281- Reverted BC break to `Uri::resolve` and `Uri::removeDotSegments` by removing
282  calls to `trigger_error` when deprecated methods are invoked.
283
284
285## [1.4.1] - 2017-02-27
286
287### Added
288
289- Rriggering of silenced deprecation warnings.
290
291### Fixed
292
293- Reverted BC break by reintroducing behavior to automagically fix a URI with a
294  relative path and an authority by adding a leading slash to the path. It's only
295  deprecated now.
296
297
298## [1.4.0] - 2017-02-21
299
300### Added
301
302- Added common URI utility methods based on RFC 3986 (see documentation in the readme):
303  - `Uri::isDefaultPort`
304  - `Uri::isAbsolute`
305  - `Uri::isNetworkPathReference`
306  - `Uri::isAbsolutePathReference`
307  - `Uri::isRelativePathReference`
308  - `Uri::isSameDocumentReference`
309  - `Uri::composeComponents`
310  - `UriNormalizer::normalize`
311  - `UriNormalizer::isEquivalent`
312  - `UriResolver::relativize`
313
314### Changed
315
316- Ensure `ServerRequest::getUriFromGlobals` returns a URI in absolute form.
317- Allow `parse_response` to parse a response without delimiting space and reason.
318- Ensure each URI modification results in a valid URI according to PSR-7 discussions.
319  Invalid modifications will throw an exception instead of returning a wrong URI or
320  doing some magic.
321  - `(new Uri)->withPath('foo')->withHost('example.com')` will throw an exception
322    because the path of a URI with an authority must start with a slash "/" or be empty
323  - `(new Uri())->withScheme('http')` will return `'http://localhost'`
324
325### Deprecated
326
327- `Uri::resolve` in favor of `UriResolver::resolve`
328- `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments`
329
330### Fixed
331
332- `Stream::read` when length parameter <= 0.
333- `copy_to_stream` reads bytes in chunks instead of `maxLen` into memory.
334- `ServerRequest::getUriFromGlobals` when `Host` header contains port.
335- Compatibility of URIs with `file` scheme and empty host.
336
337
338## [1.3.1] - 2016-06-25
339
340### Fixed
341
342- `Uri::__toString` for network path references, e.g. `//example.org`.
343- Missing lowercase normalization for host.
344- Handling of URI components in case they are `'0'` in a lot of places,
345  e.g. as a user info password.
346- `Uri::withAddedHeader` to correctly merge headers with different case.
347- Trimming of header values in `Uri::withAddedHeader`. Header values may
348  be surrounded by whitespace which should be ignored according to RFC 7230
349  Section 3.2.4. This does not apply to header names.
350- `Uri::withAddedHeader` with an array of header values.
351- `Uri::resolve` when base path has no slash and handling of fragment.
352- Handling of encoding in `Uri::with(out)QueryValue` so one can pass the
353  key/value both in encoded as well as decoded form to those methods. This is
354  consistent with withPath, withQuery etc.
355- `ServerRequest::withoutAttribute` when attribute value is null.
356
357
358## [1.3.0] - 2016-04-13
359
360### Added
361
362- Remaining interfaces needed for full PSR7 compatibility
363  (ServerRequestInterface, UploadedFileInterface, etc.).
364- Support for stream_for from scalars.
365
366### Changed
367
368- Can now extend Uri.
369
370### Fixed
371- A bug in validating request methods by making it more permissive.
372
373
374## [1.2.3] - 2016-02-18
375
376### Fixed
377
378- Support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote
379  streams, which can sometimes return fewer bytes than requested with `fread`.
380- Handling of gzipped responses with FNAME headers.
381
382
383## [1.2.2] - 2016-01-22
384
385### Added
386
387- Support for URIs without any authority.
388- Support for HTTP 451 'Unavailable For Legal Reasons.'
389- Support for using '0' as a filename.
390- Support for including non-standard ports in Host headers.
391
392
393## [1.2.1] - 2015-11-02
394
395### Changes
396
397- Now supporting negative offsets when seeking to SEEK_END.
398
399
400## [1.2.0] - 2015-08-15
401
402### Changed
403
404- Body as `"0"` is now properly added to a response.
405- Now allowing forward seeking in CachingStream.
406- Now properly parsing HTTP requests that contain proxy targets in
407  `parse_request`.
408- functions.php is now conditionally required.
409- user-info is no longer dropped when resolving URIs.
410
411
412## [1.1.0] - 2015-06-24
413
414### Changed
415
416- URIs can now be relative.
417- `multipart/form-data` headers are now overridden case-insensitively.
418- URI paths no longer encode the following characters because they are allowed
419  in URIs: "(", ")", "*", "!", "'"
420- A port is no longer added to a URI when the scheme is missing and no port is
421  present.
422
423
424## 1.0.0 - 2015-05-19
425
426Initial release.
427
428Currently unsupported:
429
430- `Psr\Http\Message\ServerRequestInterface`
431- `Psr\Http\Message\UploadedFileInterface`
432
433
434
435[1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0
436[1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2
437[1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1
438[1.5.0]: https://github.com/guzzle/psr7/compare/1.4.2...1.5.0
439[1.4.2]: https://github.com/guzzle/psr7/compare/1.4.1...1.4.2
440[1.4.1]: https://github.com/guzzle/psr7/compare/1.4.0...1.4.1
441[1.4.0]: https://github.com/guzzle/psr7/compare/1.3.1...1.4.0
442[1.3.1]: https://github.com/guzzle/psr7/compare/1.3.0...1.3.1
443[1.3.0]: https://github.com/guzzle/psr7/compare/1.2.3...1.3.0
444[1.2.3]: https://github.com/guzzle/psr7/compare/1.2.2...1.2.3
445[1.2.2]: https://github.com/guzzle/psr7/compare/1.2.1...1.2.2
446[1.2.1]: https://github.com/guzzle/psr7/compare/1.2.0...1.2.1
447[1.2.0]: https://github.com/guzzle/psr7/compare/1.1.0...1.2.0
448[1.1.0]: https://github.com/guzzle/psr7/compare/1.0.0...1.1.0
449