PHPackages                             parable-php/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. parable-php/routing

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

parable-php/routing
===================

Parable Routing is a light-weight and fast url Routing library

1.0.0(5y ago)2488↓100%1MITPHPPHP &gt;=8.0

Since Mar 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/parable-php/routing)[ Packagist](https://packagist.org/packages/parable-php/routing)[ Docs](https://github.com/parable-php/routing)[ RSS](/packages/parable-php-routing/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (11)Used By (1)

Parable Routing
===============

[](#parable-routing)

[![Workflow Status](https://github.com/parable-php/routing/workflows/Tests/badge.svg)](https://github.com/parable-php/routing/actions?query=workflow%3ATests)[![Latest Stable Version](https://camo.githubusercontent.com/db0339558259bfa4d93cb3a4577f160b5384861a03252457a4863c42e86f7802/68747470733a2f2f706f7365722e707567782e6f72672f70617261626c652d7068702f726f7574696e672f762f737461626c65)](https://packagist.org/packages/parable-php/routing)[![Latest Unstable Version](https://camo.githubusercontent.com/3c84b224a776773a6ebbae2074e03305065753cd808582ab0c21768054c5849a/68747470733a2f2f706f7365722e707567782e6f72672f70617261626c652d7068702f726f7574696e672f762f756e737461626c65)](https://packagist.org/packages/parable-php/routing)[![License](https://camo.githubusercontent.com/69981d6f2f9f26d61b793bfaeacdd596bb5e7d7ba0462284213fcbe3f62954c1/68747470733a2f2f706f7365722e707567782e6f72672f70617261626c652d7068702f726f7574696e672f6c6963656e7365)](https://packagist.org/packages/parable-php/routing)

Parable Routing is a fast, intuitive url routing library.

Install
-------

[](#install)

Php 8.0+ and [composer](https://getcomposer.org) are required.

```
$ composer require parable-php/routing
```

Usage
-----

[](#usage)

```
$router = new Router();

$route1 = new Route(
    ['GET'],
    'simple-route',
    'route/simple',
    [Controller::class, 'actionName']
);

$route2 = new Route(
    ['GET', 'POST'],
    'param-route',
    'route/{param}/hello',
    function (string $param) {
        echo 'Hello, ' . $username . '!';
    }
);

$router->addRoutes($route1, $route2);

$match = $router->match('GET', 'route/devvoh/hello');

echo $match->getName();
```

This would echo `param-route`.

Routing does not provide a direct way of executing a route, but it's easy enough:

```
$callable = $match->getCallable();
$callable(...$match->getParameterValues()->getAll());
```

For more free-form metadata you want to attach to a `Route`, you can use metadata:

```
$route = new Route(
    ['GET'],
    'simple-route',
    'route/simple',
    [Controller::class, 'actionName'],
    [
        'metadata' => 'enabled'
    ]
);

$route->getMetadataValue('metadata'); // returns 'enabled'
```

You can use this to add template paths to a route, whether it should be visible to admins only, etc.

Contributing
------------

[](#contributing)

Any suggestions, bug reports or general feedback is welcome. Use github issues and pull requests, or find me over at [devvoh.com](https://devvoh.com).

License
-------

[](#license)

All Parable components are open-source software, licensed under the MIT license.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity71

Established project with proven stability

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

Recently: every ~174 days

Total

10

Last Release

1894d ago

Major Versions

0.4.0 → 1.0.02021-03-12

PHP version history (2 changes)0.1.0PHP &gt;=7.1

0.3.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7db40df70c77a9d591de4521642b0ddcb6c448e4876b22dc2f76900c736ab579?d=identicon)[robindevoh](/maintainers/robindevoh)

---

Tags

libraryparablephp8routesroutingurlurlmicrorouterlibraryroutingroute

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[bramus/router

A lightweight and simple object oriented PHP Router

1.1k458.8k49](/packages/bramus-router)[devster/ubench

Micro PHP library for benchmarking

5701.0M29](/packages/devster-ubench)[illuminatech/url-trailing-slash

Allows enforcing URL routes with or without trailing slash

50216.9k](/packages/illuminatech-url-trailing-slash)[miladrahimi/phprouter

A powerful, lightweight, and very fast HTTP URL router for PHP projects.

20832.6k2](/packages/miladrahimi-phprouter)[proai/lumen-annotations

Route and event binding annotations for Laravel Lumen

1012.4k](/packages/proai-lumen-annotations)

PHPackages © 2026

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