PHPackages                             mehr-it/eli-closure-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. mehr-it/eli-closure-middleware

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

mehr-it/eli-closure-middleware
==============================

PSR-15 middleware for closures

1.0.0(6y ago)04MITPHPPHP &gt;=7.1.0CI failing

Since Jan 9Pushed 6y agoCompare

[ Source](https://github.com/mehr-it/eli-closure-middleware)[ Packagist](https://packagist.org/packages/mehr-it/eli-closure-middleware)[ RSS](/packages/mehr-it-eli-closure-middleware/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

PSR-15 closure middleware
=========================

[](#psr-15-closure-middleware)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a61181097130c6358629464d666f3a142028dc21598007f1f948cf7a272d3f4b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6568722d69742f656c692d636c6f737572652d6d6964646c65776172652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mehr-it/eli-closure-middleware)[![Build Status](https://camo.githubusercontent.com/a13ffd355203d8b6e6eec9fa3c359bbc9a71c1cc197a0be1b038d9e2ce998a0b/68747470733a2f2f7472617669732d63692e6f72672f6d6568722d69742f656c692d636c6f737572652d6d6964646c65776172652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mehr-it/eli-closure-middleware)

This package implements a simple PSR-15 adapter middleware for closures. This way simple closures can be used to implement middleware functionality. The closure receives the request and the next handler and **must** return an instance of `ResponseInterface`:

```
$middleware = new ClosureMiddleware(function ($request, $next)  {

    /** insert your code here **/

    return $response;
});

```

Not only closures, but any `callable` can be passed to the closure middleware.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

2366d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/44973729?v=4)[mehr.IT GmbH](/maintainers/mehr-it)[@mehr-it](https://github.com/mehr-it)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mehr-it-eli-closure-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/mehr-it-eli-closure-middleware/health.svg)](https://phpackages.com/packages/mehr-it-eli-closure-middleware)
```

###  Alternatives

[league/openapi-psr7-validator

Validate PSR-7 messages against OpenAPI (3.0.2) specifications expressed in YAML or JSON

56117.4M89](/packages/league-openapi-psr7-validator)[mezzio/mezzio

PSR-15 Middleware Microframework

3923.8M124](/packages/mezzio-mezzio)[hyperf/hyperf

A coroutine framework that focuses on hyperspeed and flexibility. Building microservice or middleware with ease.

6.9k3.2k2](/packages/hyperf-hyperf)[laminas/laminas-stratigility

PSR-7 middleware foundation for building and dispatching middleware pipelines

587.2M100](/packages/laminas-laminas-stratigility)[mezzio/mezzio-authentication-oauth2

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

28591.3k3](/packages/mezzio-mezzio-authentication-oauth2)[sunrise/http-router

A powerful solution as the foundation of your project.

17450.9k10](/packages/sunrise-http-router)

PHPackages © 2026

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