Repository navigation
v1.8.0
Fast Forward Container v1.8.0 adds an incremental construction API through ContainerBuilder.
use FastForward\Container\ContainerBuilder;
$builder = (new ContainerBuilder())->add($config, $baseProvider);
if ($featureEnabled) {
$builder->add($featureProvider);
}
$container = $builder->build();add(...$initializers)is fluent and accepts the same configuration objects, PSR-11 containers, service providers, and class strings asContainerFactory::create().- Each
build()creates fresh aggregate, provider/config adapters, and autowiring state. Later registrations affect future builds only. - Supplied source objects are reused, including external containers and their own state. Class-string initializers are instantiated anew during each build.
ContainerFactory::create()delegates to the Builder, preserving a single assembly implementation.container()continues delegating to the Factory.- Source precedence, cross-source dependencies, lazy service resolution, optional nested configuration handling, and existing lifetime semantics are preserved.
- PHPDoc, API/onboarding guides, README, and a runnable conditional-registration example document the new API.
The PHP requirement remains ^8.3. Validation includes 117 tests, 285 assertions, 100% line coverage, and CI on PHP 8.3, 8.4, and 8.5.
Resolves #13 through #16. Transient lifetime design remains separate in #6.
Changelog: CHANGELOG.md
Full changelog: v1.7.1...v1.8.0