For a dependency injection container for PHP, the strongest matches are symfony/dependency-injection (This is a comprehensive, PSR-11 compliant dependency injection container), php-di/php-di (This library is a comprehensive dependency injection container that) and symfony/symfony (Symfony provides a highly robust, PSR-11 compliant dependency injection). thephpleague/container and rdlowrey/auryn round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.
Selectăm repository-uri open-source de pe GitHub care se potrivesc cu „best php dependency injection libraries”. Rezultatele sunt clasificate după relevanța față de căutarea ta — folosește filtrele de mai jos pentru a rafina rezultatele sau utilizează AI-ul.
This project is a PHP dependency injection container and framework designed to centralize object construction and manage class dependencies. It serves as a service container and configuration registry that automates object lifecycles and manages references between services to decouple application components from their specific dependencies. The system handles the instantiation and wiring of objects through both constructor and setter injection. It provides a centralized registry for storing reusable parameters and service definitions, which prevents the hardcoding of settings across the appli
This is a comprehensive, PSR-11 compliant dependency injection container that provides robust support for autowiring, constructor injection, service configuration, and lazy loading, making it the industry standard for managing object lifecycles in PHP.
PHP-DI is an inversion of control container designed to manage object lifecycles and dependency resolution within PHP applications. It functions as a centralized registry that automates the wiring of components, allowing for the decoupling of services from their concrete implementations. The library distinguishes itself by utilizing reflection to inspect class constructor signatures, enabling automatic dependency injection without requiring manual configuration for standard scenarios. It supports recursive resolution of dependency graphs and provides mechanisms for lazy object instantiation,
This library is a comprehensive dependency injection container that fully supports PSR-11, autowiring, constructor injection, and lazy loading, making it a flagship tool for managing object lifecycles in PHP.
Symfony is a full-stack web framework designed for building scalable and maintainable server-side applications. It provides a comprehensive collection of decoupled components that form a foundational architecture, centered on a robust dependency injection container and a configuration-driven routing engine. By organizing code into modular services, the framework ensures that application components remain testable and loosely coupled throughout the development lifecycle. The framework distinguishes itself through an event-driven kernel architecture that allows developers to intercept and modif
Symfony provides a highly robust, PSR-11 compliant dependency injection container that supports autowiring, constructor injection, and lazy loading, though it is a full-stack framework rather than a standalone library.
Small but powerful dependency injection container
This library provides a PSR-11 compliant dependency injection container that supports autowiring, constructor injection, and service configuration, making it a direct fit for managing object lifecycles in PHP applications.
IoC Dependency Injector
Auryn is a powerful dependency injection container that supports constructor injection, autowiring, and lazy loading, though it lacks native PSR-11 compliance.