PHPackages                             quidphp/routing - 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. quidphp/routing

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

quidphp/routing
===============

PHP library that provides a route matching and triggering procedure

5.31.0(3y ago)4209↓83.3%1MITPHPPHP &gt;=8.1.0

Since Sep 17Pushed 1y ago2 watchersCompare

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

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

QuidPHP/Routing
===============

[](#quidphprouting)

[![Release](https://camo.githubusercontent.com/210c0293dfaf70ceed018b7f2365d5dce45eed144711d9b61671b644dbb17c9a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f717569647068702f726f7574696e67)](https://packagist.org/packages/quidphp/routing)[![License](https://camo.githubusercontent.com/72e8164f18ce44b452241cadc63a718bc6e373b2dc5f36ec39fef7ddc43ffb4f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f717569647068702f726f7574696e67)](https://github.com/quidphp/routing/blob/master/LICENSE)[![PHP Version](https://camo.githubusercontent.com/55cb729b785e9697477d75402f60c7ebe15916fcd52ad1ee5639f1187175893b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f717569647068702f726f7574696e67)](https://www.php.net)[![Style CI](https://camo.githubusercontent.com/7e9cb4ffa4e7f875a86d6f6293aa55bbb7a2c35605cca6b916f52961f25b8523/68747470733a2f2f7374796c6563692e696f2f7265706f732f3230333637333639332f736869656c64)](https://styleci.io)[![Code Size](https://camo.githubusercontent.com/1d3320a556d1a8999b2b14805a06dc83eaafe321a03b68b03da23c3d413731a3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f717569647068702f726f7574696e67)](https://github.com/quidphp/routing)

About
-----

[](#about)

**QuidPHP/Routing** is a PHP library that provides a route matching and triggering procedure. It is part of the [QuidPHP](https://github.com/quidphp/project) package and can also be used standalone.

License
-------

[](#license)

**QuidPHP/Routing** is available as an open-source software under the [MIT license](LICENSE).

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

[](#documentation)

**QuidPHP/Routing** documentation is available at [QuidPHP/Docs](https://github.com/quidphp/docs).

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

[](#installation)

**QuidPHP/Routing** can be easily installed with [Composer](https://getcomposer.org). It is available on [Packagist](https://packagist.org/packages/quidphp/routing).

```
$ composer require quidphp/routing
```

Once installed, the **Quid\\Routing** namespace will be available within your PHP application.

Requirement
-----------

[](#requirement)

**QuidPHP/Routing** requires the following:

- PHP 8.1
- All requirements of [quidphp/main](https://github.com/quidphp/main)

Dependency
----------

[](#dependency)

**QuidPHP/Routing** has the following dependency:

- [quidphp/main](https://github.com/quidphp/main) - Quid\\Main - PHP library that provides a set of base objects and collections

The dependency will be resolved by using the [Composer](https://getcomposer.org) installation process.

Comment
-------

[](#comment)

**QuidPHP/Routing** code is commented and all methods are explained (in French).

Convention
----------

[](#convention)

**QuidPHP/Routing** is built on the following conventions:

- *Coding*: No curly braces are used in a IF statement if the condition can be resolved in only one statement.
- *Config*: A special $config static property exists in all classes. This property gets recursively merged with the parents' property on initialization.
- *M-VC*: A route object serves as both a View and a Controller. There should be one route class per route.
- *Segment*: A segment within a route path represents a dynamic value. It is wrapped around brackets. A callable that accepts or rejects the value needs to be provided.
- *Templating*: Once the route is triggered, the developer has complete control and can use any HTML rendering technology it desires. Or, simply use the [Quid\\Base\\Html](https://github.com/quidphp/base/blob/master/src/Html.php) methods to generate the HTML and use traits for reusable page components.
- *Traits*: Traits filenames start with an underscore (\_).
- *Type*: Files, function arguments and return types are strict typed.

Overview
--------

[](#overview)

**QuidPHP/Routing** contains 14 classes and traits. Here is an overview:

- [BreakException](src/BreakException.php) - Class for an exception which breaks the root matching loop
- [Exception](src/Exception.php) - Class used for a route exception, the next available route will instead be triggered
- [Flash](src/Flash.php) - Class for a collection containing flash-like data, manages route key
- [Nav](src/Nav.php) - Class for storing route navigation-related data
- [Redirection](src/Redirection.php) - Class managing a URI redirection array
- [Request](src/Request.php) - Extended class with methods to route an HTTP request
- [RequestHistory](src/RequestHistory.php) - Extended class for a collection containing a history of requests
- [Route](src/Route.php) - Abstract class for a route that acts as both a View and a Controller
- [RouteRequest](src/RouteRequest.php) - Class that analyzes if a request matches a route
- [RouteSegmentRequest](src/RouteSegmentRequest.php) - Class that analyzes if a request matches a route with segment (non-static value)
- [Routes](src/Routes.php) - Class for a collection of many untriggered routes
- [Session](src/Session.php) - Extended class that adds session support for routes
- [\_attrRoute](src/_attrRoute.php) - Trait that provides methods to work with routes in the attributes property
- [\_service](src/_service.php) - Trait that provides methods to link a service to a route

### Testing

[](#testing)

**QuidPHP/Routing** contains 7 test classes:

- [BreakException](test/BreakException.php) - Class for testing Quid\\Routing\\BreakException
- [Exception](test/Exception.php) - Class for testing Quid\\Routing\\Exception
- [Nav](test/Nav.php) - Class for testing Quid\\Routing\\Nav
- [Redirection](test/Redirection.php) - Class for testing Quid\\Routing\\Redirection
- [Request](test/Request.php) - Class for testing Quid\\Routing\\Request
- [RequestHistory](test/RequestHistory.php) - Class for testing Quid\\Routing\\RequestHistory
- [Session](test/Session.php) - Class for testing Quid\\Routing\\Session

**QuidPHP/Routing** testsuite can be run by creating a new [QuidPHP/Assert](https://github.com/quidphp/assert) project.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity70

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

Total

5

Last Release

1412d ago

PHP version history (3 changes)5.27.0PHP &gt;=7.3.0

5.30.0PHP &gt;=7.4.0

5.31.0PHP &gt;=8.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9fce706f1ee9fc0052e58ea6b87ecba89474f64c31b78c7e9aba628702290709?d=identicon)[emondpph](/maintainers/emondpph)

---

Top Contributors

[![emondpph](https://avatars.githubusercontent.com/u/1444427?v=4)](https://github.com/emondpph "emondpph (122 commits)")

---

Tags

php frameworkquidquidphp

### Embed Badge

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

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[illuminate/http

The Illuminate Http package.

11936.0M5.1k](/packages/illuminate-http)

PHPackages © 2026

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