PHPackages                             jonsa/silex-ioc - 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. jonsa/silex-ioc

ActiveLibrary[Framework](/categories/framework)

jonsa/silex-ioc
===============

IoC for Silex application

v0.2.0(10y ago)128MITPHP

Since Sep 28Pushed 10y ago1 watchersCompare

[ Source](https://github.com/jonsa/silex-ioc)[ Packagist](https://packagist.org/packages/jonsa/silex-ioc)[ RSS](/packages/jonsa-silex-ioc/feed)WikiDiscussions master Synced 3w ago

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

Silex IoC
=========

[](#silex-ioc)

Class resolver for the [Silex](http://silex.sensiolabs.org/) application.

This project is a bridge between [Pimple IoC](https://github.com/jonsa/pimple-ioc) and the Silex Application.

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

[](#installation)

Add the IoC container to your `composer.json` using the command line.

```
composer require jonsa/silex-ioc

```

Usage
-----

[](#usage)

The class resolver is registered in Silex as a `ServiceProvider`

```
use Jonsa\PimpleResolver\ServiceProvider as PimpleResolverServiceProvider;
use Jonsa\SilexResolver\ServiceProvider as SilexResolverServiceProvider;
use Silex\Application;

$app = new Application();
$app->register(new PimpleResolverServiceProvider());
$app->register(new SilexResolverServiceProvider());
```

### Events

[](#events)

The Silex event dispatcher is registered with PimpleResolver which makes it easy to inject into the resolver.

```
use Jonsa\PimpleResolver\Event\ClassResolvedEvent;
use Jonsa\PimpleResolver\Events as ResolverEvents;

$app->on(ResolverEvents::CLASS_RESOLVED, function (ClassResolvedEvent $event) {
    $object = $event->getResolvedObject();
    ...
});
```

Configuration
-------------

[](#configuration)

The ServiceProvider has one configuration parameter.

```
class ServiceProvider implements ServiceProviderInterface {
    public function __construct($resolveControllers = true)
    {
        ...
    }
}
```

`$resolveControllers` tells the ServiceProvider whether to replace the built-in controller resolver in Silex. If set to true controllers will be resolved out of the IoC container.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Every ~2 days

Total

5

Last Release

3913d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/84fefa5af43cddaa8ffa30a7474e9a4dc1f57e269390759e9386878d6b3fa979?d=identicon)[jonsa](/maintainers/jonsa)

---

Top Contributors

[![jonsa](https://avatars.githubusercontent.com/u/807381?v=4)](https://github.com/jonsa "jonsa (1 commits)")

---

Tags

iocsilex

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jonsa-silex-ioc/health.svg)

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

###  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)
