PHPackages                             designcise/bitframe-fastroute - 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. designcise/bitframe-fastroute

ActiveLibrary

designcise/bitframe-fastroute
=============================

FastRoute router middleware for BitFrame microframework

v4.0.0(2y ago)0192[1 PRs](https://github.com/designcise/bitframe-fastroute/pulls)MITPHPPHP &gt;=8.2CI failing

Since May 16Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/designcise/bitframe-fastroute)[ Packagist](https://packagist.org/packages/designcise/bitframe-fastroute)[ RSS](/packages/designcise-bitframe-fastroute/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (9)Versions (21)Used By (0)

BitFrame\\FastRoute
===================

[](#bitframefastroute)

[![CI](https://github.com/designcise/bitframe-fastroute/actions/workflows/ci.yml/badge.svg)](https://github.com/designcise/bitframe-fastroute/actions/workflows/ci.yml)[![Maintainability](https://camo.githubusercontent.com/020cf3b67d39027c2e4923c8fee49278e3ca2574a13baa113a59341e86363629/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f62346630383730376663323664613937313034372f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/designcise/bitframe-fastroute/maintainability)[![Test Coverage](https://camo.githubusercontent.com/3e293d5349da7cdf68a0089d76769a09331e22ebc991cf71b7b12f08097fccbd/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f62346630383730376663323664613937313034372f746573745f636f766572616765)](https://codeclimate.com/github/designcise/bitframe-fastroute/test_coverage)

FastRoute wrapper class to manage http routes as a middleware.

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

[](#installation)

Install using composer:

```
$ composer require designcise/bitframe-fastroute

```

Please note that this package requires PHP 8.2.0 or newer.

Examples
--------

[](#examples)

### Using Attributes for Route Declaration

[](#using-attributes-for-route-declaration)

```
class SomeController
{
    #[Route(['GET'], '/hello/123')]
    public function indexAction(
        ServerRequestInterface $request,
        RequestHandlerInterface $handler,
    ): ResponseInterface {
        $response = $handler->handle($request);
        $response->getBody()->write(
            "BitFramePHP - 👋 Build Something Amazing Today!"
        );

        return $response;
    }
}
```

```
use BitFrame\App;
use BitFrame\Emitter\SapiEmitter;
use BitFrame\FastRoute\Router;
use SomeController;

require 'vendor/autoload.php';

$app = new App();
$router = new Router();

$router->registerControllers([
    new SomeController(),
]);

$app->run([
    SapiEmitter::class,
    $router,
    // ...
]);
```

### Using Inline Callback to Handle Route

[](#using-inline-callback-to-handle-route)

```
use BitFrame\App;
use BitFrame\Emitter\SapiEmitter;
use BitFrame\FastRoute\Router;

require 'vendor/autoload.php';

$app = new App();
$router = new Router();

$router->map(['GET', 'POST'], '/test', function ($request, $handler) {
    $response = $handler->handle($request);
    $response->getBody()->write('Test Page');
    return $response;
});

$app->run([
    SapiEmitter::class,
    $router,
    // ...
]);
```

Tests
-----

[](#tests)

To run the tests you can use the following commands:

CommandType`composer test`PHPUnit tests`composer style`CodeSniffer`composer md`MessDetector`composer check`PHPStanContributing
------------

[](#contributing)

- File issues at
- Issue patches to

License
-------

[](#license)

Please see [License File](LICENSE.md) for licensing information.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance54

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity85

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

Recently: every ~177 days

Total

17

Last Release

1048d ago

Major Versions

1.x-dev → 2.x-dev2020-05-11

v2.1.0 → 3.x-dev2021-05-09

v3.6.0 → 4.x-dev2023-07-01

PHP version history (5 changes)1.0.0PHP &gt;=7.1.0

2.x-devPHP &gt;=7.4.0

3.x-devPHP &gt;=8.0

v3.6.0PHP &gt;=8.1

4.x-devPHP &gt;=8.2

### Community

Maintainers

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

---

Top Contributors

[![designcise](https://avatars.githubusercontent.com/u/6676615?v=4)](https://github.com/designcise "designcise (35 commits)")

---

Tags

http-routermiddlewarephppsr-15psr-7router

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/designcise-bitframe-fastroute/health.svg)

```
[![Health](https://phpackages.com/badges/designcise-bitframe-fastroute/health.svg)](https://phpackages.com/packages/designcise-bitframe-fastroute)
```

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[neos/flow-development-collection

Flow packages in a joined repository for pull requests.

144179.3k3](/packages/neos-flow-development-collection)[windwalker/framework

The next generation PHP framework.

25639.1k1](/packages/windwalker-framework)[mezzio/mezzio-authentication-oauth2

OAuth2 (server) authentication middleware for Mezzio and PSR-7 applications.

28483.0k2](/packages/mezzio-mezzio-authentication-oauth2)[openswoole/core

Openswoole core library

181.1M32](/packages/openswoole-core)

PHPackages © 2026

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