\League\Route\RouteCollectionInterface::map requires a callable and not a \Psr\Http\Server\RequestHandlerInterface. I feel this is an oversight in PSR-15 compliance.
I assume this is so that the request handler can be instanciated lazily, but this could also be handled better by a dedicated lazy initializer like https://github.com/northwoods/lazy-middleware.
\League\Route\RouteCollectionInterface::map
requires a callable and not a\Psr\Http\Server\RequestHandlerInterface
. I feel this is an oversight in PSR-15 compliance.I assume this is so that the request handler can be instanciated lazily, but this could also be handled better by a dedicated lazy initializer like https://github.com/northwoods/lazy-middleware.