An open API service indexing awesome lists of open source software.

https://github.com/domainflow/container

PSR-11-compliant dependency injection container for PHP 8.3—featuring contextual bindings, scopes, caching, hooks, and reflection-based autowiring.
https://github.com/domainflow/container

container dependencyinjection di php8

Last synced: 4 months ago
JSON representation

PSR-11-compliant dependency injection container for PHP 8.3—featuring contextual bindings, scopes, caching, hooks, and reflection-based autowiring.

Awesome Lists containing this project

README

          

[![Tests](https://github.com/domainflow/container/actions/workflows/tests.yml/badge.svg)](https://github.com/domainflow/uuid/actions/workflows/tests.yml)
![Packagist Version](https://img.shields.io/packagist/v/domainflow/container)
![PHP Version](https://img.shields.io/packagist/php-v/domainflow/container)
![License](https://img.shields.io/github/license/domainflow/container)
![PHPStan](https://img.shields.io/badge/PHPStan-Level%209-brightgreen.svg)

# DomainFlow Dependency Injection Container

The **DomainFlow Container** is a modular and extensible **Dependency Injection (DI) Container** built for modern PHP back-end applications and microservices. It provides a full suite of features to register, resolve, and manage dependencies with ease.

---

## ✨ Core Functionality

- **Dependency Injection (DI):** Register and resolve dependencies automatically.
- **Singleton & Shared Instances:** Bind and reuse single instances across your application.
- **Lazy Loading & Autowiring:** Automatically resolve class dependencies only when needed.
- **Service Binding:** Bind concrete implementations to interfaces or abstractions.
- **PSR-11 Compliance:** Fully implements [PSR-11](https://www.php-fig.org/psr/psr-11/) for broad interoperability.

---

## ⚙️ Requirements

- **PHP 8.3+**

---

## 📦 Installation

Use Composer to install the package:

```sh
composer require domainflow/container
```

---

More details and usage examples can be found in our [documentation](https://www.domainflow.dev/docs/container)

---

## 📄 License

The **DomainFlow Container** is open-sourced software licensed under the [MIT license](https://opensource.org/license/MIT).