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)2133.4k↓33.3%[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 1mo ago

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 80% 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

2855d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/93a2113828a101b473d256ef12e6bd89d67bcbef0621704cfeb3304c98a16a47?d=identicon)[snapshotpl](/maintainers/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

[psr/http-server-middleware

Common interface for HTTP server-side middleware

18291.2M1.5k](/packages/psr-http-server-middleware)[mezzio/mezzio

PSR-15 Middleware Microframework

3883.6M97](/packages/mezzio-mezzio)[php-middleware/php-debug-bar

PHP Debug Bar PSR-15 middleware with PSR-7

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

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

12726.2k](/packages/mezzio-mezzio-skeleton)[mezzio/mezzio-authentication

Authentication middleware for Mezzio and PSR-7 applications

121.6M26](/packages/mezzio-mezzio-authentication)[idealo/php-middleware-stack

Implementation of HTTP Middleware PSR-15 specification

318.9k](/packages/idealo-php-middleware-stack)

PHPackages © 2026

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