PHPackages                             php-middleware/double-pass-compatibility - 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. php-middleware/double-pass-compatibility

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

php-middleware/double-pass-compatibility
========================================

Tools for support double pass middewares in PSR-15

1.1.0(7y ago)2134.0k—1.7%[2 PRs](https://github.com/php-middleware/double-pass-compatibility/pulls)5PHPPHP &gt;=5.6

Since May 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/php-middleware/double-pass-compatibility)[ Packagist](https://packagist.org/packages/php-middleware/double-pass-compatibility)[ RSS](/packages/php-middleware-double-pass-compatibility/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (3)Versions (6)Used By (5)

double-pass-compatibility [![Build Status](https://camo.githubusercontent.com/3d0a867bb7f997ca0ef19a6306ac89de0fd6c53548cc10c37e8777323b933514/68747470733a2f2f7472617669732d63692e6f72672f7068702d6d6964646c65776172652f646f75626c652d706173732d636f6d7061746962696c6974792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/php-middleware/double-pass-compatibility)
=================================================================================================================================================================================================================================================================================================================================================================================

[](#double-pass-compatibility-)

This package provide trait and abstract class for your [psr-15 middlewares](https://github.com/http-interop/http-middleware#42-single-pass-lambda) to [double pass middewares](https://github.com/http-interop/http-middleware#41-double-pass) support. So you can call your middleware in both styles.

**Standard PSR-15 call:**

```
$middleware->process($request, $delegate);
```

**Possible call after implements this package:**

```
$middleware($request, $response, $next);
```

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

[](#installation)

```
composer require php-middleware/double-pass-compatibility
```

You can add trait into your middeware:

```
class Middleware implements MiddlewareInterface
{
    use PhpMiddleware\DoublePassCompatibilityTrait;

    public function process(ServerRequestInterface $request, DelegateInterface $delegate)
    {
       // Implementation and return response
    }
}
```

Or extend abstract class:

```
class Middleware extend AbstractDoublePassCompatibilityMiddleware implements MiddlewareInterface
{
    public function process(ServerRequestInterface $request, DelegateInterface $delegate)
    {
       // Implementation and return response
    }
}
```

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

2

Last Release

2900d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/312655?v=4)[Witold Wasiczko](/maintainers/snapshotpl)[@snapshotpl](https://github.com/snapshotpl)

---

Top Contributors

[![snapshotpl](https://avatars.githubusercontent.com/u/312655?v=4)](https://github.com/snapshotpl "snapshotpl (9 commits)")

---

Tags

middlewarepsr-15psr-7psrpsr-7middlewarepsr-15

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/php-middleware-double-pass-compatibility/health.svg)

```
[![Health](https://phpackages.com/badges/php-middleware-double-pass-compatibility/health.svg)](https://phpackages.com/packages/php-middleware-double-pass-compatibility)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.1B4.0k](/packages/guzzlehttp-psr7)[mezzio/mezzio

PSR-15 Middleware Microframework

3923.8M125](/packages/mezzio-mezzio)[psr/http-server-middleware

Common interface for HTTP server-side middleware

185103.9M1.9k](/packages/psr-http-server-middleware)[laminas/laminas-stratigility

PSR-7 middleware foundation for building and dispatching middleware pipelines

587.2M101](/packages/laminas-laminas-stratigility)[php-middleware/php-debug-bar

PHP Debug Bar PSR-15 middleware with PSR-7

77492.1k2](/packages/php-middleware-php-debug-bar)[mezzio/mezzio-skeleton

Laminas mezzio skeleton. Begin developing PSR-15 middleware applications in seconds!

12926.6k](/packages/mezzio-mezzio-skeleton)

PHPackages © 2026

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