laminas / laminas-di
Automated dependency injection for PSR-11 containers
Fund package maintenance!
Community Bridge
Installs: 1 432 488
Dependents: 17
Suggesters: 0
Security: 0
Stars: 16
Watchers: 15
Forks: 11
Open Issues: 6
Requires
- php: ^7.3 || ~8.0.0
- laminas/laminas-stdlib: ^3.3
- laminas/laminas-zendframework-bridge: ^0.4.5 || ^1.0
- psr/container: ^1.0
- psr/log: ^1.0
Requires (Dev)
- container-interop/container-interop: ^1.2.0
- laminas/laminas-coding-standard: ^2
- laminas/laminas-servicemanager: ^3.4
- mikey179/vfsstream: ^1.6.7
- phpspec/prophecy-phpunit: ^2.0
- phpstan/phpstan: ^0.12.64
- phpunit/phpunit: ^9.3
Suggests
- laminas/laminas-servicemanager: An IoC container without auto wiring capabilities
Conflicts
Replaces
- zendframework/zend-di: ^3.1.2
- 3.3.x-dev
- 3.2.x-dev
- 3.2.1
- 3.2.0
- 3.1.x-dev
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.0
- 2.6.1
- 2.6.0
- 2.5.1
- 2.5.0
- 2.4.13
- 2.4.12
- 2.4.11
- 2.4.10
- 2.4.9
- 2.4.8
- 2.4.7
- 2.4.6
- 2.4.5
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.4.0rc7
- 2.4.0rc6
- 2.4.0rc5
- 2.4.0rc4
- 2.4.0rc3
- 2.4.0rc2
- 2.4.0rc1
- 2.3.9
- 2.3.8
- 2.3.7
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.10
- 2.2.9
- 2.2.8
- 2.2.7
- 2.2.6
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.2.0rc3
- 2.2.0rc2
- 2.2.0rc1
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
This package is auto-updated.
Last update: 2021-02-24 13:25:37 UTC
README
laminas-di provides autowiring to implement Inversion of Control (IoC) containers. IoC containers are widely used to create object instances that have all dependencies resolved and injected. Dependency Injection containers are one form of IoC – but not the only form.
laminas-di is designed to be simple, fast and reusable. It provides the following features:
- Constructor injection
- Autowiring:
- Recursively through all dependencies
- With configured type preferences
- with configured injections
- With injections passed in the create() call
- Code generators to create factories usable by other IoC containers like Laminas\ServiceManager
It does not provide:
- Setter, interface, property or any other injection method than constructor injection
- Support for factories
- Declaring shared/unshared instances
- the injector always creates new instances
- the default container always shares instances
- Support for variadic arguments in __construct
If you need these features combine it with another IoC container such as laminas-servicemanager.
- File issues at https://github.com/laminas/laminas-di/issues
- Documentation is at https://docs.laminas.dev/laminas-di/