</service> use Symfony\Component\DependencyInjection\Reference; $container->setDefinition( 'user_manager', new Definition('UserManager', [ new Reference('db'), ]) ); 㱺 16
add CompilerPasses 3. Read app/config/config.yml 4. Run CompilerPasses 4.1. First CompilerPass calls the DI extensions 4.2. All the other CompilerPasses run 23
ContainerBuilder $container ); } • Sandboxed: the given ContainerBuilder is always empty (aside from the base parameters, like kernel.debug) • Can change its behaviour using the provided configuration 24
Runs right before dumping the ContainerBuilder to PHP • Can change anything • A few Symfony ones optimise the ContainerBuilder • Most others allow interaction across bundles using tags 25