PackageTrack
Sign in Get early access

firehed/container

Dependency inversion container with advanced autowiring and compilation support. PSR-11 compliant.

1.1.0 570K downloads/mo #2311 most downloaded on Packagist Firehed/container

What this package is like to depend on

Last release 2 months ago

10 Jun 2026

Release timing varies

gaps range from 2 weeks to 2.2 years

Some releases are documented

notes for 10 of 17 stable releases

Nothing withdrawn

no release was ever pulled

7 years old

17 releases · first in 2019

3 releases in the last 12 months

see the full history below

Release timeline

17 releases · Mar 2019 to Jun 2026
2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 17
  1. 1.1.0 10 Jun 2026
    Release notes

    Summary

    • Resolved an issue where autowired classes with optional constructor parameters (__construct(?Foo $foo = null)) would never have the optional parameters resolved, even if available in the container
    • Major groundwork for external extensibility with DefinitionInterface. This is still considered internal for now, but the goal is to enable use-cases like fetching secrets from vaults, etc.
    • Bumped numerous internal tools and updated to requiring a currently-supported PHP version (8.2+)

    What's Changed

    • Add DefinitionInterface for extensible container definitions by @Firehed in #75
    • Extract Autowire utility for shared eligibility checks by @Firehed in #79
    • Check container for optional params before using default by @Firehed in #82
    • Update to PHPUnit 11-13, require PHP 8.2+ by @Firehed in #83
    • Add Dependabot configuration by @Firehed in #84
    • Bump actions/checkout from 4 to 6 by @dependabot[bot] in #87
    • Bump actions/cache from 4 to 5 by @dependabot[bot] in #88
    • Bump codecov/codecov-action from 4 to 6 by @dependabot[bot] in #85
    • Update phpcs to ^4.0 by @Firehed in #90
    • Update PHPUnit config and make it stricter by @Firehed in #91
    • Update envvar reader to leverage new DefinitionInterface by @Firehed in #76
    • Extract Autowire::instantiate() for reuse by @Firehed in #98
    • Convert FactoryInterface to DefinitionInterface by @Firehed in #99
    • Convert AutowireInterface to DefinitionInterface by @Firehed in #97
    • Unify finalization pattern with ShorthandDefinitionInterface by @Firehed in #101
    • Convert Closure handling to DefinitionInterface by @Firehed in #102
    • Convert scalar definitions to DefinitionInterface wrappers by @Firehed in #103
    • Unify config file parsing by @Firehed in #104

    New Contributors

    Full Changelog: 1.0.0...1.1.0

    Open source →
  2. 1.0.0 07 Mar 2026
    Release notes

    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.
    • envvars are now read once when the container is initialized, where previously they were read on the fly. In the unlikely event you modify envvars after the container is initialized throughout the application lifecycle (this is a very bad idea), those updates will no longer be reflected in the container
    • 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.

    What's Changed

    Full Changelog: 0.10.0...1.0.0

    Open source →
  3. 0.10.0 19 Sep 2025
    Release notes

    This improves functionality of the TypedContainerInterface when interacting with scalar values

    What's Changed

    • Update build matrix for latest PHP; PHPStan; fix some new warnings by @Firehed in #55
    • Add a bunch of covers annotations by @Firehed in #57
    • Drop unused parameter in compiler's ProxyValue by @Firehed in #56
    • More typed value access tooling by @Firehed in #58

    Full Changelog: 0.9.1...0.10.0

    Open source →
  4. 0.9.1 22 Aug 2024
    Release notes

    What's Changed

    • Ensure config entries with match statements can compile by @Firehed in #53

    Full Changelog: 0.9.0...0.9.1

    Open source →
  5. 0.9.0 22 Aug 2024
    Release notes

    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.

    What's Changed

    • Minor updates for newer dependencies by @Firehed in #48
    • Update CI tools+deps by @Firehed in #49
    • Remove polyfills redundant with PHP 8.1 by @Firehed in #50
    • Update internals to native types and constructor promotion by @Firehed in #51
    • Support casting env to enum by @Firehed in #43
    • Add more detailed explainer in enum section by @Firehed in #52

    Full Changelog: 0.8.0...0.9.0

    Open source →
  6. 0.8.0 17 Jul 2024
    Release notes

    What's Changed

    Full Changelog: 0.7.0...0.8.0

    Open source →
  7. 0.7.0 11 Feb 2024
    Release notes

    Adds a new AutoDetect class which can greatly simplify setup when following the documented conventions.

    What's Changed

    • Support newer PHPUnit versions by @Firehed in #44
    • Add an autodetect tool for the common case by @Firehed in #40

    Full Changelog: 0.6.0...0.7.0

    Open source →
  8. 0.6.0 29 Jan 2024
    Release notes

    This releases a bunch of built-up changes for newer versions of PHP and support for improved type-safety when following recommended conventions.

    What's Changed

    • Test on 8.1 and 8.2 by @Firehed in #33
    • Support PHP 8.1 & Enums by @Firehed in #22
    • Improve type safety of containers w/ tools by @Firehed in #34
    • Improve messaging on various errors by @Firehed in #37
    • Adopt some readme formatting enhancements and add a couple clarifications by @Firehed in #41
    • Test on 8.3 and 8.4-dev by @Firehed in #42

    Full Changelog: 0.5.2...0.6.0

    Open source →
  9. 0.5.2 16 Nov 2021
    Release notes

    This release contains no user-facing runtime changes. It adds some metadata to composer.json to make the package more discoverable.

    Full Changelog: 0.5.1...0.5.2

    Open source →
  10. 0.5.1 05 Nov 2021
    Release notes

    What's Changed

    • Handle missing target directory for compiled container by @Firehed in #24

    Full Changelog: 0.5.0...0.5.1

    Open source →
  11. 0.5.0 04 Nov 2021

    Nothing published for this version

  12. 0.4.1 09 Sep 2021

    Nothing published for this version

  13. 0.4.0 10 Jun 2021

    Nothing published for this version

  14. 0.3.0 29 Sep 2020

    Nothing published for this version

  15. 0.2.0 01 Sep 2020

    Nothing published for this version

  16. 0.1.1 19 Mar 2019

    Nothing published for this version

  17. 0.1 14 Mar 2019

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive