Slim 4.16.0 released

We have released Slim 4.16.0 today, which adds support for PHP 8.6 and a new route helper for the HTTP QUERY method.

On PHP 8.6, parse_str() throws a ValueError when its input contains a NUL byte, so BodyParsingMiddleware now truncates application/x-www-form-urlencoded bodies at the first NUL byte before parsing them, keeping the same behavior as before.

You can now use $app->query() to register a route for the QUERY method defined in RFC 10008. QUERY is a safe, idempotent method that carries its query in the request body, so it suits searches that are too large or complex for a URL:

$app->query('/books/search', function ($request, $response) {
    $criteria = $request->getParsedBody();
    // ...
    return $response;
});

We have also made HtmlErrorRenderer escape every field in the error details fragment consistently.

The full changelog can be seen here.