evyex / container-simple
Simple container (DI)
1.2
2026-02-18 12:24 UTC
Requires
- php: ^8.1
- psr/container: ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.94
- phpstan/phpstan: ^2.1
- phpunit/phpunit: >=10.0
README
Simple PHP Dependency Injection Container implementing PSR-11 ContainerInterface with Autowiring.
Installation
composer require evyex/container-simple
Usage
use Evyex\ContainerSimple\Container; $container = new Container(); // Get a service (auto-resolves dependencies) $service = $container->get(MyService::class); // Check if a service exists if ($container->has(MyService::class)) { // ... }
Features
- Autowiring
- ContainerInterface compliant (PSR-11)
- Lightweight
Requirements
- PHP 8.1+
- psr/container ^2.0