diff --git a/core/lib/Drupal/Core/Config/ConfigImporter.php b/core/lib/Drupal/Core/Config/ConfigImporter.php index 3ef7539..f27f91b 100644 --- a/core/lib/Drupal/Core/Config/ConfigImporter.php +++ b/core/lib/Drupal/Core/Config/ConfigImporter.php @@ -1007,13 +1007,13 @@ public function alreadyImporting() { * keep the services used by the importer in sync. */ protected function reInjectMe() { - $this->eventDispatcher = \Drupal::service('event_dispatcher'); - $this->configManager = \Drupal::service('config.manager'); - $this->lock = \Drupal::service('lock.persistent'); - $this->typedConfigManager = \Drupal::service('config.typed'); - $this->moduleHandler = \Drupal::moduleHandler(); - $this->themeHandler = \Drupal::service('theme_handler'); - $this->stringTranslation = \Drupal::service('string_translation'); + $this->_serviceIds = array(); + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value) && isset($value->_serviceId)) { + $this->$key = \Drupal::service($value->_serviceId); + } + } } }