PHPackages                             alanvdb/pimple-container-factory - 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. alanvdb/pimple-container-factory

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

alanvdb/pimple-container-factory
================================

Factories for Pimple containers

v0.1(1y ago)02MITPHP

Since Apr 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Alanvdb/pimple-container-factory)[ Packagist](https://packagist.org/packages/alanvdb/pimple-container-factory)[ RSS](/packages/alanvdb-pimple-container-factory/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Pimple Container Factory
========================

[](#pimple-container-factory)

A lightweight factory for creating [Pimple](https://github.com/silexphp/Pimple) containers, including support for PSR-11 compliant containers.

Features
--------

[](#features)

- Simple container factory based on Pimple
- PSR-11 container wrapper using `Pimple\Psr11\Container`
- Designed with interface abstraction for testability and extensibility

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

[](#installation)

You can install this package via [Composer](https://getcomposer.org/):

```
composer require alanvdb/pimple-container-factory
```

Usage
-----

[](#usage)

### Basic Pimple Container

[](#basic-pimple-container)

To create a raw Pimple container:

```
use AlanVdb\Container\Factory\PimpleContainerFactory;

$factory = new PimpleContainerFactory();
$container = $factory->createContainer([
    'service' => function () {
        return new \Some\Service();
    },
]);

$service = $container['service'];
```

### PSR-11 Compatible Container

[](#psr-11-compatible-container)

To create a container compatible with Psr\\Container\\ContainerInterface:

```
use AlanVdb\Container\Factory\PimplePsr11ContainerFactory;

$factory = new PimplePsr11ContainerFactory();
$container = $factory->createContainer([
    'service' => function () {
        return new \Some\Service();
    },
]);

$service = $container->get('service');
```

Interfaces
----------

[](#interfaces)

This package uses interfaces for container factories, located under:

- AlanVdb\\Container\\Definition\\PimpleContainerFactoryInterface
- AlanVdb\\Container\\Definition\\ContainerFactoryInterface

You can rely on these interfaces for dependency injection or testing purposes.

Requirements
------------

[](#requirements)

PHP 8.2 or higher

License
-------

[](#license)

This package is open-source and licensed under the MIT License.

Made with ❤️ by AlanVdb

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance48

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 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

383d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/79d5351bc1e25eb96224d5dd1bb67f5a60578d968784acf5f2c1edb897247b38?d=identicon)[alanvdb](/maintainers/alanvdb)

---

Top Contributors

[![Alanvdb](https://avatars.githubusercontent.com/u/35227520?v=4)](https://github.com/Alanvdb "Alanvdb (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alanvdb-pimple-container-factory/health.svg)

```
[![Health](https://phpackages.com/badges/alanvdb-pimple-container-factory/health.svg)](https://phpackages.com/packages/alanvdb-pimple-container-factory)
```

###  Alternatives

[illuminate/container

The Illuminate Container package.

31278.1M2.0k](/packages/illuminate-container)[symfony/type-info

Extracts PHP types information.

19751.9M114](/packages/symfony-type-info)[ecotone/ecotone

Supporting you in building DDD, CQRS, Event Sourcing applications with ease.

558549.8k17](/packages/ecotone-ecotone)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k17](/packages/civicrm-civicrm-core)[jaxon-php/jaxon-core

Jaxon is an open source PHP library for easily creating Ajax web applications

73142.3k25](/packages/jaxon-php-jaxon-core)[cedaro/satispress

Generate a Composer repository from installed WordPress plugins and themes.

56134.0k](/packages/cedaro-satispress)

PHPackages © 2026

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