By joachim on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.3.x
Introduced in version:
11.3.0
Issue links:
Description:
A new service, Drupal\Core\Config\ConfigImporterFactory::class has been added which allows creation of a ConfigImporter object.
This should be used rather than instantiating the ConfigImporter class directly.
Before:
$config_importer = new ConfigImporter(
$storage_comparer,
\Drupal::service('event_dispatcher'),
\Drupal::service('config.manager'),
\Drupal::service('lock.persistent'),
\Drupal::service('config.typed'),
\Drupal::service('module_handler'),
\Drupal::service('module_installer'),
\Drupal::service('theme_handler'),
\Drupal::service('string_translation'),
\Drupal::service('extension.list.module'),
\Drupal::service('extension.list.theme')
);
After:
$config_importer = \Drupal::service(Drupal\Core\Config\ConfigImporterFactory::class)->get($storage_comparer);
Impacts:
Module developers