Slim 3.4.0 released
This release add a number of new features and improvements. Firstly, we now support media type structured suffixes (+json & +xml) for our Request’s body parser and error response output. Routing has also seen some improvements with two new methods: removeNamedRoute()
and setPattern()
and you can now cache the parsed FastRoute route information to a cache file with the routerCacheFile
setting.
There’s some good news if you use New Relic or similar as you can also now disable the automatic addition of the Content-Length header in the response by setting addContentLengthHeader
to false
. This will ensure that any additional HTML that is appended by a PHP extension is receieved by the client.
Slim now advertises itself as implementing psr/http-message-implementation
so that composer will let you install packages that require an PSR 7 implementation. We’ve also updated to the stable version of fast-route.
Finally, a few bug fixes, the most important of which is that we no longer clone the response’s StreamInterface
which solves an issue when using Slim with Guzzle.
Added
- 1749: Configurable FastRoute Caching
- 1781: Support structured suffix body parsers (+json/+xml)
- 1782: Support +json & +xml accept headers when creating error responses
- 1837: Add removeNamedRoute to Router and unit test
- 1844: #1669 added Routable::setPattern method
- 1848: Add
psr/http-message-implementation
to composer - 1856: Add option to remove content-length
Improved
- 1663: ContainerInterop compliance improvement
- 1830: Abstract handlers
- 1855: Update fast-route to stable version
Fixed
- 1846: #1836 count amount of bytes read instead of chunks
- 1859: Don’t set http status code on withRedirect implicitly
- 1862: Do not clone response body while cloning response
The full list of changes is here