PHPackages                             laminas/laminas-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. laminas/laminas-router

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

laminas/laminas-router
======================

Flexible routing system for HTTP and console applications

3.18.0(2mo ago)3520.6M—0.9%16[15 issues](https://github.com/laminas/laminas-router/issues)[5 PRs](https://github.com/laminas/laminas-router/pulls)20BSD-3-ClausePHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Dec 31Pushed yesterday18 watchersCompare

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

READMEChangelog (10)Dependencies (18)Versions (120)Used By (20)

laminas-router
==============

[](#laminas-router)

[![Build Status](https://github.com/laminas/laminas-router/workflows/Continuous%20Integration/badge.svg)](https://github.com/laminas/laminas-router/actions?query=workflow%3A%22Continuous+Integration%22)

> ## 🇷🇺 Русским гражданам
>
> [](#-русским-гражданам)
>
> Мы, участники 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!"

laminas-router provides flexible HTTP routing.

Routing currently works against the [laminas-http](https://github.com/laminas/laminas-http)request and responses, and provides capabilities around:

- Literal path matches
- Path segment matches (at path boundaries, and optionally validated using regex)
- Regular expression path matches
- HTTP request scheme
- HTTP request method
- Hostname

Additionally, it supports combinations of different route types in tree structures, allowing for fast, b-tree lookups.

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

[](#installation)

Run the following to install this library:

```
composer require laminas/laminas-router
```

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

[](#documentation)

Browse the documentation online at

Support
-------

[](#support)

- [Issues](https://github.com/laminas/laminas-router/issues/)
- [Chat](https://laminas.dev/chat/)
- [Forum](https://discourse.laminas.dev/)

###  Health Score

73

—

ExcellentBetter than 100% of packages

Maintenance85

Actively maintained with recent releases

Popularity60

Solid adoption and visibility

Community43

Growing community involvement

Maturity92

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 68.4% 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 ~19 days

Recently: every ~7 days

Total

117

Last Release

64d ago

Major Versions

2.7.3 → 3.0.02019-12-31

3.18.x-dev → 4.0.x-dev2026-03-04

PHP version history (9 changes)2.0.0PHP ^5.5 || ^7.0

3.1.0PHP ^5.6 || ^7.0

3.4.0PHP ^7.3 || ~8.0.0

3.5.x-devPHP ^7.3 || ~8.0.0 || ~8.1.0

3.6.x-devPHP ^7.4 || ~8.0.0 || ~8.1.0

3.10.0PHP ~8.0.0 || ~8.1.0 || ~8.2.0

3.12.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

3.14.x-devPHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

3.16.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)

---

Top Contributors

[![weierophinney](https://avatars.githubusercontent.com/u/25943?v=4)](https://github.com/weierophinney "weierophinney (4575 commits)")[![Maks3w](https://avatars.githubusercontent.com/u/1301698?v=4)](https://github.com/Maks3w "Maks3w (605 commits)")[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (389 commits)")[![EvanDotPro](https://avatars.githubusercontent.com/u/5607?v=4)](https://github.com/EvanDotPro "EvanDotPro (165 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (139 commits)")[![akrabat](https://avatars.githubusercontent.com/u/33135?v=4)](https://github.com/akrabat "akrabat (127 commits)")[![ezimuel](https://avatars.githubusercontent.com/u/475967?v=4)](https://github.com/ezimuel "ezimuel (95 commits)")[![DASPRiD](https://avatars.githubusercontent.com/u/233300?v=4)](https://github.com/DASPRiD "DASPRiD (94 commits)")[![Xerkus](https://avatars.githubusercontent.com/u/725842?v=4)](https://github.com/Xerkus "Xerkus (56 commits)")[![michalbundyra](https://avatars.githubusercontent.com/u/7423207?v=4)](https://github.com/michalbundyra "michalbundyra (52 commits)")[![gsteel](https://avatars.githubusercontent.com/u/2803720?v=4)](https://github.com/gsteel "gsteel (46 commits)")[![marc-mabe](https://avatars.githubusercontent.com/u/302689?v=4)](https://github.com/marc-mabe "marc-mabe (34 commits)")[![sgehrig](https://avatars.githubusercontent.com/u/43394?v=4)](https://github.com/sgehrig "sgehrig (33 commits)")[![ralphschindler](https://avatars.githubusercontent.com/u/76674?v=4)](https://github.com/ralphschindler "ralphschindler (32 commits)")[![Thinkscape](https://avatars.githubusercontent.com/u/270528?v=4)](https://github.com/Thinkscape "Thinkscape (30 commits)")[![Freeaqingme](https://avatars.githubusercontent.com/u/33034?v=4)](https://github.com/Freeaqingme "Freeaqingme (27 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (25 commits)")[![fezfez](https://avatars.githubusercontent.com/u/1162307?v=4)](https://github.com/fezfez "fezfez (19 commits)")[![bakura10](https://avatars.githubusercontent.com/u/1198915?v=4)](https://github.com/bakura10 "bakura10 (17 commits)")[![mwillbanks](https://avatars.githubusercontent.com/u/38209?v=4)](https://github.com/mwillbanks "mwillbanks (16 commits)")

---

Tags

hacktoberfestrouterlaminasrouting

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[laminas/laminas-http

Provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests

3729.5M267](/packages/laminas-laminas-http)[laminas/laminas-soap

6221.8M37](/packages/laminas-laminas-soap)[mezzio/mezzio-fastroute

FastRoute integration for Mezzio

162.7M52](/packages/mezzio-mezzio-fastroute)[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)[samsonasik/apigility-consumer

Laminas API Tools Client API Service Consumer

151.6k](/packages/samsonasik-apigility-consumer)

PHPackages © 2026

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