Configure sensitive defaults for other bundles

@param ContainerBuilder $container
760139
public function prepend(ContainerBuilder $container)
    {
        $configs = array(
            'bazinga_geocoder' => array(
                'providers' => array('google_maps' => null)
            ),
//            'ivory_google_map' => array(
//                'map' => array('width' => "100%", 'height' => "600px"),
//                'info_window' => array('auto_close' => true)
//            ),
            'doctrine' => array(
                'orm' => array(
                    'dql' => array(
                        'numeric_functions' => array(
                            'GEO_DISTANCE' => 'Craue\GeoBundle\Doctrine\Query\Mysql\GeoDistance'
                        )
                    )
                )
            )
        );

        foreach ($configs as $name => $config) {
            $container->prependExtensionConfig($name, $config);
        }
    }
68086
public function compile(ContainerBuilder $container)
    {
        try {
            foreach ($this->passConfig->getPasses() as $pass) {
                $pass->process($container);
            }
        } catch (\Exception $e) {
            $usedEnvs = [];
            $prev = $e;

            do {
                $msg = $prev->getMessage();

                if ($msg !== $resolvedMsg = $container->resolveEnvPlaceholders($msg, null, $usedEnvs)) {
                    $r = new \ReflectionProperty($prev, 'message');
                    $r->setAccessible(true);
                    $r->setValue($prev, $resolvedMsg);
                }
            } while ($prev = $prev->getPrevious());

            if ($usedEnvs) {
                $e = new EnvParameterException($usedEnvs, $e);
            }

            throw $e;
        } finally {
            $this->getServiceReferenceGraph()->clear();
        }
    }
1327243
protected function setDependencies(Container $container)
    {
        parent::setDependencies($container);

        $this->setWidgetFactory($container['widget/factory']);

        if (isset($container['attachments/config'])) {
            $this->setConfig($container['attachments/config']);
        } elseif (isset($container['config']['attachments'])) {
            $this->setConfig($container['config']['attachments']);
        }
    }
362167
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        /*
         * Adds compiler passes.
         */
        foreach ($this->getCompilerPasses() as $compilerPass) {
            $container->addCompilerPass($compilerPass);
        }
    }
370268
protected function registerBundleDependencies(ContainerBuilder $container)
    {
        if (true === $this->booted) {
            return;
        }

        $this->bundles = $container->getParameter('kernel.bundles');

        if ($this->createBundles($this->getBundleDependencies())) {
            $container->setParameter('kernel.bundles', $this->bundles);

            $this->initializeBundles($container);

            $pass = new Compiler\ExtensionLoadPass($this->instances);

            $container->addCompilerPass($pass);
        }

        $this->booted = true;
    }
1281123
protected function fixSettings(ContainerBuilder $container)
    {
        $pool = $container->getDefinition('sonata.admin.manager.doctrine_phpcr');

        // @todo not very clean but don't know how to do that for now
        $settings = false;
        $methods = $pool->getMethodCalls();
        foreach ($methods as $pos => $calls) {
            if ('__hack_doctrine_phpcr__' == $calls[0]) {
                $settings = $calls[1];

                break;
            }
        }

        if ($settings) {
            unset($methods[$pos]);
        }

        $pool->setMethodCalls($methods);

        return $settings;
    }
859596
public function process(ContainerBuilder $container)
    {
        $baseOptions = [
            'verify' => false
        ];

        // system settings envs
        if (isset($_ENV['HTTP_PROXY']) && !empty($_ENV['HTTP_PROXY'])) {
            $this->setProxy($_ENV['HTTP_PROXY'], 'http');
        }
        if (isset($_ENV['HTTPS_PROXY']) && !empty($_ENV['HTTPS_PROXY'])) {
            $this->setProxy($_ENV['HTTPS_PROXY'], 'https');
        }
        if (isset($_ENV['NO_PROXY']) && !empty($_ENV['NO_PROXY'])) {
            $this->setNoProxyList($_ENV['NO_PROXY']);
        }

        // is there the old setting?
        if (isset($_ENV['GRAVITON_PROXY_CURLOPTS'])) {
            $yamlSettings = Yaml::parse($_ENV['GRAVITON_PROXY_CURLOPTS']);
            if (is_array($yamlSettings) && isset($yamlSettings['proxy'])) {
                $this->setProxy($yamlSettings['proxy']);
            }
            if (is_array($yamlSettings) && isset($yamlSettings['noproxy'])) {
                $this->setNoProxyList($yamlSettings['noproxy']);
            }
        }

        // new settings -> override all
        if (null !== $container->getParameter('graviton.proxy')) {
            $this->setProxy($container->getParameter('graviton.proxy'));
        }
        if (null !== $container->getParameter('graviton.noproxy')) {
            $this->setNoProxyList($container->getParameter('graviton.noproxy'));
        }

        // any proxy?
        if (!empty($this->proxySettings)) {
            $baseOptions['proxy'] = $this->proxySettings;
        }

        $container->setParameter(
            'graviton.core.http.client.options',
            $baseOptions
        );
    }
