load version compiler pass

@param ContainerBuilder $container container builder

@return void
340604
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new VersionCompilerPass(new PrettyVersions()));
        $container->addCompilerPass(new EnvParametersCompilerPass());
        $container->addCompilerPass(new RouteLoaderCompilerPass());
        $container->addCompilerPass(new HttpClientOptionsCompilerPass());
    }
511257
public function process(ContainerBuilder $container): void
    {
        if (true === self::enabled($container))
        {
            $excludedFiles = canonicalizeFilesPath(self::getExcludedFiles($container));

            $files = searchFiles(self::getDirectories($container), '/\.php/i');

            $this->registerClasses($container, $files, $excludedFiles);
        }
    }
857663
public function build(ContainerBuilder $container)
    {
        $this->initAdmingeneratorClassLoader($container);

        parent::build($container);

        $container->addCompilerPass(new ValidatorCompilerPass());
        $container->addCompilerPass(new FormCompilerPass());
    }
137817
public function load(ContainerBuilder $container): void
    {
        $tasks = (array) $container->getParameter('tasks');
        $tasks = \array_replace_recursive(self::DEFAULTS, $tasks);

        \ksort($tasks); // Run tasks in alphabetical order.

        $container->setParameter('tasks', $tasks);
        $container->setParameter('ascii', [
            'failed' => null,
            'succeeded' => null,
        ]);
    }
431093
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition(static::TASK_REGISTRY)) {
            return;
        }

        $registry = $container->getDefinition(static::TASK_REGISTRY);

        foreach ($container->findTaggedServiceIds(static::TASK_TAG) as $id => $tag) {
            $registry->addMethodCall("addTask", [new Reference($id)]);
        }
    }
73819
public function load(ContainerBuilder $container, array $config)
    {
        $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/config'));
        $loader->load('services.yml');

        // Backwards compatibility for pre-1.0. Will be removed in 2.0.
        if ($config['default_driver'] === 'wpapi') {
            $config['default_driver'] = 'wpphp';
        }

        $container->setParameter('wordpress.wordpress.default_driver', $config['default_driver']);
        $container->setParameter('wordpress.path', $config['path']);
        $container->setParameter('wordpress.parameters', $config);

        $this->setupWpcliDriver($loader, $container, $config);
        $this->setupWpphpDriver($loader, $container, $config);
        $this->setupBlackboxDriver($loader, $container, $config);
    }
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);
    }
233077
private function loadContextInitializer(ContainerBuilder $container)
    {
        $definition = new Definition(
            'Behat\GuzzleExtension\Context\Initializer\GuzzleAwareInitializer',
            array(
                new Reference(self::GUZZLE_CLIENT_ID),
                '%guzzle.parameters%',
            )
        );
        $definition->addTag(
            ContextExtension::INITIALIZER_TAG,
            array('priority' => 0)
        );

        $container->setDefinition('guzzle.context_initializer', $definition);
    }
22738
private function loadBundleServiceDefinitions(ContainerBuilder $container)
    {
        $fileLocator = new FileLocator(self::SERVICES_CONFIG_DIRECTORY_RELATIVE_PATH);

        $loader = new XmlFileLoader($container, $fileLocator);

        $loader->load('services.xml');
    }
539426
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new ConfigurationCompilerPass());
        $container->addCompilerPass(new VendorCompilerPass());
    }
955849
public function build(ContainerBuilder $container)
    {
        parent::build($container);

        /** @var SecurityExtension $extension */
        $extension = $container->getExtension('security');
        $extension->addSecurityListenerFactory(new JoomlaFactory());

        $container->addCompilerPass(new DoctrineCompilerPass());
        $container->addCompilerPass(new OverrideCompilerPass());
        $container->addCompilerPass(new RoutingCompilerPass());
        $container->addCompilerPass(new ModuleCompilerPass());
        $container->addCompilerPass(new AdminMenuCompilerPass());
    }
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');
    }
