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

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

garethhudson07/container
========================

A fast and intuitive dependency injection container.

v4.1.3(4y ago)05.2k↓23.8%11MITPHPPHP ^7.2 || ^8.0

Since Jan 12Pushed 4y agoCompare

[ Source](https://github.com/garethhudson07/container)[ Packagist](https://packagist.org/packages/garethhudson07/container)[ Docs](https://github.com/thephpleague/container)[ GitHub Sponsors](https://github.com/philipobenito)[ RSS](/packages/garethhudson07-container/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (8)Versions (32)Used By (1)

Container (Dependency Injection)
================================

[](#container-dependency-injection)

[![Author](https://camo.githubusercontent.com/2873cc10620cac8fee1f6bdbc6dc7ff4ab0a511e20d5864408dcbffdd2c4345a/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d407068696c69706f62656e69746f2d626c75652e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/philipobenito)[![Latest Version](https://camo.githubusercontent.com/d7b621ac09de466a56e6b0659db37f975645bb37f2386ea9a7fc50cdd58457e4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7468657068706c65616775652f636f6e7461696e65722e7376673f7374796c653d666c61742d737175617265)](https://github.com/thephpleague/container/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/b42bd3ae0699e1c9cdc3379df7c1ff18d7ae0783fa446b3a79b35ae09d6b7171/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7468657068706c65616775652f636f6e7461696e65722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/thephpleague/container)[![Coverage Status](https://camo.githubusercontent.com/f2392e8db019a3600b8080eb268ac13232047a5183512df174aa0852c876978d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f7468657068706c65616775652f636f6e7461696e65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thephpleague/container/code-structure)[![Quality Score](https://camo.githubusercontent.com/c0314bbcf1832e7d0a4673c98f3b7906d8c2ecf9e6ce5bd44758ba4b758e189f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7468657068706c65616775652f636f6e7461696e65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thephpleague/container)[![Total Downloads](https://camo.githubusercontent.com/6414bdb113ddcf83f5176eee7b2895aeb7aae7b0eb84de318e966e942474c52d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c65616775652f636f6e7461696e65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/league/container)

This package is compliant with [PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md), [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md), [PSR-12](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-12-extended-coding-style-guide.md), [PSR-4](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md) and [PSR-11](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-11-container.md). If you notice compliance oversights, please send a patch via pull request.

Install
-------

[](#install)

Via Composer

```
$ composer require league/container
```

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

[](#requirements)

The following versions of PHP are supported by this version.

- PHP 7.2
- PHP 7.3
- PHP 7.4

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

[](#documentation)

Container has [full documentation](http://container.thephpleague.com), powered by [Jekyll](http://jekyllrb.com/).

Contribute to this documentation in the [docs/](https://github.com/thephpleague/container/tree/master/docs) sub-directory.

Testing
-------

[](#testing)

Testing includes PHPUnit and PHPStan (Level 7).

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/thephpleague/container/blob/master/CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Phil Bennett](https://github.com/philipobenito)
- [All Contributors](https://github.com/thephpleague/container/contributors)
- `Orno\Di` contributors

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/thephpleague/container/blob/master/LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 68.2% 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 ~80 days

Recently: every ~112 days

Total

31

Last Release

1787d ago

Major Versions

1.x-dev → 2.0.02015-09-02

2.x-dev → 3.0.02018-07-23

3.3.2 → v4.1.32021-08-11

PHP version history (5 changes)1.0.0PHP &gt;=5.4.0

2.3.0PHP ^5.4.0 || ^7.0

3.0.0PHP ^7.0

v4.1.3PHP ^7.2 || ^8.0

v3.3.3PHP ^7.0 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7ee8009a3912b1064101718c7e23bc8c88b364869e7f2d3eb6762fbd0a553043?d=identicon)[garethhudson07](/maintainers/garethhudson07)

---

Top Contributors

[![philipobenito](https://avatars.githubusercontent.com/u/2077289?v=4)](https://github.com/philipobenito "philipobenito (210 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (38 commits)")[![hannesvdvreken](https://avatars.githubusercontent.com/u/1410358?v=4)](https://github.com/hannesvdvreken "hannesvdvreken (9 commits)")[![azjezz](https://avatars.githubusercontent.com/u/29315886?v=4)](https://github.com/azjezz "azjezz (7 commits)")[![jenssegers](https://avatars.githubusercontent.com/u/194377?v=4)](https://github.com/jenssegers "jenssegers (5 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (4 commits)")[![philsturgeon](https://avatars.githubusercontent.com/u/67381?v=4)](https://github.com/philsturgeon "philsturgeon (4 commits)")[![greg-1-anderson](https://avatars.githubusercontent.com/u/612191?v=4)](https://github.com/greg-1-anderson "greg-1-anderson (3 commits)")[![bullenb](https://avatars.githubusercontent.com/u/66941?v=4)](https://github.com/bullenb "bullenb (3 commits)")[![ADmad](https://avatars.githubusercontent.com/u/142658?v=4)](https://github.com/ADmad "ADmad (2 commits)")[![garethhudsonOS](https://avatars.githubusercontent.com/u/46483967?v=4)](https://github.com/garethhudsonOS "garethhudsonOS (2 commits)")[![sagikazarmark](https://avatars.githubusercontent.com/u/1226384?v=4)](https://github.com/sagikazarmark "sagikazarmark (2 commits)")[![pascal-hofmann](https://avatars.githubusercontent.com/u/2102878?v=4)](https://github.com/pascal-hofmann "pascal-hofmann (2 commits)")[![chrisguitarguy](https://avatars.githubusercontent.com/u/1010392?v=4)](https://github.com/chrisguitarguy "chrisguitarguy (2 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (2 commits)")[![tangrufus](https://avatars.githubusercontent.com/u/2259834?v=4)](https://github.com/tangrufus "tangrufus (1 commits)")[![Art4](https://avatars.githubusercontent.com/u/2162994?v=4)](https://github.com/Art4 "Art4 (1 commits)")[![Blackskyliner](https://avatars.githubusercontent.com/u/1038517?v=4)](https://github.com/Blackskyliner "Blackskyliner (1 commits)")[![bwg](https://avatars.githubusercontent.com/u/579193?v=4)](https://github.com/bwg "bwg (1 commits)")[![claudiunicolaa](https://avatars.githubusercontent.com/u/15197275?v=4)](https://github.com/claudiunicolaa "claudiunicolaa (1 commits)")

---

Tags

containerdependencyinjectionleaguediserviceprovider

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[league/container

A fast and intuitive dependency injection container.

86894.4M442](/packages/league-container)[capsule/di

A PSR-11 compliant autowiring dependency injection container.

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

Dependency injection (IoC) container for PHP projects

1324.1k2](/packages/miladrahimi-phpcontainer)

PHPackages © 2026

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