Update to Drupal 8.0.6. For more information, see https://www.drupal.org/drupal-8.0.6-release-notes

This commit is contained in:
Pantheon Automation 2016-04-07 11:19:57 -07:00 committed by Greg Anderson
parent 4297c64508
commit b11a755ba8
159 changed files with 2340 additions and 543 deletions

View file

@ -190,24 +190,35 @@ class ConfigInstaller implements ConfigInstallerInterface {
});
$all_config = array_merge($existing_config, $list);
$all_config = array_combine($all_config, $all_config);
$config_to_create = $storage->readMultiple($list);
// Check to see if the corresponding override storage has any overrides or
// new configuration that can be installed.
if ($profile_storage) {
$config_to_create = $profile_storage->readMultiple($list) + $config_to_create;
}
// Sort $config_to_create in the order of the least dependent first.
$dependency_manager = new ConfigDependencyManager();
$dependency_manager->setData($config_to_create);
$config_to_create = array_merge(array_flip($dependency_manager->sortAll()), $config_to_create);
foreach ($config_to_create as $config_name => $data) {
// Exclude configuration where its dependencies cannot be met.
if (!$this->validateDependencies($config_name, $data, $enabled_extensions, $all_config)) {
unset($config_to_create[$config_name]);
}
// Exclude configuration that does not have a matching dependency.
elseif (!empty($dependency)) {
// Remove configuration where its dependencies cannot be met.
$remove = !$this->validateDependencies($config_name, $data, $enabled_extensions, $all_config);
// If $dependency is defined, remove configuration that does not have a
// matching dependency.
if (!$remove && !empty($dependency)) {
// Create a light weight dependency object to check dependencies.
$config_entity = new ConfigEntityDependency($config_name, $data);
if (!$config_entity->hasDependency(key($dependency), reset($dependency))) {
unset($config_to_create[$config_name]);
}
$remove = !$config_entity->hasDependency(key($dependency), reset($dependency));
}
if ($remove) {
// Remove from the list of configuration to create.
unset($config_to_create[$config_name]);
// Remove from the list of all configuration. This ensures that any
// configuration that depends on this configuration is also removed.
unset($all_config[$config_name]);
}
}
if (!empty($config_to_create)) {