PHPackages                             aztech/phinject - 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. aztech/phinject

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

aztech/phinject
===============

PHP Dependency Injection Container

0.2.9(11y ago)03131[9 issues](https://github.com/aztech-digital/phinject/issues)2MITPHP

Since Dec 26Pushed 11y ago3 watchersCompare

[ Source](https://github.com/aztech-digital/phinject)[ Packagist](https://packagist.org/packages/aztech/phinject)[ Docs](http://aztech-digital.github.io/phinject/)[ RSS](/packages/aztech-phinject/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (14)Versions (15)Used By (2)

Phinject
========

[](#phinject)

[![Build Status](https://camo.githubusercontent.com/266001036b637357c4b1d02f6492b8020e18e28f9443ec172c3a3676ed2ab430/68747470733a2f2f7472617669732d63692e6f72672f617a746563682d6469676974616c2f7068696e6a6563742e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/aztech-digital/phinject)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/655bbb46df7408e3cc63a5bd885b21f70e18c184e482f35158ed702417e53a25/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f617a746563682d6469676974616c2f7068696e6a6563742e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/aztech-digital/phinject/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/846d50ca6dc50d3d8505d51f7825bc106bd420f32fbf40fa658fbfe09c678164/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f617a746563682d6469676974616c2f7068696e6a6563742e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/aztech-digital/phinject/?branch=master)[![HHVM Support](https://camo.githubusercontent.com/dd17502dd716f254a523d1d2d2f6a839ee9707f35857890cedb9fc274f207705/68747470733a2f2f696d672e736869656c64732e696f2f6868766d2f617a746563682f7068696e6a6563742e737667)](http://hhvm.h4cc.de/package/aztech/phinject)

[![License](https://camo.githubusercontent.com/e44596ec5097417b102e43df49fb5d9cbc91731f3da23240c92879bc3b37d772/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f617a746563682f7068696e6a6563742e7376673f7374796c653d666c6174)](https://packagist.org/packages/aztech/phinject)[![Latest Stable Version](https://camo.githubusercontent.com/626da3a793e96fb5d3be6af0d0f8364bfc71f0926692becc74fd9f14bd685702/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617a746563682f7068696e6a6563742e7376673f7374796c653d666c6174)](https://packagist.org/packages/aztech/phinject)

Phinject is a simple dependency injection container, with extensible activation &amp; injection strategies.

Setup
-----

[](#setup)

[Composer](https://getcomposer.org) is the only supported way of installing Phinject. From the root of your project, run the following command:

```
composer require aztech/phinject

```

Features
--------

[](#features)

- Compatible with the [container-interop](https://github.com/container-interop/container-interop) specification
- Compatible with [delegate containers](https://github.com/container-interop/container-interop/blob/master/docs/Delegate-lookup.md).
- YAML, JSON or PHP based configuration.
- Lazy-loading dependencies.
- Remote proxies (undocumented).
- Aliases (undocumented).
- Extensible configuration syntax (undocumented).

Usage
-----

[](#usage)

The documentation is available [here](./doc/).

We have a [getting started](./doc/01-Getting-started.md) guide, followed by more comprehensive documentation (although not yet exhaustive, but that will come):

- [Injection types](./doc/02-Injection-types.md)
- [References](./doc/03-References.md)
- [Activators](./doc/04-Activators.md)
- [Lifecycle of objects](./doc/05-Lifecycle.md)
- Remote objects (TODO: Write documentation)
- Container interoperability (TODO: Write documentation).
- [Extending the configuration syntax](./doc/07-Extensibility.md)

**Note** All the documentation examples are written using a YAML based configuration, however, you can also use JSON or PHP configuration files. (TODO: Document usage of PHP &amp; JSON config file)

Credits
-------

[](#credits)

This library is originally a fork on `oliviermadre/dic-it`, available [here](https://github.com/oliviermadre/dic-it).

Most of the core features have however been refactored or rewritten, enough that I felt it was time to re-brand this package, in order to both prevent confusion with the original package, and because I did not like the name.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 96.6% 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 ~0 days

Total

13

Last Release

4161d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/58d21270e5d40f7ee05bb875b2442496ffd38cec041f7fdcc507b8b040f7e7f8?d=identicon)[thibaud-evaneos](/maintainers/thibaud-evaneos)

---

Top Contributors

[![aztech-dev](https://avatars.githubusercontent.com/u/93562568?v=4)](https://github.com/aztech-dev "aztech-dev (28 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

containercontainer-interopdi containerdependencyinjectiondependency-injectiondiphinject

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/aztech-phinject/health.svg)

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

###  Alternatives

[php-di/php-di

The dependency injection container for humans

2.8k48.9M994](/packages/php-di-php-di)[league/container

A fast and intuitive dependency injection container.

86387.8M343](/packages/league-container)[aura/di

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

356968.3k58](/packages/aura-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)[capsule/di

A PSR-11 compliant autowiring dependency injection container.

2857.5k2](/packages/capsule-di)[slince/di

A flexible dependency injection container

20260.4k6](/packages/slince-di)

PHPackages © 2026

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