PHPackages                             phps-cans/psr7-middlewares-payload-universal-module - 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. phps-cans/psr7-middlewares-payload-universal-module

ActiveLibrary[HTTP &amp; Networking](/categories/http)

phps-cans/psr7-middlewares-payload-universal-module
===================================================

This package contains the service provider of the payload middleware of oscarotero/psr7-middlewares

1.2.0(8y ago)1107.0k3MITPHPPHP &gt;=7.1

Since Jan 6Pushed 8y ago1 watchersCompare

[ Source](https://github.com/phps-cans/psr7-middlewares-payload-universal-module)[ Packagist](https://packagist.org/packages/phps-cans/psr7-middlewares-payload-universal-module)[ Docs](https://github.com/phps-cans/psr7-middlewares-payload-universal-module)[ RSS](/packages/phps-cans-psr7-middlewares-payload-universal-module/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (4)Versions (5)Used By (0)

Payload universal module
========================

[](#payload-universal-module)

This package integrates Payload's middleware in any [container-interop](https://github.com/container-interop/service-provider) compatible framework/container.

For this, it provides a service provider for the Payload Middleware of [`oscarotero/psr7-middlewares`](https://github.com/oscarotero/psr7-middlewares).

It create an instance of `Psr7Middlewares\Middleware\Payload` under the name `Psr7Middlewares\Middleware\Payload`

It also update the queue named `TheCodingMachine\MiddlewareListServiceProvider::MIDDLEWARES_QUEUE` by inserting the middleware instance with a priortity `TheCodingMachine\MiddlewareOrder\MiddlewareOrder::UTILITY_EARLY`

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

[](#installation)

```
composer require phps-cans/psr7-middlewares-payload-universal-module

```

Usage
-----

[](#usage)

To be able to use this package, you must use [Stratigility universal module](https://github.com/thecodingmachine/middleware-list-universal-module). For this, you must register the service provider provided. If you use [simplex](https://github.com/mnapoli/simplex):

```
$container->register(new \TheCodingMachine\MiddlewareListServiceProvider());
```

Once the `MiddlewareListServiceProvider` registered, you must register the payload's service provider:

```
$container->register(new \Psr7Middlewares\Middleware\PayloadServiceProvider());
```

Once it is done:

1. If you use [stratigility-harmony](https://github.com/thecodingmachine/stratigility-harmony), there is nothing more to do.
2. If not using [stratigility-harmony](https://github.com/thecodingmachine/stratigility-harmony), do not forget to register middlewares inside the pipe. If you use Zend Expressive:

```
$app = $container->get(\Zend\Expressive\Application::class);
$middlewaresQueue = $container->get(\TheCodingMachine\MiddlewareListServiceProvider::MIDDLEWARES_QUEUE);

foreach ($middlewaresQueue as $middleware) {
    $app->pipe($middleware);
}
```

Expected values / services
--------------------------

[](#expected-values--services)

This *service provider* expects the following configuration / services to be available:

NameCompulsoryDescription`\TheCodingMachine\MiddlewareListServiceProvider::MIDDLEWARES_QUEUE`*yes*Instance of `\ SplPriorityQueue`Provided services
-----------------

[](#provided-services)

This *service provider* provides the following services:

Service nameDescription`\Psr7Middlewares\Middleware\Payload::class`The middleware instanciedExtended services
-----------------

[](#extended-services)

This *service provider* extends those services:

NameCompulsoryDescription`\TheCodingMachine\MiddlewareListServiceProvider::MIDDLEWARES_QUEUE`*yes*Update the queue with the middleware's payload

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 72.7% 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 ~125 days

Total

4

Last Release

3038d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.5.0

1.2.0PHP &gt;=7.1

### Community

Maintainers

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

---

Top Contributors

[![Ngob](https://avatars.githubusercontent.com/u/2749238?v=4)](https://github.com/Ngob "Ngob (8 commits)")[![charlesc-TCM](https://avatars.githubusercontent.com/u/124873336?v=4)](https://github.com/charlesc-TCM "charlesc-TCM (2 commits)")[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (1 commits)")

---

Tags

psr7serviceproviderservice providermiddlewarespsr7-middlewaresjson body

### Embed Badge

![Health badge](/badges/phps-cans-psr7-middlewares-payload-universal-module/health.svg)

```
[![Health](https://phpackages.com/badges/phps-cans-psr7-middlewares-payload-universal-module/health.svg)](https://phpackages.com/packages/phps-cans-psr7-middlewares-payload-universal-module)
```

###  Alternatives

[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[league/openapi-psr7-validator

Validate PSR-7 messages against OpenAPI (3.0.2) specifications expressed in YAML or JSON

55615.9M69](/packages/league-openapi-psr7-validator)[kevinrob/guzzle-cache-middleware

A HTTP/1.1 Cache for Guzzle 6. It's a simple Middleware to be added in the HandlerStack. (RFC 7234)

43117.4M104](/packages/kevinrob-guzzle-cache-middleware)[league/route

Fast routing and dispatch component including PSR-15 middleware, built on top of FastRoute.

6633.1M115](/packages/league-route)[dflydev/fig-cookies

Cookies for PSR-7 HTTP Message Interface.

2268.5M102](/packages/dflydev-fig-cookies)[jdesrosiers/silex-cors-provider

A silex service provider that adds CORS services to silex

83892.3k10](/packages/jdesrosiers-silex-cors-provider)

PHPackages © 2026

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