Installation
Install Container with Composer.
shell
composer require raxos/containerRequirements
- PHP 8.5 or newer.
The package has no required PHP extensions.
Raxos dependencies
Container builds on a few other Raxos packages, which Composer installs for you:
- Contract provides the
ContainerInterface,ContainerExceptionInterfaceandAttributeInterfacethat the container and its attributes implement. - Error provides the base
Exceptionclass that every container exception extends. - Foundation provides the
env()helper used by the#[Env]attribute.
Autowiring itself is built on the class, method and parameter reflectors from Reflection.
Optional dependency
To expose the container through the PSR-11 ContainerInterface, install psr/container as well. It is only needed for PsrContainerAdapter.
shell
composer require psr/containerReturn to the Container introduction.