PHPackages                             zobzn/psr7-stack - 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. zobzn/psr7-stack

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

zobzn/psr7-stack
================

PSR-7 HTTP Middleware Stack

0.1.1(9y ago)1128MITPHPPHP &gt;=5.4

Since Feb 20Pushed 9y ago1 watchersCompare

[ Source](https://github.com/zobzn/psr7-stack)[ Packagist](https://packagist.org/packages/zobzn/psr7-stack)[ Docs](https://github.com/zobzn/psr7-stack)[ RSS](/packages/zobzn-psr7-stack/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

zobzn/psr7-stack
================

[](#zobznpsr7-stack)

[![Build Status](https://camo.githubusercontent.com/b19ce6496cda59f4c4bd7ce49825bca942c6d01a6b2df39e9f3faa65a0535c1a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7a6f627a6e2f707372372d737461636b2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/zobzn/psr7-stack)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

PSR-7 HTTP Middleware Stack

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

[](#installation)

```
composer require zobzn/psr7-stack
```

Basic Usage
-----------

[](#basic-usage)

```
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;

require_once __DIR__ . '/vendor/autoload.php';

$stack = new \Zobzn\Stack();
$stack->push(function (ServerRequestInterface $request, ResponseInterface $response, callable $next = null) {
    // do something with request and/or response
    return $next ? $next($request, $response) : $response;
});
$stack->push(function (ServerRequestInterface $request, ResponseInterface $response, callable $next = null) {
    // do something else with request and/or response
    return $next ? $next($request, $response) : $response;
});

$request  = new SomeServerRequestImplementation();
$response = new SomeResponseImplementation();

// execute middlewares on given request and response, and get final response
$response = $stack->__invoke($request, $response);
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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 ~154 days

Total

2

Last Release

3627d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/324251?v=4)[zema](/maintainers/zema)[@zema](https://github.com/zema)

---

Top Contributors

[![zobzn](https://avatars.githubusercontent.com/u/579620?v=4)](https://github.com/zobzn "zobzn (5 commits)")

---

Tags

httppsrpsr-7middlewarestack

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zobzn-psr7-stack/health.svg)

```
[![Health](https://phpackages.com/badges/zobzn-psr7-stack/health.svg)](https://phpackages.com/packages/zobzn-psr7-stack)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.1B3.8k](/packages/guzzlehttp-psr7)[mezzio/mezzio

PSR-15 Middleware Microframework

3913.8M120](/packages/mezzio-mezzio)[psr/http-server-middleware

Common interface for HTTP server-side middleware

18499.3M1.8k](/packages/psr-http-server-middleware)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[mezzio/mezzio-helpers

Helper/Utility classes for Mezzio

134.5M82](/packages/mezzio-mezzio-helpers)[mezzio/mezzio-fastroute

FastRoute integration for Mezzio

162.8M63](/packages/mezzio-mezzio-fastroute)

PHPackages © 2026

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