brenoroosevelt/habemus
PSR-11 Container for Dependency Injection (auto-wiring, attributes, factories, closures, array access)
Maintainers
Requires
- php: ^7.1 || ^8.0
- psr/container: ^1.0
Requires (Dev)
- phpstan/phpstan: ^1
- phpunit/phpunit: ^6 || ^9
- squizlabs/php_codesniffer: ^3
Suggests
None
Provides
Conflicts
None
Replaces
None
MIT ecb79da97d5ef98c27bd3db584542968b4f7d52a
- Breno Roosevelt <breno.roosevelt.woop@gmail.com>
dependency injectioncontainerattributesautowirePSR-11setter injectionauto-wiringphp8 attributesproperty injectionconstructor injection
README
👁 Build
👁 codecov
👁 Scrutinizer Code Quality
👁 Latest Version
👁 Software License
Habemus is a PSR-11 compatible dependency injection container. This package provides autowiring to implement Inversion of Control (IoC) containers for PHP.
Features
Habemus supports:
- PSR-11 compatible.
- Auto wiring (recursively through all dependencies)
- Constructor injection.
- Setter injection.
- Property/constructor injection using PHP 8 Attributes.
- Circular dependency detection.
- Interfaces, Factories, Closures, Callbacks.
- Delegated containers.
- Container composite.
- Service providers and lazy service providers.
- Taggable services.
- Shareable instances.
- Variadic arguments in the constructor.
- Aliasing.
- Array Access.
Requirements
This package supports the following versions of PHP:
- PHP 7.1
- PHP 7.2
- PHP 7.3
- PHP 7.4
- PHP 8.0
Install
Via Composer
$ composer require brenoroosevelt/habemus
Documentation
Read the full documentation.
Contributing
Please read the Contributing guide to learn about contributing to this project.
License
This project is licensed under the terms of the MIT license. See the LICENSE file for license rights and limitations.
