PHPackages                             viloveul/middleware - 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. viloveul/middleware

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

viloveul/middleware
===================

Wrapper for your middleware component. Implementation PSR Http Server Handler

v1.0.5(7y ago)11661MITPHP

Since Jan 5Pushed 7y ago1 watchersCompare

[ Source](https://github.com/viloveul/middleware)[ Packagist](https://packagist.org/packages/viloveul/middleware)[ Docs](http://www.viloveul.com)[ RSS](/packages/viloveul-middleware/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (6)Dependencies (5)Versions (8)Used By (1)

[![Build Status](https://camo.githubusercontent.com/548836ca86cc0dac5b411900f25c2e71511d5c7b05bfeae647f43219c6d2373c/68747470733a2f2f7472617669732d63692e636f6d2f76696c6f7665756c2f6d6964646c65776172652e737667)](https://travis-ci.com/viloveul/middleware)[![Total Downloads](https://camo.githubusercontent.com/78f6a3fe90224e4f23c92edf2fe38ff58ebb91a9fa6a7c1ecbbeec71cad09734/68747470733a2f2f706f7365722e707567782e6f72672f76696c6f7665756c2f6d6964646c65776172652f642f746f74616c2e737667)](https://packagist.org/packages/viloveul/middleware)[![Latest Stable Version](https://camo.githubusercontent.com/4195e46e2ac136decc0c0185f58757cd2e43186bbd71f822f5f34d4b1663d515/68747470733a2f2f706f7365722e707567782e6f72672f76696c6f7665756c2f6d6964646c65776172652f762f737461626c652e737667)](https://packagist.org/packages/viloveul/middleware)

Installation
============

[](#installation)

make sure your php version &gt; 7.0

```
composer require viloveul/middleware
```

HOW
---

[](#how)

```
require __DIR__ . '/vendor/autoload.php';

$collection = new Viloveul\Middleware\Collection();

$controller = function () {
	// return Psr\Http\Message\ResponseInterface
};

$collection->add('new object from Psr\Http\Server\MiddlewareInterface');
$collection->add('new object of Closure');
$collection->add(function (Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Server\RequestHandlerInterface $next) : Psr\Http\Message\ResponseInterface {
		// do something
		return $next->handle($request);
	}
);

$stack = new Viloveul\Middleware\Stack($controller, $collection);

$response = $stack->handle("object from Psr\Http\Message\ServerRequestInterface");

var_dump($response);
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

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

Recently: every ~37 days

Total

7

Last Release

2578d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/609a03f1a38d80aa5cf333dd556cb748371dbcbc880f3c580ecea72ff0fb228b?d=identicon)[zafex](/maintainers/zafex)

---

Top Contributors

[![zafex](https://avatars.githubusercontent.com/u/12587685?v=4)](https://github.com/zafex "zafex (21 commits)")

---

Tags

componentmiddlewarephpviloveulviloveul-frameworkmiddlewarelibrarycomponentzafexviloveulfajrulaz

###  Code Quality

TestsCodeception

### Embed Badge

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

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

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k19.1M1.7k](/packages/cakephp-cakephp)[cakephp/authentication

Authentication plugin for CakePHP

1143.9M95](/packages/cakephp-authentication)[mezzio/mezzio-authentication-oauth2

OAuth2 (server) authentication middleware for Mezzio and PSR-7 applications.

28545.4k3](/packages/mezzio-mezzio-authentication-oauth2)[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)
