@param \Symfony\Component\DependencyInjection\ContainerBuilder $container

@throws \LogicException
13293
public function process(ContainerBuilder $container)
    {
        $ioMetadataHandlers = $container->hasParameter('ez_io.metadata_handlers') ?
            $container->getParameter('ez_io.metadata_handlers') :
            array();
        $this->processHandlers(
            $container,
            $container->getDefinition('ezpublish.core.io.metadata_handler.factory'),
            $ioMetadataHandlers,
            $this->metadataHandlerFactories,
            'ezpublish.core.io.metadata_handler.flysystem.default'
        );

        $ioBinarydataHandlers = $container->hasParameter('ez_io.binarydata_handlers') ?
            $container->getParameter('ez_io.binarydata_handlers') :
            array();
        $this->processHandlers(
            $container,
            $container->getDefinition('ezpublish.core.io.binarydata_handler.factory'),
            $ioBinarydataHandlers,
            $this->binarydataHandlerFactories,
            'ezpublish.core.io.binarydata_handler.flysystem.default'
        );

        // Unset parameters that are no longer required ?
    }
1109577
public function process(ContainerBuilder $container): void
    {
        if (!$container->has('assetic.twig_formula_loader.real')) {
            return;
        }

        $container
            ->findDefinition('assetic.twig_formula_loader.real')
            ->replaceArgument(1, null);
    }
612299
public function process(\Symfony\Component\DependencyInjection\ContainerBuilder $container)
    {
        if (!$container->hasDefinition("thelia.admin.resources")) {
            return;
        }

        /** @var \Symfony\Component\DependencyInjection\Definition $adminResources */
        $adminResources = $container->getDefinition("thelia.admin.resources");

        $adminResources->addMethodCall("addModuleResources", [$this->getResources(), $this->getModuleCode()]);
    }
362167
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        /*
         * Adds compiler passes.
         */
        foreach ($this->getCompilerPasses() as $compilerPass) {
            $container->addCompilerPass($compilerPass);
        }
    }
539426
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new ConfigurationCompilerPass());
        $container->addCompilerPass(new VendorCompilerPass());
    }
323321
public function process(ContainerBuilder $container)
    {
        $this->compiler = $container->getCompiler();
        $this->formatter = $this->compiler->getLoggingFormatter();
        $this->graph = $this->compiler->getServiceReferenceGraph();

        $container->setDefinitions($this->inlineArguments($container, $container->getDefinitions(), true));
    }
165439
public function process(ContainerBuilder $container)
    {
        if (class_exists(BaseTranslator::class) && $container->hasDefinition('translator.default')
            && $container->hasParameter('translator.class')) {
            $class = $container->getParameter('translator.class');
            $definition = $container->getDefinition('translator.default');
            $definition->setClass($class);
        }
    }
805925
public function process(ContainerBuilder $container)
    {
        $this->bag = $container->getParameterBag();

        try {
            parent::process($container);

            $aliases = array();
            foreach ($container->getAliases() as $name => $target) {
                $this->currentId = $name;
                $aliases[$this->bag->resolveValue($name)] = $target;
            }
            $container->setAliases($aliases);
        } catch (ParameterNotFoundException $e) {
            $e->setSourceId($this->currentId);

            throw $e;
        }

        $this->bag->resolve();
        $this->bag = null;
    }
815573
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition('joomla.component.module.module_manager')) {
            return;
        }

        $moduleManagerDefinition = $container->getDefinition('joomla.component.module.module_manager');
        $taggedServices = $container->findTaggedServiceIds('joomla.module');

        foreach (array_keys($taggedServices) as $id) {
            $moduleDefinition = $container->getDefinition($id);
            $reflection = new \ReflectionClass($moduleDefinition->getClass());

            if (!$reflection->implementsInterface(ModuleRendererInterface::class)) {
                throw new \InvalidArgumentException(sprintf(
                    'Module service class %s does not implement %s',
                    $id,
                    ModuleRendererInterface::class
                ));
            }

            $moduleDefinition->addMethodCall('setFormFactory', [ new Reference('form.factory') ]);
            $moduleDefinition->addMethodCall('setTwigEnvironment', [ new Reference('twig') ]);
            $moduleDefinition->setScope(ContainerInterface::SCOPE_PROTOTYPE);
            $moduleManagerDefinition->addMethodCall('addModuleService', [ $id ]);
        }
    }
82267
public function process(ContainerBuilder $container)
    {
        $this->registerStateExtractors($container);
        $this->registerStateElements($container);
        $this->registerResultModifications($container);
    }
