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

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

mezzio/mezzio-router
====================

Router subcomponent for Mezzio

4.2.0(4mo ago)265.0M—3.6%11[2 issues](https://github.com/mezzio/mezzio-router/issues)[2 PRs](https://github.com/mezzio/mezzio-router/pulls)20BSD-3-ClausePHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Dec 31Pushed 1mo ago15 watchersCompare

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

READMEChangelog (10)Dependencies (13)Versions (81)Used By (20)

mezzio-router
=============

[](#mezzio-router)

[![Build Status](https://github.com/mezzio/mezzio-router/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/mezzio/mezzio-router/actions/workflows/continuous-integration.yml)[![Type Coverage](https://camo.githubusercontent.com/5fe4d28b289e89e1368f50990d030f41f5f428e0bbf11a08fbbf04a29783ec49/68747470733a2f2f73686570686572642e6465762f6769746875622f6d657a7a696f2f6d657a7a696f2d726f757465722f636f7665726167652e737667)](https://shepherd.dev/github/mezzio/mezzio-router)

> ## 🇷🇺 Русским гражданам
>
> [](#-русским-гражданам)
>
> Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как в России, так и в Украине. Некоторые из нас родились в России. Некоторые из нас живут в России. У некоторых бабушки и дедушки сражались с фашистами во Второй мировой войне. Здесь никто не поддерживает фашизм.
>
> У одного из нас есть украинская родственница, которая спаслась из дома вместе с сыном. Поезд задержался из-за бомбежки на дороге впереди. У нас есть друзья, которые прячутся в бомбоубежищах. Мы с тревогой ждем весточки от них после воздушных налетов, которые беспорядочно наносят удары и попадают по больницам, школам, детским садам и домам. Мы не берем это из каких-либо СМИ. Мы наблюдаем это напрямую.
>
> Вы доверяете нам достаточно, чтоб использовать наши программы, и мы просим вас довериться нам вновь. Мы нуждаемся в помощи. Выходите и протестуйте против этой бесполезной войны. Остановите кровопролитие. Скажите "Нет войне!"
>
> ## 🇺🇸 To Citizens of Russia
>
> [](#-to-citizens-of-russia)
>
> We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism.
>
> One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences.
>
> You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!"

Router subcomponent for [Mezzio](https://github.com/mezzio/mezzio).

This package provides the following classes and interfaces:

- `RouterInterface`, a generic interface to implement for providing routing capabilities around [PSR-7](http://www.php-fig.org/psr/psr-7/)`ServerRequest` messages.
- `Route`, a value object describing routed middleware.
- `RouteResult`, a value object describing the results of routing.

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

[](#installation)

Typically, you will install this when installing Mezzio. However, it can be used standalone to provide a generic way to provide routed PSR-7 middleware. To do this, use:

```
$ composer require mezzio/mezzio-router
```

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/laminas/laminas-router): `composer require mezzio/mezzio-laminasrouter`

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

[](#documentation)

Mezzio provides [routing documentation](https://docs.mezzio.dev/mezzio/features/router/intro/).

###  Health Score

71

—

ExcellentBetter than 100% of packages

Maintenance83

Actively maintained with recent releases

Popularity55

Moderate usage in the ecosystem

Community42

Growing community involvement

Maturity90

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~16 days

Total

79

Last Release

64d ago

Major Versions

1.3.2 → 2.0.02019-12-31

2.4.1 → 3.0.02019-12-31

3.18.x-dev → 4.0.02025-04-26

3.19.0 → 4.1.x-dev2025-10-11

3.20.0 → 4.3.x-dev2026-03-16

PHP version history (12 changes)1.0.0PHP &gt;=5.5

1.2.0PHP ^5.5 || ^7.0

1.3.0PHP ^5.6 || ^7.0

3.0.0PHP ^7.1

3.2.0PHP ^7.3 || ~8.0.0

3.7.0PHP ^7.3 || ~8.0.0 || ~8.1.0

3.8.0PHP ^7.4 || ~8.0.0 || ~8.1.0

3.9.0PHP ~8.0.0 || ~8.1.0 || ~8.2.0

3.14.0PHP ~8.1.0 || ~8.2.0

3.17.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

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

3.19.x-devPHP ~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 (298 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (163 commits)")[![michalbundyra](https://avatars.githubusercontent.com/u/7423207?v=4)](https://github.com/michalbundyra "michalbundyra (102 commits)")[![gsteel](https://avatars.githubusercontent.com/u/2803720?v=4)](https://github.com/gsteel "gsteel (92 commits)")[![michaelmoussa](https://avatars.githubusercontent.com/u/183833?v=4)](https://github.com/michaelmoussa "michaelmoussa (45 commits)")[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (24 commits)")[![geerteltink](https://avatars.githubusercontent.com/u/9497586?v=4)](https://github.com/geerteltink "geerteltink (23 commits)")[![boesing](https://avatars.githubusercontent.com/u/2189546?v=4)](https://github.com/boesing "boesing (22 commits)")[![Koopzington](https://avatars.githubusercontent.com/u/3015529?v=4)](https://github.com/Koopzington "Koopzington (9 commits)")[![laminas-bot](https://avatars.githubusercontent.com/u/68250880?v=4)](https://github.com/laminas-bot "laminas-bot (5 commits)")[![ghostwriter](https://avatars.githubusercontent.com/u/9754361?v=4)](https://github.com/ghostwriter "ghostwriter (5 commits)")[![nepster-web](https://avatars.githubusercontent.com/u/5681979?v=4)](https://github.com/nepster-web "nepster-web (5 commits)")[![marcelthole](https://avatars.githubusercontent.com/u/850125?v=4)](https://github.com/marcelthole "marcelthole (4 commits)")[![pursehouse](https://avatars.githubusercontent.com/u/3063832?v=4)](https://github.com/pursehouse "pursehouse (3 commits)")[![Xerkus](https://avatars.githubusercontent.com/u/725842?v=4)](https://github.com/Xerkus "Xerkus (2 commits)")[![alexraputa](https://avatars.githubusercontent.com/u/10957915?v=4)](https://github.com/alexraputa "alexraputa (2 commits)")[![pine3ree](https://avatars.githubusercontent.com/u/3229979?v=4)](https://github.com/pine3ree "pine3ree (1 commits)")[![Moln](https://avatars.githubusercontent.com/u/2050694?v=4)](https://github.com/Moln "Moln (1 commits)")[![renanbr](https://avatars.githubusercontent.com/u/350222?v=4)](https://github.com/renanbr "renanbr (1 commits)")[![fezfez](https://avatars.githubusercontent.com/u/1162307?v=4)](https://github.com/fezfez "fezfez (1 commits)")

---

Tags

hacktoberfesthttppsrpsr-7middlewarelaminasmezzio

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[mezzio/mezzio

PSR-15 Middleware Microframework

3883.6M97](/packages/mezzio-mezzio)[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-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)
