evyex/container-simple

Simple container (DI)

Maintainers

Package info

github.com/evyex/container-simple

pkg:composer/evyex/container-simple

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.2 2026-02-18 12:24 UTC

This package is auto-updated.

Last update: 2026-03-18 12:41:15 UTC


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