Build all local filter registries

@param ContainerBuilder $container
@return void
339188
public function buildLocalFilterRegistries(ContainerBuilder $container)
    {
        $filters = $container->findTaggedServiceIds('spray_persistence.entity_filter');
        foreach ($filters as $filterId => $filterOptions) {
            foreach (array_filter($filterOptions, array($this, 'filterLocalFilterOptions')) as $options) {
                $registryId = $this->determineRegistryIdForRepositoryId($options['repository']);
                $this->attachFilterToRegistry(
                    $this->locateFilterRegistry($container, $registryId),
                    $filterId,
                    $options
                );
                $this->attachRegistryToRepository($container, $registryId, $options['repository']);
            }
        }
    }
655002
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition($this->collectionServiceId)) {
            return;
        }

        $collection = $this->getCollection($container);

        foreach ($container->findTaggedServiceIds($this->serviceTag) as $id => $attributes) {
            $this->addServiceToCollection($collection, $id);
        }
    }
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;
    }
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());
    }
787991
public function process(ContainerBuilder $container)
    {
        if (!$container->has(PluginManager::class)) {
            return;
        }

        $pluginsData = [];

        // Find all Plugin services.
        $plugins = $container->findTaggedServiceIds('expansion.plugin');
        foreach ($plugins as $id => $tags) {
            $pluginsData[$id]['dataProviders'] = [];
            foreach ($tags as $attributes) {
                if (isset($attributes['data_provider'])) {
                    $pluginsData[$id]['dataProviders'][] = $attributes['data_provider'];
                }
            }
        }

        // Find the parent services.
        $plugins = $container->findTaggedServiceIds('expansion.plugin.parent');
        foreach ($plugins as $id => $tags) {
            foreach ($tags as $attributes) {
                $pluginsData[$id]['parent'][] = $attributes['parent'];
            }
        }

        // Get the data provider manager service definition to register data providers into.
        $definition = $container->getDefinition(PluginManager::class);

        foreach ($pluginsData as $pluginId => $data)
        {
            $definition->addMethodCall('registerPlugin', [
                    $pluginId,
                    empty($data['dataProviders']) ? [] : $data['dataProviders'],
                    empty($data['parent']) ? [] : $data['parent'],
                ]
            );
        }
    }
596920
public function process(ContainerBuilder $container)
    {
        foreach ($container->findTaggedServiceIds($this->baseTag) as $id => $services) {
            foreach ((array) $services as $service) {
                $this->findAndReplaceTaggedServices($id, $service, $container);
            }
        }
    }
134024
public function process(ContainerBuilder $container): void
    {
        $servicesReference = [];
        $serviceIds        = [];

        /**
         * @psalm-var array<string, array<mixed, string>> $taggedServices
         *
         * @var array $taggedServices
         */
        $taggedServices = $container->findTaggedServiceIds('service_bus.service');

        foreach ($taggedServices as $id => $tags)
        {
            /** @psalm-var class-string|null $serviceClass */
            $serviceClass = $container->getDefinition($id)->getClass();

            if (null !== $serviceClass)
            {
                $this->collectServiceDependencies($serviceClass, $container, $servicesReference);

                $serviceIds[] = $serviceClass;

                $servicesReference[\sprintf('%s_service', $serviceClass)] = new ServiceClosureArgument(
                    new Reference($id)
                );
            }
        }

        $container->setParameter('service_bus.services_map', $serviceIds);

        $container
            ->register('service_bus.services_locator', ServiceLocator::class)
            ->setPublic(true)
            ->setArguments([$servicesReference]);
    }
183960
public function process(ContainerBuilder $container)
    {
        if ($container->hasAlias('api_platform.name_converter') || !$container->hasDefinition('serializer.name_converter.metadata_aware')) {
            return;
        }

        $definition = $container->getDefinition('serializer.name_converter.metadata_aware');

        if (1 >= \count($definition->getArguments()) || null === $definition->getArgument(1)) {
            return;
        }

        $container->setAlias('api_platform.name_converter', 'serializer.name_converter.metadata_aware');
    }
539426
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new ConfigurationCompilerPass());
        $container->addCompilerPass(new VendorCompilerPass());
    }
437076
protected function registerResources(ContainerBuilder $container)
    {
        $templatingEngines = $container->getParameter('templating.engines');

        if (in_array('twig', $templatingEngines)) {
            $container->setParameter('twig.form.resources', array_merge(
                array('FenrizbesColorPickerTypeBundle:Form:fields.html.twig'),
                $container->getParameter('twig.form.resources')
            ));
        }
    }
1004935
public function process(ContainerBuilder $container)
    {
        $this->buildApple($container);
        $this->buildAndroid($container);
        $this->buildWindows($container);
    }
930392
public function build(ContainerBuilder $container)
    {
        parent::build($container);
        $container->addCompilerPass(new ApplicationConfigProviderPass());
        $container->addCompilerPass(new TranslationDomainsExtensionsPass());
        $container->addCompilerPass(new ValueObjectVisitorPass());
    }
622708
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(
            new GeneratorHashCompilerPass(),
            PassConfig::TYPE_BEFORE_OPTIMIZATION,
            50
        );
    }
374300
private function registerImageFilters(ContainerBuilder $container)
    {
        $medias = [
            'lg' => 1140,
            'md' => 940,
            'sm' => 720,
            'xs' => 480,
        ];

        $filterSets = [];

        foreach ($medias as $size => $width) {
            for ($column = 1; $column <= 12; $column++) {
                $number = 12 / $column;

                $filterSets[sprintf('col_%s_%d', $size, $column)] = [
                    'cache'           => 'local_media',
                    'data_loader'     => 'local_media',
                    'filters'         => [
                        'relative_resize' => ['widen' => round(($width - ($number - 1) * 30) / $number)],
                    ],
                    'post_processors' => [
                        'jpegoptim' => ['strip_all' => true, 'max' => "%image.jpeg_quality%", 'progressive' => true],
                        'pngquant'  => ['quality' => "%image.png_quality%"],
                    ],
                ];
            }
        }

        $container->prependExtensionConfig('liip_imagine', [
            'filter_sets' => $filterSets,
        ]);
    }
505518
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        if ($container->hasDefinition('jms_translation.config_factory')) {
            $container->addCompilerPass(new TraductionCompilerPass());
        }
        $container->addCompilerPass(new AccessMapCompilerPass());
        $container->addCompilerPass(new OverrideServiceCompilerPass());
    }
202418
public function process(ContainerBuilder $container)
    {
        if (!$container->has('ezpublish.view_builder.registry')) {
            return;
        }

        $viewBuilderRegistry = $container->findDefinition('ezpublish.view_builder.registry');
        $tagViewBuilder = $container->findDefinition('eztags.view.tag_view_builder');

        $viewBuilderRegistry->addMethodCall(
            'addToRegistry',
            [[$tagViewBuilder]]
        );
    }
1118211
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition('behat.alice.subscriber_factory.registry')) {
            return;
        }

        $factoryIds = array();

        foreach ($container->findTaggedServiceIds('behat.alice.subscriber.factory') as $id => $attributes) {
            $factoryIds[$attributes[0]['alias']] = $id;
        }

        $container->findDefinition('behat.alice.subscriber_factory.registry')->replaceArgument(1, $factoryIds);
    }