Laminas Diactoros v1.1.0 Release Notes
Release Date: 2015-06-24 // almost 9 years ago-
โ Added
zendframework/zend-diactoros#52, zendframework/zend-diactoros#58, zendframework/zend-diactoros#59, and zendframework/zend-diactoros#61 create several custom response types for simplifying response creation:
Laminas\Diactoros\Response\HtmlResponse
accepts HTML content via its constructor, and sets theContent-Type
totext/html
.Laminas\Diactoros\Response\JsonResponse
accepts data to serialize to JSON via its constructor, and sets theContent-Type
toapplication/json
.Laminas\Diactoros\Response\EmptyResponse
allows creating empty, read-only responses, with a default status code of 204.Laminas\Diactoros\Response\RedirectResponse
allows specifying a URI for theLocation
header in the constructor, with a default status code of 302.
Each also accepts an optional status code, and optional headers (which can also be used to provide an alternate
Content-Type
in the case of the HTML and JSON responses).๐ Deprecated
- Nothing.
โ Removed
- ๐ zendframework/zend-diactoros#43 removed both
ServerRequestFactory::marshalUri()
andServerRequestFactory::marshalHostAndPort()
, which were deprecated prior to the 1.0 release.
๐ Fixed
- ๐ zendframework/zend-diactoros#29 fixes request method validation to allow any valid token as defined by RFC 7230. This allows usage of custom request methods, vs a static, hard-coded list.