PHPackages                             decodelabs/pandora - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. decodelabs/pandora

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

decodelabs/pandora
==================

Potent PSR-11 depdency injection container

v0.4.1(8mo ago)520.9k13MITPHPPHP ^8.4CI passing

Since May 10Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/decodelabs/pandora)[ Packagist](https://packagist.org/packages/decodelabs/pandora)[ RSS](/packages/decodelabs-pandora/feed)WikiDiscussions develop Synced today

READMEChangelog (10)Dependencies (6)Versions (28)Used By (3)

Pandora
=======

[](#pandora)

[![PHP from Packagist](https://camo.githubusercontent.com/a90d04ddcdfc59d49c04df96f4bda213106e0de83a40fc2d4c1573270314b1ec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6465636f64656c6162732f70616e646f72613f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/pandora)[![Latest Version](https://camo.githubusercontent.com/96518c691a413582c2b8e4b29a31f5ac92fb17eba8b60c825a41027156649b1f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6465636f64656c6162732f70616e646f72612e7376673f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/pandora)[![Total Downloads](https://camo.githubusercontent.com/d6025c43aa1a4b43f12fef16ca47fe946b93655d1326bbe77e29b6afffd2cccb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6465636f64656c6162732f70616e646f72612e7376673f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/pandora)[![GitHub Workflow Status](https://camo.githubusercontent.com/5335288c5633f85f41a38ec981ad85b27da16a651fb67344bc01fa2596eceb13/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6465636f64656c6162732f70616e646f72612f696e746567726174652e796d6c3f6272616e63683d646576656c6f70)](https://github.com/decodelabs/pandora/actions/workflows/integrate.yml)[![PHPStan](https://camo.githubusercontent.com/e25c14ce011edabdd0fbd2e10415b41cc5d66ed11ef3e5b7edd074c5bdd35a2d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d3434434331312e7376673f6c6f6e6743616368653d74727565267374796c653d666c6174)](https://github.com/phpstan/phpstan)[![License](https://camo.githubusercontent.com/b1dfbcfa59a1132713864a7d3b5761332b355cf513c5ddc3df97d5f8a13fd5b4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6465636f64656c6162732f70616e646f72613f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/pandora)

### PSR-11 dependency injection container

[](#psr-11-dependency-injection-container)

Pandora offers a simple, powerful and flexible dependency injection and instantiation system to used as the core of your application.

---

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

[](#installation)

This package requires PHP 8.4 or higher.

Install via Composer:

```
composer require decodelabs/pandora
```

Usage
-----

[](#usage)

Instantiate a new `Container` to keep your important objects organised:

```
use DecodeLabs\Pandora\Container;

$container = new Container();
```

Bind instances or classes to interfaces and retrieve them when you need them:

```
use My\Library\CoolInterface;
use My\Library\CoolImplementation; // Implements CoolInterface

// Instance
$container->bind(CoolInterface::class, new CoolImplementation());
$imp = $container->get(CoolInterface::class);

// Will only bind if CoolInterface has not been bound before
$container->tryBind(CoolInterface::class, new OtherImplementation()); // Will not bind
$imp = $container->get(CoolInterface::class);

// Bind a factory
$container->bind(CoolInterface::class, fn() => new CoolImplementation());
```

### Retrieval

[](#retrieval)

Parameters can be passed to constructors of implementation classes:

```
$imp = $container->getWith(CoolInterface::class, ['list', 'of', 'params']);

// Or inject parameters for later:
$container->inject(CoolInterface::class, 'paramName', 'paramValue');
$imp = $container->get(CoolInterface::class);
```

Access the binding controllers:

```
$binding = $container->getBinding(CoolInterface::class);
```

Licensing
---------

[](#licensing)

Pandora is licensed under the MIT License. See [LICENSE](./LICENSE) for the full license text.

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance67

Regular maintenance activity

Popularity32

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity70

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

Recently: every ~38 days

Total

26

Last Release

243d ago

PHP version history (4 changes)v0.1.0PHP ^7.2|^8.0

v0.2.0PHP ^8.0

v0.2.14PHP ^8.1

v0.3.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a241d64d12b3b5ee94197862ec1ec30b82ed2efa34a0cd7f4c3565a021daddd?d=identicon)[betterthanclay](/maintainers/betterthanclay)

---

Top Contributors

[![betterthanclay](https://avatars.githubusercontent.com/u/1273586?v=4)](https://github.com/betterthanclay "betterthanclay (140 commits)")

---

Tags

containerdependency-injectionphppsr-11containerPSR-11dependencyinjection

### Embed Badge

![Health badge](/badges/decodelabs-pandora/health.svg)

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

###  Alternatives

[league/container

A fast and intuitive dependency injection container.

86387.8M342](/packages/league-container)[slince/di

A flexible dependency injection container

20260.4k6](/packages/slince-di)[capsule/di

A PSR-11 compliant autowiring dependency injection container.

2857.5k2](/packages/capsule-di)[miladrahimi/phpcontainer

Dependency injection (IoC) container for PHP projects

1322.7k2](/packages/miladrahimi-phpcontainer)

PHPackages © 2026

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