Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Diactoros 1.2.0

Compare
Choose a tag to compare
@weierophinney weierophinney released this 24 Nov 19:20
· 1052 commits to master since this release

Added

  • #88 updates the SapiEmitter to emit a Content-Length header with the content length as reported by the response body stream, assuming that StreamInterface::getSize() returns an integer.
  • #77 adds a new response type, Zend\Diactoros\Response\TextResponse, for returning plain text responses. By default, it sets the content type to text/plain; charset=utf-8; per the other response types, the signature is new TextResponse($text, $status = 200, array $headers = [].
  • #90 adds a new Zend\Diactoros\CallbackStream, allowing you to back a stream with a PHP callable (such as a generator) to generate the message content. Its constructor accepts the callable: $stream = new CallbackStream($callable);

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • #77 updates the HtmlResponse to set the charset to utf-8 by default (if no content type header is provided at instantiation).