Download the PHP package loophp/psr-http-message-bridge-bundle without Composer
On this page you can find all versions of the php package loophp/psr-http-message-bridge-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download loophp/psr-http-message-bridge-bundle
More information about loophp/psr-http-message-bridge-bundle
Files in loophp/psr-http-message-bridge-bundle
Package psr-http-message-bridge-bundle
Short Description Register symfony/psr-http-message-bridge classes in your Symfony application.
License MIT
Homepage http://github.com/loophp/psr-http-message-bridge-bundle
Informations about the package psr-http-message-bridge-bundle
PSR HTTP Message Bridge Bundle
This bundle will register in your Symfony application's container a couple of services.
Those services are from the symfony/psr-http-message-brige bridge package.
It provides:
-
An argument value resolver to be able to get the following objects through:
Psr\Http\Message\MessageInterface
Psr\Http\Message\RequestInterface
Psr\Http\Message\ServerRequestInterface
Those are directly derived from the current Symfony Request object.
It means that you can directly get a PSR7 Request in Symfony controllers through method parameters.
-
An event listener that let users return PSR7 Responses in Symfony controllers. Basically, this event will check if the return value of a Response is an instance of
Psr\Http\Message\ResponseInterface
and only if it's the case, will convert it into a Symfony response. - Factories:
- A
HttpFoundactionFactory
service to convert PSR requests into Symfony requests. - A
PsrHttpFactory
service to convert Symfony requests into PSR requests.
- A
Requirements
- PHP >= 7.3
- Symfony >= 4
Installation
Once the bundle installed in your application, it's ready to use, there is no configuration to set up.
Usage
Code quality, tests and benchmarks
Every time changes are introduced into the library, Github run the tests and the benchmarks.
The library has tests written with PHPSpec.
Feel free to check them out in the spec
directory. Run composer phpspec
to trigger the tests.
Before each commit some inspections are executed with GrumPHP, run ./vendor/bin/grumphp run
to check manually.
PHPInfection is used to ensure that your code is properly tested, run composer infection
to test your code.
Contributing
Feel free to contribute by sending Github pull requests. I'm quite responsive :-)
Changelog
See CHANGELOG.md for a changelog based on git commits.
For more detailed changelogs, please check the release changelogs.