touta / nasc-di
Dependency injection container with explicit, inspectable wiring for the Touta PHP ecosystem
v0.1.0
2026-03-21 03:40 UTC
Requires
- php: ^8.3
- touta/aria-runtime-php: ^0.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- pestphp/pest: ^3.0
- phpstan/phpstan: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
README
Dependency injection container with explicit, inspectable wiring for the Touta PHP ecosystem.
Install
composer require touta/nasc-di
Usage
use Touta\Nasc\Container; $container = Container::create() ->bind(LoggerInterface::class, fn() => new FileLogger('/tmp/app.log')) ->bind('db.host', fn() => 'localhost'); $logger = $container->resolve(LoggerInterface::class); // Success(FileLogger)
License
MIT