Debian Codegraph @

vendor/guzzlehttp/psr7/CHANGELOG.md

raw
1 # Change Log
2
3 All notable changes to this project will be documented in this file.
4
5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
8 ## 2.12.3 - 2026-06-23
9
10 ### Security
11
12 - Validate the URI host so `getHost()` matches the URI authority (GHSA-c2w2-prh8-qm98)
13
14 ## 2.12.2 - 2026-06-23
15
16 ### Fixed
17
18 - Report URI parsing, filtering, and normalization PCRE failures explicitly
19 - Report HTTP message parser PCRE failures explicitly
20 - Fail closed when PCRE validation fails for request targets and hosts
21
22 ## 2.12.1 - 2026-06-18
23
24 ### Security
25
26 - Reject CR/LF in HTTP method, protocol version, and reason phrase (GHSA-vm85-hxw5-5432)
27
28 ## 2.12.0 - 2026-06-16
29
30 ### Deprecated
31
32 - Deprecated non-finite float values in `Query::build()` that guzzlehttp/psr7 3.0 rejects
33 - Deprecated non-finite float multipart contents that guzzlehttp/psr7 3.0 rejects
34 - Deprecated non-string scalar bodies in `Utils::streamFor()`; cast them to a string for 3.0
35 - Deprecated non-string `Uri::withQueryValues()` values; cast them to a string for 3.0
36
37 ## 2.11.1 - 2026-06-12
38
39 ### Fixed
40
41 - Fixed non-finite float values emitting coercion warnings on PHP 8.5
42
43 ## 2.11.0 - 2026-06-02
44
45 ### Changed
46
47 - Changed `Utils::modifyRequest()` to reject conflicting URI and `Host` header changes in the same call
48 - Changed `Header::parse()` to split semicolon-separated parameters without repeated regular expression lookaheads
49 - Changed `UriComparator::isCrossOrigin()` so only HTTP and HTTPS missing ports receive implicit default ports
50
51 ### Deprecated
52
53 - Deprecated invalid PSR-7 arguments that guzzlehttp/psr7 3.0 will require native types for
54 - Deprecated non-string header values that guzzlehttp/psr7 3.0 will reject
55 - Deprecated empty header value arrays that guzzlehttp/psr7 3.0 will reject
56 - Deprecated URI schemes that do not match guzzlehttp/psr7 3.0 syntax requirements
57 - Deprecated multipart boundary and custom part header metadata that guzzlehttp/psr7 3.0 will reject
58 - Deprecated reliance on automatic uppercasing of request methods; guzzlehttp/psr7 3.0 preserves method casing
59 - Deprecated invalid `Utils::modifyRequest()` change values that guzzlehttp/psr7 3.0 will reject
60
61 ### Fixed
62
63 - Fixed `Utils::copyToStream()` to retry short destination writes instead of dropping the unwritten remainder
64 - Fixed `Header::parse()` splitting of semicolon-separated parameters with escaped quotes
65
66 ## 2.10.4 - 2026-05-29
67
68 ### Fixed
69
70 - Apply `UriNormalizer` percent-encoding normalizations to URI fragments
71 - Make `LimitStream::getSize()` return `0` for slices past the underlying stream end
72 - Make `AppendStream::read()` return an empty string when no streams are attached
73 - Make `CachingStream::read()` throw on an incomplete cache-target write instead of silently corrupting replays
74 - Prevent `CachingStream::seek()` from looping indefinitely when the remote stream makes no progress
75
76 ## 2.10.3 - 2026-05-27
77
78 ### Fixed
79
80 - Fixed URI parsing for IPv6 literals containing embedded IPv4 addresses
81 - Fixed malformed UTF-8 URI strings being parsed as empty URIs
82
83 ## 2.10.2 - 2026-05-25
84
85 ### Security
86
87 - Reject control and whitespace characters in URI host components (GHSA-hq7v-mx3g-29hw)
88 - Reject malformed Host values when constructing request URIs (GHSA-34xg-wgjx-8xph)
89
90 ### Fixed
91
92 - Make `ServerRequest::fromGlobals()` robust against unexpected HTTP header value types in `$_SERVER`
93
94 ## 2.10.1 - 2026-05-20
95
96 ### Fixed
97
98 - Fix `Utils::modifyRequest()` with numeric header names
99
100 ## 2.10.0 - 2026-05-19
101
102 ### Changed
103
104 - Harden `ServerRequest::fromGlobals()` against malformed `$_SERVER` values
105 - Prevent custom stream metadata from affecting internal size handling
106 - Throw when `StreamWrapper::getResource()` cannot create a resource
107 - Preserve custom request implementations in `Utils::modifyRequest()`
108 - Preserve custom URI implementations in `UriResolver::resolve()`
109 - Make `Uri::__toString()` side-effect-free
110
111 ## 2.9.1 - 2026-05-19
112
113 ### Fixed
114
115 - Fix parsing of relative path references containing a colon in a non-initial path segment
116 - Fix `CachingStream::detach()` returning an incomplete resource before the decorated stream has been fully read
117 - Fix `Message::bodySummary()` returning `null` when truncating printable UTF-8 bodies inside a multibyte character
118
119 ## 2.9.0 - 2026-03-10
120
121 ### Added
122
123 - Added nested array expansion support to `MultipartStream`
124 - Added `@return static` to `MessageTrait` methods
125
126 ### Changed
127
128 - Updated MIME type mappings
129
130 ## 2.8.1 - 2026-03-10
131
132 ### Fixed
133
134 - Encode `+` signs in `Uri::withQueryValue()` and `Uri::withQueryValues()` to prevent them being interpreted as spaces
135
136 ## 2.8.0 - 2025-08-23
137
138 ### Added
139
140 - Allow empty lists as header values
141
142 ### Changed
143
144 - PHP 8.5 support
145
146 ## 2.7.1 - 2025-03-27
147
148 ### Fixed
149
150 - Fixed uppercase IPv6 addresses in URI
151
152 ### Changed
153
154 - Improve uploaded file error message
155
156 ## 2.7.0 - 2024-07-18
157
158 ### Added
159
160 - Add `Utils::redactUserInfo()` method
161 - Add ability to encode bools as ints in `Query::build`
162
163 ## 2.6.3 - 2024-07-18
164
165 ### Fixed
166
167 - Make `StreamWrapper::stream_stat()` return `false` if inner stream's size is `null`
168
169 ### Changed
170
171 - PHP 8.4 support
172
173 ## 2.6.2 - 2023-12-03
174
175 ### Fixed
176
177 - Fixed another issue with the fact that PHP transforms numeric strings in array keys to ints
178
179 ### Changed
180
181 - Updated links in docs to their canonical versions
182 - Replaced `call_user_func*` with native calls
183
184 ## 2.6.1 - 2023-08-27
185
186 ### Fixed
187
188 - Properly handle the fact that PHP transforms numeric strings in array keys to ints
189
190 ## 2.6.0 - 2023-08-03
191
192 ### Changed
193
194 - Updated the mime type map to add some new entries, fix a couple of invalid entries, and remove an invalid entry
195 - Fallback to `application/octet-stream` if we are unable to guess the content type for a multipart file upload
196
197 ## 2.5.1 - 2023-08-03
198
199 ### Fixed
200
201 - Corrected mime type for `.acc` files to `audio/aac`
202
203 ### Changed
204
205 - PHP 8.3 support
206
207 ## 2.5.0 - 2023-04-17
208
209 ### Changed
210
211 - Adjusted `psr/http-message` version constraint to `^1.1 || ^2.0`
212
213 ## 2.4.5 - 2023-04-17
214
215 ### Fixed
216
217 - Prevent possible warnings on unset variables in `ServerRequest::normalizeNestedFileSpec`
218 - Fixed `Message::bodySummary` when `preg_match` fails
219 - Fixed header validation issue
220
221 ## 2.4.4 - 2023-03-09
222
223 ### Changed
224
225 - Removed the need for `AllowDynamicProperties` in `LazyOpenStream`
226
227 ## 2.4.3 - 2022-10-26
228
229 ### Changed
230
231 - Replaced `sha1(uniqid())` by `bin2hex(random_bytes(20))`
232
233 ## 2.4.2 - 2022-10-25
234
235 ### Fixed
236
237 - Fixed erroneous behaviour when combining host and relative path
238
239 ## 2.4.1 - 2022-08-28
240
241 ### Fixed
242
243 - Rewind body before reading in `Message::bodySummary`
244
245 ## 2.4.0 - 2022-06-20
246
247 ### Added
248
249 - Added provisional PHP 8.2 support
250 - Added `UriComparator::isCrossOrigin` method
251
252 ## 2.3.0 - 2022-06-09
253
254 ### Fixed
255
256 - Added `Header::splitList` method
257 - Added `Utils::tryGetContents` method
258 - Improved `Stream::getContents` method
259 - Updated mimetype mappings
260
261 ## 2.2.2 - 2022-06-08
262
263 ### Fixed
264
265 - Fix `Message::parseRequestUri` for numeric headers
266 - Re-wrap exceptions thrown in `fread` into runtime exceptions
267 - Throw an exception when multipart options is misformatted
268
269 ## 2.2.1 - 2022-03-20
270
271 ### Fixed
272
273 - Correct header value validation
274
275 ## 2.2.0 - 2022-03-20
276
277 ### Added
278
279 - A more compressive list of mime types
280 - Add JsonSerializable to Uri
281 - Missing return types
282
283 ### Fixed
284
285 - Bug MultipartStream no `uri` metadata
286 - Bug MultipartStream with filename for `data://` streams
287 - Fixed new line handling in MultipartStream
288 - Reduced RAM usage when copying streams
289 - Updated parsing in `Header::normalize()`
290
291 ## 2.1.1 - 2022-03-20
292
293 ### Fixed
294
295 - Validate header values properly
296
297 ## 2.1.0 - 2021-10-06
298
299 ### Changed
300
301 - Attempting to create a `Uri` object from a malformed URI will no longer throw a generic
302 `InvalidArgumentException`, but rather a `MalformedUriException`, which inherits from the former
303 for backwards compatibility. Callers relying on the exception being thrown to detect invalid
304 URIs should catch the new exception.
305
306 ### Fixed
307
308 - Return `null` in caching stream size if remote size is `null`
309
310 ## 2.0.0 - 2021-06-30
311
312 Identical to the RC release.
313
314 ## 2.0.0@RC-1 - 2021-04-29
315
316 ### Fixed
317
318 - Handle possibly unset `url` in `stream_get_meta_data`
319
320 ## 2.0.0@beta-1 - 2021-03-21
321
322 ### Added
323
324 - PSR-17 factories
325 - Made classes final
326 - PHP7 type hints
327
328 ### Changed
329
330 - When building a query string, booleans are represented as 1 and 0.
331
332 ### Removed
333
334 - PHP < 7.2 support
335 - All functions in the `GuzzleHttp\Psr7` namespace
336
337 ## 1.8.1 - 2021-03-21
338
339 ### Fixed
340
341 - Issue parsing IPv6 URLs
342 - Issue modifying ServerRequest lost all its attributes
343
344 ## 1.8.0 - 2021-03-21
345
346 ### Added
347
348 - Locale independent URL parsing
349 - Most classes got a `@final` annotation to prepare for 2.0
350
351 ### Fixed
352
353 - Issue when creating stream from `php://input` and curl-ext is not installed
354 - Broken `Utils::tryFopen()` on PHP 8
355
356 ## 1.7.0 - 2020-09-30
357
358 ### Added
359
360 - Replaced functions by static methods
361
362 ### Fixed
363
364 - Converting a non-seekable stream to a string
365 - Handle multiple Set-Cookie correctly
366 - Ignore array keys in header values when merging
367 - Allow multibyte characters to be parsed in `Message:bodySummary()`
368
369 ### Changed
370
371 - Restored partial HHVM 3 support
372
373
374 ## [1.6.1] - 2019-07-02
375
376 ### Fixed
377
378 - Accept null and bool header values again
379
380
381 ## [1.6.0] - 2019-06-30
382
383 ### Added
384
385 - Allowed version `^3.0` of `ralouphie/getallheaders` dependency (#244)
386 - Added MIME type for WEBP image format (#246)
387 - Added more validation of values according to PSR-7 and RFC standards, e.g. status code range (#250, #272)
388
389 ### Changed
390
391 - Tests don't pass with HHVM 4.0, so HHVM support got dropped. Other libraries like composer have done the same. (#262)
392 - Accept port number 0 to be valid (#270)
393
394 ### Fixed
395
396 - Fixed subsequent reads from `php://input` in ServerRequest (#247)
397 - Fixed readable/writable detection for certain stream modes (#248)
398 - Fixed encoding of special characters in the `userInfo` component of an URI (#253)
399
400
401 ## [1.5.2] - 2018-12-04
402
403 ### Fixed
404
405 - Check body size when getting the message summary
406
407
408 ## [1.5.1] - 2018-12-04
409
410 ### Fixed
411
412 - Get the summary of a body only if it is readable
413
414
415 ## [1.5.0] - 2018-12-03
416
417 ### Added
418
419 - Response first-line to response string exception (fixes #145)
420 - A test for #129 behavior
421 - `get_message_body_summary` function in order to get the message summary
422 - `3gp` and `mkv` mime types
423
424 ### Changed
425
426 - Clarify exception message when stream is detached
427
428 ### Deprecated
429
430 - Deprecated parsing folded header lines as per RFC 7230
431
432 ### Fixed
433
434 - Fix `AppendStream::detach` to not close streams
435 - `InflateStream` preserves `isSeekable` attribute of the underlying stream
436 - `ServerRequest::getUriFromGlobals` to support URLs in query parameters
437
438
439 Several other fixes and improvements.
440
441
442 ## [1.4.2] - 2017-03-20
443
444 ### Fixed
445
446 - Reverted BC break to `Uri::resolve` and `Uri::removeDotSegments` by removing
447 calls to `trigger_error` when deprecated methods are invoked.
448
449
450 ## [1.4.1] - 2017-02-27
451
452 ### Added
453
454 - Rriggering of silenced deprecation warnings.
455
456 ### Fixed
457
458 - Reverted BC break by reintroducing behavior to automagically fix a URI with a
459 relative path and an authority by adding a leading slash to the path. It's only
460 deprecated now.
461
462
463 ## [1.4.0] - 2017-02-21
464
465 ### Added
466
467 - Added common URI utility methods based on RFC 3986 (see documentation in the readme):
468 - `Uri::isDefaultPort`
469 - `Uri::isAbsolute`
470 - `Uri::isNetworkPathReference`
471 - `Uri::isAbsolutePathReference`
472 - `Uri::isRelativePathReference`
473 - `Uri::isSameDocumentReference`
474 - `Uri::composeComponents`
475 - `UriNormalizer::normalize`
476 - `UriNormalizer::isEquivalent`
477 - `UriResolver::relativize`
478
479 ### Changed
480
481 - Ensure `ServerRequest::getUriFromGlobals` returns a URI in absolute form.
482 - Allow `parse_response` to parse a response without delimiting space and reason.
483 - Ensure each URI modification results in a valid URI according to PSR-7 discussions.
484 Invalid modifications will throw an exception instead of returning a wrong URI or
485 doing some magic.
486 - `(new Uri)->withPath('foo')->withHost('example.com')` will throw an exception
487 because the path of a URI with an authority must start with a slash "/" or be empty
488 - `(new Uri())->withScheme('http')` will return `'http://localhost'`
489
490 ### Deprecated
491
492 - `Uri::resolve` in favor of `UriResolver::resolve`
493 - `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments`
494
495 ### Fixed
496
497 - `Stream::read` when length parameter <= 0.
498 - `copy_to_stream` reads bytes in chunks instead of `maxLen` into memory.
499 - `ServerRequest::getUriFromGlobals` when `Host` header contains port.
500 - Compatibility of URIs with `file` scheme and empty host.
501
502
503 ## [1.3.1] - 2016-06-25
504
505 ### Fixed
506
507 - `Uri::__toString` for network path references, e.g. `//example.org`.
508 - Missing lowercase normalization for host.
509 - Handling of URI components in case they are `'0'` in a lot of places,
510 e.g. as a user info password.
511 - `Uri::withAddedHeader` to correctly merge headers with different case.
512 - Trimming of header values in `Uri::withAddedHeader`. Header values may
513 be surrounded by whitespace which should be ignored according to RFC 7230
514 Section 3.2.4. This does not apply to header names.
515 - `Uri::withAddedHeader` with an array of header values.
516 - `Uri::resolve` when base path has no slash and handling of fragment.
517 - Handling of encoding in `Uri::with(out)QueryValue` so one can pass the
518 key/value both in encoded as well as decoded form to those methods. This is
519 consistent with withPath, withQuery etc.
520 - `ServerRequest::withoutAttribute` when attribute value is null.
521
522
523 ## [1.3.0] - 2016-04-13
524
525 ### Added
526
527 - Remaining interfaces needed for full PSR7 compatibility
528 (ServerRequestInterface, UploadedFileInterface, etc.).
529 - Support for stream_for from scalars.
530
531 ### Changed
532
533 - Can now extend Uri.
534
535 ### Fixed
536 - A bug in validating request methods by making it more permissive.
537
538
539 ## [1.2.3] - 2016-02-18
540
541 ### Fixed
542
543 - Support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote
544 streams, which can sometimes return fewer bytes than requested with `fread`.
545 - Handling of gzipped responses with FNAME headers.
546
547
548 ## [1.2.2] - 2016-01-22
549
550 ### Added
551
552 - Support for URIs without any authority.
553 - Support for HTTP 451 'Unavailable For Legal Reasons.'
554 - Support for using '0' as a filename.
555 - Support for including non-standard ports in Host headers.
556
557
558 ## [1.2.1] - 2015-11-02
559
560 ### Changes
561
562 - Now supporting negative offsets when seeking to SEEK_END.
563
564
565 ## [1.2.0] - 2015-08-15
566
567 ### Changed
568
569 - Body as `"0"` is now properly added to a response.
570 - Now allowing forward seeking in CachingStream.
571 - Now properly parsing HTTP requests that contain proxy targets in
572 `parse_request`.
573 - functions.php is now conditionally required.
574 - user-info is no longer dropped when resolving URIs.
575
576
577 ## [1.1.0] - 2015-06-24
578
579 ### Changed
580
581 - URIs can now be relative.
582 - `multipart/form-data` headers are now overridden case-insensitively.
583 - URI paths no longer encode the following characters because they are allowed
584 in URIs: "(", ")", "*", "!", "'"
585 - A port is no longer added to a URI when the scheme is missing and no port is
586 present.
587
588
589 ## 1.0.0 - 2015-05-19
590
591 Initial release.
592
593 Currently unsupported:
594
595 - `Psr\Http\Message\ServerRequestInterface`
596 - `Psr\Http\Message\UploadedFileInterface`
597
598
599
600 [1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0
601 [1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2
602 [1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1
603 [1.5.0]: https://github.com/guzzle/psr7/compare/1.4.2...1.5.0
604 [1.4.2]: https://github.com/guzzle/psr7/compare/1.4.1...1.4.2
605 [1.4.1]: https://github.com/guzzle/psr7/compare/1.4.0...1.4.1
606 [1.4.0]: https://github.com/guzzle/psr7/compare/1.3.1...1.4.0
607 [1.3.1]: https://github.com/guzzle/psr7/compare/1.3.0...1.3.1
608 [1.3.0]: https://github.com/guzzle/psr7/compare/1.2.3...1.3.0
609 [1.2.3]: https://github.com/guzzle/psr7/compare/1.2.2...1.2.3
610 [1.2.2]: https://github.com/guzzle/psr7/compare/1.2.1...1.2.2
611 [1.2.1]: https://github.com/guzzle/psr7/compare/1.2.0...1.2.1
612 [1.2.0]: https://github.com/guzzle/psr7/compare/1.1.0...1.2.0
613 [1.1.0]: https://github.com/guzzle/psr7/compare/1.0.0...1.1.0