zend-diactoros v1.2.0 Release Notes
Release Date: 2015-11-24 // over 8 years ago-
➕ Added
- ⚡️ #88 updates the
SapiEmitter
to emit aContent-Length
header with the content length as reported by the response body stream, assuming thatStreamInterface::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 totext/plain; charset=utf-8
; per the other response types, the signature isnew 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).
- ⚡️ #88 updates the