maduser/argon-container

A high-performance, modular, PSR-11 compliant dependency injection container for PHP.

Maintainers

Package info

github.com/judus/argon-container

pkg:composer/maduser/argon-container

Statistics

Installs: 55

Dependents: 6

Suggesters: 0

Stars: 0

Open Issues: 4

v1.3.0 2026-05-24 14:26 UTC

README

PHP Build codecov Psalm Level Latest Version Downloads License: MIT

maduser/argon-container is the dependency injection container at the center of the Argon package suite. It is PSR-11 compatible, strict by design, and built around explicit service definitions instead of framework magic.

Installation

composer require maduser/argon-container

Quick Start

use Maduser\Argon\Container\ArgonContainer;

$container = new ArgonContainer();

$container->set(LoggerInterface::class, MonologLogger::class)
    ->shared();

$logger = $container->get(LoggerInterface::class);

Service providers can group package or application registrations:

$container->register(AppServiceProvider::class);
$container->boot();

Scope

The container owns service binding, argument resolution, contextual bindings, service tags, lifecycle hooks, and compiled-container generation. It does not provide HTTP routing, middleware, console commands, or application bootstrapping; those belong to the surrounding Argon packages.

Quality Gate

composer check