Dead simple PSR-15 / PSR-7 middleware dispatcher
See #24
This release removes support for legacy PSR-15 middleware and legacy PSR-11 IOC containers.
This version requires you to use the official, final psr/http-server-middleware
and psr/container
packages.
Dispatcher::dispatch()
has been removed in favor of PSR-15 RequestHandlerInterface::handle()
, which is now implemented by Dispatcher
- if you were calling this directly, you should switch to the identical PSR-15 standard handle()
method.
Dispatcher
now implements the PSR-15 standard RequestHandlerInterface
, and as such can be directly dispatched by a host or similar PSR-15 "server"-type implementations.
Adds support for PHP 8
Corrected dependencies, added tests.
Changes the dependency on PSR-11 to the final package.
Please refer to UPGRADING.md
for an overview of breaking changes.
work-around for non-semver breaking change in http-interop
This major release changes middleware support from the traditional, de-facto standard double-pass to the new lambda-style PSR-15 function signatures, as proposed by the draft PSR-15 and current 0.2.0
release of http-interop/http-middleware
.
This is a complete BC break - double-pass middleware isn't (and cannot be) supported.
Porting your middleware components should be fairly easy, once you get the hang of it. See UPGRADING.md for more details and an example of upgrading middleware from the de-facto standard to PSR-15.