You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

396 lines
9.9 KiB

2 years ago
  1. # Change Log
  2. All notable changes to this project will be documented in this file.
  3. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
  4. and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
  5. ## Unreleased
  6. ## 2.4.3 - 2022-10-26
  7. ### Changed
  8. - Replaced `sha1(uniqid())` by `bin2hex(random_bytes(20))`
  9. ## 2.4.2 - 2022-10-25
  10. ### Fixed
  11. - Fixed erroneous behaviour when combining host and relative path
  12. ## 2.4.1 - 2022-08-28
  13. ### Fixed
  14. - Rewind body before reading in `Message::bodySummary`
  15. ## 2.4.0 - 2022-06-20
  16. ### Added
  17. - Added provisional PHP 8.2 support
  18. - Added `UriComparator::isCrossOrigin` method
  19. ## 2.3.0 - 2022-06-09
  20. ### Fixed
  21. - Added `Header::splitList` method
  22. - Added `Utils::tryGetContents` method
  23. - Improved `Stream::getContents` method
  24. - Updated mimetype mappings
  25. ## 2.2.2 - 2022-06-08
  26. ### Fixed
  27. - Fix `Message::parseRequestUri` for numeric headers
  28. - Re-wrap exceptions thrown in `fread` into runtime exceptions
  29. - Throw an exception when multipart options is misformatted
  30. ## 2.2.1 - 2022-03-20
  31. ### Fixed
  32. - Correct header value validation
  33. ## 2.2.0 - 2022-03-20
  34. ### Added
  35. - A more compressive list of mime types
  36. - Add JsonSerializable to Uri
  37. - Missing return types
  38. ### Fixed
  39. - Bug MultipartStream no `uri` metadata
  40. - Bug MultipartStream with filename for `data://` streams
  41. - Fixed new line handling in MultipartStream
  42. - Reduced RAM usage when copying streams
  43. - Updated parsing in `Header::normalize()`
  44. ## 2.1.1 - 2022-03-20
  45. ### Fixed
  46. - Validate header values properly
  47. ## 2.1.0 - 2021-10-06
  48. ### Changed
  49. - Attempting to create a `Uri` object from a malformed URI will no longer throw a generic
  50. `InvalidArgumentException`, but rather a `MalformedUriException`, which inherits from the former
  51. for backwards compatibility. Callers relying on the exception being thrown to detect invalid
  52. URIs should catch the new exception.
  53. ### Fixed
  54. - Return `null` in caching stream size if remote size is `null`
  55. ## 2.0.0 - 2021-06-30
  56. Identical to the RC release.
  57. ## 2.0.0@RC-1 - 2021-04-29
  58. ### Fixed
  59. - Handle possibly unset `url` in `stream_get_meta_data`
  60. ## 2.0.0@beta-1 - 2021-03-21
  61. ### Added
  62. - PSR-17 factories
  63. - Made classes final
  64. - PHP7 type hints
  65. ### Changed
  66. - When building a query string, booleans are represented as 1 and 0.
  67. ### Removed
  68. - PHP < 7.2 support
  69. - All functions in the `GuzzleHttp\Psr7` namespace
  70. ## 1.8.1 - 2021-03-21
  71. ### Fixed
  72. - Issue parsing IPv6 URLs
  73. - Issue modifying ServerRequest lost all its attributes
  74. ## 1.8.0 - 2021-03-21
  75. ### Added
  76. - Locale independent URL parsing
  77. - Most classes got a `@final` annotation to prepare for 2.0
  78. ### Fixed
  79. - Issue when creating stream from `php://input` and curl-ext is not installed
  80. - Broken `Utils::tryFopen()` on PHP 8
  81. ## 1.7.0 - 2020-09-30
  82. ### Added
  83. - Replaced functions by static methods
  84. ### Fixed
  85. - Converting a non-seekable stream to a string
  86. - Handle multiple Set-Cookie correctly
  87. - Ignore array keys in header values when merging
  88. - Allow multibyte characters to be parsed in `Message:bodySummary()`
  89. ### Changed
  90. - Restored partial HHVM 3 support
  91. ## [1.6.1] - 2019-07-02
  92. ### Fixed
  93. - Accept null and bool header values again
  94. ## [1.6.0] - 2019-06-30
  95. ### Added
  96. - Allowed version `^3.0` of `ralouphie/getallheaders` dependency (#244)
  97. - Added MIME type for WEBP image format (#246)
  98. - Added more validation of values according to PSR-7 and RFC standards, e.g. status code range (#250, #272)
  99. ### Changed
  100. - Tests don't pass with HHVM 4.0, so HHVM support got dropped. Other libraries like composer have done the same. (#262)
  101. - Accept port number 0 to be valid (#270)
  102. ### Fixed
  103. - Fixed subsequent reads from `php://input` in ServerRequest (#247)
  104. - Fixed readable/writable detection for certain stream modes (#248)
  105. - Fixed encoding of special characters in the `userInfo` component of an URI (#253)
  106. ## [1.5.2] - 2018-12-04
  107. ### Fixed
  108. - Check body size when getting the message summary
  109. ## [1.5.1] - 2018-12-04
  110. ### Fixed
  111. - Get the summary of a body only if it is readable
  112. ## [1.5.0] - 2018-12-03
  113. ### Added
  114. - Response first-line to response string exception (fixes #145)
  115. - A test for #129 behavior
  116. - `get_message_body_summary` function in order to get the message summary
  117. - `3gp` and `mkv` mime types
  118. ### Changed
  119. - Clarify exception message when stream is detached
  120. ### Deprecated
  121. - Deprecated parsing folded header lines as per RFC 7230
  122. ### Fixed
  123. - Fix `AppendStream::detach` to not close streams
  124. - `InflateStream` preserves `isSeekable` attribute of the underlying stream
  125. - `ServerRequest::getUriFromGlobals` to support URLs in query parameters
  126. Several other fixes and improvements.
  127. ## [1.4.2] - 2017-03-20
  128. ### Fixed
  129. - Reverted BC break to `Uri::resolve` and `Uri::removeDotSegments` by removing
  130. calls to `trigger_error` when deprecated methods are invoked.
  131. ## [1.4.1] - 2017-02-27
  132. ### Added
  133. - Rriggering of silenced deprecation warnings.
  134. ### Fixed
  135. - Reverted BC break by reintroducing behavior to automagically fix a URI with a
  136. relative path and an authority by adding a leading slash to the path. It's only
  137. deprecated now.
  138. ## [1.4.0] - 2017-02-21
  139. ### Added
  140. - Added common URI utility methods based on RFC 3986 (see documentation in the readme):
  141. - `Uri::isDefaultPort`
  142. - `Uri::isAbsolute`
  143. - `Uri::isNetworkPathReference`
  144. - `Uri::isAbsolutePathReference`
  145. - `Uri::isRelativePathReference`
  146. - `Uri::isSameDocumentReference`
  147. - `Uri::composeComponents`
  148. - `UriNormalizer::normalize`
  149. - `UriNormalizer::isEquivalent`
  150. - `UriResolver::relativize`
  151. ### Changed
  152. - Ensure `ServerRequest::getUriFromGlobals` returns a URI in absolute form.
  153. - Allow `parse_response` to parse a response without delimiting space and reason.
  154. - Ensure each URI modification results in a valid URI according to PSR-7 discussions.
  155. Invalid modifications will throw an exception instead of returning a wrong URI or
  156. doing some magic.
  157. - `(new Uri)->withPath('foo')->withHost('example.com')` will throw an exception
  158. because the path of a URI with an authority must start with a slash "/" or be empty
  159. - `(new Uri())->withScheme('http')` will return `'http://localhost'`
  160. ### Deprecated
  161. - `Uri::resolve` in favor of `UriResolver::resolve`
  162. - `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments`
  163. ### Fixed
  164. - `Stream::read` when length parameter <= 0.
  165. - `copy_to_stream` reads bytes in chunks instead of `maxLen` into memory.
  166. - `ServerRequest::getUriFromGlobals` when `Host` header contains port.
  167. - Compatibility of URIs with `file` scheme and empty host.
  168. ## [1.3.1] - 2016-06-25
  169. ### Fixed
  170. - `Uri::__toString` for network path references, e.g. `//example.org`.
  171. - Missing lowercase normalization for host.
  172. - Handling of URI components in case they are `'0'` in a lot of places,
  173. e.g. as a user info password.
  174. - `Uri::withAddedHeader` to correctly merge headers with different case.
  175. - Trimming of header values in `Uri::withAddedHeader`. Header values may
  176. be surrounded by whitespace which should be ignored according to RFC 7230
  177. Section 3.2.4. This does not apply to header names.
  178. - `Uri::withAddedHeader` with an array of header values.
  179. - `Uri::resolve` when base path has no slash and handling of fragment.
  180. - Handling of encoding in `Uri::with(out)QueryValue` so one can pass the
  181. key/value both in encoded as well as decoded form to those methods. This is
  182. consistent with withPath, withQuery etc.
  183. - `ServerRequest::withoutAttribute` when attribute value is null.
  184. ## [1.3.0] - 2016-04-13
  185. ### Added
  186. - Remaining interfaces needed for full PSR7 compatibility
  187. (ServerRequestInterface, UploadedFileInterface, etc.).
  188. - Support for stream_for from scalars.
  189. ### Changed
  190. - Can now extend Uri.
  191. ### Fixed
  192. - A bug in validating request methods by making it more permissive.
  193. ## [1.2.3] - 2016-02-18
  194. ### Fixed
  195. - Support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote
  196. streams, which can sometimes return fewer bytes than requested with `fread`.
  197. - Handling of gzipped responses with FNAME headers.
  198. ## [1.2.2] - 2016-01-22
  199. ### Added
  200. - Support for URIs without any authority.
  201. - Support for HTTP 451 'Unavailable For Legal Reasons.'
  202. - Support for using '0' as a filename.
  203. - Support for including non-standard ports in Host headers.
  204. ## [1.2.1] - 2015-11-02
  205. ### Changes
  206. - Now supporting negative offsets when seeking to SEEK_END.
  207. ## [1.2.0] - 2015-08-15
  208. ### Changed
  209. - Body as `"0"` is now properly added to a response.
  210. - Now allowing forward seeking in CachingStream.
  211. - Now properly parsing HTTP requests that contain proxy targets in
  212. `parse_request`.
  213. - functions.php is now conditionally required.
  214. - user-info is no longer dropped when resolving URIs.
  215. ## [1.1.0] - 2015-06-24
  216. ### Changed
  217. - URIs can now be relative.
  218. - `multipart/form-data` headers are now overridden case-insensitively.
  219. - URI paths no longer encode the following characters because they are allowed
  220. in URIs: "(", ")", "*", "!", "'"
  221. - A port is no longer added to a URI when the scheme is missing and no port is
  222. present.
  223. ## 1.0.0 - 2015-05-19
  224. Initial release.
  225. Currently unsupported:
  226. - `Psr\Http\Message\ServerRequestInterface`
  227. - `Psr\Http\Message\UploadedFileInterface`
  228. [1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0
  229. [1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2
  230. [1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1
  231. [1.5.0]: https://github.com/guzzle/psr7/compare/1.4.2...1.5.0
  232. [1.4.2]: https://github.com/guzzle/psr7/compare/1.4.1...1.4.2
  233. [1.4.1]: https://github.com/guzzle/psr7/compare/1.4.0...1.4.1
  234. [1.4.0]: https://github.com/guzzle/psr7/compare/1.3.1...1.4.0
  235. [1.3.1]: https://github.com/guzzle/psr7/compare/1.3.0...1.3.1
  236. [1.3.0]: https://github.com/guzzle/psr7/compare/1.2.3...1.3.0
  237. [1.2.3]: https://github.com/guzzle/psr7/compare/1.2.2...1.2.3
  238. [1.2.2]: https://github.com/guzzle/psr7/compare/1.2.1...1.2.2
  239. [1.2.1]: https://github.com/guzzle/psr7/compare/1.2.0...1.2.1
  240. [1.2.0]: https://github.com/guzzle/psr7/compare/1.1.0...1.2.0
  241. [1.1.0]: https://github.com/guzzle/psr7/compare/1.0.0...1.1.0