PHPackages                             n0wada/chert - 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. n0wada/chert

ActiveLibrary[Framework](/categories/framework)

n0wada/chert
============

It is a simple routing library using annotations and caching.

1.1(9y ago)024MITPHP

Since Mar 19Pushed 9y agoCompare

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

READMEChangelogDependencies (5)Versions (3)Used By (0)

Chert
=====

[](#chert)

It's an alternative to ControllerProvider for Silex application, using annotations and caching. Chert is inspired by [Orlex](https://github.com/dcousineau/orlex)

Install
-------

[](#install)

Chert uses Composer to install:

```
  "require": {
      "n0wada/chert": "dev-master"
  }

```

Parameters
----------

[](#parameters)

### chert.cache\_dir

[](#chertcache_dir)

The cache directory. This library save RouteCollection Object there.
If you use FilesystemCache(default), This Parameter is required.

### chert.cache\_lifetime

[](#chertcache_lifetime)

The lifetime in number of seconds for this cache entry. default lifetime is 0.

### chert.controller\_dirs

[](#chertcontroller_dirs)

It is an array of pairs of namespace and directory.

### chert.cache

[](#chertcache)

If you want to use ApcCache, MemCached, Redis etc., you can set Cache Object here.
You need to implements Doctrine\\Common\\Cache\\Cache Interface.

Usage
-----

[](#usage)

Resister Provider in your Silex application.

```
$app = new \Silex\Application();

$app->register(new \Chert\RouteCompileServiceProvider(),[
    'chert.cache_dir' => __DIR__ . '/cache,
    'chert.controller_dirs' => ['Controller' => __DIR__ . '/controllers]
]);

$app->run();
```

Set up Routing in your Controller.

```
namespace Test\Controller;

use Chert\Annotation\Route;
use Chert\Annotation\Value;
use Symfony\Component\HttpFoundation\JsonResponse;

/**
 * @Route(path="/test")
 */
class TestController
{
    /**
     * @Route(path="/index/{id}",methods={"GET"}, name="test.index")
     * @Value(variable="id",default="1")
     */
    function index($id)
    {
        return new JsonResponse($id);
    }
}
```

License
-------

[](#license)

[MIT](https://github.com/n0wada/Chert/blob/master/LICENSE)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Total

2

Last Release

3331d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

routingprovidersilexannotation

### Embed Badge

![Health badge](/badges/n0wada-chert/health.svg)

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

###  Alternatives

[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[ddesrosiers/silex-annotation-provider

A silex service provider that allows the use of annotations in ServiceControllers.

25246.7k3](/packages/ddesrosiers-silex-annotation-provider)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)[chameleon-system/chameleon-base

The Chameleon System core.

1026.5k3](/packages/chameleon-system-chameleon-base)

PHPackages © 2026

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