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

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

phact-cmf/container
===================

PSR-11 compatible dependency injection container

v1.0.1(5y ago)031MITPHPPHP &gt;=7.2CI failing

Since Jun 29Pushed 5y agoCompare

[ Source](https://github.com/phact-cmf/Container)[ Packagist](https://packagist.org/packages/phact-cmf/container)[ Docs](https://github.com/phact-cmf/Container)[ RSS](/packages/phact-cmf-container/feed)WikiDiscussions master Synced 6d ago

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

Dependency Injection Container
==============================

[](#dependency-injection-container)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e2c74cda08219d427d77eedcd65e7eec39fe339f1c0810dbe82e577e7715028a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70686163742d636d662f436f6e7461696e65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/phact-cmf/Container/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/53cd03ce44e8555faa220b8c4eaac50275fd80b893caa1f8b122feafeb8eb7a8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70686163742d636d662f436f6e7461696e65722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/phact-cmf/Container/?branch=master)[![Build Status](https://camo.githubusercontent.com/1d027082cb0a1165821c90a25949d4d93062bf7f3ec0edb9ce3fad2f0082d680/68747470733a2f2f7472617669732d63692e6f72672f70686163742d636d662f436f6e7461696e65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/phact-cmf/Container)

Follows PSR-11, and PSR-1, PSR-2, PSR-4.

```
Inspired by [league/container](https://container.thephpleague.com/).

```

Main ideas
----------

[](#main-ideas)

- Creating objects, described by definitions
- Creating objects not described by definitions (to any level of nesting)
- Ability to make calls and set properties after creating an object
- Ability to make calls and set properties by class / interface (for example, "Aware" interfaces)
- Creating objects using factories
- Aliases (tags) for any service
- Ability to analyze method / constructor dependencies using reflection
- Ability to add child containers to retrieve objects not described in the current container

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

[](#installation)

```
composer require phact-cmf/container
```

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

[](#requirements)

- PHP &gt;= 7.2

Documentation
-------------

[](#documentation)

Full documentation in progress.

[Доступна полная документация на русском языке](docs/ru.md)

License
-------

[](#license)

The MIT License (MIT). [License File](LICENSE.md).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Total

2

Last Release

2148d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/324fc1713367ed6c64d63e6ad760b2603c7e231be26f726f034eff98595c4744?d=identicon)[AntonOkulov](/maintainers/AntonOkulov)

---

Top Contributors

[![AntonOkulov](https://avatars.githubusercontent.com/u/34657149?v=4)](https://github.com/AntonOkulov "AntonOkulov (25 commits)")

---

Tags

containerdependencyinjectiondipsr11

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/phact-cmf-container/health.svg)](https://phpackages.com/packages/phact-cmf-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)
