Repository navigation
v1.9.0
Fast Forward Container v1.9.0 replaces its internal PHP-DI engine with native constructor autowiring.
Added
- Native constructor autowiring with recursive dependency resolution, shared instances, cycle diagnostics and cleanup after failed construction.
- Standalone autowiring through
new AutowireContainer(), with an optional nullable PSR-11 delegate whose entries take precedence over autowiring. - Support for constructor parameters passed by reference and optional internal arguments whose default values are unavailable through reflection.
- Named exception factories for circular dependency paths and unresolvable constructor parameters.
- A versioned changelog, including the release history from
1.0.0through1.8.0.
Changed
- Optional named object dependencies resolve explicit container entries or autowire concrete classes before using their declared defaults, including non-null defaults.
- Missing entries and structurally unavailable dependency graphs use an optional argument's default. Autoloader, constructor, factory, type, cycle and default-expression failures remain errors with their original causes preserved.
- Aggregate lookups still try later sources after delegated failures, but preserve the first construction exception when no source succeeds instead of reporting a fresh not-found exception.
AutowireContainer::has()checks whether an entry is known without callingget(). Known classes or entries may returntrueeven when construction fails; unknown entries returnfalseandget()throwsNotFoundExceptionInterface, following PSR-11. Applications that usedhas()as a construction health check must callget()and handle resolution errors instead.- The public
AutowireContainer,ContainerBuilder,ContainerFactoryandcontainer()APIs remain available. PHP^8.3remains the minimum requirement. - Optional dependencies may now execute constructors that were previously skipped. A nullable argument without a default remains required.
- Applications that use PHP-DI directly must declare their own dependency. External PHP-DI containers remain usable as PSR-11 sources.
- Scalars, ambiguous union/intersection/DNF types and variadic collections require defaults or explicit service factories. See the autowiring guide for the complete contract.
Removed
- The runtime
php-di/php-didependency and the internal PHP-DI autowiring engine.
Delivered through PR #18, addressing issue #17.
Validation: 166 tests, 405 assertions and 99.26% line coverage; PHP 8.3, 8.4 and 8.5 CI. The published Packagist distribution was installed and exercised without PHP-DI or development tooling, including standalone/delegated autowiring and error propagation for optional dependencies.
Changelog: CHANGELOG.md
Full changelog: v1.8.0...v1.9.0