PHPackages                             aura/di - 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. aura/di

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

aura/di
=======

A serializable dependency injection container with constructor and setter injection, interface and trait awareness, configuration inheritance, and much more.

5.0.8(1y ago)356968.3k↓18.4%63[1 issues](https://github.com/auraphp/Aura.Di/issues)20MITPHPPHP ^8.0

Since Nov 27Pushed 1y ago25 watchersCompare

[ Source](https://github.com/auraphp/Aura.Di)[ Packagist](https://packagist.org/packages/aura/di)[ Docs](https://github.com/auraphp/Aura.Di)[ RSS](/packages/aura-di/feed)WikiDiscussions 5.x Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (49)Used By (20)

Aura.Di
=======

[](#auradi)

A serializable dependency injection container with constructor and setter injection, interface and trait awareness, configuration inheritance, and much more.

Installation and Autoloading
----------------------------

[](#installation-and-autoloading)

This package is installable and PSR-4 autoloadable via Composer as [aura/di](https://packagist.org/packages/aura/di):

```
composer require aura/di

```

Alternatively, [download a release](https://github.com/auraphp/Aura.Di/releases), or clone this repository, then map the `Aura\Di\` namespace to the package `src/` directory.

Dependencies
------------

[](#dependencies)

This package requires PHP 8.0 or later. We recommend using the latest available version of PHP as a matter of principle. If you are interested in using this package for older PHP versions, use version 4.x for PHP 7.2+ or version 3.x for PHP 5.5+.

Aura library packages may sometimes depend on external interfaces, but never on external implementations. This allows compliance with community standards without compromising flexibility. For specifics, please examine the package [composer.json](./composer.json) file.

Quality
-------

[](#quality)

[![Latest Version](https://camo.githubusercontent.com/1038e57343eaaaf0fe362cb258ed62c8e0ccdf939f4499958eec00177993f030/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f617572617068702f417572612e44692e7376673f7374796c653d666c61742d737175617265)](https://github.com/auraphp/Aura.Di/releases)[![GitHub Workflow Status](https://github.com/auraphp/Aura.Di/workflows/CI/badge.svg)](https://github.com/auraphp/Aura.Di/workflows/CI/badge.svg)

To run the unit tests at the command line, issue `composer install` and then `composer test` at the package root. This requires [Composer](http://getcomposer.org/) to be available as `composer`.

This package attempts to comply 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-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.

Community
---------

[](#community)

To ask questions, provide feedback, or otherwise communicate with other Aura users, please join our [Google Group](http://groups.google.com/group/auraphp).

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

[](#documentation)

This package is fully documented [here](./docs/index.md).

Aura.Di 2.x, 3.x and 4.x users may wish to read the [migrating](./docs/migrating.md) documentation.

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity58

Moderate usage in the ecosystem

Community47

Growing community involvement

Maturity81

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~4 days

Total

46

Last Release

608d ago

Major Versions

2.2.3 → 3.0.0-beta12015-06-03

2.2.4 → 3.0.02016-03-14

2.x-dev → 3.x-dev2019-01-04

3.x-dev → 4.0.0-alpha12019-04-26

4.x-dev → 5.0.0-alpha.12024-05-28

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

2.0.0-beta1PHP &gt;=5.3.0

3.0.0-alpha1PHP &gt;=5.6.0

3.0.0-beta1PHP &gt;=5.5.0

4.0.0-alpha1PHP &gt;=7.2.0

4.2.0PHP ^7.4 || ^8.0

4.x-devPHP ^7.2 || ^8.0

5.0.0-alpha.1PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25754?v=4)[Paul M. Jones](/maintainers/pmjones)[@pmjones](https://github.com/pmjones)

![](https://www.gravatar.com/avatar/29dba0e6add8d89fd3fc6126b213d5d2f57538ea78318963025d6ea98db34161?d=identicon)[harikt](/maintainers/harikt)

---

Top Contributors

[![frederikbosch](https://avatars.githubusercontent.com/u/1552577?v=4)](https://github.com/frederikbosch "frederikbosch (137 commits)")[![harikt](https://avatars.githubusercontent.com/u/120454?v=4)](https://github.com/harikt "harikt (53 commits)")[![jakejohns](https://avatars.githubusercontent.com/u/174708?v=4)](https://github.com/jakejohns "jakejohns (10 commits)")[![djmattyg007](https://avatars.githubusercontent.com/u/489338?v=4)](https://github.com/djmattyg007 "djmattyg007 (10 commits)")[![aMoniker](https://avatars.githubusercontent.com/u/915878?v=4)](https://github.com/aMoniker "aMoniker (8 commits)")[![cxj](https://avatars.githubusercontent.com/u/446131?v=4)](https://github.com/cxj "cxj (6 commits)")[![andrewshell](https://avatars.githubusercontent.com/u/144136?v=4)](https://github.com/andrewshell "andrewshell (6 commits)")[![yuya-takeyama](https://avatars.githubusercontent.com/u/241542?v=4)](https://github.com/yuya-takeyama "yuya-takeyama (4 commits)")[![donatj](https://avatars.githubusercontent.com/u/133747?v=4)](https://github.com/donatj "donatj (4 commits)")[![kenaniah](https://avatars.githubusercontent.com/u/363800?v=4)](https://github.com/kenaniah "kenaniah (4 commits)")[![marcusjhdon](https://avatars.githubusercontent.com/u/299708?v=4)](https://github.com/marcusjhdon "marcusjhdon (4 commits)")[![cj-clx](https://avatars.githubusercontent.com/u/46033285?v=4)](https://github.com/cj-clx "cj-clx (3 commits)")[![koriym](https://avatars.githubusercontent.com/u/529021?v=4)](https://github.com/koriym "koriym (3 commits)")[![drbyte](https://avatars.githubusercontent.com/u/404472?v=4)](https://github.com/drbyte "drbyte (3 commits)")[![dhaaker](https://avatars.githubusercontent.com/u/245347?v=4)](https://github.com/dhaaker "dhaaker (2 commits)")[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (2 commits)")[![brandonsavage](https://avatars.githubusercontent.com/u/197889?v=4)](https://github.com/brandonsavage "brandonsavage (2 commits)")[![denfil](https://avatars.githubusercontent.com/u/12842206?v=4)](https://github.com/denfil "denfil (2 commits)")[![mrclay](https://avatars.githubusercontent.com/u/170687?v=4)](https://github.com/mrclay "mrclay (1 commits)")[![pborreli](https://avatars.githubusercontent.com/u/77759?v=4)](https://github.com/pborreli "pborreli (1 commits)")

---

Tags

auracontainer-interopdependency-injectiondependency-injection-containerdi-containerphppsr-11containerdi containerdependency-injectiondidependency injection container

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/aura-di/health.svg)

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

###  Alternatives

[php-di/php-di

The dependency injection container for humans

2.8k48.9M994](/packages/php-di-php-di)[mrclay/props-dic

Props is a simple DI container that allows retrieving values via custom property and method names

3611.7M3](/packages/mrclay-props-dic)[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)

PHPackages © 2026

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