PHPackages                             kryptamine/groot - 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. kryptamine/groot

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

kryptamine/groot
================

PHP 8 attributes based router adapter

0.0.1(4y ago)119MITPHPPHP ^8.0

Since Sep 26Pushed 4y ago2 watchersCompare

[ Source](https://github.com/kryptamine/groot)[ Packagist](https://packagist.org/packages/kryptamine/groot)[ RSS](/packages/kryptamine-groot/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

PHP 8 attributes router adapter
===============================

[](#php-8-attributes-router-adapter)

This package is an adapter that provides the ability to integrate PHP 8 attributes with any router you'd prefer to use.

```
use Kryptamine\Groot\Attributes\Get;
use Kryptamine\Groot\Attributes\Post;
use Kryptamine\Groot\Attributes\Controller;

#[Controller('users')]
class UserController
{
    #[Get('/')]
    public function getUsers(): void
    {

    }

    #[Get('/{id:\d+}')]
    public function getUser(int $id): void
    {

    }

    #[Post('/')]
    public function saveUser(): void
    {

    }

    ...
}
```

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

[](#installation)

1. Install the package via composer:

```
composer require kryptamine/groot
```

2. Use a supported adapter or implement [your own](#supported-adapters)

Usage example
-------------

[](#usage-example)

```
namespace Kryptamine\Groot;

use Kryptamine\Groot\Router;
use Bramus\Router\Router as BramusRouter;
use Kryptamine\Groot\Adapters\BramusRouterAdapter;

require 'vendor/autoload.php';

$bramusRouter = new BramusRouter();

$router = new Router(BramusRouterAdapter::fromBramusRouter($bramusRouter), [
    UserController::class,
]);

$router->register();

$bramusRouter->run();
```

Supported Adapters
------------------

[](#supported-adapters)

[bramus/router](https://github.com/bramus/router)

[nikic/FastRoute](https://github.com/nikic/FastRoute)

To create your own adapter, you should implement [RouteRegistrarAdapterInterface](https://github.com/kryptamine/groot/blob/main/src/Adapters/RouteRegistrarAdapterInterface.php)

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

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

1741d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7682795?v=4)[Alexander Satretdinov](/maintainers/kryptamine)[@kryptamine](https://github.com/kryptamine)

---

Top Contributors

[![kryptamine](https://avatars.githubusercontent.com/u/7682795?v=4)](https://github.com/kryptamine "kryptamine (5 commits)")

---

Tags

routerphp-attributes

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kryptamine-groot/health.svg)

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

###  Alternatives

[bramus/router

A lightweight and simple object oriented PHP Router

1.1k490.5k55](/packages/bramus-router)[izniburak/laravel-auto-routes

Auto Route Generating (Auto-Discovery) Package for Laravel

23549.7k](/packages/izniburak-laravel-auto-routes)[proai/lumen-annotations

Route and event binding annotations for Laravel Lumen

1012.7k](/packages/proai-lumen-annotations)[miranj/craft-router

Use URL segments as filtering criteria on an entry query.

231.6k](/packages/miranj-craft-router)

PHPackages © 2026

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