diff --git a/core/lib/Drupal/Core/Config/ConfigImporter.php b/core/lib/Drupal/Core/Config/ConfigImporter.php index a13a414..007282e 100644 --- a/core/lib/Drupal/Core/Config/ConfigImporter.php +++ b/core/lib/Drupal/Core/Config/ConfigImporter.php @@ -8,6 +8,7 @@ namespace Drupal\Core\Config; use Drupal\Core\Extension\ModuleHandlerInterface; +use Drupal\Core\Extension\ModuleInstallerInterface; use Drupal\Core\Extension\ThemeHandlerInterface; use Drupal\Component\Utility\String; use Drupal\Core\Config\Entity\ImportableEntityStorageInterface; @@ -156,6 +157,13 @@ class ConfigImporter { protected $totalConfigurationToProcess = 0; /** + * The module installer. + * + * @var \Drupal\Core\Extension\ModuleInstallerInterface + */ + protected $moduleInstaller; + + /** * Constructs a configuration import object. * * @param \Drupal\Core\Config\StorageComparerInterface $storage_comparer @@ -171,18 +179,21 @@ class ConfigImporter { * The typed configuration manager. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler + * @param \Drupal\Core\Extension\ModuleInstallerInterface $module_installer + * The module installer. * @param \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler * The theme handler * @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation * The string translation service. */ - public function __construct(StorageComparerInterface $storage_comparer, EventDispatcherInterface $event_dispatcher, ConfigManagerInterface $config_manager, LockBackendInterface $lock, TypedConfigManagerInterface $typed_config, ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler, TranslationInterface $string_translation) { + public function __construct(StorageComparerInterface $storage_comparer, EventDispatcherInterface $event_dispatcher, ConfigManagerInterface $config_manager, LockBackendInterface $lock, TypedConfigManagerInterface $typed_config, ModuleHandlerInterface $module_handler, ModuleInstallerInterface $module_installer, ThemeHandlerInterface $theme_handler, TranslationInterface $string_translation) { $this->storageComparer = $storage_comparer; $this->eventDispatcher = $event_dispatcher; $this->configManager = $config_manager; $this->lock = $lock; $this->typedConfigManager = $typed_config; $this->moduleHandler = $module_handler; + $this->moduleInstaller = $module_installer; $this->themeHandler = $theme_handler; $this->stringTranslation = $string_translation; foreach ($this->storageComparer->getAllCollectionNames() as $collection) { @@ -750,7 +761,7 @@ protected function processExtension($type, $op, $name) { ->setSyncing(TRUE) ->setSourceStorage($this->storageComparer->getSourceStorage()); if ($type == 'module') { - $this->moduleHandler->$op(array($name), FALSE); + $this->moduleInstaller->$op(array($name), FALSE); // Installing a module can cause a kernel boot therefore reinject all the // services. $this->reInjectMe();