PSR-11 Container for Dependency Injection (auto-wiring, attributes, factories, closures, array access)

1.2.2 2022-03-07 12:08 UTC

This package is auto-updated.

Last update: 2024-06-07 17:24:32 UTC


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.


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.


This package supports the following versions of PHP:

  • PHP 7.1
  • PHP 7.2
  • PHP 7.3
  • PHP 7.4
  • PHP 8.0


Via Composer

$ composer require brenoroosevelt/habemus


Read the full documentation.


Please read the Contributing guide to learn about contributing to this project.


This project is licensed under the terms of the MIT license. See the LICENSE file for license rights and limitations.