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

ActiveLibrary[Framework](/categories/framework)

codemonster-ru/router
=====================

Lightweight router for PHP applications

v2.5.0(6mo ago)01681MITPHPPHP &gt;=8.2CI passing

Since Sep 26Pushed 6mo agoCompare

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

READMEChangelog (7)Dependencies (1)Versions (8)Used By (1)

codemonster-ru/router
=====================

[](#codemonster-rurouter)

[![Latest Version on Packagist](https://camo.githubusercontent.com/074ded00708293b4e78a436646a408fc7bb096232726c172a098652ffef07317/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f64656d6f6e737465722d72752f726f757465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codemonster-ru/router)[![Total Downloads](https://camo.githubusercontent.com/a340df06ac9ee2b5fac3a6e10a030f467a555ad508d9ed2b6a967da4c45d64b2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f64656d6f6e737465722d72752f726f757465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codemonster-ru/router)[![License](https://camo.githubusercontent.com/b3618165849825e2c341aef3e349902df3bc400c64c17d2e294a7e48d97e8b38/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636f64656d6f6e737465722d72752f726f757465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codemonster-ru/router)[![Tests](https://github.com/codemonster-ru/router/actions/workflows/tests.yml/badge.svg)](https://github.com/codemonster-ru/router/actions/workflows/tests.yml)

A lightweight router for PHP applications.

📦 Installation
--------------

[](#-installation)

```
composer require codemonster-ru/router
```

🚀 Usage
-------

[](#-usage)

```
use Codemonster\Router\Router;

$router = new Router();

$router->get('/', fn() => 'Home Page');
$router->get('/about', fn() => 'About Us');

$result = $router->dispatch(
    $_SERVER['REQUEST_METHOD'],
    parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
);

if ($result === null) {
    http_response_code(404);

    echo 'Not Found';
} else {
    echo $result;
}
```

✨ Features
----------

[](#-features)

- Simple route registration (`get`, `post`, `any`)
- Support for callbacks, `[Controller::class, 'method']` controllers, and `Controller@method` strings
- Returns a **pure result**, without binding to a specific `Response`

🧪 Testing
---------

[](#-testing)

```
composer test
```

👨‍💻 Author
----------

[](#‍-author)

[**Kirill Kolesnikov**](https://github.com/KolesnikovKirill)

📜 License
---------

[](#-license)

[MIT](https://github.com/codemonster-ru/router/blob/main/LICENSE)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance69

Regular maintenance activity

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

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

Total

7

Last Release

183d ago

Major Versions

v1.0.0 → v2.0.02025-09-28

PHP version history (2 changes)v1.0.0PHP &gt;=8.0

v2.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/a22c460130c82eca5da633a388faa81adf7e63558a2ae1e34441e6624ec2ad15?d=identicon)[KolesnikovKirill](/maintainers/KolesnikovKirill)

---

Top Contributors

[![KolesnikovKirill](https://avatars.githubusercontent.com/u/33142935?v=4)](https://github.com/KolesnikovKirill "KolesnikovKirill (10 commits)")

---

Tags

frameworkhttplightweightphprouterroutinghttpphpframeworkrouterroutinglightweight

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[pecee/simple-router

Simple, fast PHP router that is easy to get integrated and in almost any project. Heavily inspired by the Laravel router.

696214.6k17](/packages/pecee-simple-router)[developermarius/simple-router

Simple, fast PHP router that is easy to get integrated and in almost any project. Heavily inspired by the Laravel router.

112.4k](/packages/developermarius-simple-router)

PHPackages © 2026

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