PHPackages                             quillstack/di - 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. quillstack/di

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

quillstack/di
=============

The dependency injection container based on PSR-11: Container interface.

v0.0.9(3y ago)39277MITPHPPHP ^8.0

Since Aug 16Pushed 3y ago2 watchersCompare

[ Source](https://github.com/quillstack/di)[ Packagist](https://packagist.org/packages/quillstack/di)[ Docs](https://quillstack.org/di)[ RSS](/packages/quillstack-di/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (9)Dependencies (2)Versions (11)Used By (7)

Quillstack DI Container
=======================

[](#quillstack-di-container)

[![Build Status](https://camo.githubusercontent.com/29150d0f7966e17db4e89f8d4047afa9f66c615c90025d38368ac1253d75d18d/68747470733a2f2f6170702e7472617669732d63692e636f6d2f7175696c6c737461636b2f64692e7376673f6272616e63683d6d61696e)](https://app.travis-ci.com/quillstack/di)[![Downloads](https://camo.githubusercontent.com/3970bc3cd2e5460bcc1f06617b1a892d1e0fb58eecc909ef081446a30006715f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7175696c6c737461636b2f64692e737667)](https://packagist.org/packages/quillstack/di)[![Coverage](https://camo.githubusercontent.com/b7bc3bde17cc2958df21eec317b84b53ccef197eec6e9c1e6be8ba32e819b489/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d7175696c6c737461636b5f6469266d65747269633d636f766572616765)](https://sonarcloud.io/dashboard?id=quillstack_di)[![Lines of Code](https://camo.githubusercontent.com/ca35e703a9f161af2fb8edadf40df38b622c2772dc403ba13ea74bb4987b2d5c/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d7175696c6c737461636b5f6469266d65747269633d6e636c6f63)](https://sonarcloud.io/dashboard?id=quillstack_di)[![StyleCI](https://camo.githubusercontent.com/6621352ac4114b9adf2650ecfb175886b2de9597ab2d5ac105f1fe88d61aec06/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3239313436343835332f736869656c643f6272616e63683d6d61696e)](https://github.styleci.io/repos/291464853?branch=main)[![CodeFactor](https://camo.githubusercontent.com/67d1ccd6b178491118b1cb1f352b39207a4a91568109714ab2a20c1ef737738b/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f7175696c6c737461636b2f64692f6261646765)](https://www.codefactor.io/repository/github/quillstack/di)[![Packagist License](https://camo.githubusercontent.com/f7f8b5677eccd3397c24adae2cd2bd6526081862d4b7fc0e360e098a31df6d7e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7175696c6c737461636b2f6469)](https://camo.githubusercontent.com/f7f8b5677eccd3397c24adae2cd2bd6526081862d4b7fc0e360e098a31df6d7e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7175696c6c737461636b2f6469)[![Reliability Rating](https://camo.githubusercontent.com/bb24bf4fa251f8e21fd5889cf5a8f4b45f43c6074859f79264a5e1b7e92a4a27/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d7175696c6c737461636b5f6469266d65747269633d72656c696162696c6974795f726174696e67)](https://sonarcloud.io/dashboard?id=quillstack_di)[![Maintainability](https://camo.githubusercontent.com/8d82fe3aab07770f3fc1be8b11ffff01837eb88e2896ea2158cc134f5d937b3b/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f64333635373938326538613562623530663465332f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/quillstack/di/maintainability)[![Security Rating](https://camo.githubusercontent.com/733cdf9d3483b7f5911f1ed86abcee7bf064ddcec383927757cb43b779261009/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d7175696c6c737461636b5f6469266d65747269633d73656375726974795f726174696e67)](https://sonarcloud.io/dashboard?id=quillstack_di)[![Packagist PHP Version Support](https://camo.githubusercontent.com/4c315b606b40804e68da01809f22fd929a03f3c1196b13c19ebde4f6db9281cd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7175696c6c737461636b2f6469)](https://camo.githubusercontent.com/4c315b606b40804e68da01809f22fd929a03f3c1196b13c19ebde4f6db9281cd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7175696c6c737461636b2f6469)

Quillstack DI Container is the dependency injection container based on *PSR-11: Container interface*, and with the main goal: to be fast. You can find the full documentation on the website:

This DI container uses constructors and types of class properties.

### Installation

[](#installation)

To install this package, run the standard command using *Composer*:

```
composer require quillstack/di

```

### Usage

[](#usage)

You can use Quillstack DI Container when you want:

- To have a simple and fast DI container.
- Define dependencies based on interfaces.
- Define parameters e.g. credentials for a database in the `Database` class.
- To use constructors or/and class properties.
- To implement your own instance factories e.g. for `Request` classes.
- To use objects as dependencies.

#### Simple usage

[](#simple-usage)

You can easily start using a DI Container:

```
