PHPackages                             kusabi/container - 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. kusabi/container

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

kusabi/container
================

A PSR-11 conforming container library for PHP

1.0.0(5y ago)02mitPHPPHP ^7.0 || ^8.0

Since Nov 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/kusabi/container)[ Packagist](https://packagist.org/packages/kusabi/container)[ RSS](/packages/kusabi-container/feed)WikiDiscussions main Synced 1mo ago

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

PHP Container
=============

[](#php-container)

[![Tests](https://github.com/kusabi/container/workflows/tests/badge.svg)](https://github.com/kusabi/container/workflows/tests/badge.svg)[![codecov](https://camo.githubusercontent.com/c4e16529e3f67106b5841e4ed400b4433a0721d30f80c6c46c7bafd547742a42/68747470733a2f2f636f6465636f762e696f2f67682f6b75736162692f636f6e7461696e65722f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/kusabi/container)[![Licence Badge](https://camo.githubusercontent.com/60ebc07c6f643d0e46808e2d92258ef0a1a077d03ea0e4905eb3e1118585cb94/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6b75736162692f636f6e7461696e65722e737667)](https://img.shields.io/github/license/kusabi/container.svg)[![Release Badge](https://camo.githubusercontent.com/cf3f5aaacd1aeb0c1d6fefeb64045a9116b60508107c53714609b0af5fabaff4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6b75736162692f636f6e7461696e65722e737667)](https://img.shields.io/github/release/kusabi/container.svg)[![Tag Badge](https://camo.githubusercontent.com/8756733f82d4901a115506b11cff8365aae67544022d7ff6ec05401687b05c76/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f6b75736162692f636f6e7461696e65722e737667)](https://img.shields.io/github/tag/kusabi/container.svg)[![Issues Badge](https://camo.githubusercontent.com/fa9f117165c90209c3a08a5952bfc136206d3cc9958a4cd9d06788e3c4cfbb5f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6b75736162692f636f6e7461696e65722e737667)](https://img.shields.io/github/issues/kusabi/container.svg)[![Code Size](https://camo.githubusercontent.com/70236095973b6e1cb61726f4e341ac87aebdf9925a9475554f9a31cf4af93190/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f6b75736162692f636f6e7461696e65722e7376673f6c6162656c3d73697a65)](https://img.shields.io/github/languages/code-size/kusabi/container.svg)

An implementation of a [PSR-11](https://www.php-fig.org/psr/psr-11/) conforming Container library

Compatibility and dependencies
------------------------------

[](#compatibility-and-dependencies)

This library is compatible with PHP version `7.0`, `7.1`, `7.2`, `7.3`, `7.4`, `8.0` and `8.1`.

This library has no dependencies.

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

[](#installation)

Installation is simple using composer.

```
composer require kusabi/container
```

Or simply add it to your `composer.json` file

```
{
    "require": {
        "kusabi/container": "^1.0"
    }
}
```

Using the Container class
-------------------------

[](#using-the-container-class)

The Uri class is a very basic wrapper around a Uri string.

```
use Kusabi\Container\Container;

// Create a new instance
$container = new Container();

// Set and get items
$container->set('integer', 1);
$container->get('integer'); // 1

// Set values by reference
$array = [1, 2, 3];
$container->setReference('array', $array);
$array[] = 4;
$container->get('array'); // [1, 2, 3, 4]
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

2013d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/62f4942978644437b5ff3d7bd3f6411580413d327b001104acd4914f43ab63b6?d=identicon)[kusabi](/maintainers/kusabi)

---

Top Contributors

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

---

Tags

containercontainersdependenciesdependencydependency-injectionphpphp7php8psrpsr-11containerdependencyinjectiondiserviceprovider

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/kusabi-container/health.svg)

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

###  Alternatives

[league/container

A fast and intuitive dependency injection container.

86387.8M343](/packages/league-container)[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)
