diff --git a/core/lib/Drupal/Core/Config/StorageComparer.php b/core/lib/Drupal/Core/Config/StorageComparer.php index fc1df98..96b56d3 100644 --- a/core/lib/Drupal/Core/Config/StorageComparer.php +++ b/core/lib/Drupal/Core/Config/StorageComparer.php @@ -105,7 +105,8 @@ class StorageComparer implements StorageComparerInterface { * The configuration manager. */ public function __construct(StorageInterface $source_storage, StorageInterface $target_storage, ConfigManagerInterface $config_manager) { - // Wrapper the sourceStorage in a storage that statically caches reads. + // Wrap the storages in a static cache so that multiple reads of the same + // raw configuration object are not costly. $this->sourceCacheStorage = new MemoryBackend(__CLASS__ . '::source'); $this->sourceStorage = new CachedStorage( $source_storage, @@ -264,7 +265,7 @@ protected function addChangelistUpdate($collection) { $source_data = $this->getSourceStorage($collection)->read($name); $target_data = $this->getTargetStorage($collection)->read($name); if ($source_data !== $target_data) { - if (isset($source_data['uuid']) && $source_data['uuid'] != $target_data['uuid']) { + if (isset($source_data['uuid']) && $source_data['uuid'] !== $target_data['uuid']) { // The entity has the same file as an existing entity but the UUIDs do // not match. This means that the entity has been recreated so config // synchronization should do the same. @@ -408,7 +409,8 @@ protected function getAndSortConfigData($collection) { $target_storage = $this->getTargetStorage($collection); $target_names = $target_storage->listAll(); $source_names = $source_storage->listAll(); - // Prime the static caches. + // Prime the static caches by reading all the configuration in the source + // and target storages. $target_data = $target_storage->readMultiple($target_names); $source_data = $source_storage->readMultiple($source_names); // If the collection only supports simple configuration do not use