NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #3013 most downloaded on Packagist
Dependency inversion container with advanced autowiring and compilation support. PSR-11 compliant.
Latest stable
1.2.0
Last release 2 months ago
02 Sep 2026
Ships unpredictably
gaps range from 2 weeks to 2.2 years
Nearly every release is documented
notes for 18 of 18 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
18 releases · first in 2019
Drag across the ruler to compare, or tap a release to open it.
Add addDirectory to BuilderInterface by @Firehed in https://github.com/Firehed/container/pull/110
addDirectory to BuilderInterface by @Firehed in https://github.com/Firehed/container/pull/110AutoDetect::getBuilder(), update ::from to use it by @Firehed in https://github.com/Firehed/container/pull/109Full Changelog: https://github.com/Firehed/container/compare/1.1.0...1.2.0
Resolved an issue where autowired classes with optional constructor parameters (__construct(?Foo $foo = null)) would never have the optional parameter
__construct(?Foo $foo = null)) would never have the optional parameters resolved, even if available in the containerDefinitionInterface. This is still considered internal for now, but the goal is to enable use-cases like fetching secrets from vaults, etc.Full Changelog: https://github.com/Firehed/container/compare/1.0.0...1.1.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
This is the 1.0.0 release of the container library!
This is the 1.0.0 release of the container library!
There are three behavioral changes that could be possible BC breaks from the 0.x line:
env() now sources from $_ENV before getenv(). Previously only getenv() was checked.ValueRetreivalException is now correctly spelled ValueRetrievalException (you should still only catch the PSR-11 ContainerExceptionInterface, though). If you were catching it anyway, you should a) just catch the PSR interface or b) update to the new name if you really have a good reason.The first change is to increase compatibility with the default/recommended behavior of vlucas/dotenv, which will write into $_ENV but not call putenv(). Basically, there's no need to use unsafe mode to support this library (though you still can). Under the majority of deployments, this will be fully compatible. If you have variables_order set to a value that excludes E and S (this is rare) in php.ini, you may encounter unexpected behavior. See README for details.
If any code writes non-string values into $_ENV, reading it will cause an error. This is consistent with the previous getenv-backed environment reads, which could only be a string.
__debugInfo() method by @Firehed in https://github.com/Firehed/container/pull/70Full Changelog: https://github.com/Firehed/container/compare/0.10.0...1.0.0
This improves functionality of the TypedContainerInterface when interacting with scalar values
This improves functionality of the TypedContainerInterface when interacting with scalar values
Full Changelog: https://github.com/Firehed/container/compare/0.9.1...0.10.0
Ensure config entries with match statements can compile by @Firehed in https://github.com/Firehed/container/pull/53
Full Changelog: https://github.com/Firehed/container/compare/0.9.0...0.9.1
This release adds support for streamlined reading of environment vars into backed enums. This streamlines common pain points such as environment-speci
This release adds support for streamlined reading of environment vars into backed enums. This streamlines common pain points such as environment-specific "drivers" in a more modern PHP deployment.
Full Changelog: https://github.com/Firehed/container/compare/0.8.0...0.9.0
This release adds support for streamlined reading of environment vars into backed enums. This streamlines common pain points such as environment-specific "drivers" in a more modern PHP deployment.
Full Changelog: 0.8.0...0.9.0
Drop support for legacy versions of PHP by @Firehed in https://github.com/Firehed/container/pull/47
Full Changelog: https://github.com/Firehed/container/compare/0.7.0...0.8.0
Adds a new AutoDetect class which can greatly simplify setup when following the documented conventions.
Adds a new AutoDetect class which can greatly simplify setup when following the documented conventions.
Full Changelog: https://github.com/Firehed/container/compare/0.6.0...0.7.0
This releases a bunch of built-up changes for newer versions of PHP and support for improved type-safety when following recommended conventions.
This releases a bunch of built-up changes for newer versions of PHP and support for improved type-safety when following recommended conventions.
Full Changelog: https://github.com/Firehed/container/compare/0.5.2...0.6.0
This release contains no user-facing runtime changes. It adds some metadata to composer.json to make the package more discoverable.
This release contains no user-facing runtime changes. It adds some metadata to composer.json to make the package more discoverable.
Full Changelog: https://github.com/Firehed/container/compare/0.5.1...0.5.2
Handle missing target directory for compiled container by @Firehed in https://github.com/Firehed/container/pull/24
Full Changelog: https://github.com/Firehed/container/compare/0.5.0...0.5.1
This updates the composer manifest to support psr/log at major versions 2 and 3, so use of this tool should not prevent installs of those versions.
This updates the composer manifest to support psr/log at major versions 2 and 3, so use of this tool should not prevent installs of those versions.
This sets up a gitattributes file to avoid shipping tests with "dist" installs.
This sets up a gitattributes file to avoid shipping tests with "dist" installs.
…now consistently be thrown. These may constitute breaking changes at runtime, although any configuration that's impacted probably already threw an exc…
This release adds support for psr/container 2.x right alongside 1.x.
Additionally, some internal validation rules were added, especially around interface-to-implementation mappings in config definitions. Namely, if a config key is a fully-qualified interface name without an explicit definition, an exception will now consistently be thrown. These may constitute breaking changes at runtime, although any configuration that's impacted probably already threw an exception due to undefined behavior.
This adds PHP 8 (currently in beta) into the CI builds to allow a smooth rollout when it is released, likely later this year.
This adds PHP 8 (currently in beta) into the CI builds to allow a smooth rollout when it is released, likely later this year.
Additionally, a dependency for compiling closure-based definitions has been removed entirely, in favor of a native implementation based on nikic/php-parser. This should produce more reliable results, since it includes native support for FQCN resolution regardless of the version of PHP.
Short closure syntax is now supported in value definitions
Changes:
There should be no BC breaks.
This resolves an issue where env default values were not following the casting rules as expected. Now env('ALTERNATE_PI', '3.14')->asFloat() will corr
This resolves an issue where env default values were not following the casting rules as expected. Now env('ALTERNATE_PI', '3.14')->asFloat() will correctly return float(3.14) instead of string(4) "3.14" when the env var is not set.
This is the first beta release of the container.
This is the first beta release of the container.
One column per quarter.