annotate vendor/zendframework/zend-diactoros/CHANGELOG.md @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 129ea1e6d783
children
rev   line source
Chris@0 1 # Changelog
Chris@0 2
Chris@0 3 All notable changes to this project will be documented in this file, in reverse chronological order by release.
Chris@0 4
Chris@17 5 ## 1.8.6 - 2018-09-05
Chris@17 6
Chris@17 7 ### Added
Chris@17 8
Chris@17 9 - Nothing.
Chris@17 10
Chris@17 11 ### Changed
Chris@17 12
Chris@17 13 - [#325](https://github.com/zendframework/zend-diactoros/pull/325) changes the behavior of `ServerRequest::withParsedBody()`. Per
Chris@17 14 - PSR-7, it now no longer allows values other than `null`, arrays, or objects.
Chris@17 15
Chris@17 16 - [#325](https://github.com/zendframework/zend-diactoros/pull/325) changes the behavior of each of `Request`, `ServerRequest`, and
Chris@17 17 `Response` in relation to the validation of header values. Previously, we
Chris@17 18 allowed empty arrays to be provided via `withHeader()`; however, this was
Chris@17 19 contrary to the PSR-7 specification. Empty arrays are no longer allowed.
Chris@17 20
Chris@17 21 ### Deprecated
Chris@17 22
Chris@17 23 - Nothing.
Chris@17 24
Chris@17 25 ### Removed
Chris@17 26
Chris@17 27 - Nothing.
Chris@17 28
Chris@17 29 ### Fixed
Chris@17 30
Chris@17 31 - [#325](https://github.com/zendframework/zend-diactoros/pull/325) ensures that `Uri::withUserInfo()` no longer ignores values of
Chris@17 32 `0` (numeric zero).
Chris@17 33
Chris@17 34 - [#325](https://github.com/zendframework/zend-diactoros/pull/325) fixes how header values are merged when calling
Chris@17 35 `withAddedHeader()`, ensuring that array keys are ignored.
Chris@17 36
Chris@17 37 ## 1.8.5 - 2018-08-10
Chris@17 38
Chris@17 39 ### Added
Chris@17 40
Chris@17 41 - Nothing.
Chris@17 42
Chris@17 43 ### Changed
Chris@17 44
Chris@17 45 - Nothing.
Chris@17 46
Chris@17 47 ### Deprecated
Chris@17 48
Chris@17 49 - Nothing.
Chris@17 50
Chris@17 51 ### Removed
Chris@17 52
Chris@17 53 - Nothing.
Chris@17 54
Chris@17 55 ### Fixed
Chris@17 56
Chris@17 57 - [#324](https://github.com/zendframework/zend-diactoros/pull/324) fixes a reference
Chris@17 58 to an undefined variable in the `ServerRequestFactory`, which made it
Chris@17 59 impossible to fetch a specific header by name.
Chris@17 60
Chris@17 61 ## 1.8.4 - 2018-08-01
Chris@17 62
Chris@17 63 ### Added
Chris@17 64
Chris@17 65 - Nothing.
Chris@17 66
Chris@17 67 ### Changed
Chris@17 68
Chris@17 69 - This release modifies how `ServerRequestFactory` marshals the request URI. In
Chris@17 70 prior releases, we would attempt to inspect the `X-Rewrite-Url` and
Chris@17 71 `X-Original-Url` headers, using their values, if present. These headers are
Chris@17 72 issued by the ISAPI_Rewrite module for IIS (developed by HeliconTech).
Chris@17 73 However, we have no way of guaranteeing that the module is what issued the
Chris@17 74 headers, making it an unreliable source for discovering the URI. As such, we
Chris@17 75 have removed this feature in this release of Diactoros.
Chris@17 76
Chris@17 77 If you are developing a middleware application, you can mimic the
Chris@17 78 functionality via middleware as follows:
Chris@17 79
Chris@17 80 ```php
Chris@17 81 use Psr\Http\Message\ResponseInterface;
Chris@17 82 use Psr\Http\Message\ServerRequestInterface;
Chris@17 83 use Psr\Http\Server\RequestHandlerInterface;
Chris@17 84 use Zend\Diactoros\Uri;
Chris@17 85
Chris@17 86 public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Chris@17 87 {
Chris@17 88 $requestUri = null;
Chris@17 89
Chris@17 90 $httpXRewriteUrl = $request->getHeaderLine('X-Rewrite-Url');
Chris@17 91 if ($httpXRewriteUrl !== null) {
Chris@17 92 $requestUri = $httpXRewriteUrl;
Chris@17 93 }
Chris@17 94
Chris@17 95 $httpXOriginalUrl = $request->getHeaderLine('X-Original-Url');
Chris@17 96 if ($httpXOriginalUrl !== null) {
Chris@17 97 $requestUri = $httpXOriginalUrl;
Chris@17 98 }
Chris@17 99
Chris@17 100 if ($requestUri !== null) {
Chris@17 101 $request = $request->withUri(new Uri($requestUri));
Chris@17 102 }
Chris@17 103
Chris@17 104 return $handler->handle($request);
Chris@17 105 }
Chris@17 106 ```
Chris@17 107
Chris@17 108 If you use middleware such as the above, make sure you also instruct your web
Chris@17 109 server to strip any incoming headers of the same name so that you can
Chris@17 110 guarantee they are issued by the ISAPI_Rewrite module.
Chris@17 111
Chris@17 112 ### Deprecated
Chris@17 113
Chris@17 114 - Nothing.
Chris@17 115
Chris@17 116 ### Removed
Chris@17 117
Chris@17 118 - Nothing.
Chris@17 119
Chris@17 120 ### Fixed
Chris@17 121
Chris@17 122 - Nothing.
Chris@17 123
Chris@17 124 ## 1.8.3 - 2018-07-24
Chris@17 125
Chris@17 126 ### Added
Chris@17 127
Chris@17 128 - Nothing.
Chris@17 129
Chris@17 130 ### Changed
Chris@17 131
Chris@17 132 - Nothing.
Chris@17 133
Chris@17 134 ### Deprecated
Chris@17 135
Chris@17 136 - Nothing.
Chris@17 137
Chris@17 138 ### Removed
Chris@17 139
Chris@17 140 - Nothing.
Chris@17 141
Chris@17 142 ### Fixed
Chris@17 143
Chris@17 144 - [#321](https://github.com/zendframework/zend-diactoros/pull/321) updates the logic in `Uri::withPort()` to ensure that it checks that the
Chris@17 145 value provided is either an integer or a string integer, as only those values
Chris@17 146 may be cast to integer without data loss.
Chris@17 147
Chris@17 148 - [#320](https://github.com/zendframework/zend-diactoros/pull/320) adds checking within `Response` to ensure that the provided reason
Chris@17 149 phrase is a string; an `InvalidArgumentException` is now raised if it is not. This change
Chris@17 150 ensures the class adheres strictly to the PSR-7 specification.
Chris@17 151
Chris@17 152 - [#319](https://github.com/zendframework/zend-diactoros/pull/319) provides a fix to `Zend\Diactoros\Response` that ensures that the status
Chris@17 153 code returned is _always_ an integer (and never a string containing an
Chris@17 154 integer), thus ensuring it strictly adheres to the PSR-7 specification.
Chris@17 155
Chris@17 156 ## 1.8.2 - 2018-07-19
Chris@17 157
Chris@17 158 ### Added
Chris@17 159
Chris@17 160 - Nothing.
Chris@17 161
Chris@17 162 ### Changed
Chris@17 163
Chris@17 164 - Nothing.
Chris@17 165
Chris@17 166 ### Deprecated
Chris@17 167
Chris@17 168 - Nothing.
Chris@17 169
Chris@17 170 ### Removed
Chris@17 171
Chris@17 172 - Nothing.
Chris@17 173
Chris@17 174 ### Fixed
Chris@17 175
Chris@17 176 - [#318](https://github.com/zendframework/zend-diactoros/pull/318) fixes the logic for discovering whether an HTTPS scheme is in play
Chris@17 177 to be case insensitive when comparing header and SAPI values, ensuring no
Chris@17 178 false negative lookups occur.
Chris@17 179
Chris@17 180 - [#314](https://github.com/zendframework/zend-diactoros/pull/314) modifies error handling around opening a file resource within
Chris@17 181 `Zend\Diactoros\Stream::setStream()` to no longer use the second argument to
Chris@17 182 `set_error_handler()`, and instead check the error type in the handler itself;
Chris@17 183 this fixes an issue when the handler is nested inside another error handler,
Chris@17 184 which currently has buggy behavior within the PHP engine.
Chris@17 185
Chris@16 186 ## 1.8.1 - 2018-07-09
Chris@16 187
Chris@16 188 ### Added
Chris@16 189
Chris@16 190 - Nothing.
Chris@16 191
Chris@16 192 ### Changed
Chris@16 193
Chris@16 194 - [#313](https://github.com/zendframework/zend-diactoros/pull/313) changes the reason phrase associated with the status code 425
Chris@16 195 to "Too Early", corresponding to a new definition of the code as specified by the IANA.
Chris@16 196
Chris@16 197 ### Deprecated
Chris@16 198
Chris@16 199 - Nothing.
Chris@16 200
Chris@16 201 ### Removed
Chris@16 202
Chris@16 203 - Nothing.
Chris@16 204
Chris@16 205 ### Fixed
Chris@16 206
Chris@16 207 - [#312](https://github.com/zendframework/zend-diactoros/pull/312) fixes how the `normalizeUploadedFiles()` utility function handles nested trees of
Chris@16 208 uploaded files, ensuring it detects them properly.
Chris@16 209
Chris@16 210 ## 1.8.0 - 2018-06-27
Chris@16 211
Chris@16 212 ### Added
Chris@16 213
Chris@16 214 - [#307](https://github.com/zendframework/zend-diactoros/pull/307) adds the following functions under the `Zend\Diactoros` namespace, each of
Chris@16 215 which may be used to derive artifacts from SAPI supergloabls for the purposes
Chris@16 216 of generating a `ServerRequest` instance:
Chris@16 217 - `normalizeServer(array $server, callable $apacheRequestHeaderCallback = null) : array`
Chris@16 218 (main purpose is to aggregate the `Authorization` header in the SAPI params
Chris@16 219 when under Apache)
Chris@16 220 - `marshalProtocolVersionFromSapi(array $server) : string`
Chris@16 221 - `marshalMethodFromSapi(array $server) : string`
Chris@16 222 - `marshalUriFromSapi(array $server, array $headers) : Uri`
Chris@16 223 - `marshalHeadersFromSapi(array $server) : array`
Chris@16 224 - `parseCookieHeader(string $header) : array`
Chris@16 225 - `createUploadedFile(array $spec) : UploadedFile` (creates the instance from
Chris@16 226 a normal `$_FILES` entry)
Chris@16 227 - `normalizeUploadedFiles(array $files) : UploadedFileInterface[]` (traverses
Chris@16 228 a potentially nested array of uploaded file instances and/or `$_FILES`
Chris@16 229 entries, including those aggregated under mod_php, php-fpm, and php-cgi in
Chris@16 230 order to create a flat array of `UploadedFileInterface` instances to use in a
Chris@16 231 request)
Chris@16 232
Chris@16 233 ### Changed
Chris@16 234
Chris@16 235 - Nothing.
Chris@16 236
Chris@16 237 ### Deprecated
Chris@16 238
Chris@16 239 - [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::normalizeServer()`; the method is
Chris@16 240 no longer used internally, and users should instead use `Zend\Diactoros\normalizeServer()`,
Chris@16 241 to which it proxies.
Chris@16 242
Chris@16 243 - [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::marshalHeaders()`; the method is
Chris@16 244 no longer used internally, and users should instead use `Zend\Diactoros\marshalHeadersFromSapi()`,
Chris@16 245 to which it proxies.
Chris@16 246
Chris@16 247 - [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::marshalUriFromServer()`; the method
Chris@16 248 is no longer used internally. Users should use `marshalUriFromSapi()` instead.
Chris@16 249
Chris@16 250 - [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::marshalRequestUri()`. the method is no longer
Chris@16 251 used internally, and currently proxies to `marshalUriFromSapi()`, pulling the
Chris@16 252 discovered path from the `Uri` instance returned by that function. Users
Chris@16 253 should use `marshalUriFromSapi()` instead.
Chris@16 254
Chris@16 255 - [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::marshalHostAndPortFromHeaders()`; the method
Chris@16 256 is no longer used internally, and currently proxies to `marshalUriFromSapi()`,
Chris@16 257 pulling the discovered host and port from the `Uri` instance returned by that
Chris@16 258 function. Users should use `marshalUriFromSapi()` instead.
Chris@16 259
Chris@16 260 - [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::getHeader()`; the method is no longer
Chris@16 261 used internally. Users should copy and paste the functionality into their own
Chris@16 262 applications if needed, or rely on headers from a fully-populated `Uri`
Chris@16 263 instance instead.
Chris@16 264
Chris@16 265 - [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::stripQueryString()`; the method is no longer
Chris@16 266 used internally, and users can mimic the functionality via the expression
Chris@16 267 `$path = explode('?', $path, 2)[0];`.
Chris@16 268
Chris@16 269 - [#307](https://github.com/zendframework/zend-diactoros/pull/307) deprecates `ServerRequestFactory::normalizeFiles()`; the functionality
Chris@16 270 is no longer used internally, and users can use `normalizeUploadedFiles()` as
Chris@16 271 a replacement.
Chris@16 272
Chris@16 273 - [#303](https://github.com/zendframework/zend-diactoros/pull/303) deprecates `Zend\Diactoros\Response\EmitterInterface` and its various implementations. These are now provided via the
Chris@16 274 [zendframework/zend-httphandlerrunner](https://docs.zendframework.com/zend-httphandlerrunner) package as 1:1 substitutions.
Chris@16 275
Chris@16 276 - [#303](https://github.com/zendframework/zend-diactoros/pull/303) deprecates the `Zend\Diactoros\Server` class. Users are directed to the `RequestHandlerRunner` class from the
Chris@16 277 [zendframework/zend-httphandlerrunner](https://docs.zendframework.com/zend-httphandlerrunner) package as an alternative.
Chris@16 278
Chris@16 279 ### Removed
Chris@16 280
Chris@16 281 - Nothing.
Chris@16 282
Chris@16 283 ### Fixed
Chris@16 284
Chris@16 285 - Nothing.
Chris@16 286
Chris@16 287 ## 1.7.2 - 2018-05-29
Chris@16 288
Chris@16 289 ### Added
Chris@16 290
Chris@16 291 - Nothing.
Chris@16 292
Chris@16 293 ### Changed
Chris@16 294
Chris@16 295 - Nothing.
Chris@16 296
Chris@16 297 ### Deprecated
Chris@16 298
Chris@16 299 - Nothing.
Chris@16 300
Chris@16 301 ### Removed
Chris@16 302
Chris@16 303 - Nothing.
Chris@16 304
Chris@16 305 ### Fixed
Chris@16 306
Chris@16 307 - [#301](https://github.com/zendframework/zend-diactoros/pull/301) adds stricter comparisons within the `uri` class to ensure non-empty
Chris@16 308 values are not treated as empty.
Chris@16 309
Chris@13 310 ## 1.7.1 - 2018-02-26
Chris@13 311
Chris@13 312 ### Added
Chris@13 313
Chris@13 314 - Nothing.
Chris@13 315
Chris@13 316 ### Changed
Chris@13 317
Chris@13 318 - [#293](https://github.com/zendframework/zend-diactoros/pull/293) updates
Chris@13 319 `Uri::getHost()` to cast the value via `strtolower()` before returning it.
Chris@13 320 While this represents a change, it is fixing a bug in our implementation:
Chris@13 321 the PSR-7 specification for the method, which follows IETF RFC 3986 section
Chris@13 322 3.2.2, requires that the host name be normalized to lowercase.
Chris@13 323
Chris@13 324 ### Deprecated
Chris@13 325
Chris@13 326 - Nothing.
Chris@13 327
Chris@13 328 ### Removed
Chris@13 329
Chris@13 330 - Nothing.
Chris@13 331
Chris@13 332 ### Fixed
Chris@13 333
Chris@13 334 - [#290](https://github.com/zendframework/zend-diactoros/pull/290) fixes
Chris@13 335 `Stream::getSize()` such that it checks that the result of `fstat` was
Chris@13 336 succesful before attempting to return its `size` member; in the case of an
Chris@13 337 error, it now returns `null`.
Chris@13 338
Chris@12 339 ## 1.7.0 - 2018-01-04
Chris@12 340
Chris@12 341 ### Added
Chris@12 342
Chris@12 343 - [#285](https://github.com/zendframework/zend-diactoros/pull/285) adds a new
Chris@12 344 custom response type, `Zend\Diactoros\Response\XmlResponse`, for generating
Chris@12 345 responses representing XML. Usage is the same as with the `HtmlResponse` or
Chris@12 346 `TextResponse`; the response generated will have a `Content-Type:
Chris@12 347 application/xml` header by default.
Chris@12 348
Chris@12 349 - [#280](https://github.com/zendframework/zend-diactoros/pull/280) adds the
Chris@12 350 response status code/phrase pairing "103 Early Hints" to the
Chris@12 351 `Response::$phrases` property. This is a new status proposed via
Chris@12 352 [RFC 8297](https://datatracker.ietf.org/doc/rfc8297/).
Chris@12 353
Chris@12 354 - [#279](https://github.com/zendframework/zend-diactoros/pull/279) adds explicit
Chris@12 355 support for PHP 7.2; previously, we'd allowed build failures, though none
Chris@12 356 occured; we now require PHP 7.2 builds to pass.
Chris@12 357
Chris@12 358 ### Changed
Chris@12 359
Chris@12 360 - Nothing.
Chris@12 361
Chris@12 362 ### Deprecated
Chris@12 363
Chris@12 364 - Nothing.
Chris@12 365
Chris@12 366 ### Removed
Chris@12 367
Chris@12 368 - Nothing.
Chris@12 369
Chris@12 370 ### Fixed
Chris@12 371
Chris@12 372 - Nothing.
Chris@12 373
Chris@12 374 ## 1.6.1 - 2017-10-12
Chris@12 375
Chris@12 376 ### Added
Chris@12 377
Chris@12 378 - Nothing.
Chris@12 379
Chris@12 380 ### Changed
Chris@12 381
Chris@12 382 - [#273](https://github.com/zendframework/zend-diactoros/pull/273) updates each
Chris@12 383 of the SAPI emitter implementations to emit the status line after emitting
Chris@12 384 other headers; this is done to ensure that the status line is not overridden
Chris@12 385 by PHP.
Chris@12 386
Chris@12 387 ### Deprecated
Chris@12 388
Chris@12 389 - Nothing.
Chris@12 390
Chris@12 391 ### Removed
Chris@12 392
Chris@12 393 - Nothing.
Chris@12 394
Chris@12 395 ### Fixed
Chris@12 396
Chris@12 397 - [#273](https://github.com/zendframework/zend-diactoros/pull/273) modifies how
Chris@12 398 the `SapiEmitterTrait` calls `header()` to ensure that a response code is
Chris@12 399 _always_ passed as the third argument; this is done to prevent PHP from
Chris@12 400 silently overriding it.
Chris@12 401
Chris@12 402 ## 1.6.0 - 2017-09-13
Chris@12 403
Chris@12 404 ### Added
Chris@12 405
Chris@12 406 - Nothing.
Chris@12 407
Chris@12 408 ### Changed
Chris@12 409
Chris@12 410 - [#270](https://github.com/zendframework/zend-diactoros/pull/270) changes the
Chris@12 411 behavior of `Zend\Diactoros\Server`: it no longer creates an output buffer.
Chris@12 412
Chris@12 413 - [#270](https://github.com/zendframework/zend-diactoros/pull/270) changes the
Chris@12 414 behavior of the two SAPI emitters in two backwards-incompatible ways:
Chris@12 415
Chris@12 416 - They no longer auto-inject a `Content-Length` header. If you need this
Chris@12 417 functionality, zendframework/zend-expressive-helpers 4.1+ provides it via
Chris@12 418 `Zend\Expressive\Helper\ContentLengthMiddleware`.
Chris@12 419
Chris@12 420 - They no longer flush the output buffer. Instead, if headers have been sent,
Chris@12 421 or the output buffer exists and has a non-zero length, the emitters raise an
Chris@12 422 exception, as mixed PSR-7/output buffer content creates a blocking issue.
Chris@12 423 If you are emitting content via `echo`, `print`, `var_dump`, etc., or not
Chris@12 424 catching PHP errors or exceptions, you will need to either fix your
Chris@12 425 application to always work with a PSR-7 response, or provide your own
Chris@12 426 emitters that allow mixed output mechanisms.
Chris@12 427
Chris@12 428 ### Deprecated
Chris@12 429
Chris@12 430 - Nothing.
Chris@12 431
Chris@12 432 ### Removed
Chris@12 433
Chris@12 434 - Nothing.
Chris@12 435
Chris@12 436 ### Fixed
Chris@12 437
Chris@12 438 - Nothing.
Chris@12 439
Chris@12 440 ## 1.5.0 - 2017-08-22
Chris@12 441
Chris@12 442 ### Added
Chris@12 443
Chris@12 444 - [#205](https://github.com/zendframework/zend-diactoros/pull/205) adds support
Chris@12 445 for PHP 7.2.
Chris@12 446
Chris@12 447 - [#250](https://github.com/zendframework/zend-diactoros/pull/250) adds a new
Chris@12 448 API to `JsonResponse` to avoid the need for decoding the response body in
Chris@12 449 order to make changes to the underlying content. New methods include:
Chris@12 450 - `getPayload()`: retrieve the unencoded payload.
Chris@12 451 - `withPayload($data)`: create a new instance with the given data.
Chris@12 452 - `getEncodingOptions()`: retrieve the flags to use when encoding the payload
Chris@12 453 to JSON.
Chris@12 454 - `withEncodingOptions(int $encodingOptions)`: create a new instance that uses
Chris@12 455 the provided flags when encoding the payload to JSON.
Chris@12 456
Chris@12 457 ### Changed
Chris@12 458
Chris@12 459 - [#249](https://github.com/zendframework/zend-diactoros/pull/249) changes the
Chris@12 460 behavior of the various `Uri::with*()` methods slightly: if the value
Chris@12 461 represents no change, these methods will return the same instance instead of a
Chris@12 462 new one.
Chris@12 463
Chris@12 464 - [#248](https://github.com/zendframework/zend-diactoros/pull/248) changes the
Chris@12 465 behavior of `Uri::getUserInfo()` slightly: it now (correctly) returns the
Chris@12 466 percent-encoded values for the user and/or password, per RFC 3986 Section
Chris@12 467 3.2.1. `withUserInfo()` will percent-encode values, using a mechanism that
Chris@12 468 prevents double-encoding.
Chris@12 469
Chris@12 470 - [#243](https://github.com/zendframework/zend-diactoros/pull/243) changes the
Chris@12 471 exception messages thrown by `UploadedFile::getStream()` and `moveTo()` when
Chris@12 472 an upload error exists to include details about the upload error.
Chris@12 473
Chris@12 474 - [#233](https://github.com/zendframework/zend-diactoros/pull/233) adds a new
Chris@12 475 argument to `SapiStreamEmitter::emit`, `$maxBufferLevel` **between** the
Chris@12 476 `$response` and `$maxBufferLength` arguments. This was done because the
Chris@12 477 `Server::listen()` method passes only the response and `$maxBufferLevel` to
Chris@12 478 emitters; previously, this often meant that streams were being chunked 2 bytes
Chris@12 479 at a time versus the expected default of 8kb.
Chris@12 480
Chris@12 481 If you were calling the `SapiStreamEmitter::emit()` method manually
Chris@12 482 previously, you will need to update your code.
Chris@12 483
Chris@12 484 ### Deprecated
Chris@12 485
Chris@12 486 - Nothing.
Chris@12 487
Chris@12 488 ### Removed
Chris@12 489
Chris@12 490 - [#205](https://github.com/zendframework/zend-diactoros/pull/205) and
Chris@12 491 [#243](https://github.com/zendframework/zend-diactoros/pull/243) **remove
Chris@12 492 support for PHP versions prior to 5.6 as well as HHVM**.
Chris@12 493
Chris@12 494 ### Fixed
Chris@12 495
Chris@12 496 - [#248](https://github.com/zendframework/zend-diactoros/pull/248) fixes how the
Chris@12 497 `Uri` class provides user-info within the URI authority; the value is now
Chris@12 498 correctly percent-encoded , per RFC 3986 Section 3.2.1.
Chris@12 499
Chris@0 500 ## 1.4.1 - 2017-08-17
Chris@0 501
Chris@0 502 ### Added
Chris@0 503
Chris@0 504 - Nothing.
Chris@0 505
Chris@0 506 ### Deprecated
Chris@0 507
Chris@0 508 - Nothing.
Chris@0 509
Chris@0 510 ### Removed
Chris@0 511
Chris@0 512 - [#260](https://github.com/zendframework/zend-diactoros/pull/260) removes
Chris@0 513 support for HHVM, as tests have failed against it for some time.
Chris@0 514
Chris@0 515 ### Fixed
Chris@0 516
Chris@0 517 - [#247](https://github.com/zendframework/zend-diactoros/pull/247) fixes the
Chris@0 518 `Stream` and `RelativeStream` `__toString()` method implementations to check
Chris@0 519 if the stream `isSeekable()` before attempting to `rewind()` it, ensuring that
Chris@0 520 the method does not raise exceptions (PHP does not allow exceptions in that
Chris@0 521 method). In particular, this fixes an issue when using AWS S3 streams.
Chris@0 522
Chris@0 523 - [#252](https://github.com/zendframework/zend-diactoros/pull/252) provides a
Chris@0 524 fix to the `SapiEmitterTrait` to ensure that any `Set-Cookie` headers in the
Chris@0 525 response instance do not override those set by PHP when a session is created
Chris@0 526 and/or regenerated.
Chris@0 527
Chris@0 528 - [#257](https://github.com/zendframework/zend-diactoros/pull/257) provides a
Chris@0 529 fix for the `PhpInputStream::read()` method to ensure string content that
Chris@0 530 evaluates as empty (including `0`) is still cached.
Chris@0 531
Chris@0 532 - [#258](https://github.com/zendframework/zend-diactoros/pull/258) updates the
Chris@0 533 `Uri::filterPath()` method to allow parens within a URI path, per [RFC 3986
Chris@0 534 section 3.3](https://tools.ietf.org/html/rfc3986#section-3.3) (parens are
Chris@0 535 within the character set "sub-delims").
Chris@0 536
Chris@0 537 ## 1.4.0 - 2017-04-06
Chris@0 538
Chris@0 539 ### Added
Chris@0 540
Chris@0 541 - [#219](https://github.com/zendframework/zend-diactoros/pull/219) adds two new
Chris@0 542 classes, `Zend\Diactoros\Request\ArraySerializer` and
Chris@0 543 `Zend\Diactoros\Response\ArraySerializer`. Each exposes the static methods
Chris@0 544 `toArray()` and `fromArray()`, allowing de/serialization of messages from and
Chris@0 545 to arrays.
Chris@0 546
Chris@0 547 - [#236](https://github.com/zendframework/zend-diactoros/pull/236) adds two new
Chris@0 548 constants to the `Response` class: `MIN_STATUS_CODE_VALUE` and
Chris@0 549 `MAX_STATUS_CODE_VALUE`.
Chris@0 550
Chris@0 551 ### Changes
Chris@0 552
Chris@0 553 - [#240](https://github.com/zendframework/zend-diactoros/pull/240) changes the
Chris@0 554 behavior of `ServerRequestFactory::fromGlobals()` when no `$cookies` argument
Chris@0 555 is present. Previously, it would use `$_COOKIES`; now, if a `Cookie` header is
Chris@0 556 present, it will parse and use that to populate the instance instead.
Chris@0 557
Chris@0 558 This change allows utilizing cookies that contain period characters (`.`) in
Chris@0 559 their names (PHP's built-in cookie handling renames these to replace `.` with
Chris@0 560 `_`, which can lead to synchronization issues with clients).
Chris@0 561
Chris@0 562 - [#235](https://github.com/zendframework/zend-diactoros/pull/235) changes the
Chris@0 563 behavior of `Uri::__toString()` to better follow proscribed behavior in PSR-7.
Chris@0 564 In particular, prior to this release, if a scheme was missing but an authority
Chris@0 565 was present, the class was incorrectly returning a value that did not include
Chris@0 566 a `//` prefix. As of this release, it now does this correctly.
Chris@0 567
Chris@0 568 ### Deprecated
Chris@0 569
Chris@0 570 - Nothing.
Chris@0 571
Chris@0 572 ### Removed
Chris@0 573
Chris@0 574 - Nothing.
Chris@0 575
Chris@0 576 ### Fixed
Chris@0 577
Chris@0 578 - Nothing.
Chris@0 579
Chris@0 580 ## 1.3.11 - 2017-04-06
Chris@0 581
Chris@0 582 ### Added
Chris@0 583
Chris@0 584 - Nothing.
Chris@0 585
Chris@0 586 ### Changes
Chris@0 587
Chris@0 588 - [#241](https://github.com/zendframework/zend-diactoros/pull/241) changes the
Chris@0 589 constraint by which the package provides `psr/http-message-implementation` to
Chris@0 590 simply `1.0` instead of `~1.0.0`, to follow how other implementations provide
Chris@0 591 PSR-7.
Chris@0 592
Chris@0 593 ### Deprecated
Chris@0 594
Chris@0 595 - Nothing.
Chris@0 596
Chris@0 597 ### Removed
Chris@0 598
Chris@0 599 - Nothing.
Chris@0 600
Chris@0 601 ### Fixed
Chris@0 602
Chris@0 603 - [#161](https://github.com/zendframework/zend-diactoros/pull/161) adds
Chris@0 604 additional validations to header names and values to ensure no malformed values
Chris@0 605 are provided.
Chris@0 606
Chris@0 607 - [#234](https://github.com/zendframework/zend-diactoros/pull/234) fixes a
Chris@0 608 number of reason phrases in the `Response` instance, and adds automation from
Chris@0 609 the canonical IANA sources to ensure any new phrases added are correct.
Chris@0 610
Chris@0 611 ## 1.3.10 - 2017-01-23
Chris@0 612
Chris@0 613 ### Added
Chris@0 614
Chris@0 615 - Nothing.
Chris@0 616
Chris@0 617 ### Deprecated
Chris@0 618
Chris@0 619 - Nothing.
Chris@0 620
Chris@0 621 ### Removed
Chris@0 622
Chris@0 623 - Nothing.
Chris@0 624
Chris@0 625 ### Fixed
Chris@0 626
Chris@0 627 - [#226](https://github.com/zendframework/zend-diactoros/pull/226) fixed an
Chris@0 628 issue with the `SapiStreamEmitter` causing the response body to be cast
Chris@0 629 to `(string)` and also be read as a readable stream, potentially producing
Chris@0 630 double output.
Chris@0 631
Chris@0 632 ## 1.3.9 - 2017-01-17
Chris@0 633
Chris@0 634 ### Added
Chris@0 635
Chris@0 636 - Nothing.
Chris@0 637
Chris@0 638 ### Deprecated
Chris@0 639
Chris@0 640 - Nothing.
Chris@0 641
Chris@0 642 ### Removed
Chris@0 643
Chris@0 644 - Nothing.
Chris@0 645
Chris@0 646 ### Fixed
Chris@0 647
Chris@0 648 - [#223](https://github.com/zendframework/zend-diactoros/issues/223)
Chris@0 649 [#224](https://github.com/zendframework/zend-diactoros/pull/224) fixed an issue
Chris@0 650 with the `SapiStreamEmitter` consuming too much memory when producing output
Chris@0 651 for readable bodies.
Chris@0 652
Chris@0 653 ## 1.3.8 - 2017-01-05
Chris@0 654
Chris@0 655 ### Added
Chris@0 656
Chris@0 657 - Nothing.
Chris@0 658
Chris@0 659 ### Deprecated
Chris@0 660
Chris@0 661 - Nothing.
Chris@0 662
Chris@0 663 ### Removed
Chris@0 664
Chris@0 665 - Nothing.
Chris@0 666
Chris@0 667 ### Fixed
Chris@0 668
Chris@0 669 - [#222](https://github.com/zendframework/zend-diactoros/pull/222) fixes the
Chris@0 670 `SapiStreamEmitter`'s handling of the `Content-Range` header to properly only
Chris@0 671 emit a range of bytes if the header value is in the form `bytes {first-last}/length`.
Chris@0 672 This allows using other range units, such as `items`, without incorrectly
Chris@0 673 emitting truncated content.
Chris@0 674
Chris@0 675 ## 1.3.7 - 2016-10-11
Chris@0 676
Chris@0 677 ### Added
Chris@0 678
Chris@0 679 - [#208](https://github.com/zendframework/zend-diactoros/pull/208) adds several
Chris@0 680 missing response codes to `Zend\Diactoros\Response`, including:
Chris@0 681 - 226 ('IM used')
Chris@0 682 - 308 ('Permanent Redirect')
Chris@0 683 - 444 ('Connection Closed Without Response')
Chris@0 684 - 499 ('Client Closed Request')
Chris@0 685 - 510 ('Not Extended')
Chris@0 686 - 599 ('Network Connect Timeout Error')
Chris@0 687 - [#211](https://github.com/zendframework/zend-diactoros/pull/211) adds support
Chris@0 688 for UTF-8 characters in query strings handled by `Zend\Diactoros\Uri`.
Chris@0 689
Chris@0 690 ### Deprecated
Chris@0 691
Chris@0 692 - Nothing.
Chris@0 693
Chris@0 694 ### Removed
Chris@0 695
Chris@0 696 - Nothing.
Chris@0 697
Chris@0 698 ### Fixed
Chris@0 699
Chris@0 700 - Nothing.
Chris@0 701
Chris@0 702 ## 1.3.6 - 2016-09-07
Chris@0 703
Chris@0 704 ### Added
Chris@0 705
Chris@0 706 - [#170](https://github.com/zendframework/zend-diactoros/pull/170) prepared
Chris@0 707 documentation for publication at https://zendframework.github.io/zend-diactoros/
Chris@0 708 - [#165](https://github.com/zendframework/zend-diactoros/pull/165) adds support
Chris@0 709 for Apache `REDIRECT_HTTP_*` header detection in the `ServerRequestFactory`.
Chris@0 710 - [#166](https://github.com/zendframework/zend-diactoros/pull/166) adds support
Chris@0 711 for UTF-8 characters in URI paths.
Chris@0 712 - [#204](https://github.com/zendframework/zend-diactoros/pull/204) adds testing
Chris@0 713 against PHP 7.1 release-candidate builds.
Chris@0 714
Chris@0 715 ### Deprecated
Chris@0 716
Chris@0 717 - Nothing.
Chris@0 718
Chris@0 719 ### Removed
Chris@0 720
Chris@0 721 - Nothing.
Chris@0 722
Chris@0 723 ### Fixed
Chris@0 724
Chris@0 725 - [#186](https://github.com/zendframework/zend-diactoros/pull/186) fixes a typo
Chris@0 726 in a variable name within the `SapiStreamEmitter`.
Chris@0 727 - [#200](https://github.com/zendframework/zend-diactoros/pull/200) updates the
Chris@0 728 `SapiStreamEmitter` to implement a check for `isSeekable()` prior to attempts
Chris@0 729 to rewind; this allows it to work with non-seekable streams such as the
Chris@0 730 `CallbackStream`.
Chris@0 731 - [#169](https://github.com/zendframework/zend-diactoros/pull/169) ensures that
Chris@0 732 response serialization always provides a `\r\n\r\n` sequence following the
Chris@0 733 headers, even when no message body is present, to ensure it conforms with RFC
Chris@0 734 7230.
Chris@0 735 - [#175](https://github.com/zendframework/zend-diactoros/pull/175) updates the
Chris@0 736 `Request` class to set the `Host` header from the URI host if no header is
Chris@0 737 already present. (Ensures conformity with PSR-7 specification.)
Chris@0 738 - [#197](https://github.com/zendframework/zend-diactoros/pull/197) updates the
Chris@0 739 `Uri` class to ensure that string serialization does not include a colon after
Chris@0 740 the host name if no port is present in the instance.
Chris@0 741
Chris@0 742 ## 1.3.5 - 2016-03-17
Chris@0 743
Chris@0 744 ### Added
Chris@0 745
Chris@0 746 - Nothing.
Chris@0 747
Chris@0 748 ### Deprecated
Chris@0 749
Chris@0 750 - Nothing.
Chris@0 751
Chris@0 752 ### Removed
Chris@0 753
Chris@0 754 - Nothing.
Chris@0 755
Chris@0 756 ### Fixed
Chris@0 757
Chris@0 758 - [#160](https://github.com/zendframework/zend-diactoros/pull/160) fixes HTTP
Chris@0 759 protocol detection in the `ServerRequestFactory` to work correctly with HTTP/2.
Chris@0 760
Chris@0 761 ## 1.3.4 - 2016-03-17
Chris@0 762
Chris@0 763 ### Added
Chris@0 764
Chris@0 765 - [#119](https://github.com/zendframework/zend-diactoros/pull/119) adds the 451
Chris@0 766 (Unavailable for Legal Reasons) status code to the `Response` class.
Chris@0 767
Chris@0 768 ### Deprecated
Chris@0 769
Chris@0 770 - Nothing.
Chris@0 771
Chris@0 772 ### Removed
Chris@0 773
Chris@0 774 - Nothing.
Chris@0 775
Chris@0 776 ### Fixed
Chris@0 777
Chris@0 778 - [#117](https://github.com/zendframework/zend-diactoros/pull/117) provides
Chris@0 779 validation of the HTTP protocol version.
Chris@0 780 - [#127](https://github.com/zendframework/zend-diactoros/pull/127) now properly
Chris@0 781 removes attributes with `null` values when calling `withoutAttribute()`.
Chris@0 782 - [#132](https://github.com/zendframework/zend-diactoros/pull/132) updates the
Chris@0 783 `ServerRequestFactory` to marshal the request path fragment, if present.
Chris@0 784 - [#142](https://github.com/zendframework/zend-diactoros/pull/142) updates the
Chris@0 785 exceptions thrown by `HeaderSecurity` to include the header name and/or
Chris@0 786 value.
Chris@0 787 - [#148](https://github.com/zendframework/zend-diactoros/pull/148) fixes several
Chris@0 788 stream operations to ensure they raise exceptions when the internal pointer
Chris@0 789 is at an invalid position.
Chris@0 790 - [#151](https://github.com/zendframework/zend-diactoros/pull/151) ensures
Chris@0 791 URI fragments are properly encoded.
Chris@0 792
Chris@0 793 ## 1.3.3 - 2016-01-04
Chris@0 794
Chris@0 795 ### Added
Chris@0 796
Chris@0 797 - Nothing.
Chris@0 798
Chris@0 799 ### Deprecated
Chris@0 800
Chris@0 801 - Nothing.
Chris@0 802
Chris@0 803 ### Removed
Chris@0 804
Chris@0 805 - Nothing.
Chris@0 806
Chris@0 807 ### Fixed
Chris@0 808
Chris@0 809 - [#135](https://github.com/zendframework/zend-diactoros/pull/135) fixes the
Chris@0 810 behavior of `ServerRequestFactory::marshalHeaders()` to no longer omit
Chris@0 811 `Cookie` headers from the aggregated headers. While the values are parsed and
Chris@0 812 injected into the cookie params, it's useful to have access to the raw headers
Chris@0 813 as well.
Chris@0 814
Chris@0 815 ## 1.3.2 - 2015-12-22
Chris@0 816
Chris@0 817 ### Added
Chris@0 818
Chris@0 819 - [#124](https://github.com/zendframework/zend-diactoros/pull/124) adds four
Chris@0 820 more optional arguments to the `ServerRequest` constructor:
Chris@0 821 - `array $cookies`
Chris@0 822 - `array $queryParams`
Chris@0 823 - `null|array|object $parsedBody`
Chris@0 824 - `string $protocolVersion`
Chris@0 825 `ServerRequestFactory` was updated to pass values for each of these parameters
Chris@0 826 when creating an instance, instead of using the related `with*()` methods on
Chris@0 827 an instance.
Chris@0 828
Chris@0 829 ### Deprecated
Chris@0 830
Chris@0 831 - Nothing.
Chris@0 832
Chris@0 833 ### Removed
Chris@0 834
Chris@0 835 - Nothing.
Chris@0 836
Chris@0 837 ### Fixed
Chris@0 838
Chris@0 839 - [#122](https://github.com/zendframework/zend-diactoros/pull/122) updates the
Chris@0 840 `ServerRequestFactory` to retrieve the HTTP protocol version and inject it in
Chris@0 841 the generated `ServerRequest`, which previously was not performed.
Chris@0 842
Chris@0 843 ## 1.3.1 - 2015-12-16
Chris@0 844
Chris@0 845 ### Added
Chris@0 846
Chris@0 847 - Nothing.
Chris@0 848
Chris@0 849 ### Deprecated
Chris@0 850
Chris@0 851 - Nothing.
Chris@0 852
Chris@0 853 ### Removed
Chris@0 854
Chris@0 855 - Nothing.
Chris@0 856
Chris@0 857 ### Fixed
Chris@0 858
Chris@0 859 - [#113](https://github.com/zendframework/zend-diactoros/pull/113) fixes an
Chris@0 860 issue in the response serializer, ensuring that the status code in the
Chris@0 861 deserialized response is an integer.
Chris@0 862 - [#115](https://github.com/zendframework/zend-diactoros/pull/115) fixes an
Chris@0 863 issue in the various text-basd response types (`TextResponse`, `HtmlResponse`,
Chris@0 864 and `JsonResponse`); due to the fact that the constructor was not
Chris@0 865 rewinding the message body stream, `getContents()` was thus returning `null`,
Chris@0 866 as the pointer was at the end of the stream. The constructor now rewinds the
Chris@0 867 stream after populating it in the constructor.
Chris@0 868
Chris@0 869 ## 1.3.0 - 2015-12-15
Chris@0 870
Chris@0 871 ### Added
Chris@0 872
Chris@0 873 - [#110](https://github.com/zendframework/zend-diactoros/pull/110) adds
Chris@0 874 `Zend\Diactoros\Response\SapiEmitterTrait`, which provides the following
Chris@0 875 private method definitions:
Chris@0 876 - `injectContentLength()`
Chris@0 877 - `emitStatusLine()`
Chris@0 878 - `emitHeaders()`
Chris@0 879 - `flush()`
Chris@0 880 - `filterHeader()`
Chris@0 881 The `SapiEmitter` implementation has been updated to remove those methods and
Chris@0 882 instead compose the trait.
Chris@0 883 - [#111](https://github.com/zendframework/zend-diactoros/pull/111) adds
Chris@0 884 a new emitter implementation, `SapiStreamEmitter`; this emitter type will
Chris@0 885 loop through the stream instead of emitting it in one go, and supports content
Chris@0 886 ranges.
Chris@0 887
Chris@0 888 ### Deprecated
Chris@0 889
Chris@0 890 - Nothing.
Chris@0 891
Chris@0 892 ### Removed
Chris@0 893
Chris@0 894 - Nothing.
Chris@0 895
Chris@0 896 ### Fixed
Chris@0 897
Chris@0 898 - Nothing.
Chris@0 899
Chris@0 900 ## 1.2.1 - 2015-12-15
Chris@0 901
Chris@0 902 ### Added
Chris@0 903
Chris@0 904 - Nothing.
Chris@0 905
Chris@0 906 ### Deprecated
Chris@0 907
Chris@0 908 - Nothing.
Chris@0 909
Chris@0 910 ### Removed
Chris@0 911
Chris@0 912 - Nothing.
Chris@0 913
Chris@0 914 ### Fixed
Chris@0 915
Chris@0 916 - [#101](https://github.com/zendframework/zend-diactoros/pull/101) fixes the
Chris@0 917 `withHeader()` implementation to ensure that if the header existed previously
Chris@0 918 but using a different casing strategy, the previous version will be removed
Chris@0 919 in the cloned instance.
Chris@0 920 - [#103](https://github.com/zendframework/zend-diactoros/pull/103) fixes the
Chris@0 921 constructor of `Response` to ensure that null status codes are not possible.
Chris@0 922 - [#99](https://github.com/zendframework/zend-diactoros/pull/99) fixes
Chris@0 923 validation of header values submitted via request and response constructors as
Chris@0 924 follows:
Chris@0 925 - numeric (integer and float) values are now properly allowed (this solves
Chris@0 926 some reported issues with setting Content-Length headers)
Chris@0 927 - invalid header names (non-string values or empty strings) now raise an
Chris@0 928 exception.
Chris@0 929 - invalid individual header values (non-string, non-numeric) now raise an
Chris@0 930 exception.
Chris@0 931
Chris@0 932 ## 1.2.0 - 2015-11-24
Chris@0 933
Chris@0 934 ### Added
Chris@0 935
Chris@0 936 - [#88](https://github.com/zendframework/zend-diactoros/pull/88) updates the
Chris@0 937 `SapiEmitter` to emit a `Content-Length` header with the content length as
Chris@0 938 reported by the response body stream, assuming that
Chris@0 939 `StreamInterface::getSize()` returns an integer.
Chris@0 940 - [#77](https://github.com/zendframework/zend-diactoros/pull/77) adds a new
Chris@0 941 response type, `Zend\Diactoros\Response\TextResponse`, for returning plain
Chris@0 942 text responses. By default, it sets the content type to `text/plain;
Chris@0 943 charset=utf-8`; per the other response types, the signature is `new
Chris@0 944 TextResponse($text, $status = 200, array $headers = [])`.
Chris@0 945 - [#90](https://github.com/zendframework/zend-diactoros/pull/90) adds a new
Chris@0 946 `Zend\Diactoros\CallbackStream`, allowing you to back a stream with a PHP
Chris@0 947 callable (such as a generator) to generate the message content. Its
Chris@0 948 constructor accepts the callable: `$stream = new CallbackStream($callable);`
Chris@0 949
Chris@0 950 ### Deprecated
Chris@0 951
Chris@0 952 - Nothing.
Chris@0 953
Chris@0 954 ### Removed
Chris@0 955
Chris@0 956 - Nothing.
Chris@0 957
Chris@0 958 ### Fixed
Chris@0 959
Chris@0 960 - [#77](https://github.com/zendframework/zend-diactoros/pull/77) updates the
Chris@0 961 `HtmlResponse` to set the charset to utf-8 by default (if no content type
Chris@0 962 header is provided at instantiation).
Chris@0 963
Chris@0 964 ## 1.1.4 - 2015-10-16
Chris@0 965
Chris@0 966 ### Added
Chris@0 967
Chris@0 968 - [#98](https://github.com/zendframework/zend-diactoros/pull/98) adds
Chris@0 969 `JSON_UNESCAPED_SLASHES` to the default `json_encode` flags used by
Chris@0 970 `Zend\Diactoros\Response\JsonResponse`.
Chris@0 971
Chris@0 972 ### Deprecated
Chris@0 973
Chris@0 974 - Nothing.
Chris@0 975
Chris@0 976 ### Removed
Chris@0 977
Chris@0 978 - Nothing.
Chris@0 979
Chris@0 980 ### Fixed
Chris@0 981
Chris@0 982 - [#96](https://github.com/zendframework/zend-diactoros/pull/96) updates
Chris@0 983 `withPort()` to allow `null` port values (indicating usage of default for
Chris@0 984 the given scheme).
Chris@0 985 - [#91](https://github.com/zendframework/zend-diactoros/pull/91) fixes the
Chris@0 986 logic of `withUri()` to do a case-insensitive check for an existing `Host`
Chris@0 987 header, replacing it with the new one.
Chris@0 988
Chris@0 989 ## 1.1.3 - 2015-08-10
Chris@0 990
Chris@0 991 ### Added
Chris@0 992
Chris@0 993 - [#73](https://github.com/zendframework/zend-diactoros/pull/73) adds caching of
Chris@0 994 the vendor directory to the Travis-CI configuration, to speed up builds.
Chris@0 995
Chris@0 996 ### Deprecated
Chris@0 997
Chris@0 998 - Nothing.
Chris@0 999
Chris@0 1000 ### Removed
Chris@0 1001
Chris@0 1002 - Nothing.
Chris@0 1003
Chris@0 1004 ### Fixed
Chris@0 1005
Chris@0 1006 - [#71](https://github.com/zendframework/zend-diactoros/pull/71) fixes the
Chris@0 1007 docblock of the `JsonResponse` constructor to typehint the `$data` argument
Chris@0 1008 as `mixed`.
Chris@0 1009 - [#73](https://github.com/zendframework/zend-diactoros/pull/73) changes the
Chris@0 1010 behavior in `Request` such that if it marshals a stream during instantiation,
Chris@0 1011 the stream is marked as writeable (specifically, mode `wb+`).
Chris@0 1012 - [#85](https://github.com/zendframework/zend-diactoros/pull/85) updates the
Chris@0 1013 behavior of `Zend\Diactoros\Uri`'s various `with*()` methods that are
Chris@0 1014 documented as accepting strings to raise exceptions on non-string input.
Chris@0 1015 Previously, several simply passed non-string input on verbatim, others
Chris@0 1016 normalized the input, and a few correctly raised the exceptions. Behavior is
Chris@0 1017 now consistent across each.
Chris@0 1018 - [#87](https://github.com/zendframework/zend-diactoros/pull/87) fixes
Chris@0 1019 `UploadedFile` to ensure that `moveTo()` works correctly in non-SAPI
Chris@0 1020 environments when the file provided to the constructor is a path.
Chris@0 1021
Chris@0 1022 ## 1.1.2 - 2015-07-12
Chris@0 1023
Chris@0 1024 ### Added
Chris@0 1025
Chris@0 1026 - Nothing.
Chris@0 1027
Chris@0 1028 ### Deprecated
Chris@0 1029
Chris@0 1030 - Nothing.
Chris@0 1031
Chris@0 1032 ### Removed
Chris@0 1033
Chris@0 1034 - Nothing.
Chris@0 1035
Chris@0 1036 ### Fixed
Chris@0 1037
Chris@0 1038 - [#67](https://github.com/zendframework/zend-diactoros/pull/67) ensures that
Chris@0 1039 the `Stream` class only accepts `stream` resources, not any resource.
Chris@0 1040
Chris@0 1041 ## 1.1.1 - 2015-06-25
Chris@0 1042
Chris@0 1043 ### Added
Chris@0 1044
Chris@0 1045 - Nothing.
Chris@0 1046
Chris@0 1047 ### Deprecated
Chris@0 1048
Chris@0 1049 - Nothing.
Chris@0 1050
Chris@0 1051 ### Removed
Chris@0 1052
Chris@0 1053 - Nothing.
Chris@0 1054
Chris@0 1055 ### Fixed
Chris@0 1056
Chris@0 1057 - [#64](https://github.com/zendframework/zend-diactoros/pull/64) fixes the
Chris@0 1058 behavior of `JsonResponse` with regards to serialization of `null` and scalar
Chris@0 1059 values; the new behavior is to serialize them verbatim, without any casting.
Chris@0 1060
Chris@0 1061 ## 1.1.0 - 2015-06-24
Chris@0 1062
Chris@0 1063 ### Added
Chris@0 1064
Chris@0 1065 - [#52](https://github.com/zendframework/zend-diactoros/pull/52),
Chris@0 1066 [#58](https://github.com/zendframework/zend-diactoros/pull/58),
Chris@0 1067 [#59](https://github.com/zendframework/zend-diactoros/pull/59), and
Chris@0 1068 [#61](https://github.com/zendframework/zend-diactoros/pull/61) create several
Chris@0 1069 custom response types for simplifying response creation:
Chris@0 1070
Chris@0 1071 - `Zend\Diactoros\Response\HtmlResponse` accepts HTML content via its
Chris@0 1072 constructor, and sets the `Content-Type` to `text/html`.
Chris@0 1073 - `Zend\Diactoros\Response\JsonResponse` accepts data to serialize to JSON via
Chris@0 1074 its constructor, and sets the `Content-Type` to `application/json`.
Chris@0 1075 - `Zend\Diactoros\Response\EmptyResponse` allows creating empty, read-only
Chris@0 1076 responses, with a default status code of 204.
Chris@0 1077 - `Zend\Diactoros\Response\RedirectResponse` allows specifying a URI for the
Chris@0 1078 `Location` header in the constructor, with a default status code of 302.
Chris@0 1079
Chris@0 1080 Each also accepts an optional status code, and optional headers (which can
Chris@0 1081 also be used to provide an alternate `Content-Type` in the case of the HTML
Chris@0 1082 and JSON responses).
Chris@0 1083
Chris@0 1084 ### Deprecated
Chris@0 1085
Chris@0 1086 - Nothing.
Chris@0 1087
Chris@0 1088 ### Removed
Chris@0 1089
Chris@0 1090 - [#43](https://github.com/zendframework/zend-diactoros/pull/43) removed both
Chris@0 1091 `ServerRequestFactory::marshalUri()` and `ServerRequestFactory::marshalHostAndPort()`,
Chris@0 1092 which were deprecated prior to the 1.0 release.
Chris@0 1093
Chris@0 1094 ### Fixed
Chris@0 1095
Chris@0 1096 - [#29](https://github.com/zendframework/zend-diactoros/pull/29) fixes request
Chris@0 1097 method validation to allow any valid token as defined by [RFC
Chris@0 1098 7230](http://tools.ietf.org/html/rfc7230#appendix-B). This allows usage of
Chris@0 1099 custom request methods, vs a static, hard-coded list.
Chris@0 1100
Chris@0 1101 ## 1.0.5 - 2015-06-24
Chris@0 1102
Chris@0 1103 ### Added
Chris@0 1104
Chris@0 1105 - Nothing.
Chris@0 1106
Chris@0 1107 ### Deprecated
Chris@0 1108
Chris@0 1109 - Nothing.
Chris@0 1110
Chris@0 1111 ### Removed
Chris@0 1112
Chris@0 1113 - Nothing.
Chris@0 1114
Chris@0 1115 ### Fixed
Chris@0 1116
Chris@0 1117 - [#60](https://github.com/zendframework/zend-diactoros/pull/60) fixes
Chris@0 1118 the behavior of `UploadedFile` when the `$errorStatus` provided at
Chris@0 1119 instantiation is not `UPLOAD_ERR_OK`. Prior to the fix, an
Chris@0 1120 `InvalidArgumentException` would occur at instantiation due to the fact that
Chris@0 1121 the upload file was missing or invalid. With the fix, no exception is raised
Chris@0 1122 until a call to `moveTo()` or `getStream()` is made.
Chris@0 1123
Chris@0 1124 ## 1.0.4 - 2015-06-23
Chris@0 1125
Chris@0 1126 This is a security release.
Chris@0 1127
Chris@0 1128 A patch has been applied to `Zend\Diactoros\Uri::filterPath()` that ensures that
Chris@0 1129 paths can only begin with a single leading slash. This prevents the following
Chris@0 1130 potential security issues:
Chris@0 1131
Chris@0 1132 - XSS vectors. If the URI path is used for links or form targets, this prevents
Chris@0 1133 cases where the first segment of the path resembles a domain name, thus
Chris@0 1134 creating scheme-relative links such as `//example.com/foo`. With the patch,
Chris@0 1135 the leading double slash is reduced to a single slash, preventing the XSS
Chris@0 1136 vector.
Chris@0 1137 - Open redirects. If the URI path is used for `Location` or `Link` headers,
Chris@0 1138 without a scheme and authority, potential for open redirects exist if clients
Chris@0 1139 do not prepend the scheme and authority. Again, preventing a double slash
Chris@0 1140 corrects the vector.
Chris@0 1141
Chris@0 1142 If you are using `Zend\Diactoros\Uri` for creating links, form targets, or
Chris@0 1143 redirect paths, and only using the path segment, we recommend upgrading
Chris@0 1144 immediately.
Chris@0 1145
Chris@0 1146 ### Added
Chris@0 1147
Chris@0 1148 - [#25](https://github.com/zendframework/zend-diactoros/pull/25) adds
Chris@0 1149 documentation. Documentation is written in markdown, and can be converted to
Chris@0 1150 HTML using [bookdown](http://bookdown.io). New features now MUST include
Chris@0 1151 documentation for acceptance.
Chris@0 1152
Chris@0 1153 ### Deprecated
Chris@0 1154
Chris@0 1155 - Nothing.
Chris@0 1156
Chris@0 1157 ### Removed
Chris@0 1158
Chris@0 1159 - Nothing.
Chris@0 1160
Chris@0 1161 ### Fixed
Chris@0 1162
Chris@0 1163 - [#51](https://github.com/zendframework/zend-diactoros/pull/51) fixes
Chris@0 1164 `MessageTrait::getHeaderLine()` to return an empty string instead of `null` if
Chris@0 1165 the header is undefined (which is the behavior specified in PSR-7).
Chris@0 1166 - [#57](https://github.com/zendframework/zend-diactoros/pull/57) fixes the
Chris@0 1167 behavior of how the `ServerRequestFactory` marshals upload files when they are
Chris@0 1168 represented as a nested associative array.
Chris@0 1169 - [#49](https://github.com/zendframework/zend-diactoros/pull/49) provides several
Chris@0 1170 fixes that ensure that Diactoros complies with the PSR-7 specification:
Chris@0 1171 - `MessageInterface::getHeaderLine()` MUST return a string (that string CAN be
Chris@0 1172 empty). Previously, Diactoros would return `null`.
Chris@0 1173 - If no `Host` header is set, the `$preserveHost` flag MUST be ignored when
Chris@0 1174 calling `withUri()` (previously, Diactoros would not set the `Host` header
Chris@0 1175 if `$preserveHost` was `true`, but no `Host` header was present).
Chris@0 1176 - The request method MUST be a string; it CAN be empty. Previously, Diactoros
Chris@0 1177 would return `null`.
Chris@0 1178 - The request MUST return a `UriInterface` instance from `getUri()`; that
Chris@0 1179 instance CAN be empty. Previously, Diactoros would return `null`; now it
Chris@0 1180 lazy-instantiates an empty `Uri` instance on initialization.
Chris@0 1181 - [ZF2015-05](http://framework.zend.com/security/advisory/ZF2015-05) was
Chris@0 1182 addressed by altering `Uri::filterPath()` to prevent emitting a path prepended
Chris@0 1183 with multiple slashes.
Chris@0 1184
Chris@0 1185 ## 1.0.3 - 2015-06-04
Chris@0 1186
Chris@0 1187 ### Added
Chris@0 1188
Chris@0 1189 - [#48](https://github.com/zendframework/zend-diactoros/pull/48) drops the
Chris@0 1190 minimum supported PHP version to 5.4, to allow an easier upgrade path for
Chris@0 1191 Symfony 2.7 users, and potential Drupal 8 usage.
Chris@0 1192
Chris@0 1193 ### Deprecated
Chris@0 1194
Chris@0 1195 - Nothing.
Chris@0 1196
Chris@0 1197 ### Removed
Chris@0 1198
Chris@0 1199 - Nothing.
Chris@0 1200
Chris@0 1201 ### Fixed
Chris@0 1202
Chris@0 1203 - Nothing.
Chris@0 1204
Chris@0 1205 ## 1.0.2 - 2015-06-04
Chris@0 1206
Chris@0 1207 ### Added
Chris@0 1208
Chris@0 1209 - [#27](https://github.com/zendframework/zend-diactoros/pull/27) adds phonetic
Chris@0 1210 pronunciation of "Diactoros" to the README file.
Chris@0 1211 - [#36](https://github.com/zendframework/zend-diactoros/pull/36) adds property
Chris@0 1212 annotations to the class-level docblock of `Zend\Diactoros\RequestTrait` to
Chris@0 1213 ensure properties inherited from the `MessageTrait` are inherited by
Chris@0 1214 implementations.
Chris@0 1215
Chris@0 1216 ### Deprecated
Chris@0 1217
Chris@0 1218 - Nothing.
Chris@0 1219
Chris@0 1220 ### Removed
Chris@0 1221
Chris@0 1222 - Nothing.
Chris@0 1223 -
Chris@0 1224 ### Fixed
Chris@0 1225
Chris@0 1226 - [#41](https://github.com/zendframework/zend-diactoros/pull/41) fixes the
Chris@0 1227 namespace for test files to begin with `ZendTest` instead of `Zend`.
Chris@0 1228 - [#46](https://github.com/zendframework/zend-diactoros/pull/46) ensures that
Chris@0 1229 the cookie and query params for the `ServerRequest` implementation are
Chris@0 1230 initialized as arrays.
Chris@0 1231 - [#47](https://github.com/zendframework/zend-diactoros/pull/47) modifies the
Chris@0 1232 internal logic in `HeaderSecurity::isValid()` to use a regular expression
Chris@0 1233 instead of character-by-character comparisons, improving performance.
Chris@0 1234
Chris@0 1235 ## 1.0.1 - 2015-05-26
Chris@0 1236
Chris@0 1237 ### Added
Chris@0 1238
Chris@0 1239 - [#10](https://github.com/zendframework/zend-diactoros/pull/10) adds
Chris@0 1240 `Zend\Diactoros\RelativeStream`, which will return stream contents relative to
Chris@0 1241 a given offset (i.e., a subset of the stream). `AbstractSerializer` was
Chris@0 1242 updated to create a `RelativeStream` when creating the body of a message,
Chris@0 1243 which will prevent duplication of the stream in-memory.
Chris@0 1244 - [#21](https://github.com/zendframework/zend-diactoros/pull/21) adds a
Chris@0 1245 `.gitattributes` file that excludes directories and files not needed for
Chris@0 1246 production; this will further minify the package for production use cases.
Chris@0 1247
Chris@0 1248 ### Deprecated
Chris@0 1249
Chris@0 1250 - Nothing.
Chris@0 1251
Chris@0 1252 ### Removed
Chris@0 1253
Chris@0 1254 - Nothing.
Chris@0 1255
Chris@0 1256 ### Fixed
Chris@0 1257
Chris@0 1258 - [#9](https://github.com/zendframework/zend-diactoros/pull/9) ensures that
Chris@0 1259 attributes are initialized to an empty array, ensuring that attempts to
Chris@0 1260 retrieve single attributes when none are defined will not produce errors.
Chris@0 1261 - [#14](https://github.com/zendframework/zend-diactoros/pull/14) updates
Chris@0 1262 `Zend\Diactoros\Request` to use a `php://temp` stream by default instead of
Chris@0 1263 `php://memory`, to ensure requests do not create an out-of-memory condition.
Chris@0 1264 - [#15](https://github.com/zendframework/zend-diactoros/pull/15) updates
Chris@0 1265 `Zend\Diactoros\Stream` to ensure that write operations trigger an exception
Chris@0 1266 if the stream is not writeable. Additionally, it adds more robust logic for
Chris@0 1267 determining if a stream is writeable.
Chris@0 1268
Chris@0 1269 ## 1.0.0 - 2015-05-21
Chris@0 1270
Chris@0 1271 First stable release, and first release as `zend-diactoros`.
Chris@0 1272
Chris@0 1273 ### Added
Chris@0 1274
Chris@0 1275 - Nothing.
Chris@0 1276
Chris@0 1277 ### Deprecated
Chris@0 1278
Chris@0 1279 - Nothing.
Chris@0 1280
Chris@0 1281 ### Removed
Chris@0 1282
Chris@0 1283 - Nothing.
Chris@0 1284
Chris@0 1285 ### Fixed
Chris@0 1286
Chris@0 1287 - Nothing.