PHPackages                             mezzio/mezzio - 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. mezzio/mezzio

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

mezzio/mezzio
=============

PSR-15 Middleware Microframework

3.27.0(4mo ago)3883.6M—1.7%53[20 issues](https://github.com/mezzio/mezzio/issues)[3 PRs](https://github.com/mezzio/mezzio/pulls)20BSD-3-ClausePHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Dec 31Pushed 1mo ago31 watchersCompare

[ Source](https://github.com/mezzio/mezzio)[ Packagist](https://packagist.org/packages/mezzio/mezzio)[ Docs](https://mezzio.dev)[ Fund](https://funding.communitybridge.org/projects/laminas-project)[ RSS](/packages/mezzio-mezzio/feed)WikiDiscussions 3.28.x Synced 1mo ago

READMEChangelog (10)Dependencies (19)Versions (130)Used By (20)

mezzio
======

[](#mezzio)

[![Build Status](https://github.com/mezzio/mezzio/workflows/Continuous%20Integration/badge.svg)](https://github.com/mezzio/mezzio/actions?query=workflow%3A%22Continuous+Integration%22)[![Type Coverage](https://camo.githubusercontent.com/a74a4b88c3923b6996403d860bb025b09e37de8a36046e5aba7a59b2a363aa9b/68747470733a2f2f73686570686572642e6465762f6769746875622f6d657a7a696f2f6d657a7a696f2f636f7665726167652e737667)](https://shepherd.dev/github/mezzio/mezzio)

*Develop PSR-7 middleware applications in minutes!*

mezzio builds on [laminas-stratigility](https://github.com/laminas/laminas-stratigility)to provide a minimalist PSR-7 middleware framework for PHP, with the following features:

- Routing. Choose your own router; we support:
    - [FastRoute](https://github.com/nikic/FastRoute)
    - [laminas-router](https://github.com/mezzio/mezzio-router)
- DI Containers, via [PSR-11 Container](https://github.com/php-fig/container). Middleware matched via routing is retrieved from the composed container.
- Optionally, templating. We support:
    - [Plates](http://platesphp.com/)
    - [Twig](https://twig.symfony.com/)
    - [Laminas's PhpRenderer](https://github.com/laminas/laminas-view)

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

[](#installation)

We provide two ways to install Mezzio, both using [Composer](https://getcomposer.org): via our [skeleton project and installer](https://github.com/mezzio/mezzio-skeleton), or manually.

### Using the skeleton + installer

[](#using-the-skeleton--installer)

The simplest way to install and get started is using the skeleton project, which includes installer scripts for choosing a router, dependency injection container, and optionally a template renderer and/or error handler. The skeleton also provides configuration for officially supported dependencies.

To use the skeleton, use Composer's `create-project` command:

```
composer create-project mezzio/mezzio-skeleton
```

This will prompt you through choosing your dependencies, and then create and install the project in the `` (omitting the `` will create and install in a `mezzio-skeleton/` directory).

### Manual Composer installation

[](#manual-composer-installation)

You can install Mezzio standalone using Composer:

```
composer require mezzio/mezzio
```

However, at this point, Mezzio is not usable, as you need to supply minimally:

- a router.
- a dependency injection container.

We currently support and provide the following routing integrations:

- [FastRoute](https://github.com/nikic/FastRoute): `composer require mezzio/mezzio-fastroute`
- [laminas-router](https://github.com/mezzio/mezzio-router): `composer require mezzio/mezzio-laminasrouter`

We recommend using a dependency injection container, and typehint against [PSR-11 Container](https://github.com/php-fig/container). We can recommend the following implementations:

- [laminas-servicemanager](https://github.com/laminas/laminas-servicemanager): `composer require laminas/laminas-servicemanager`
- [Pimple](https://github.com/silexphp/Pimple) (see [docs](docs/book/features/container/pimple.md) for more details): `composer require laminas/laminas-pimple-config`
- [Aura.Di](https://github.com/auraphp/Aura.Di) (see [docs](docs/book/features/container/aura-di.md) for more details): `composer require laminas/laminas-auradi-config`

Additionally, you may optionally want to install a template renderer implementation, and/or an error handling integration. These are covered in the documentation.

Documentation
-------------

[](#documentation)

Documentation is [in the doc tree](docs/book/), and can be compiled using [mkdocs](https://www.mkdocs.org):

```
mkdocs build
```

Additionally, public-facing, browseable documentation is available at

###  Health Score

74

—

ExcellentBetter than 100% of packages

Maintenance82

Actively maintained with recent releases

Popularity63

Solid adoption and visibility

Community49

Growing community involvement

Maturity92

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 64.5% 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 ~18 days

Recently: every ~29 days

Total

126

Last Release

57d ago

Major Versions

0.5.3 → 1.0.02019-12-31

1.1.1 → 2.0.02019-12-31

2.2.1 → 3.0.02019-12-31

3.27.0 → 4.0.x-dev2026-01-09

PHP version history (11 changes)0.1.0PHP &gt;=5.5

1.0.0PHP ^5.5 || ^7.0

1.0.2PHP ^5.6 || ^7.0

3.0.0PHP ^7.1

3.3.0PHP ^7.3||~8.0.0

3.7.x-devPHP ~7.4.0||~8.0.0||~8.1.0

3.12.x-devPHP ~8.0.0 || ~8.1.0 || ~8.2.0

3.16.0PHP ~8.1.0 || ~8.2.0

3.18.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

3.20.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

3.23.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25943?v=4)[Matthew Weier O'Phinney](/maintainers/weierophinney)[@weierophinney](https://github.com/weierophinney)

![](https://avatars.githubusercontent.com/u/296074?v=4)[Zend Framework](/maintainers/zendframework)[@zendframework](https://github.com/zendframework)

---

Top Contributors

[![weierophinney](https://avatars.githubusercontent.com/u/25943?v=4)](https://github.com/weierophinney "weierophinney (1775 commits)")[![michalbundyra](https://avatars.githubusercontent.com/u/7423207?v=4)](https://github.com/michalbundyra "michalbundyra (196 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (126 commits)")[![gsteel](https://avatars.githubusercontent.com/u/2803720?v=4)](https://github.com/gsteel "gsteel (96 commits)")[![geerteltink](https://avatars.githubusercontent.com/u/9497586?v=4)](https://github.com/geerteltink "geerteltink (91 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (62 commits)")[![boesing](https://avatars.githubusercontent.com/u/2189546?v=4)](https://github.com/boesing "boesing (47 commits)")[![ezimuel](https://avatars.githubusercontent.com/u/475967?v=4)](https://github.com/ezimuel "ezimuel (38 commits)")[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (34 commits)")[![pine3ree](https://avatars.githubusercontent.com/u/3229979?v=4)](https://github.com/pine3ree "pine3ree (34 commits)")[![froschdesign](https://avatars.githubusercontent.com/u/103362?v=4)](https://github.com/froschdesign "froschdesign (24 commits)")[![settermjd](https://avatars.githubusercontent.com/u/196801?v=4)](https://github.com/settermjd "settermjd (23 commits)")[![jensdenies](https://avatars.githubusercontent.com/u/33403685?v=4)](https://github.com/jensdenies "jensdenies (20 commits)")[![Maks3w](https://avatars.githubusercontent.com/u/1301698?v=4)](https://github.com/Maks3w "Maks3w (19 commits)")[![Xerkus](https://avatars.githubusercontent.com/u/725842?v=4)](https://github.com/Xerkus "Xerkus (18 commits)")[![michaelmoussa](https://avatars.githubusercontent.com/u/183833?v=4)](https://github.com/michaelmoussa "michaelmoussa (17 commits)")[![mtymek](https://avatars.githubusercontent.com/u/777893?v=4)](https://github.com/mtymek "mtymek (16 commits)")[![bakura10](https://avatars.githubusercontent.com/u/1198915?v=4)](https://github.com/bakura10 "bakura10 (16 commits)")[![kynx](https://avatars.githubusercontent.com/u/1320145?v=4)](https://github.com/kynx "kynx (14 commits)")[![snapshotpl](https://avatars.githubusercontent.com/u/312655?v=4)](https://github.com/snapshotpl "snapshotpl (13 commits)")

---

Tags

middlewaremiddleware-frameworkpsr-15httppsrpsr-7middlewarePSR-11laminaspsr-15mezzio

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[mezzio/mezzio-authentication-oauth2

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

28483.0k2](/packages/mezzio-mezzio-authentication-oauth2)[mezzio/mezzio-authentication

Authentication middleware for Mezzio and PSR-7 applications

121.6M26](/packages/mezzio-mezzio-authentication)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.0M61](/packages/mezzio-mezzio-router)[mezzio/mezzio-helpers

Helper/Utility classes for Mezzio

134.3M67](/packages/mezzio-mezzio-helpers)[mezzio/mezzio-fastroute

FastRoute integration for Mezzio

162.7M52](/packages/mezzio-mezzio-fastroute)[laminas/laminas-stratigility

PSR-7 middleware foundation for building and dispatching middleware pipelines

586.6M81](/packages/laminas-laminas-stratigility)

PHPackages © 2026

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