PHP-DI/PHP-DI
The dependency injection container for humans observed · 2026-08-28
Health v2 · maintenance only
58/100
- Activity 60
- Release rhythm 31
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 41
- age_days: 5282
- days_rel: 382
- days_push: 245
- n_releases_24m: 6
Adoption not part of the score
2772 stars · 320 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
PHP-DI is a dependency injection container for PHP that emphasizes practicality, autowiring, and expressive PHP-based configuration. It is framework-agnostic, PSR-11 compliant, and supports container compilation for production performance.
Use cases
- manage dependency injection in a PHP application
- autowire classes from constructor type-hints
- bind interfaces to implementations in a service container
- replace Pimple or another PSR-11 container
- configure services with PHP-based definitions instead of YAML or XML
- integrate a DI container with Slim or Symfony
When to choose
- you want a PSR-11 compliant container with zero-config autowiring
- you prefer configuration written in PHP with IDE autocompletion and static analysis
- you need a framework-agnostic container that scales from small apps to modular systems
- you want compiled containers for optimal production performance
When to avoid
- your framework already ships with its own DI container you are happy with
- you need dependency injection in a non-PHP project
- you are on PHP below 8.0 (PHP-DI 7 requirement)
Facets
library · maturity stable
middleware developer-tools web-development backend developer-tools php dependency-injection ioc-container psr-11 autowiring service-container
5 sources
- readme: https://github.com/PHP-DI/PHP-DI · fetched 2026-08-28 · dce0997cd472
- homepage: https://php-di.org · fetched 2026-08-29 · 10b523965e9e
- site_page: https://php-di.org/doc/getting-started.html · fetched 2026-08-29 · 0523653bb300
- site_page: https://php-di.org/doc · fetched 2026-08-29 · 07b604423705
- site_page: https://php-di.org/change-log.html · fetched 2026-08-29 · 05a22684ec1e
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| PHP-DI/PHP-DI | main | 58 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem