PHP Package: symfony/dependency-injection
Symfony's Dependency Injection component provides a powerful and flexible way to manage the dependencies in your application.
Current Version: 7.3.0
Last Updated: 2025-05-29
PHP Requirement: >=8.2
Dependencies:
symfony/config
symfony/config
⚠️ To ensure full functionality, the above dependencies might be required.
Package Description
Symfony's Dependency Injection component allows you to define services and their dependencies using a configuration format. This component simplifies the process of managing dependencies and promotes reusability and maintainability in your PHP projects. By leveraging the Dependency Injection component, you can build modular and testable applications easily.
Classes:
- Symfony\Component\DependencyInjection\TaggedContainerInterface
- Symfony\Component\DependencyInjection\Definition
- Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface
- Symfony\Component\DependencyInjection\ParameterBag\ContainerBag
- Symfony\Component\DependencyInjection\ParameterBag\ParameterBag
- Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag
- Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface
- Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag
- Symfony\Component\DependencyInjection\Alias
- Symfony\Component\DependencyInjection\ExpressionLanguage
- Symfony\Component\DependencyInjection\ReverseContainer
- Symfony\Component\DependencyInjection\Container
- Symfony\Component\DependencyInjection\Attribute\AutowireMethodOf
- Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag
- Symfony\Component\DependencyInjection\Attribute\AutowireLocator
- Symfony\Component\DependencyInjection\Attribute\AsDecorator
- Symfony\Component\DependencyInjection\Attribute\AutowireIterator
- Symfony\Component\DependencyInjection\Attribute\TaggedIterator
- Symfony\Component\DependencyInjection\Attribute\AsTaggedItem
- Symfony\Component\DependencyInjection\Attribute\Exclude
- Symfony\Component\DependencyInjection\Attribute\TaggedLocator
- Symfony\Component\DependencyInjection\Attribute\WhenNot
- Symfony\Component\DependencyInjection\Attribute\Autowire
- Symfony\Component\DependencyInjection\Attribute\Lazy
- Symfony\Component\DependencyInjection\Attribute\AutowireDecorated
- Symfony\Component\DependencyInjection\Attribute\AutowireCallable
- Symfony\Component\DependencyInjection\Attribute\When
- Symfony\Component\DependencyInjection\Attribute\AutowireServiceClosure
- Symfony\Component\DependencyInjection\Attribute\AutowireInline
- Symfony\Component\DependencyInjection\Attribute\AsAlias
- Symfony\Component\DependencyInjection\Attribute\Autoconfigure
- Symfony\Component\DependencyInjection\Attribute\Target
- Symfony\Component\DependencyInjection\EnvVarProcessorInterface
- Symfony\Component\DependencyInjection\ChildDefinition
- Symfony\Component\DependencyInjection\ContainerInterface
- Symfony\Component\DependencyInjection\ServiceLocator
- Symfony\Component\DependencyInjection\Loader\PhpFileLoader
- Symfony\Component\DependencyInjection\Loader\ProtectedPhpFileLoader
- Symfony\Component\DependencyInjection\Loader\DirectoryLoader
- Symfony\Component\DependencyInjection\Loader\YamlFileLoader
- Symfony\Component\DependencyInjection\Loader\XmlFileLoader
- Symfony\Component\DependencyInjection\Loader\ClosureLoader
- Symfony\Component\DependencyInjection\Loader\GlobFileLoader
- Symfony\Component\DependencyInjection\Loader\FileLoader
- Symfony\Component\DependencyInjection\Loader\Configurator\ParametersConfigurator
- Symfony\Component\DependencyInjection\Loader\Configurator\AbstractConfigurator
- Symfony\Component\DependencyInjection\Loader\Configurator\ServiceConfigurator
- Symfony\Component\DependencyInjection\Loader\Configurator\AliasConfigurator
- Symfony\Component\DependencyInjection\Loader\Configurator\DefaultsConfigurator
- Symfony\Component\DependencyInjection\Loader\Configurator\AbstractServiceConfigurator
- Symfony\Component\DependencyInjection\Loader\Configurator\InlineServiceConfigurator
- Symfony\Component\DependencyInjection\Loader\Configurator\ReferenceConfigurator
- Symfony\Component\DependencyInjection\Loader\Configurator\ClosureReferenceConfigurator
- Symfony\Component\DependencyInjection\Loader\Configurator\FromCallableConfigurator
- Symfony\Component\DependencyInjection\Loader\Configurator\PrototypeConfigurator
- Symfony\Component\DependencyInjection\Loader\Configurator\InstanceofConfigurator
- Symfony\Component\DependencyInjection\Loader\Configurator\EnvConfigurator
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\ParentTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\AutowireTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\BindTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\ConfiguratorTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\PropertyTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\FromCallableTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\TagTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\DeprecateTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\AutoconfigureTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\LazyTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\ClassTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\SyntheticTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\CallTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\PublicTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\FileTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\ArgumentTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\DecorateTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\AbstractTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\FactoryTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\ConstructorTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\Traits\ShareTrait
- Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator
- Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator
- Symfony\Component\DependencyInjection\Loader\IniFileLoader
- Symfony\Component\DependencyInjection\Loader\UndefinedExtensionHandler
- Symfony\Component\DependencyInjection\TypedReference
- Symfony\Component\DependencyInjection\Dumper\XmlDumper
- Symfony\Component\DependencyInjection\Dumper\DumperInterface
- Symfony\Component\DependencyInjection\Dumper\GraphvizDumper
- Symfony\Component\DependencyInjection\Dumper\Preloader
- Symfony\Component\DependencyInjection\Dumper\PhpDumper
- Symfony\Component\DependencyInjection\Dumper\Dumper
- Symfony\Component\DependencyInjection\Dumper\YamlDumper
- Symfony\Component\DependencyInjection\Extension\ConfigurableExtensionInterface
- Symfony\Component\DependencyInjection\Extension\ExtensionInterface
- Symfony\Component\DependencyInjection\Extension\Extension
- Symfony\Component\DependencyInjection\Extension\ExtensionTrait
- Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface
- Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface
- Symfony\Component\DependencyInjection\Extension\AbstractExtension
- Symfony\Component\DependencyInjection\ExpressionLanguageProvider
- Symfony\Component\DependencyInjection\ContainerBuilder
- Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument
- Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument
- Symfony\Component\DependencyInjection\Argument\RewindableGenerator
- Symfony\Component\DependencyInjection\Argument\LazyClosure
- Symfony\Component\DependencyInjection\Argument\ServiceLocator
- Symfony\Component\DependencyInjection\Argument\IteratorArgument
- Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument
- Symfony\Component\DependencyInjection\Argument\AbstractArgument
- Symfony\Component\DependencyInjection\Argument\ArgumentInterface
- Symfony\Component\DependencyInjection\Argument\BoundArgument
- Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass
- Symfony\Component\DependencyInjection\Compiler\DecoratorServicePass
- Symfony\Component\DependencyInjection\Compiler\ResolveDecoratorStackPass
- Symfony\Component\DependencyInjection\Compiler\ResolveNamedArgumentsPass
- Symfony\Component\DependencyInjection\Compiler\ResolveReferencesToAliasesPass
- Symfony\Component\DependencyInjection\Compiler\AttributeAutoconfigurationPass
- Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass
- Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
- Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass
- Symfony\Component\DependencyInjection\Compiler\ResolveInstanceofConditionalsPass
- Symfony\Component\DependencyInjection\Compiler\DefinitionErrorExceptionPass
- Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass
- Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass
- Symfony\Component\DependencyInjection\Compiler\ResolveNoPreloadPass
- Symfony\Component\DependencyInjection\Compiler\ResolveInvalidReferencesPass
- Symfony\Component\DependencyInjection\Compiler\AutowireRequiredPropertiesPass
- Symfony\Component\DependencyInjection\Compiler\CheckCircularReferencesPass
- Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
- Symfony\Component\DependencyInjection\Compiler\ResolveAutowireInlineAttributesPass
- Symfony\Component\DependencyInjection\Compiler\AutowireRequiredMethodsPass
- Symfony\Component\DependencyInjection\Compiler\ValidateEnvPlaceholdersPass
- Symfony\Component\DependencyInjection\Compiler\ExtensionCompilerPass
- Symfony\Component\DependencyInjection\Compiler\ResolveBindingsPass
- Symfony\Component\DependencyInjection\Compiler\CheckReferenceValidityPass
- Symfony\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass
- Symfony\Component\DependencyInjection\Compiler\AliasDeprecatedPublicServicesPass
- Symfony\Component\DependencyInjection\Compiler\RegisterEnvVarProcessorsPass
- Symfony\Component\DependencyInjection\Compiler\ResolveFactoryClassPass
- Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait
- Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceUtil
- Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraphNode
- Symfony\Component\DependencyInjection\Compiler\Compiler
- Symfony\Component\DependencyInjection\Compiler\AutowirePass
- Symfony\Component\DependencyInjection\Compiler\ResolveEnvPlaceholdersPass
- Symfony\Component\DependencyInjection\Compiler\CheckDefinitionValidityPass
- Symfony\Component\DependencyInjection\Compiler\CheckArgumentsValidityPass
- Symfony\Component\DependencyInjection\Compiler\ResolveClassPass
- Symfony\Component\DependencyInjection\Compiler\CheckTypeDeclarationsPass
- Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraph
- Symfony\Component\DependencyInjection\Compiler\CheckAliasValidityPass
- Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass
- Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationParameterBag
- Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationContainerBuilder
- Symfony\Component\DependencyInjection\Compiler\RemoveBuildParametersPass
- Symfony\Component\DependencyInjection\Compiler\RegisterReverseContainerPass
- Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraphEdge
- Symfony\Component\DependencyInjection\Compiler\PassConfig
- Symfony\Component\DependencyInjection\Compiler\ResolveServiceSubscribersPass
- Symfony\Component\DependencyInjection\Compiler\RegisterServiceSubscribersPass
- Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass
- Symfony\Component\DependencyInjection\Compiler\RegisterAutoconfigureAttributesPass
- Symfony\Component\DependencyInjection\Compiler\ResolveTaggedIteratorArgumentPass
- Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass
- Symfony\Component\DependencyInjection\Compiler\ResolveHotPathPass
- Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass
- Symfony\Component\DependencyInjection\Compiler\AutowireAsDecoratorPass
- Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass
- Symfony\Component\DependencyInjection\Compiler\AutoAliasServicePass
- Symfony\Component\DependencyInjection\Parameter
- Symfony\Component\DependencyInjection\EnvVarLoaderInterface
- Symfony\Component\DependencyInjection\Reference
- Symfony\Component\DependencyInjection\StaticEnvVarLoader
- Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
- Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException
- Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException
- Symfony\Component\DependencyInjection\Exception\EmptyParameterValueException
- Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException
- Symfony\Component\DependencyInjection\Exception\LogicException
- Symfony\Component\DependencyInjection\Exception\ExceptionInterface
- Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException
- Symfony\Component\DependencyInjection\Exception\EnvNotFoundException
- Symfony\Component\DependencyInjection\Exception\InvalidParameterTypeException
- Symfony\Component\DependencyInjection\Exception\BadMethodCallException
- Symfony\Component\DependencyInjection\Exception\OutOfBoundsException
- Symfony\Component\DependencyInjection\Exception\EnvParameterException
- Symfony\Component\DependencyInjection\Exception\AutoconfigureFailedException
- Symfony\Component\DependencyInjection\Exception\AutowiringFailedException
- Symfony\Component\DependencyInjection\Exception\RuntimeException
- Symfony\Component\DependencyInjection\Variable
- Symfony\Component\DependencyInjection\Config\ContainerParametersResource
- Symfony\Component\DependencyInjection\Config\ContainerParametersResourceChecker
- Symfony\Component\DependencyInjection\EnvVarProcessor
- Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\LazyServiceDumper
- Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface
- Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\NullDumper
- Symfony\Component\DependencyInjection\LazyProxy\Instantiator\InstantiatorInterface
- Symfony\Component\DependencyInjection\LazyProxy\Instantiator\LazyServiceInstantiator
- Symfony\Component\DependencyInjection\LazyProxy\Instantiator\RealServiceInstantiator
Download Latest Version: 7.3.0

Previous Versions
v7.2.4
v7.2.5 - Coming soon
v7.2.6 - Coming soon
Code Integration Example
Make sure to include the correct namespace and class paths for proper usage.
<?php
// Example from PHPlibraries.com
require_once 'libs/symfony/dependency-injection/7.3.0/loader.php';
require_once 'libs/symfony/config/7.3.0/loader.php';
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
$obj = new Container();
echo '✅ Test OK: ' . get_class($obj);
?>
We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.
Community Discussion
Ask questions, share tips, or report issues below.