You can modify the container here before it is dumped to PHP code.

@param ContainerBuilder $container Container

@api
972854
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition('thelia.coupon.manager')) {
            return;
        }

        $couponManager = $container->getDefinition('thelia.coupon.manager');
        $services = $container->findTaggedServiceIds("thelia.coupon.addCondition");

        foreach ($services as $id => $condition) {
            $couponManager->addMethodCall(
                'addAvailableCondition',
                array(
                    new Reference($id)
                )
            );
        }
    }
578733
protected function prepareContainer(ContainerBuilder $container)
    {
        parent::prepareContainer($container);
        $container->setParameter('smart_core_cms.modules', $this->modules);
        $container->setParameter('smart_core_cms.site_name', $this->siteName);
    }
26343
public function build(ContainerBuilder $container)
    {
        $container->addCompilerPass(new CommandProcessorPass(), PassConfig::TYPE_BEFORE_REMOVING);
        $container->addCompilerPass(new PoolsPass());
        $container->addCompilerPass(new RegisterSerializerDriversPass());
        $container->addCompilerPass(new WorkerRunnersPass());
    }
701556
public function prepend(ContainerBuilder $container)
    {
        $bundles = $container->getParameter('kernel.bundles');
        foreach ($bundles as $bundle => $class) {
            if (method_exists($this, 'prepend' . $bundle)) {
                call_user_func_array(array($this, 'prepend' . $bundle), array($container));
            }
        }
    }
450614
public function process(ContainerBuilder $container)
    {
        $factory = $container->findDefinition(FilterFactory::class);

        $filters = [];

        foreach ($container->findTaggedServiceIds(self::FILTER_TAG) as $id => $attributes) {
            $filters[$id] = new Reference($id);
        }

        $factory->replaceArgument(0, ServiceLocatorTagPass::register($container, $filters));
    }
979932
public function process(ContainerBuilder $container)
    {
        $this->container = $container;
        $this->signalingException = new RuntimeException('Invalid reference.');

        try {
            $this->processValue($container->getDefinitions(), 1);
        } finally {
            $this->container = $this->signalingException = null;
        }
    }
680361
public function process(ContainerBuilder $container)
    {
        foreach ($container->getDefinitions() as $id => $definition) {
            if ($definition->isAbstract()) {
                $container->removeDefinition($id);
                $container->log($this, sprintf('Removed service "%s"; reason: abstract.', $id));
            }
        }
    }
735785
public function process(ContainerBuilder $container)
    {
        $configuration = $container->get('configuration', ContainerInterface::NULL_ON_INVALID_REFERENCE);
        if ($configuration instanceof ConfigurationInterface) {
            $this->registerService($container, 'deployment_strategy', $configuration->getDeploymentStrategyClass());

            $connectionManager = $container->get('connection_manager', ContainerInterface::NULL_ON_INVALID_REFERENCE);
            if ($connectionManager instanceof ConnectionManagerInterface) {
                foreach ($configuration->getDeploymentConnectionClasses() as $connectionType => $connectionAdapterClass) {
                    $connectionManager->registerConnectionAdapter($connectionType, $connectionAdapterClass);
                }
            }
        }
    }
362167
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        /*
         * Adds compiler passes.
         */
        foreach ($this->getCompilerPasses() as $compilerPass) {
            $container->addCompilerPass($compilerPass);
        }
    }
609216
public function prepend(ContainerBuilder $container)
    {
        $this->declareReportAsCustomizable($container);
        $this->declareRouting($container);
        $this->prependRoleHierarchy($container);
    }
235379
public function process(ContainerBuilder $container)
    {
        if ($container->hasDefinition($this->filesystemTag)) {
            $filesystem = new Reference($this->filesystemTag);

            $reportBugCommandDefinition = $container->getDefinition(ReportBugCommand::class);
            $reportBugCommandDefinition->addMethodCall('setFilesystem', [$filesystem]);

            $captureScreenshotsCommandDefinition = $container->getDefinition(CaptureScreenshotsCommand::class);
            $captureScreenshotsCommandDefinition->addMethodCall('setFilesystem', [$filesystem]);

            $removeScreenshotsCommandDefinition = $container->getDefinition(RemoveScreenshotsCommand::class);
            $removeScreenshotsCommandDefinition->addMethodCall('setFilesystem', [$filesystem]);
        }
    }
362999
public function process(ContainerBuilder $container)
    {
        $taggedServices = $container->findTaggedServiceIds($this->tagName);
        foreach ($taggedServices as $id => $tags) {

            $definition = $container->getDefinition($id);
            foreach ($tags as $tag) {

                $references = $this->getSortedDependencies(
                    $container,
                    $this->buildOptionsFromServiceTag($id, $tag)
                );

                $this->configureConsumer($definition, $tag, $references);
            }
        }
    }
641099
public function process(ContainerBuilder $container)
    {
        $managerName = 'open_orchestra_api.oauth2.authorization_server';
        $tagName = 'open_orchestra_api.oauth2.strategy';

        $this->addStrategyToManager($container, $managerName, $tagName);
    }
787392
public function process(ContainerBuilder $container)
    {
        if (!$container->has('support_tools.system_info.output_registry')) {
            return;
        }

        $outputFormattersTagged = $container->findTaggedServiceIds('support_tools.system_info.output_format');

        $outputFormatters = [];
        foreach ($outputFormattersTagged as $id => $tags) {
            foreach ($tags as $attributes) {
                $outputFormatters[$attributes['format']] = new Reference($id);
            }
        }

        $outputFormatRegistryDef = $container->findDefinition('support_tools.system_info.output_registry');
        $outputFormatRegistryDef->setArguments([$outputFormatters]);
    }
777066
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition($this->subjectService)) {
            return;
        }

        $subjects = $this->findTaggedServices($container, $this->subjectTag, SubjectInterface::class, 'support', false);

        $subjectDefinition = $container->getDefinition($this->subjectService);
        $subjectDefinition->replaceArgument(0, $subjects);
    }
857663
public function build(ContainerBuilder $container)
    {
        $this->initAdmingeneratorClassLoader($container);

        parent::build($container);

        $container->addCompilerPass(new ValidatorCompilerPass());
        $container->addCompilerPass(new FormCompilerPass());
    }
698582
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new WidgetContentResolverPass());
        //get widgetItems
        $container->addCompilerPass(new WidgetItemPass());
    }