Skip to main content

Dependency Injection

The base PHP project uses the PHP-DI container for dependency injection. Services — including your adapter connections — are resolved from the container rather than constructed by hand, so your flow code stays focused on what it does, not on wiring.

Register your own services in the project's container configuration, then type-hint them where you need them and PHP-DI will inject them. For the common case of obtaining a configured adapter connection, see Loading an adapter connection.