evyex/container-simple

Simple container (DI)

Maintainers

Package info

github.com/evyex/container-simple

pkg:composer/evyex/container-simple

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.3 2026-05-11 09:19 UTC

This package is auto-updated.

Last update: 2026-05-11 09:20:40 UTC


README

Simple PHP Dependency Injection Container implementing PSR-11 ContainerInterface with Autowiring and Recursion resolving.

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
  • Recursion resolving

Requirements

  • PHP ^8.1
  • psr/container ^2.0