PHPackages                             marcel-strahl/container - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. marcel-strahl/container

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

marcel-strahl/container
=======================

A simple and clean PHP container based on PSR-11

v0.1.0(3y ago)18[1 PRs](https://github.com/Dropelikeit/container/pulls)MITPHPPHP ^8.0

Since Feb 3Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Dropelikeit/container)[ Packagist](https://packagist.org/packages/marcel-strahl/container)[ RSS](/packages/marcel-strahl-container/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (8)Versions (3)Used By (0)

PHP DI Container
----------------

[](#php-di-container)

A lightweight dependency injection container that is decoupled from any framework. This library can be used for production, but I recommend that it is better to use a di-container from a larger community like Symfony, Laravel or Laminas.

This library was developed for fun, but is supported if someone uses it.

This project can also be used as an example to show how a modern DI container works in a simplified way.

---

How it works

```
    composer require marcel-strahl/container
```

Written for PHP &gt;= 8.0

This library use the PSR container.

---

Usage:

```