772340
private function loadDefinitionTranslator(ContainerBuilder $container)
    {
        $definition = new Definition('Behat\Behat\Definition\Translator\DefinitionTranslator', array(
            new Reference(TranslatorExtension::TRANSLATOR_ID)
        ));
        $container->setDefinition(self::DEFINITION_TRANSLATOR_ID, $definition);
    }
695216
public function process(ContainerBuilder $container)
    {
        $this->container = $container;
        $this->processorDefinitionsRegistry = $this->container->getDefinition('smartesb.registry.processor_definitions');

        $processorDefinitionsServices = $container->findTaggedServiceIds(self::TAG_DEFINITIONS);
        foreach ($processorDefinitionsServices as $id => $tags) {
            foreach ($tags as $attributes) {
                $this->processorDefinitionsRegistry->addMethodCall('register', [$attributes['nodeName'], new Reference($id)]);
            }
        }

        /** @var SmartboxIntegrationCamelConfigExtension $extension */
        $extension = $container->getExtension('smartbox_integration_camel_config');

        /** @var SmartboxIntegrationFrameworkExtension $frameworkExtension */
        $frameworkExtension = $container->getExtension('smartbox_integration_framework');

        $flowsDirs = $extension->getFlowsDirectories();
        $currentVersion = $frameworkExtension->getFlowsVersion();
        $frozenFlowsDir = $extension->getFrozenFlowsDirectory();

        // Load current version if not frozen
        if (!file_exists($frozenFlowsDir.'/'.$currentVersion)) {
            $this->loadFlowsFromPaths($currentVersion, $flowsDirs);
        }

        // Load frozen versions
        $finder = new Finder();
        $frozenDirs = $finder->directories()->in($frozenFlowsDir)->depth(0);

        /** @var SplFileInfo $frozenDir */
        foreach ($frozenDirs as $frozenDir) {
            $subFinder = new Finder();
            $version = $frozenDir->getRelativePathname();
            $subDirs = $subFinder->directories()->in($frozenDir->getRealPath())->depth(0);

            $paths = [];
            /** @var SplFileInfo $subDir */
            foreach ($subDirs as $subDir) {
                $paths[] = $subDir->getRealPath();
            }

            $this->loadFlowsFromPaths($version, $paths);
        }
    }
865081
public function process(ContainerBuilder $container)
    {
        $rootDir = $container->getParameter('kernel.root_dir');

        if (strpos($rootDir, 'vendor') !== false) {
            $configurationFile = $rootDir.'/../../../../app';
        } else {
            $configurationFile = $rootDir;
        }

        $configurationFile .= '/config/version_service.yml';

        if (!file_exists($configurationFile)) {
            throw new \LogicException(
                'Could not read version configuration file "'.$configurationFile.'"'
            );
        }

        $config = Yaml::parseFile($configurationFile);
        $versionInformation = [
            'self' => 'unknown'
        ];

        if (isset($config['selfName'])) {
            $versionInformation['self'] = $this->getPackageVersion($config['selfName']);
        }

        if (isset($config['desiredVersions']) && is_array($config['desiredVersions'])) {
            foreach ($config['desiredVersions'] as $name) {
                $versionInformation[$name] = $this->getPackageVersion($name);
            }
        }

        // for version header
        $versionHeader = '';
        foreach ($versionInformation as $name => $version) {
            $versionHeader .= $name . ': ' . $version . '; ';
        }

        $container->setParameter(
            'graviton.core.version.data',
            $versionInformation
        );
        $container->setParameter(
            'graviton.core.version.header',
            trim($versionHeader)
        );
    }
134560
public function process(ContainerBuilder $container)
    {
        $overrideTemplates = $container->getParameter(
            EzPlatformStandardDesignExtension::OVERRIDE_KERNEL_TEMPLATES_PARAM_NAME
        );
        if ($overrideTemplates) {
            $loader = new YamlFileLoader(
                $container,
                new FileLocator(__DIR__ . '/../../Resources/config')
            );
            $loader->load('override/ezpublish.yaml');
        }

        $this->setStandardThemeDirectories($container);
    }
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));
    }