Middleware to set a random status code
Randomise the status code returned from a middleware pipeline.
Given a middleware pipeline, change the HTTP status code to a new random status code.
Inspired by my own tweet: https://twitter.com/asgrim/status/1143523405335019520
composer require asgrim/random-status-middleware
\Asgrim\RandomStatusMiddleware\RandomStatusMiddleware into your middleware pipeline. Probably works best towards
the outermost layer to ensure the status code is not overwritten unintentionally by another middleware.