Download the PHP package h4cc/stack-psr7-bridge without Composer
On this page you can find all versions of the php package h4cc/stack-psr7-bridge. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download h4cc/stack-psr7-bridge
More information about h4cc/stack-psr7-bridge
Files in h4cc/stack-psr7-bridge
Package stack-psr7-bridge
Short Description StackPHP Middleware for converting Symfony Http abstractions to PSR-7 and back.
License MIT
Informations about the package stack-psr7-bridge
h4cc/stack-psr7-bridge
StackPHP Middleware for using Symfony HttpKernel Applications and PSR-7 Application transparent.
This Middleware tries to make using Symfony HttpKernel Application and PSR-7 as easy as possible.
Wrapped applications can be:
- Any Symfony HttpKernel
- Any Callback expecting
function(RequestInterface $request, ResponseInterface $response, $next = null)
It does not matter what kind of application is wrapped, the bridge will convert incoming requests and outgoing responses accordingly to the used interface.
The implementation this middleware is based on is https://github.com/symfony/psr-http-message-bridge.
Usage
By default, the Symfony HttpFoundation and HttpKernel are used. For PSR-7, the Zend-Diactoros implementation is used. These implementations can be changed if needed.
Wrapping a HttpKernel
Wrapping a PSR-7 callback
The expected PSR-7 callback format is not yet defined by PHP-FIG and might be subject to change!
Installation
The recommended way to install stack-psr7-bridge is through Composer:
Protip: you should browse the h4cc/stack-psr7-bridge
page to choose a stable version to use, avoid the @stable
meta constraint.
License
h4cc/stack-psr7-bridge is released under the MIT License. See the bundled LICENSE file for details.