diff -u b/core/lib/Drupal/Core/Extension/ModuleInstaller.php b/core/lib/Drupal/Core/Extension/ModuleInstaller.php --- b/core/lib/Drupal/Core/Extension/ModuleInstaller.php +++ b/core/lib/Drupal/Core/Extension/ModuleInstaller.php @@ -18,11 +18,10 @@ use Drupal\Core\DependencyInjection\UpdateDependenciesTrait; use Drupal\Core\DrupalKernelInterface; use Drupal\Component\Utility\SafeMarkup; -use Drupal\Component\Utility\String; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\KeyValueStore\KeyValueFactoryInterface; use Drupal\Core\Plugin\CachedDiscoveryClearer; -use Drupal\Core\Routing\RouteBuilderIndicatorInterface; +use Drupal\Core\Routing\RouteBuilderInterface; use Drupal\Core\StreamWrapper\StreamWrapperManager; use Psr\Log\LoggerInterface; @@ -86,11 +85,11 @@ protected $pluginCacheClearer; /** - * The route rebuild indicator. + * The route builder. * - * @var \Drupal\Core\Routing\RouteBuilderIndicatorInterface + * @var \Drupal\Core\Routing\RouteBuilderInterface */ - protected $routeRebuildIndicator; + protected $routeBuilder; /** * The entity manager. @@ -149,8 +148,8 @@ * The config installer. * @param \Drupal\Core\Plugin\CachedDiscoveryClearer $plugin_cache_clearer * The plugin cache clearer. - * @param \Drupal\Core\Routing\RouteBuilderIndicatorInterface $route_rebuild_indicator - * The route rebuild indicator. + * @param \Drupal\Core\Routing\RouteBuilderInterface $route_builder + * The route builder. * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. * @param \Drupal\Core\StreamWrapper\StreamWrapperManager $stream_wrapper_manager @@ -167,14 +166,14 @@ * @see \Drupal\Core\DrupalKernel * @see \Drupal\Core\CoreServiceProvider */ - public function __construct($root, ModuleHandlerInterface $module_handler, DrupalKernelInterface $kernel, ConfigFactoryInterface $config_factory, ConfigInstallerInterface $config_installer, CachedDiscoveryClearer $plugin_cache_clearer, RouteBuilderIndicatorInterface $route_rebuild_indicator, EntityManagerInterface $entity_manager, StreamWrapperManager $stream_wrapper_manager, ThemeHandlerInterface $theme_handler, LoggerInterface $logger, ConfigManagerInterface $config_manager, KeyValueFactoryInterface $key_value_factory) { + public function __construct($root, ModuleHandlerInterface $module_handler, DrupalKernelInterface $kernel, ConfigFactoryInterface $config_factory, ConfigInstallerInterface $config_installer, CachedDiscoveryClearer $plugin_cache_clearer, RouteBuilderInterface $route_builder, EntityManagerInterface $entity_manager, StreamWrapperManager $stream_wrapper_manager, ThemeHandlerInterface $theme_handler, LoggerInterface $logger, ConfigManagerInterface $config_manager, KeyValueFactoryInterface $key_value_factory) { $this->root = $root; $this->moduleHandler = $module_handler; $this->kernel = $kernel; $this->configFactory = $config_factory; $this->configInstaller = $config_installer; $this->pluginCacheClearer = $plugin_cache_clearer; - $this->routeRebuildIndicator = $route_rebuild_indicator; + $this->routeBuilder = $route_builder; $this->entityManager = $entity_manager; $this->streamWrapperManager = $stream_wrapper_manager; $this->themeHandler = $theme_handler; @@ -339,7 +338,7 @@ // Clear plugin manager caches and flag router to rebuild if requested. $this->pluginCacheClearer->clearCachedDefinitions(); - $this->routeRebuildIndicator->setRebuildNeeded(); + $this->routeBuilder->setRebuildNeeded(); // Set the schema version to the number of the last update provided by // the module, or the minimum core schema version. @@ -408,7 +407,7 @@ // If any modules were newly installed, invoke hook_modules_installed(). if (!empty($modules_installed)) { - \Drupal::service('router.builder')->setRebuildNeeded(); + $this->routeBuilder->setRebuildNeeded(); $this->moduleHandler->invokeAll('modules_installed', array($modules_installed)); } @@ -533,7 +532,7 @@ // Clear plugin manager caches and flag router to rebuild if requested. $this->pluginCacheClearer->clearCachedDefinitions(); - $this->routeRebuildIndicator->setRebuildNeeded(); + $this->routeBuilder->setRebuildNeeded(); // Update the kernel to exclude the uninstalled modules. $this->updateKernel($module_filenames); @@ -548,7 +547,7 @@ $this->keyValueFactory->get('system.schema')->delete($module); } - \Drupal::service('router.builder')->setRebuildNeeded(); + $this->routeBuilder->setRebuildNeeded(); drupal_get_installed_schema_version(NULL, TRUE); // Let other modules react.