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