By ilya.no on
Change record status:
Draft (View all draft change records)
Project:
Introduced in branch:
11.x
Introduced in version:
11.0.0-beta1
Issue links:
Description:
The third parameter is added for the method Drupal\Core\Config\ConfigInstaller::installOptionalConfig(). It's named $collection and has default value Drupal\Core\Config\StorageInterface::DEFAULT_COLLECTION. It replaces direct using of Drupal\Core\Config\StorageInterface::DEFAULT_COLLECTION inside function, so it can be overriden.
Before
$storage = \Drupal::service('config.installer')->getSourceStorage();
\Drupal::service('config.installer')->installOptionalConfig($storage, '');
After
$storage = \Drupal::service('config.installer')->getSourceStorage();
$collection_info = \Drupal::service('config.manager')->getConfigCollectionInfo();
foreach ($collection_info->getCollectionNames() as $collection) {
\Drupal::service('config.installer')->installOptionalConfig($storage, '', $collection);
}
Impacts:
Module developers