PHPackages                             quillphp/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. quillphp/container

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

quillphp/container
==================

First-class DI container with autowiring for Quill PHP

v0.0.1(yesterday)010↑500%MITPHPPHP ^8.3

Since Apr 6Pushed yesterdayCompare

[ Source](https://github.com/quillphp/quill-container)[ Packagist](https://packagist.org/packages/quillphp/container)[ Docs](https://quillphp.com)[ RSS](/packages/quillphp-container/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Quill DI Container
==================

[](#quill-di-container)

First-class Dependency Injection container with zero-config autowiring for the [Quill PHP Framework](https://quillphp.com).

This container implements [PSR-11](https://www.php-fig.org/psr/psr-11/) and provides a fast, reflection-based autowiring mechanism that eliminates the need for manual service configuration in most cases.

Installation
------------

[](#installation)

```
composer require quillphp/container
```

Features
--------

[](#features)

- **PSR-11 Compliant**: Seamless integration with any PSR-11 compatible library.
- **Recursive Autowiring**: Automatically resolves and injects constructor dependencies.
- **Singletons**: High-performance instance caching for shared services.
- **Interface Decoupling**: Bind abstract interfaces to concrete implementations.
- **Circular Detection**: Fail fast with clear error messages when circular dependencies occur.

Usage
-----

[](#usage)

### Basic Autowiring

[](#basic-autowiring)

Simply request a class, and the container will instantiate it and all its dependencies:

```
use Quill\Container\Container;

class Mailer {}
class UserController {
    public function __construct(private Mailer $mailer) {}
}

$container = new Container();
$controller = $container->get(UserController::class); // Works out-of-the-box!
```

### Manual Bindings

[](#manual-bindings)

#### Singletons

[](#singletons)

Register a service that should only be instantiated once:

```
$container->singleton(Database::class, function($c) {
    return new Database(getenv('DB_URL'));
});
```

#### Interface Implementation

[](#interface-implementation)

Tell the container which concrete class to use for an interface:

```
$container->bind(UserRepositoryInterface::class, SqliteUserRepository::class);
```

### Integration with Quill App

[](#integration-with-quill-app)

Quill automatically uses this container for resolving handlers:

```
$app = new \Quill\App();
$app->singleton(MyService::class);

$app->get('/users', function(MyService $service) {
    // service is already resolved and injected!
});
```

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance100

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4742b2ad737c14793d6b0a418e6da90b446153a4d7ba120a1f3c07e2a2951d28?d=identicon)[quillphp](/maintainers/quillphp)

---

Top Contributors

[![fr3on](https://avatars.githubusercontent.com/u/26393383?v=4)](https://github.com/fr3on "fr3on (1 commits)")

---

Tags

phpcontainerAutowiringdiquill

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/quillphp-container/health.svg)

```
[![Health](https://phpackages.com/badges/quillphp-container/health.svg)](https://phpackages.com/packages/quillphp-container)
```

###  Alternatives

[devanych/di-container

Simple implementation of a PSR-11 dependency injection container

124.2k3](/packages/devanych-di-container)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
