PHPackages                             colossal/colossal-middleware-queue - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. colossal/colossal-middleware-queue

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

colossal/colossal-middleware-queue
==================================

A PSR-15 middleware allowing multiple other PSR-15 middleware to be treated as a single entity.

v1.0.2(2y ago)0421MITPHPPHP ^8.0

Since Nov 5Pushed 2y ago1 watchersCompare

[ Source](https://github.com/colossalg/Colossal-Middleware-Queue)[ Packagist](https://packagist.org/packages/colossal/colossal-middleware-queue)[ Docs](https://github.com/colossalg/Colossal-Middleware-Queue)[ RSS](/packages/colossal-colossal-middleware-queue/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (4)Versions (4)Used By (1)

Colossal-Middleware-Queue
=========================

[](#colossal-middleware-queue)

A PSR-15 middleware allowing multiple other PSR-15 middleware to be treated as a single entity.

Usage
-----

[](#usage)

```
namespace Dummy;

use Psr\Http\Message\{
    ResponseInterface,
    ServerRequestInterface
};
use Psr\Http\Server\{
    MiddlewareInterface,
    RequestHandlerInterface
};

class DummyMiddlewareA
{
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        echo 'A';
        return $handler->handle($request);
    }
}

class DummyMiddlewareB
{
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        echo 'B';
        return $handler->handle($request);
    }
}

class DummyHandler
{
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        echo 'Handler';
        // Return a ResponseInterface
    }
}

```

```
// ---------------------------------------------------------------------------- //
// Creating and using the MiddlewareQueue is trivial.                           //
// ---------------------------------------------------------------------------- //

use Colossal\MiddlewareQueue\MiddlewareQueue;
use Dummy\{
    DummyMiddlewareA,
    DummyMiddlewareB,
    DummyHandler
};

$dummyMiddlewareA = new DummyMiddlewareA();
$dummyMiddlewareB = new DummyMiddlewareB();

$middlewareQueue = new MiddlewareQueue();
$middlewareQueue->enqueue($dummyMiddlewareA);
$middlewareQueue->enqueue($dummyMiddlewareB);

// ---------------------------------------------------------------------------- //
// The resulting MiddlewareQueue can now be used as a single middleware.        //
// A call to process will now do the following (in order):                      //
//   - Call $dummyMiddlewareA->process() passing the request passed to          //
//     $middlewareQueue->process().                                             //
//   - Call $dummyMiddlewareB->process() passing the request passed to          //
//     $middlewareQueue->process().                                             //
//   - Call RequestHandlerInterface::handle() on the handler passed to          //
//     $middlewareInterface->process().                                         //
// ---------------------------------------------------------------------------- //

$middlewareQueue->process($request, $dummyHandler);
// Prints:
// A
// B
// Handler
```

Development Tips
----------------

[](#development-tips)

### Running PHPStan Code Quality Analysis

[](#running-phpstan-code-quality-analysis)

Run the PHPStan code quality analysis with the following command:

```
>> .\vendor\bin\phpstan --configuration=phpstan.neon
```

### Running PHP Code Sniffer Code Style Analysis

[](#running-php-code-sniffer-code-style-analysis)

Run the PHP Code Sniffer code style analysis with the following commands:

```
>> .\vendor\bin\phpcs --standard=phpcs.xml src
```

To fix automatically resolve issues found by PHP Code Sniffer run the following commands:

```
>> .\vendor\bin\phpcbf --standard=phpcs.xml src
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

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

Total

3

Last Release

971d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d2a935d24a37f2255e4aba33f327f6d9f9e91b1063ffcd3a51ce46ea841dd58?d=identicon)[colossalg](/maintainers/colossalg)

---

Top Contributors

[![colossalg](https://avatars.githubusercontent.com/u/39691679?v=4)](https://github.com/colossalg "colossalg (6 commits)")

---

Tags

middlewarepsr-15

###  Code Quality

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/colossal-colossal-middleware-queue/health.svg)

```
[![Health](https://phpackages.com/badges/colossal-colossal-middleware-queue/health.svg)](https://phpackages.com/packages/colossal-colossal-middleware-queue)
```

###  Alternatives

[mcp/sdk

Model Context Protocol SDK for Client and Server applications in PHP

1.5k1.5M87](/packages/mcp-sdk)[cakephp/authentication

Authentication plugin for CakePHP

1214.1M106](/packages/cakephp-authentication)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)[jaxon-php/jaxon-core

Jaxon is an open source PHP library for easily creating Ajax web applications

74149.4k30](/packages/jaxon-php-jaxon-core)[xima/xima-typo3-frontend-edit

Frontend Edit - This extension provides an edit button for editors within frontend content elements.

1414.3k](/packages/xima-xima-typo3-frontend-edit)[eliashaeussler/typo3-solver

Solver - Extends TYPO3's exception handling with AI generated solutions. Problems can also be solved from command line. Several OpenAI parameters are configurable and prompts and solution providers can be customized as desired.

302.1k](/packages/eliashaeussler-typo3-solver)

PHPackages © 2026

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