Type-hint your constructor parameters and the container can guess which dependencies to inject. class Foo { private $bar; public function __construct(Bar $bar) { $this->bar = $bar; } } Covers 80% of the use cases with 0 configuration. Expressive configuration PHP-DI's configuration is written in PHP, allowing to benefit from auto-completion, static analysis and refactoring support with any IDE.
{{#tags}}- {{label}}
{{/tags}}