class UpdateBundle

Bundle class for update.php service overrides.

This bundle is manually added by update.php via $conf['container_bundles'] and required to prevent various services from trying to retrieve data from storages that do not exist yet.

Hierarchy

Expanded class hierarchy of UpdateBundle

File

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

Namespace

Drupal\Core\DependencyInjection
View source
class UpdateBundle extends Bundle {

  /**
   * Implements \Symfony\Component\HttpKernel\Bundle\BundleInterface::build().
   */
  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');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Bundle::$extension protected property
Bundle::$name protected property
Bundle::$reflected protected property
Bundle::boot public function Boots the Bundle. Overrides BundleInterface::boot
Bundle::getContainerExtension public function Returns the bundle's container extension. Overrides BundleInterface::getContainerExtension
Bundle::getName final public function Returns the bundle name (the class short name). Overrides BundleInterface::getName
Bundle::getNamespace public function Gets the Bundle namespace. Overrides BundleInterface::getNamespace
Bundle::getParent public function Returns the bundle parent name. Overrides BundleInterface::getParent
Bundle::getPath public function Gets the Bundle directory path. Overrides BundleInterface::getPath
Bundle::registerCommands public function Finds and registers Commands.
Bundle::shutdown public function Shutdowns the Bundle. Overrides BundleInterface::shutdown
ContainerAware::$container protected property @api
ContainerAware::setContainer public function Sets the Container associated with this Controller. Overrides ContainerAwareInterface::setContainer
UpdateBundle::build public function Implements \Symfony\Component\HttpKernel\Bundle\BundleInterface::build(). Overrides Bundle::build