PHPackages                             interophp/injector - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. interophp/injector

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

interophp/injector
==================

Inject dependencies into constructors and methods

v1.0.0(9y ago)12.4k1MITPHPPHP &gt;=5.5.0

Since Jul 10Pushed 9y ago1 watchersCompare

[ Source](https://github.com/interophp/injector)[ Packagist](https://packagist.org/packages/interophp/injector)[ Docs](http://www.github.com/interophp/injector)[ RSS](/packages/interophp-injector/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (1)

Injector
========

[](#injector)

Simple constructor and method argument injector.

You can pass a context to the injector to resolve parameters into injectable values.

Supported contexts:
-------------------

[](#supported-contexts)

- ArrayContext: Resolves by a simple associative array's key/value
- RequestContext: Uses a PSR7 ServerRequest to resolve values from request attributes
- InteropContainerContext: Add support for DI containers implementing `Interop\Container\ContainerInterface`
- PsrContainerContext: Add support for DI containers implementing `Psr\Container\ContainerInterface`
- MultiContext: Pass an array of one or more of the above contexts to resolve from multiple contexts.

It's simple to add your own contexts by implementing `InteroPhp\Injector\Context\ContextInterface`

Examples and usage
------------------

[](#examples-and-usage)

Please check the included `example/` directory for usage examples.

License
-------

[](#license)

MIT (see [LICENSE.md](LICENSE.md))

Brought to you by the LinkORB Engineering team
----------------------------------------------

[](#brought-to-you-by-the-linkorb-engineering-team)

[![](https://camo.githubusercontent.com/62fb66b034de7ea7fca9fd9776424b5348daa76ef8622caf92c2f7622003e5ef/687474703a2f2f7777772e6c696e6b6f72622e636f6d2f642f6d6574612f74696572312f696d616765732f6c696e6b6f7262656e67696e656572696e672d6c6f676f2e706e67)](https://camo.githubusercontent.com/62fb66b034de7ea7fca9fd9776424b5348daa76ef8622caf92c2f7622003e5ef/687474703a2f2f7777772e6c696e6b6f72622e636f6d2f642f6d6574612f74696572312f696d616765732f6c696e6b6f7262656e67696e656572696e672d6c6f676f2e706e67)
Check out our other projects at [linkorb.com/engineering](http://www.linkorb.com/engineering).

Btw, we're hiring!

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

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

3599d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1db66b320db18b8036ea68211b7d8a39e7c6da97e6fd29f59a50380ebb69d0bb?d=identicon)[joostfaassen](/maintainers/joostfaassen)

---

Top Contributors

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

---

Tags

phpinjectioninjectdependenciesauto resolvelinkorbinjector

### Embed Badge

![Health badge](/badges/interophp-injector/health.svg)

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

PHPackages © 2026

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