564014
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new MetaTagHandlersCompilerPass());
        $container->addCompilerPass(new TwigRuntimePass());
    }
40342
private function configureWebpackAssets(ContainerBuilder $container, array $config): void
    {
        $assetsFile = $config['file'];
        $cacheId = $config['cache']['service_id'];
        $cacheKey = $config['cache']['key'];
        $cacheEnabled = $config['cache']['enabled'];
        $cacheEnabled = null !== $cacheEnabled
            ? $cacheEnabled
            : !$container->getParameter('kernel.debug');

        $container->setParameter('fxp_require_asset.webpack.adapter.assets.file', $assetsFile);
        $container->setParameter('fxp_require_asset.webpack.adapter.assets.cache_key', $cacheKey);

        if ($cacheEnabled) {
            $container->setAlias('fxp_require_asset.webpack.adapter.assets.cache', $cacheId);
        }
    }
1301456
public function configureSettings($config, ContainerBuilder $container)
    {
        $container->setParameter('rz_search.slugify_service',                                   $config['slugify_service']);
        $container->setParameter('rz_search.settings.search.pagination.per_page',               $config['search']['pagination']['per_page']);
        $container->setParameter('rz_search.settings.search.variables.search_query',            $config['search']['variables']['search_query']);
        $container->setParameter('rz_search.settings.search.variables.templates',               $config['search']['templates']);
        $container->setParameter('rz_search.settings.search.variables.default_identifier',      $config['search']['variables']['default_identifier']);

        $container->setParameter('rz_search.settings.search.controller.search',                 $config['search']['controller']['search']);
        $container->setParameter('rz_search.settings.search.controller.ajax',                   $config['search']['controller']['ajax']);
    }
724701
public function process(ContainerBuilder $container)
    {
        $repositoryConfigurations = $container->getParameter('apisearch.repository_configuration');
        foreach ($repositoryConfigurations as $name => $repositoryConfiguration) {
            $this->createAppRepositories(
                $container,
                $name,
                $repositoryConfiguration
            );

            foreach ($repositoryConfiguration['indices'] as $indexName => $indexId) {
                $indexId = (string) $indexId;
                $this->createIndexRepositories(
                    $container,
                    $name,
                    $repositoryConfiguration,
                    $indexId,
                    $indexName
                );
            }
        }
    }
837678
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new ValidatorPass());
        $container->addCompilerPass(new FormPass());
        $container->addCompilerPass(new TwigLoaderPass());
    }
341026
protected function prependTwigBundle(ContainerBuilder $container)
    {
        $config = $this->getConfig($container);
        if (isset($config['auto_configure']) && isset($config['auto_configure']['twig']) && ($config['auto_configure']['twig'])) {
            foreach (array_keys($container->getExtensions()) as $name) {
                switch ($name) {
                    case 'twig':
                        $container->prependExtensionConfig(
                            $name,
                            array(
                                'form' => array('resources' => array('AkumaBootswatchBundle:Form:fields.html.twig')),
//                                'form_themes' => array('AkumaBootswatchBundle:Form:fields.html.twig')
                            )
                        );
                        break;
                }
            }
        }
    }
930392
public function build(ContainerBuilder $container)
    {
        parent::build($container);
        $container->addCompilerPass(new ApplicationConfigProviderPass());
        $container->addCompilerPass(new TranslationDomainsExtensionsPass());
        $container->addCompilerPass(new ValueObjectVisitorPass());
    }
952248
public function inject(ContainerBuilder $container)
    {
        foreach ($this->schema as $parameter) {

            $value = $parameter['default'];

            if ($this->parametersStorage->has($parameter['key'])) {
                $value = $this->parametersStorage->get($parameter['key']);
            }

            $container->setParameter($this->getParametersName($parameter['key']), $this->protectParameterValue($value));
        }
    }
890778
private function handleDefaultSettingsLoading(ContainerBuilder $container, FileLoader $loader)
    {
        $loader->load('default_settings.yml');

        if (!$this->isRichTextBundleEnabled($container)) {
            $loader->load('ezrichtext_default_settings.yml');
        }

        foreach ($this->defaultSettingsCollection as $fileLocation => $files) {
            $externalLoader = new Loader\YamlFileLoader($container, new FileLocator($fileLocation));
            foreach ($files as $file) {
                $externalLoader->load($file);
            }
        }
    }
147525
public function process(ContainerBuilder $container)
    {
        $repository = $container->getDefinition(HandlerRepository::class);
        $finder = new BundleNameFinder($container->getParameter('kernel.bundles'));

        $locatableServices = [];

        foreach ($container->findTaggedServiceIds(self::HANDLER_TAG) as $id => $attributes) {
            $repository->addMethodCall('addBundleName', [
                $id,
                $finder->find($container->getDefinition($id)->getClass()),
            ]);

            $locatableServices[$id] = new Reference($id);
        }

        $repository->replaceArgument(0, ServiceLocatorTagPass::register($container, $locatableServices));
    }