PHPackages                             undertext/arouter - 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. undertext/arouter

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

undertext/arouter
=================

Annotation based router

v0.1.0(7y ago)1154MITPHPCI failing

Since Sep 27Pushed 6y ago2 watchersCompare

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

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

ARouter
=======

[](#arouter)

Php annotation based router. Documentation can be found [here](https://undertext.github.io/arouter/html/index.html)

Requirements
------------

[](#requirements)

PHP version &gt;= 7.1

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

[](#installation)

To install ARouter, run the command below:

`composer require undertext/arouter`

Quick example
-------------

[](#quick-example)

```
// Enable annotations autolading. This is a required step.
AnnotationRegistry::registerLoader('class_exists');
// Build annotaion based router, find controllers in 'src/Controller' folder.
$router = RouterFactory::getRouter('src/Controller');
// Get response based on request.
try {
   $response = $router->getResponse(ServerRequest::fromGlobals());
} catch (RouteHandlerNotFoundException $e) {
    $response = new Response(404, [], "Route not found"); // This is an example of Guzzle HTTP Response usage.
}

outputResponse($response); // outputResponse is a function that converts response to string and outputs it.
```

Main documentation sections:
----------------------------

[](#main-documentation-sections)

*NOTE: Due to Doxygen parser all code examples with PHP annotations do not wrap those annotations in DocBlock comment*

- [Routes declaration](https://undertext.github.io/arouter/html/group__routes__declaring.html)
- [Creating the router](https://undertext.github.io/arouter/html/group__router__creation.html)
- [HTTP Message Converters](https://undertext.github.io/arouter/html/group__http__message__converters.html)
- [Argument resolvers](https://undertext.github.io/arouter/html/group__argument__resolvers.html)
- [PSR-15 MIddleware](https://undertext.github.io/arouter/html/group__middleware.html)
- [Exceptions](https://undertext.github.io/arouter/html/group__exceptions.html)

[![Build Status](https://camo.githubusercontent.com/ff2bab07ed622626197b5aec3cbcb81a92ffba39333c0898654ab84d82e4c0d3/68747470733a2f2f7472617669732d63692e636f6d2f756e646572746578742f61726f757465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/undertext/arouter)[![codecov](https://camo.githubusercontent.com/9bd802678980a8e58de5d3c5561e94ca79424fad45859bdb8eea06d293ab4ef9/68747470733a2f2f636f6465636f762e696f2f67682f756e646572746578742f61726f757465722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/undertext/arouter)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

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

Unknown

Total

1

Last Release

2787d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1038992?v=4)[Yaroslav Kharchenko](/maintainers/undertext)[@undertext](https://github.com/undertext)

---

Top Contributors

[![undertext](https://avatars.githubusercontent.com/u/1038992?v=4)](https://github.com/undertext "undertext (11 commits)")

---

Tags

psr-7router

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/undertext-arouter/health.svg)

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

###  Alternatives

[league/route

Fast routing and dispatch component including PSR-15 middleware, built on top of FastRoute.

6633.1M115](/packages/league-route)[aura/router

Powerful, flexible web routing for PSR-7 requests.

5231.5M67](/packages/aura-router)[sunrise/http-router

A powerful solution as the foundation of your project.

16249.8k10](/packages/sunrise-http-router)[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)[middlewares/fast-route

Middleware to use FastRoute

96191.1k15](/packages/middlewares-fast-route)

PHPackages © 2026

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