PHPackages                             ajgarlag/psr-http-message-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. ajgarlag/psr-http-message-bundle

ActiveSymfony-bundle[HTTP &amp; Networking](/categories/http)

ajgarlag/psr-http-message-bundle
================================

1.2.2(3y ago)8560.2k—8.9%3[1 issues](https://github.com/ajgarlag/psr-http-message-bundle/issues)1MITPHPPHP &gt;=7.4

Since Feb 3Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ajgarlag/psr-http-message-bundle)[ Packagist](https://packagist.org/packages/ajgarlag/psr-http-message-bundle)[ RSS](/packages/ajgarlag-psr-http-message-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (13)Versions (10)Used By (1)

AjgarlagPsrHttpMessageBundle
============================

[](#ajgarlagpsrhttpmessagebundle)

This bundle provides support for HTTP messages interfaces defined in [PSR-7](http://www.php-fig.org/psr/psr-7/). It allows to inject instances of `Psr\Http\Message\ServerRequestInterface`and to return instances of `Psr\Http\Message\ResponseInterface` in controllers.

The inital code is borrowed from [sensio/framework-extra-bundle](https://github.com/sensiolabs/SensioFrameworkExtraBundle) which [removed support](https://github.com/sensiolabs/SensioFrameworkExtraBundle/pull/710) for [PSR-7](http://www.php-fig.org/psr/psr-7/) since version 6.0.

Installation
------------

[](#installation)

To install the latest stable version of this component, open a console and execute the following command:

```
$ composer require ajgarlag/psr-http-message-bundle

```

Note that [autowiring aliases for PSR-17](https://github.com/symfony/recipes/blob/master/nyholm/psr7/1.0/config/packages/nyholm_psr7.yaml) must be installed. An easy way to provide them is to require [nyholm/psr7](https://github.com/Nyholm/psr7) :

```
$ composer require nyholm/psr7

```

Configuration
-------------

[](#configuration)

If your code depends on old `sensio_framework_extra_...` services identifiers, you should enable aliasing defining:

```
ajgarlag_psr_http_message:
    alias_sensio_framework_extra_services:
        enabled: true
```

Usage
-----

[](#usage)

Then, [PSR-7](http://www.php-fig.org/psr/psr-7/) messages can be used directly in controllers like in the following code snippet

```
namespace App\Controller;

use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ServerRequestInterface;

class DefaultController
{
    public function index(ServerRequestInterface $request, ResponseFactoryInterface $responseFactory)
    {
        // Interact with the PSR-7 request

        $response = $responseFactory->createResponse();
        // Interact with the PSR-7 response

        return $response;
    }
}
```

Note that internally, Symfony always use `Symfony\Component\HttpFoundation\Request`and `Symfony\Component\HttpFoundation\Response` instances.

Upgrade path from [sensio/framework-extra-bundle](https://github.com/sensiolabs/SensioFrameworkExtraBundle) [PSR-7](http://www.php-fig.org/psr/psr-7/) support
--------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#upgrade-path-from-sensioframework-extra-bundle-psr-7-support)

If your code depends on [sensio/framework-extra-bundle](https://github.com/sensiolabs/SensioFrameworkExtraBundle) [PSR-7](http://www.php-fig.org/psr/psr-7/) support, this is the suggested upgrade path:

1. Require `sensio/framework-extra-bundle:^5.3`.
2. Require `ajgarlag/psr-http-message-bundle:^1.1`, and enable old services aliasing.
3. Disable PSR-7 support in `sensio_framework_extra` configuration.
4. If your code depends on old `sensio_framework_extra.psr7.http_(message|foundation)_factory` services identifiers, modify service definitions to use the `Symfony\Bridge\PsrHttpMessage\Http(Message|Foundation)Interface` alternatives following deprecation messages.
5. Do you need any other feature provided by `sensio/framework-extra-bundle`?:
    - YES: require `sensio/framework-extra-bundle:^6.0`.
    - NO: remove `sensio/framework-extra-bundle`.

License
-------

[](#license)

This component is under the MIT license. See the complete license in the [LICENSE](LICENSE) file.

Reporting an issue or a feature request
---------------------------------------

[](#reporting-an-issue-or-a-feature-request)

Issues and feature requests are tracked in the [Github issue tracker](https://github.com/ajgarlag/psr-http-message-bundle/issues).

Author Information
------------------

[](#author-information)

Developed with ♥ by [Antonio J. García Lagar](http://aj.garcialagar.es).

If you find this component useful, please add a ★ in the [GitHub repository page](https://github.com/ajgarlag/psr-http-message-bundle) and/or the [Packagist package page](https://packagist.org/packages/ajgarlag/psr-http-message-bundle).

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community11

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~85 days

Recently: every ~147 days

Total

8

Last Release

1329d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f895b5880bdb002b96abac69a1a6630b4e20c4fbff9dbe3d47b08f0d1b7e2211?d=identicon)[ajgarlag](/maintainers/ajgarlag)

---

Top Contributors

[![ajgarlag](https://avatars.githubusercontent.com/u/388184?v=4)](https://github.com/ajgarlag "ajgarlag (44 commits)")

---

Tags

psr-7psr7symfonysymfony-bundle

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/ajgarlag-psr-http-message-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ajgarlag-psr-http-message-bundle/health.svg)](https://phpackages.com/packages/ajgarlag-psr-http-message-bundle)
```

###  Alternatives

[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.3k63.6M233](/packages/nelmio-api-doc-bundle)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[friendsofsymfony/http-cache-bundle

Set path based HTTP cache headers and send invalidation requests to your HTTP cache

43813.2M47](/packages/friendsofsymfony-http-cache-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M343](/packages/drupal-core-recommended)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
