Psr-15 middleware pipeline
composer require bermudaphp/pipeline
use function Bermuda\Pipeline\pipe;
pipe()->pipe($myFirstMiddlewareInstance)
->pipe($mySecondMiddlewareInstance)
->process($serverRequest, $requestHandler);
pipe([$myFirstMiddlewareInstance, $mySecondMiddlewareInstance])->handle($serverRequest);