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.




The full list of changes is here