871882
private function validateFirehoseTransport(ContainerBuilder $container): void
    {
        if (!$container->hasDefinition('gdbots_pbjx.transport.firehose_router')) {
            throw new \LogicException(
                'The service "gdbots_pbjx.transport.firehose" has a dependency on a non-existent ' .
                'service "gdbots_pbjx.transport.firehose_router". You must define this in your app ' .
                'since it requires a delivery stream name which may be message specific.'
            );
        }

        if (!$container->hasDefinition('aws.firehose')) {
            throw new \LogicException(
                'The service "gdbots_pbjx.transport.firehose" has a dependency on a non-existent ' .
                'service "aws.firehose". This expects the Firehose Client that comes from ' .
                'composer package "aws/aws-sdk-php-symfony": "^1.0".'
            );
        }
    }
1084619
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new MenuBuilderOptionsPass(), PassConfig::TYPE_AFTER_REMOVING);
    }
665123
public function process(ContainerBuilder $container): void
    {
        $this->injectParameters($container);

        $handlerDefinition = new Definition(UdpHandler::class, [
            '%service_bus.logger.graylog.udp_host%',
            '%service_bus.logger.graylog.udp_port%',
            '%service_bus.logger.graylog.gzip%',
            '%service_bus.logger.graylog.log_level%',
        ]);

        $container->addDefinitions([UdpHandler::class => $handlerDefinition]);

        (new LoggerCompilerPass())->process($container);

        $loggerDefinition = $container->getDefinition('service_bus.logger');

        $loggerDefinition->addMethodCall(
            'pushHandler',
            [new Reference(UdpHandler::class)]
        );
    }
167137
public function process(ContainerBuilder $container)
    {
        if (!$container->hasAlias(SchemaBuilder::class)
            || !$container->hasDefinition(self::CLEAN_INSTALLER_DEF_ID)
        ) {
            return;
        }

        $cleanInstallerDefinition = $container->getDefinition(self::CLEAN_INSTALLER_DEF_ID);
        $cleanInstallerDefinition->setClass(CoreInstaller::class);
        $cleanInstallerDefinition->addArgument(new Reference(SchemaBuilder::class));
    }
1144481
public function build(ContainerBuilder $container)
    {
        /** @var \eZ\Bundle\EzPublishCoreBundle\DependencyInjection\EzPublishCoreExtension $core */
        $core = $container->getExtension('ezpublish');

        $configParsers = $this->getConfigParsers();
        array_walk($configParsers, [$core, 'addConfigParser']);

        $core->addDefaultSettings(__DIR__ . '/Resources/config', ['ezplatform_default_settings.yml']);

        $this->addCompilerPasses($container);
    }
254358
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition('ezpublish.field_type_collection.factory')) {
            return;
        }

        $fieldTypeCollectionFactoryDef = $container->getDefinition('ezpublish.field_type_collection.factory');

        // Field types.
        // Alias attribute is the field type string.
        foreach ($container->findTaggedServiceIds('ezpublish.fieldType') as $id => $attributes) {
            foreach ($attributes as $attribute) {
                if (!isset($attribute['alias'])) {
                    throw new LogicException(
                        'ezpublish.fieldType service tag needs an "alias" attribute to identify the field type. None given.'
                    );
                }

                $fieldTypeCollectionFactoryDef->addMethodCall(
                    'registerFieldType',
                    array(
                        // Only pass the service Id since field types will be lazy loaded via the service container
                        $id,
                        $attribute['alias'],
                    )
                );

                // Add FieldType to the "concrete" list if it's not a fake.
                if (!is_a($container->findDefinition($id)->getClass(), '\eZ\Publish\Core\FieldType\Null\Type', true)) {
                    $fieldTypeCollectionFactoryDef->addMethodCall(
                        'registerConcreteFieldTypeIdentifier',
                        array($attribute['alias'])
                    );
                }
            }
        }
    }
481162
public function prepend(ContainerBuilder $container)
    {
        $bundles = $container->getParameter('kernel.bundles');

        if (isset($bundles['DoctrineBundle'])) {
            $mappingConfig = [
                'orm' => [
                    'entity_managers' => [
                        'default' => [
                            'mappings' => [
                                'HMLBDDDBundle' => [
                                    'mapping' => true,
                                    'type' => 'xml',
                                    'dir' => __DIR__.'/../Resources/config/doctrine',
                                    'prefix' => 'HMLB\DDD',
                                    'is_bundle' => false,
                                ],
                            ],
                        ],
                    ],
                ],
            ];

            $container->getExtension('doctrine');
            $container->prependExtensionConfig('doctrine', $mappingConfig);
        }

        $container->prependExtensionConfig(
            'command_bus',
            [
                'command_name_resolver_strategy' => 'named_message',
            ]
        );
        $container->prependExtensionConfig(
            'event_bus',
            [
                'event_name_resolver_strategy' => 'named_message',
            ]
        );
    }