PHPackages                             lokhman/silex-tools - 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. lokhman/silex-tools

ActiveLibrary[Framework](/categories/framework)

lokhman/silex-tools
===================

Tools for Silex 2.0+ framework

2.1.4(9y ago)1618MITPHP

Since Nov 25Pushed 9y ago1 watchersCompare

[ Source](https://github.com/lokhman/silex-tools)[ Packagist](https://packagist.org/packages/lokhman/silex-tools)[ RSS](/packages/lokhman-silex-tools/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (4)Versions (11)Used By (0)

silex-tools
===========

[](#silex-tools)

[![StyleCI](https://camo.githubusercontent.com/1e814637ec7e8e0a664b8ae90784f5674d5f783abf2bb7f3d6246dcd158328f2/68747470733a2f2f7374796c6563692e696f2f7265706f732f36363935373632312f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/66957621)

Tools for [**Silex 2.0+**](http://silex.sensiolabs.org/) micro-framework.

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

[](#installation)

You can install `silex-tools` with [Composer](http://getcomposer.org):

```
composer require lokhman/silex-tools

```

Components
------------------------------------------------

[](#components)

- [Console Application](https://github.com/lokhman/silex-console)
- [Config Service Provider](https://github.com/lokhman/silex-config)
- [RESTful Service Provider](https://github.com/lokhman/silex-restful)
- [Application Class](#application-class)
- [Route Class](#route-class)
- [Twig Service Provider](#twig-service-provider)
- [Tools Trait](#tools-trait)

Suggested Components
--------------------------------------------------------------------

[](#suggested-components)

- [Assetic Service Provider](https://github.com/lokhman/silex-assetic)
- [Hashids Service Provider](https://github.com/lokhman/silex-hashids)
- [AutoReload Service Provider](https://github.com/lokhman/silex-autoreload)

### Application Container

[](#application-container)

Class that overrides base `Silex\Application` class and provides automatic registration of `ConfigServiceProvider`, error handling and [Tools Trait](#tools-trait).

```
use Lokhman\Silex\Application as BaseApplication;

class Application extends BaseApplication {

    public function __construct(array $values = []) {
        $values['config.dir'] = __DIR__.'/../app/config';

        parent::__construct($values);

        // ...
    }

}

```

### Route Class

[](#route-class)

Class that overrides base `Silex\Route` class and adds support for [`SecurityTrait`](http://silex.sensiolabs.org/doc/2.0/providers/security.html#traits). You can enable it with:

```
$app['route_class'] = 'Lokhman\Silex\Route';

```

### Twig Service Provider

[](#twig-service-provider)

Extended service provider for traditional [`TwigServiceProvider`](http://silex.sensiolabs.org/doc/2.0/providers/twig.html) that enables support for namespaces in special `twig.paths` option.

```
use Lokhman\Silex\Provider\TwigServiceProvider;

$app->register(new TwigServiceProvider(), [
    'twig.paths' => [
        'PublicBundle' => '/path/to/src/PublicBundle/Resources/views',
    ],
]);

$app->render('@PublicBundle/default/index.html.twig');

```

### Tools Trait

[](#tools-trait)

Trait to be included in overridden Silex `Application` class. Provides various useful methods to be used in the container. This trait is automatically included into [Application Container](#application-container).

```
use Silex\Application as BaseApplication;
use Lokhman\Silex\Application\ToolsTrait;

class Application extends BaseApplication {

    use ToolsTrait;

    public function __construct(array $values = []) {
        parent::__construct($values);
    }

}

```

License
------------------------------------------

[](#license)

Library is available under the MIT license. The included LICENSE file describes this in detail.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity69

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

Recently: every ~28 days

Total

10

Last Release

3332d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/17a4b2bb3c64905c2663115cb0a3ef36854123b51709645576a591fb72fbef10?d=identicon)[lokhman](/maintainers/lokhman)

---

Top Contributors

[![lokhman](https://avatars.githubusercontent.com/u/7714105?v=4)](https://github.com/lokhman "lokhman (68 commits)")

---

Tags

silextoolstoolssilex

### Embed Badge

![Health badge](/badges/lokhman-silex-tools/health.svg)

```
[![Health](https://phpackages.com/badges/lokhman-silex-tools/health.svg)](https://phpackages.com/packages/lokhman-silex-tools)
```

###  Alternatives

[ddesrosiers/silex-annotation-provider

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

25249.1k3](/packages/ddesrosiers-silex-annotation-provider)[tobiassjosten/responsible-service-provider

A Silex ServiceProvider for automagic response formatting.

3492.1k](/packages/tobiassjosten-responsible-service-provider)[propel/propel-service-provider

Propel integrationfor Silex.

2625.4k3](/packages/propel-propel-service-provider)

PHPackages © 2026

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