Skip to content

judus/argon-container

Repository files navigation

Argon Container

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

About

PHP Service Container/DI - PSR-11

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages