public function UpdateBundle::build

Implements \Symfony\Component\HttpKernel\Bundle\BundleInterface::build().

Overrides Bundle::build

File

drupal/core/lib/Drupal/Core/DependencyInjection/UpdateBundle.php, line 25
Contains \Drupal\Core\DependencyInjection\UpdateBundle.

Class

UpdateBundle
Bundle class for update.php service overrides.

Namespace

Drupal\Core\DependencyInjection

Code

public function build(SymfonyContainerBuilder $container) {

  // Disable the Lock service.
  $container
    ->register('lock', 'Drupal\\Core\\Lock\\NullLockBackend');

  // Prevent config from accessing {cache_config}.
  // @see $conf['cache_classes'], update_prepare_d8_bootstrap()
  $container
    ->register('config.storage', 'Drupal\\Core\\Config\\FileStorage')
    ->addArgument(config_get_config_directory(CONFIG_ACTIVE_DIRECTORY));
  $container
    ->register('module_handler', 'Drupal\\Core\\Extension\\UpdateModuleHandler')
    ->addArgument('%container.modules%');
  $container
    ->register("cache_factory", 'Drupal\\Core\\Cache\\MemoryBackendFactory');
  $container
    ->register('router.builder', 'Drupal\\Core\\Routing\\RouteBuilderStatic');
}