PHPackages                             logifire/nano-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. [Framework](/categories/framework)
4. /
5. logifire/nano-router

ActiveLibrary[Framework](/categories/framework)

logifire/nano-router
====================

Router implementation using PSR-7

5.0.0(11mo ago)118[1 PRs](https://github.com/Logifire/nano-router/pulls)MITPHPPHP &gt;=8.4CI passing

Since Jan 22Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/Logifire/nano-router)[ Packagist](https://packagist.org/packages/logifire/nano-router)[ RSS](/packages/logifire-nano-router/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (8)Versions (16)Used By (0)

nano-router
===========

[](#nano-router)

[![](https://github.com/logifire/nano-router/workflows/Tests/badge.svg)](https://github.com/logifire/nano-router/workflows/Tests/badge.svg)

Usage
-----

[](#usage)

**Basic**

```
    // Controller implementation
    class StringController implements Controller {
        public function run(): ResponseInterface {
            ...
        }
    }

    ...
    // Router configuration
    $router = new Router();
    $router->configurePath(Router::METHOD_GET, '/profiles/(?[0-9a-f\-]{36})', StringController::class);
    $router->configurePath(Router::METHOD_GET, '/profiles/(?\d+)', IntegerController::class);

    ...
    // Request handling
    $router_result = $router->processRequest($server_request);

    if ($router_result !== null) {
        $controller_name = $router_result->getControllerName();
        $path_result = $router_result->getPathResult();
        $query_result = $router_result->getQueryResult();

        $controller = new $controller_name({dependencies});

        $psr7_response = $controller->buildResponse();
    }
    ...

```

This package comes with PSR-15 RouterMiddleware

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance68

Regular maintenance activity

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

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

Recently: every ~448 days

Total

13

Last Release

348d ago

Major Versions

1.0.0 → 2.0.02020-02-29

2.0.0 → 3.0.02020-06-12

3.0.0 → 4.0.02020-06-30

4.0.1 → 6.0.0.x-dev2021-01-11

4.0.2 → 5.0.02025-05-26

PHP version history (3 changes)0.1PHP ^7.2

6.0.0.x-devPHP ^7.4

5.0.0PHP &gt;=8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16954276?v=4)[Bo Andersen](/maintainers/Logifire)[@Logifire](https://github.com/Logifire)

---

Top Contributors

[![Logifire](https://avatars.githubusercontent.com/u/16954276?v=4)](https://github.com/Logifire "Logifire (70 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.3k86.3M2.2k](/packages/symfony-symfony)[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[neos/flow

Flow Application Framework

862.0M449](/packages/neos-flow)[cakephp/authentication

Authentication plugin for CakePHP

1153.6M67](/packages/cakephp-authentication)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)

PHPackages © 2026

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