diff --git a/core/core.api.php b/core/core.api.php index 3501723..1d50206 100644 --- a/core/core.api.php +++ b/core/core.api.php @@ -110,7 +110,7 @@ * and HAL. * - Node entity support is configured by default. If you would like to support * other types of entities, you can copy - * core/modules/rest/config/install/rest.settings.yml to your staging + * core/modules/rest/config/install/rest.settings.yml to your sync * configuration directory, appropriately modified for other entity types, * and import it. Support for GET on the log from the Database Logging module * can also be enabled in this way; in this case, the 'entity:node' line diff --git a/core/core.services.yml b/core/core.services.yml index 77173cd..f505932 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -247,9 +247,9 @@ services: class: Drupal\Core\Config\FileStorage factory: Drupal\Core\Config\FileStorageFactory::getActive public: false - config.storage.staging: + config.storage.sync: class: Drupal\Core\Config\FileStorage - factory: Drupal\Core\Config\FileStorageFactory::getStaging + factory: Drupal\Core\Config\FileStorageFactory::getSync config.storage.snapshot: class: Drupal\Core\Config\DatabaseStorage arguments: ['@database', config_snapshot] diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index d11e608..03ddfc8 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -104,11 +104,11 @@ const CONFIG_ACTIVE_DIRECTORY = 'active'; /** - * $config_directories key for staging directory. + * $config_directories key for sync directory. * * @see config_get_config_directory() */ -const CONFIG_STAGING_DIRECTORY = 'staging'; +const CONFIG_SYNC_DIRECTORY = 'sync'; /** * Defines the root directory of the Drupal installation. @@ -163,7 +163,7 @@ function conf_path($require_settings = TRUE, $reset = FALSE, Request $request = * * @param string $type * (optional) The type of config directory to return. Drupal core provides - * 'active' and 'staging'. Defaults to CONFIG_ACTIVE_DIRECTORY. + * 'active' and 'sync'. Defaults to CONFIG_ACTIVE_DIRECTORY. * * @return string * The configuration directory path. diff --git a/core/includes/file.inc b/core/includes/file.inc index 4440d41..02b01c8 100644 --- a/core/includes/file.inc +++ b/core/includes/file.inc @@ -428,7 +428,7 @@ function file_ensure_htaccess() { } file_save_htaccess('temporary://', TRUE); file_save_htaccess(config_get_config_directory(), TRUE); - file_save_htaccess(config_get_config_directory(CONFIG_STAGING_DIRECTORY), TRUE); + file_save_htaccess(config_get_config_directory(CONFIG_SYNC_DIRECTORY), TRUE); } /** diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 402d41e..8db0ed9 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -366,7 +366,7 @@ function install_begin_request($class_loader, &$install_state) { \Drupal::setContainer($container); // Determine whether base system services are ready to operate. - $install_state['config_verified'] = install_ensure_config_directory(CONFIG_ACTIVE_DIRECTORY) && install_ensure_config_directory(CONFIG_STAGING_DIRECTORY); + $install_state['config_verified'] = install_ensure_config_directory(CONFIG_ACTIVE_DIRECTORY) && install_ensure_config_directory(CONFIG_SYNC_DIRECTORY); $install_state['database_verified'] = install_verify_database_settings($site_path); $install_state['settings_verified'] = $install_state['config_verified'] && $install_state['database_verified']; diff --git a/core/includes/install.inc b/core/includes/install.inc index 01d6166..ab1f96d 100644 --- a/core/includes/install.inc +++ b/core/includes/install.inc @@ -183,8 +183,8 @@ function drupal_get_database_types() { * 'value' => 'config_hash/active' * 'required' => TRUE, * ), - * CONFIG_STAGING_DIRECTORY => (object) array( - * 'value' => 'config_hash/staging', + * CONFIG_SYNC_DIRECTORY => (object) array( + * 'value' => 'config_hash/sync', * 'required' => TRUE, * ), * ); @@ -192,7 +192,7 @@ function drupal_get_database_types() { * gets dumped as: * @code * $config_directories['active'] = 'config_hash/active'; - * $config_directories['staging'] = 'config_hash/staging' + * $config_directories['sync'] = 'config_hash/sync' * @endcode */ function drupal_rewrite_settings($settings = array(), $settings_file = NULL) { @@ -474,9 +474,9 @@ function drupal_install_config_directories() { 'required' => TRUE, ]; } - if (empty($config_directories[CONFIG_STAGING_DIRECTORY])) { - $settings['config_directories'][CONFIG_STAGING_DIRECTORY] = (object) [ - 'value' => \Drupal::service('site.path') . '/files/config_' . $config_directories_hash . '/staging', + if (empty($config_directories[CONFIG_SYNC_DIRECTORY])) { + $settings['config_directories'][CONFIG_SYNC_DIRECTORY] = (object) [ + 'value' => \Drupal::service('site.path') . '/files/config_' . $config_directories_hash . '/sync', 'required' => TRUE, ]; } @@ -487,7 +487,7 @@ function drupal_install_config_directories() { } // Ensure the config directories exist or can be created, and are writable. - foreach (array(CONFIG_ACTIVE_DIRECTORY, CONFIG_STAGING_DIRECTORY) as $config_type) { + foreach (array(CONFIG_ACTIVE_DIRECTORY, CONFIG_SYNC_DIRECTORY) as $config_type) { // This should never fail, since if the config directory was specified in // settings.php it will have already been created and verified earlier, and // if it wasn't specified in settings.php, it is created here inside the @@ -507,9 +507,9 @@ function drupal_install_config_directories() { // to the drupal core repo. switch ($config_type) { case CONFIG_ACTIVE_DIRECTORY: - $text = 'If you change the configuration system to use file storage instead of the database for the active Drupal site configuration, this directory will contain the active configuration. By default, this directory will be empty. If you are using files to store the active configuration, and you want to move it between environments, files from this directory should be placed in the staging directory on the target server. To make this configuration active, visit admin/config/development/configuration/sync on the target server.'; + $text = 'If you change the configuration system to use file storage instead of the database for the active Drupal site configuration, this directory will contain the active configuration. By default, this directory will be empty. If you are using files to store the active configuration, and you want to move it between environments, files from this directory should be placed in the sync directory on the target server. To make this configuration active, visit admin/config/development/configuration/sync on the target server.'; break; - case CONFIG_STAGING_DIRECTORY: + case CONFIG_SYNC_DIRECTORY: $text = 'This directory contains configuration to be imported into your Drupal site. To make this configuration active, visit admin/config/development/configuration/sync.'; break; } @@ -523,7 +523,7 @@ function drupal_install_config_directories() { * * @param string $type * Type of config directory to return. Drupal core provides 'active' and - * 'staging'. + * 'sync'. * * @return bool * TRUE if the config directory exists and is writable. diff --git a/core/lib/Drupal/Core/Config/ConfigImporter.php b/core/lib/Drupal/Core/Config/ConfigImporter.php index ed50735..f08dd62 100644 --- a/core/lib/Drupal/Core/Config/ConfigImporter.php +++ b/core/lib/Drupal/Core/Config/ConfigImporter.php @@ -368,8 +368,8 @@ protected function createExtensionChangelist() { $current_extensions = $this->storageComparer->getTargetStorage()->read('core.extension'); $new_extensions = $this->storageComparer->getSourceStorage()->read('core.extension'); - // If there is no extension information in staging then exit. This is - // probably due to an empty staging directory. + // If there is no extension information in sync then exit. This is + // probably due to an empty sync directory. if (!$new_extensions) { return; } @@ -781,7 +781,7 @@ protected function processConfiguration($collection, $op, $name) { * The name of the extension to process. */ protected function processExtension($type, $op, $name) { - // Set the config installer to use the staging directory instead of the + // Set the config installer to use the sync directory instead of the // extensions own default config directories. \Drupal::service('config.installer') ->setSyncing(TRUE) diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php b/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php index a762de9..5266ff4 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php @@ -85,7 +85,7 @@ * configuration object so that they can be checked without the module that * provides the configuration entity class being installed. This is important * for configuration synchronization, which needs to be able to validate - * configuration in the staging directory before the synchronization has + * configuration in the sync directory before the synchronization has * occurred. Also, if you have a configuration entity object and you want to * get the current dependencies without recalculation, you can use * \Drupal\Core\Config\Entity\ConfigEntityInterface::getDependencies(). diff --git a/core/lib/Drupal/Core/Config/FileStorageFactory.php b/core/lib/Drupal/Core/Config/FileStorageFactory.php index 1768df4..b8d0917 100644 --- a/core/lib/Drupal/Core/Config/FileStorageFactory.php +++ b/core/lib/Drupal/Core/Config/FileStorageFactory.php @@ -21,12 +21,12 @@ static function getActive() { } /** - * Returns a FileStorage object working with the staging config directory. + * Returns a FileStorage object working with the sync config directory. * * @return \Drupal\Core\Config\FileStorage FileStorage */ - static function getStaging() { - return new FileStorage(config_get_config_directory(CONFIG_STAGING_DIRECTORY)); + static function getSync() { + return new FileStorage(config_get_config_directory(CONFIG_SYNC_DIRECTORY)); } } diff --git a/core/modules/config/config.module b/core/modules/config/config.module index 05f4b6d..dc5234e 100644 --- a/core/modules/config/config.module +++ b/core/modules/config/config.module @@ -15,14 +15,14 @@ function config_help($route_name, RouteMatchInterface $route_match) { case 'help.page.config': $output = ''; $output .= '

' . t('About') . '

'; - $output .= '

' . t('The Configuration manager module provides a user interface for importing and exporting configuration changes; i.e., for staging configuration data between multiple instances of this web site. For more information, see the online handbook entry for Configuration manager module', array( + $output .= '

' . t('The Configuration manager module provides a user interface for importing and exporting configuration changes; i.e., for synching configuration data between multiple instances of this web site. For more information, see the online handbook entry for Configuration manager module', array( '!url' => 'https://www.drupal.org/documentation/administer/config', )) . '

'; return $output; case 'config.sync': $output = ''; - $output .= '

' . t('Import configuration that is placed in your staging directory. All changes, deletions, renames, and additions are listed below.') . '

'; + $output .= '

' . t('Import configuration that is placed in your sync directory. All changes, deletions, renames, and additions are listed below.') . '

'; return $output; } } diff --git a/core/modules/config/src/Controller/ConfigController.php b/core/modules/config/src/Controller/ConfigController.php index dc56910..688e641 100644 --- a/core/modules/config/src/Controller/ConfigController.php +++ b/core/modules/config/src/Controller/ConfigController.php @@ -64,7 +64,7 @@ class ConfigController implements ContainerInjectionInterface { public static function create(ContainerInterface $container) { return new static( $container->get('config.storage'), - $container->get('config.storage.staging'), + $container->get('config.storage.sync'), $container->get('config.manager'), new FileDownloadController(), $container->get('diff.formatter') diff --git a/core/modules/config/src/Form/ConfigImportForm.php b/core/modules/config/src/Form/ConfigImportForm.php index 9ed9b83..002dd8b 100644 --- a/core/modules/config/src/Form/ConfigImportForm.php +++ b/core/modules/config/src/Form/ConfigImportForm.php @@ -40,7 +40,7 @@ public function __construct(StorageInterface $config_storage) { */ public static function create(ContainerInterface $container) { return new static( - $container->get('config.storage.staging') + $container->get('config.storage.sync') ); } @@ -96,7 +96,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { foreach ($archiver->listContent() as $file) { $files[] = $file['filename']; } - $archiver->extractList($files, config_get_config_directory(CONFIG_STAGING_DIRECTORY)); + $archiver->extractList($files, config_get_config_directory(CONFIG_SYNC_DIRECTORY)); drupal_set_message($this->t('Your configuration files were successfully uploaded, ready for import.')); $form_state->setRedirect('config.sync'); } diff --git a/core/modules/config/src/Form/ConfigSync.php b/core/modules/config/src/Form/ConfigSync.php index 2c71254..23cdda9 100644 --- a/core/modules/config/src/Form/ConfigSync.php +++ b/core/modules/config/src/Form/ConfigSync.php @@ -38,11 +38,11 @@ class ConfigSync extends FormBase { protected $lock; /** - * The staging configuration object. + * The sync configuration object. * * @var \Drupal\Core\Config\StorageInterface */ - protected $stagingStorage; + protected $syncStorage; /** * The active configuration object. @@ -103,7 +103,7 @@ class ConfigSync extends FormBase { /** * Constructs the object. * - * @param \Drupal\Core\Config\StorageInterface $staging_storage + * @param \Drupal\Core\Config\StorageInterface $sync_storage * The source storage. * @param \Drupal\Core\Config\StorageInterface $active_storage * The target storage. @@ -124,8 +124,8 @@ class ConfigSync extends FormBase { * @param \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler * The theme handler. */ - public function __construct(StorageInterface $staging_storage, StorageInterface $active_storage, StorageInterface $snapshot_storage, LockBackendInterface $lock, EventDispatcherInterface $event_dispatcher, ConfigManagerInterface $config_manager, TypedConfigManagerInterface $typed_config, ModuleHandlerInterface $module_handler, ModuleInstallerInterface $module_installer, ThemeHandlerInterface $theme_handler) { - $this->stagingStorage = $staging_storage; + public function __construct(StorageInterface $sync_storage, StorageInterface $active_storage, StorageInterface $snapshot_storage, LockBackendInterface $lock, EventDispatcherInterface $event_dispatcher, ConfigManagerInterface $config_manager, TypedConfigManagerInterface $typed_config, ModuleHandlerInterface $module_handler, ModuleInstallerInterface $module_installer, ThemeHandlerInterface $theme_handler) { + $this->syncStorage = $sync_storage; $this->activeStorage = $active_storage; $this->snapshotStorage = $snapshot_storage; $this->lock = $lock; @@ -142,7 +142,7 @@ public function __construct(StorageInterface $staging_storage, StorageInterface */ public static function create(ContainerInterface $container) { return new static( - $container->get('config.storage.staging'), + $container->get('config.storage.sync'), $container->get('config.storage'), $container->get('config.storage.snapshot'), $container->get('lock.persistent'), @@ -171,8 +171,8 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#type' => 'submit', '#value' => $this->t('Import all'), ); - $source_list = $this->stagingStorage->listAll(); - $storage_comparer = new StorageComparer($this->stagingStorage, $this->activeStorage, $this->configManager); + $source_list = $this->syncStorage->listAll(); + $storage_comparer = new StorageComparer($this->syncStorage, $this->activeStorage, $this->configManager); if (empty($source_list) || !$storage_comparer->createChangelist()->hasChanges()) { $form['no_changes'] = array( '#type' => 'table', diff --git a/core/modules/config/src/Tests/AssertConfigEntityImportTrait.php b/core/modules/config/src/Tests/AssertConfigEntityImportTrait.php index 6d9b298..05f5385 100644 --- a/core/modules/config/src/Tests/AssertConfigEntityImportTrait.php +++ b/core/modules/config/src/Tests/AssertConfigEntityImportTrait.php @@ -28,8 +28,8 @@ public function assertConfigEntityImport(ConfigEntityInterface $entity) { $entity_uuid = $entity->uuid(); $entity_type_id = $entity->getEntityTypeId(); $original_data = $entity->toArray(); - // Copy everything to staging. - $this->copyConfig(\Drupal::service('config.storage'), \Drupal::service('config.storage.staging')); + // Copy everything to sync. + $this->copyConfig(\Drupal::service('config.storage'), \Drupal::service('config.storage.sync')); // Delete the configuration from active. Don't worry about side effects of // deleting config like fields cleaning up field storages. The coming import // should recreate everything as necessary. diff --git a/core/modules/config/src/Tests/ConfigDiffTest.php b/core/modules/config/src/Tests/ConfigDiffTest.php index 10f6902..efb5db3 100644 --- a/core/modules/config/src/Tests/ConfigDiffTest.php +++ b/core/modules/config/src/Tests/ConfigDiffTest.php @@ -28,7 +28,7 @@ class ConfigDiffTest extends KernelTestBase { */ function testDiff() { $active = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); + $sync = $this->container->get('config.storage.sync'); $config_name = 'config_test.system'; $change_key = 'foo'; $remove_key = '404'; @@ -43,44 +43,44 @@ function testDiff() { // Install the default config. $this->installConfig(array('config_test')); - // Change a configuration value in staging. - $staging_data = $original_data; - $staging_data[$change_key] = $change_data; - $staging_data[$add_key] = $add_data; - $staging->write($config_name, $staging_data); + // Change a configuration value in sync. + $sync_data = $original_data; + $sync_data[$change_key] = $change_data; + $sync_data[$add_key] = $add_data; + $sync->write($config_name, $sync_data); // Verify that the diff reflects a change. - $diff = \Drupal::service('config.manager')->diff($active, $staging, $config_name); + $diff = \Drupal::service('config.manager')->diff($active, $sync, $config_name); $edits = $diff->getEdits(); $this->assertEqual($edits[0]->type, 'change', 'The first item in the diff is a change.'); $this->assertEqual($edits[0]->orig[0], $change_key . ': ' . $original_data[$change_key], format_string("The active value for key '%change_key' is '%original_data'.", array('%change_key' => $change_key, '%original_data' => $original_data[$change_key]))); - $this->assertEqual($edits[0]->closing[0], $change_key . ': ' . $change_data, format_string("The staging value for key '%change_key' is '%change_data'.", array('%change_key' => $change_key, '%change_data' => $change_data))); + $this->assertEqual($edits[0]->closing[0], $change_key . ': ' . $change_data, format_string("The sync value for key '%change_key' is '%change_data'.", array('%change_key' => $change_key, '%change_data' => $change_data))); // Reset data back to original, and remove a key - $staging_data = $original_data; - unset($staging_data[$remove_key]); - $staging->write($config_name, $staging_data); + $sync_data = $original_data; + unset($sync_data[$remove_key]); + $sync->write($config_name, $sync_data); // Verify that the diff reflects a removed key. - $diff = \Drupal::service('config.manager')->diff($active, $staging, $config_name); + $diff = \Drupal::service('config.manager')->diff($active, $sync, $config_name); $edits = $diff->getEdits(); $this->assertEqual($edits[0]->type, 'copy', 'The first item in the diff is a copy.'); $this->assertEqual($edits[1]->type, 'delete', 'The second item in the diff is a delete.'); $this->assertEqual($edits[1]->orig[0], $remove_key . ': ' . $original_data[$remove_key], format_string("The active value for key '%remove_key' is '%original_data'.", array('%remove_key' => $remove_key, '%original_data' => $original_data[$remove_key]))); - $this->assertFalse($edits[1]->closing, format_string("The key '%remove_key' does not exist in staging.", array('%remove_key' => $remove_key))); + $this->assertFalse($edits[1]->closing, format_string("The key '%remove_key' does not exist in sync.", array('%remove_key' => $remove_key))); // Reset data back to original and add a key - $staging_data = $original_data; - $staging_data[$add_key] = $add_data; - $staging->write($config_name, $staging_data); + $sync_data = $original_data; + $sync_data[$add_key] = $add_data; + $sync->write($config_name, $sync_data); // Verify that the diff reflects an added key. - $diff = \Drupal::service('config.manager')->diff($active, $staging, $config_name); + $diff = \Drupal::service('config.manager')->diff($active, $sync, $config_name); $edits = $diff->getEdits(); $this->assertEqual($edits[0]->type, 'copy', 'The first item in the diff is a copy.'); $this->assertEqual($edits[1]->type, 'add', 'The second item in the diff is an add.'); $this->assertFalse($edits[1]->orig, format_string("The key '%add_key' does not exist in active.", array('%add_key' => $add_key))); - $this->assertEqual($edits[1]->closing[0], $add_key . ': ' . $add_data, format_string("The staging value for key '%add_key' is '%add_data'.", array('%add_key' => $add_key, '%add_data' => $add_data))); + $this->assertEqual($edits[1]->closing[0], $add_key . ': ' . $add_data, format_string("The sync value for key '%add_key' is '%add_data'.", array('%add_key' => $add_key, '%add_data' => $add_data))); // Test diffing a renamed config entity. $test_entity_id = $this->randomMachineName(); @@ -90,9 +90,9 @@ function testDiff() { )); $test_entity->save(); $data = $active->read('config_test.dynamic.' . $test_entity_id); - $staging->write('config_test.dynamic.' . $test_entity_id, $data); + $sync->write('config_test.dynamic.' . $test_entity_id, $data); $config_name = 'config_test.dynamic.' . $test_entity_id; - $diff = \Drupal::service('config.manager')->diff($active, $staging, $config_name, $config_name); + $diff = \Drupal::service('config.manager')->diff($active, $sync, $config_name, $config_name); // Prove the fields match. $edits = $diff->getEdits(); $this->assertEqual($edits[0]->type, 'copy', 'The first item in the diff is a copy.'); @@ -103,7 +103,7 @@ function testDiff() { $test_entity->set('id', $new_test_entity_id); $test_entity->save(); - $diff = \Drupal::service('config.manager')->diff($active, $staging, 'config_test.dynamic.' . $new_test_entity_id, $config_name); + $diff = \Drupal::service('config.manager')->diff($active, $sync, 'config_test.dynamic.' . $new_test_entity_id, $config_name); $edits = $diff->getEdits(); $this->assertEqual($edits[0]->type, 'copy', 'The first item in the diff is a copy.'); $this->assertEqual($edits[1]->type, 'change', 'The second item in the diff is a change.'); @@ -119,27 +119,27 @@ function testDiff() { function testCollectionDiff() { /** @var \Drupal\Core\Config\StorageInterface $active */ $active = $this->container->get('config.storage'); - /** @var \Drupal\Core\Config\StorageInterface $staging */ - $staging = $this->container->get('config.storage.staging'); + /** @var \Drupal\Core\Config\StorageInterface $sync */ + $sync = $this->container->get('config.storage.sync'); $active_test_collection = $active->createCollection('test'); - $staging_test_collection = $staging->createCollection('test'); + $sync_test_collection = $sync->createCollection('test'); $config_name = 'config_test.test'; $data = array('foo' => 'bar'); $active->write($config_name, $data); - $staging->write($config_name, $data); + $sync->write($config_name, $data); $active_test_collection->write($config_name, $data); - $staging_test_collection->write($config_name, array('foo' => 'baz')); + $sync_test_collection->write($config_name, array('foo' => 'baz')); // Test the fields match in the default collection diff. - $diff = \Drupal::service('config.manager')->diff($active, $staging, $config_name); + $diff = \Drupal::service('config.manager')->diff($active, $sync, $config_name); $edits = $diff->getEdits(); $this->assertEqual($edits[0]->type, 'copy', 'The first item in the diff is a copy.'); $this->assertEqual(count($edits), 1, 'There is one item in the diff'); // Test that the differences are detected when diffing the collection. - $diff = \Drupal::service('config.manager')->diff($active, $staging, $config_name, NULL, 'test'); + $diff = \Drupal::service('config.manager')->diff($active, $sync, $config_name, NULL, 'test'); $edits = $diff->getEdits(); $this->assertEqual($edits[0]->type, 'change', 'The second item in the diff is a copy.'); $this->assertEqual($edits[0]->orig, array('foo: bar')); diff --git a/core/modules/config/src/Tests/ConfigEntityStorageTest.php b/core/modules/config/src/Tests/ConfigEntityStorageTest.php index 19bf959..dea998b 100644 --- a/core/modules/config/src/Tests/ConfigEntityStorageTest.php +++ b/core/modules/config/src/Tests/ConfigEntityStorageTest.php @@ -11,7 +11,7 @@ use Drupal\Core\Config\ConfigDuplicateUUIDException; /** - * Tests staging and importing config entities with IDs and UUIDs that match + * Tests sync and importing config entities with IDs and UUIDs that match * existing config. * * @group config diff --git a/core/modules/config/src/Tests/ConfigExportImportUITest.php b/core/modules/config/src/Tests/ConfigExportImportUITest.php index 6a63df7..0059abf 100644 --- a/core/modules/config/src/Tests/ConfigExportImportUITest.php +++ b/core/modules/config/src/Tests/ConfigExportImportUITest.php @@ -188,21 +188,21 @@ public function testExportImport() { $this->drupalGet('admin/config/development/configuration'); $this->assertText(t('Warning message')); $this->assertText('The following items in your active configuration have changes since the last import that may be lost on the next import. system.site'); - // Remove everything from staging. The warning about differences between the + // Remove everything from sync. The warning about differences between the // active and snapshot should no longer exist. - \Drupal::service('config.storage.staging')->deleteAll(); + \Drupal::service('config.storage.sync')->deleteAll(); $this->drupalGet('admin/config/development/configuration'); $this->assertNoText(t('Warning message')); $this->assertNoText('The following items in your active configuration have changes since the last import that may be lost on the next import. system.site'); $this->assertText(t('There are no configuration changes to import.')); - // Write a file to staging. The warning about differences between the + // Write a file to sync. The warning about differences between the // active and snapshot should now exist. - /** @var \Drupal\Core\Config\StorageInterface $staging */ - $staging = $this->container->get('config.storage.staging'); + /** @var \Drupal\Core\Config\StorageInterface $sync */ + $sync = $this->container->get('config.storage.sync'); $data = $this->config('system.site')->get(); $data['slogan'] = 'in the face'; - $this->copyConfig($this->container->get('config.storage'), $staging); - $staging->write('system.site', $data); + $this->copyConfig($this->container->get('config.storage'), $sync); + $sync->write('system.site', $data); $this->drupalGet('admin/config/development/configuration'); $this->assertText(t('Warning message')); $this->assertText('The following items in your active configuration have changes since the last import that may be lost on the next import. system.site'); diff --git a/core/modules/config/src/Tests/ConfigImportAllTest.php b/core/modules/config/src/Tests/ConfigImportAllTest.php index 6e1aaea..932b06b 100644 --- a/core/modules/config/src/Tests/ConfigImportAllTest.php +++ b/core/modules/config/src/Tests/ConfigImportAllTest.php @@ -70,8 +70,8 @@ public function testInstallUninstall() { $this->assertModuleTablesExist($module); } - // Export active config to staging - $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.staging')); + // Export active config to sync + $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.sync')); system_list_reset(); $this->resetAll(); @@ -145,7 +145,7 @@ public function testInstallUninstall() { // Ensure that we have no configuration changes to import. $storage_comparer = new StorageComparer( - $this->container->get('config.storage.staging'), + $this->container->get('config.storage.sync'), $this->container->get('config.storage'), $this->container->get('config.manager') ); diff --git a/core/modules/config/src/Tests/ConfigImportRecreateTest.php b/core/modules/config/src/Tests/ConfigImportRecreateTest.php index 83ea2ee..cc703a0 100644 --- a/core/modules/config/src/Tests/ConfigImportRecreateTest.php +++ b/core/modules/config/src/Tests/ConfigImportRecreateTest.php @@ -40,11 +40,11 @@ protected function setUp() { $this->installEntitySchema('node'); $this->installConfig(array('field', 'node')); - $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.staging')); + $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.sync')); // Set up the ConfigImporter object for testing. $storage_comparer = new StorageComparer( - $this->container->get('config.storage.staging'), + $this->container->get('config.storage.sync'), $this->container->get('config.storage'), $this->container->get('config.manager') ); @@ -71,11 +71,11 @@ public function testRecreateEntity() { node_add_body_field($content_type); /** @var \Drupal\Core\Config\StorageInterface $active */ $active = $this->container->get('config.storage'); - /** @var \Drupal\Core\Config\StorageInterface $staging */ - $staging = $this->container->get('config.storage.staging'); + /** @var \Drupal\Core\Config\StorageInterface $sync */ + $sync = $this->container->get('config.storage.sync'); $config_name = $content_type->getEntityType()->getConfigPrefix() . '.' . $content_type->id(); - $this->copyConfig($active, $staging); + $this->copyConfig($active, $sync); // Delete the content type. This will also delete a field storage, a field, // an entity view display and an entity form display. diff --git a/core/modules/config/src/Tests/ConfigImportRenameValidationTest.php b/core/modules/config/src/Tests/ConfigImportRenameValidationTest.php index 118c1cb..ae62bb0 100644 --- a/core/modules/config/src/Tests/ConfigImportRenameValidationTest.php +++ b/core/modules/config/src/Tests/ConfigImportRenameValidationTest.php @@ -48,7 +48,7 @@ protected function setUp() { // Set up the ConfigImporter object for testing. $storage_comparer = new StorageComparer( - $this->container->get('config.storage.staging'), + $this->container->get('config.storage.sync'), $this->container->get('config.storage'), $this->container->get('config.manager') ); @@ -80,8 +80,8 @@ public function testRenameValidation() { // Stage the test entity and then delete it from the active storage. $active = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); - $this->copyConfig($active, $staging); + $sync = $this->container->get('config.storage.sync'); + $this->copyConfig($active, $sync); $test_entity->delete(); // Create a content type with a matching UUID in the active storage. @@ -127,8 +127,8 @@ public function testRenameSimpleConfigValidation() { $config->set('uuid', $uuid_value)->save(); $active = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); - $this->copyConfig($active, $staging); + $sync = $this->container->get('config.storage.sync'); + $this->copyConfig($active, $sync); $config->delete(); // Create another simple configuration with the same UUID. diff --git a/core/modules/config/src/Tests/ConfigImportUITest.php b/core/modules/config/src/Tests/ConfigImportUITest.php index cc36e36..55f8659 100644 --- a/core/modules/config/src/Tests/ConfigImportUITest.php +++ b/core/modules/config/src/Tests/ConfigImportUITest.php @@ -37,7 +37,7 @@ protected function setUp() { $this->webUser = $this->drupalCreateUser(array('synchronize configuration')); $this->drupalLogin($this->webUser); - $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.staging')); + $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.sync')); } /** @@ -46,8 +46,8 @@ protected function setUp() { function testImport() { $name = 'system.site'; $dynamic_name = 'config_test.dynamic.new'; - /** @var \Drupal\Core\Config\StorageInterface $staging */ - $staging = $this->container->get('config.storage.staging'); + /** @var \Drupal\Core\Config\StorageInterface $sync */ + $sync = $this->container->get('config.storage.sync'); $this->drupalGet('admin/config/development/configuration'); $this->assertText('There are no configuration changes to import.'); @@ -56,7 +56,7 @@ function testImport() { // Create updated configuration object. $new_site_name = 'Config import test ' . $this->randomString(); $this->prepareSiteNameUpdate($new_site_name); - $this->assertIdentical($staging->exists($name), TRUE, $name . ' found.'); + $this->assertIdentical($sync->exists($name), TRUE, $name . ' found.'); // Create new config entity. $original_dynamic_data = array( @@ -72,8 +72,8 @@ function testImport() { 'size_value' => '', 'protected_property' => '', ); - $staging->write($dynamic_name, $original_dynamic_data); - $this->assertIdentical($staging->exists($dynamic_name), TRUE, $dynamic_name . ' found.'); + $sync->write($dynamic_name, $original_dynamic_data); + $this->assertIdentical($sync->exists($dynamic_name), TRUE, $dynamic_name . ' found.'); // Enable the Action and Ban modules during import. The Ban // module is used because it creates a table during the install. The Action @@ -86,7 +86,7 @@ function testImport() { // Bartik is a subtheme of classy so classy must be enabled. $core_extension['theme']['classy'] = 0; $core_extension['theme']['bartik'] = 0; - $staging->write('core.extension', $core_extension); + $sync->write('core.extension', $core_extension); // Use the install storage so that we can read configuration from modules // and themes that are not installed. @@ -95,17 +95,17 @@ function testImport() { // Set the Bartik theme as default. $system_theme = $this->config('system.theme')->get(); $system_theme['default'] = 'bartik'; - $staging->write('system.theme', $system_theme); + $sync->write('system.theme', $system_theme); // Read the action config from module default config folder. $action_settings = $install_storage->read('action.settings'); $action_settings['recursion_limit'] = 50; - $staging->write('action.settings', $action_settings); + $sync->write('action.settings', $action_settings); // Uninstall the Options and Text modules to ensure that dependencies are // handled correctly. Options depends on Text so Text should be installed // first. Since they were enabled during the test setup the core.extension - // file in staging will already contain them. + // file in sync will already contain them. \Drupal::service('module_installer')->uninstall(array('text', 'options')); // Set the state system to record installations and uninstallations. @@ -174,14 +174,14 @@ function testImport() { unset($core_extension['module']['options']); unset($core_extension['module']['text']); unset($core_extension['theme']['bartik']); - $staging->write('core.extension', $core_extension); - $staging->delete('action.settings'); - $staging->delete('text.settings'); + $sync->write('core.extension', $core_extension); + $sync->delete('action.settings'); + $sync->delete('text.settings'); $system_theme = $this->config('system.theme')->get(); $system_theme['default'] = 'stark'; $system_theme['admin'] = 'stark'; - $staging->write('system.theme', $system_theme); + $sync->write('system.theme', $system_theme); // Set the state system to record installations and uninstallations. \Drupal::state()->set('ConfigImportUITest.core.extension.modules_installed', array()); @@ -253,12 +253,12 @@ function testImportLock() { * Tests verification of site UUID before importing configuration. */ function testImportSiteUuidValidation() { - $staging = \Drupal::service('config.storage.staging'); + $sync = \Drupal::service('config.storage.sync'); // Create updated configuration object. $config_data = $this->config('system.site')->get(); // Generate a new site UUID. $config_data['uuid'] = \Drupal::service('uuid')->generate(); - $staging->write('system.site', $config_data); + $sync->write('system.site', $config_data); // Verify that there are configuration differences to import. $this->drupalGet('admin/config/development/configuration'); @@ -267,10 +267,10 @@ function testImportSiteUuidValidation() { } /** - * Tests the screen that shows differences between active and staging. + * Tests the screen that shows differences between active and sync. */ function testImportDiff() { - $staging = $this->container->get('config.storage.staging'); + $sync = $this->container->get('config.storage.sync'); $config_name = 'config_test.system'; $change_key = 'foo'; $remove_key = '404'; @@ -282,28 +282,28 @@ function testImportDiff() { '404' => 'herp', ); - // Change a configuration value in staging. - $staging_data = $original_data; - $staging_data[$change_key] = $change_data; - $staging_data[$add_key] = $add_data; - $staging->write($config_name, $staging_data); + // Change a configuration value in sync. + $sync_data = $original_data; + $sync_data[$change_key] = $change_data; + $sync_data[$add_key] = $add_data; + $sync->write($config_name, $sync_data); // Load the diff UI and verify that the diff reflects the change. $this->drupalGet('admin/config/development/configuration/sync/diff/' . $config_name); $this->assertTitle(format_string('View changes of @config_name | Drupal', array('@config_name' => $config_name))); // Reset data back to original, and remove a key - $staging_data = $original_data; - unset($staging_data[$remove_key]); - $staging->write($config_name, $staging_data); + $sync_data = $original_data; + unset($sync_data[$remove_key]); + $sync->write($config_name, $sync_data); // Load the diff UI and verify that the diff reflects a removed key. $this->drupalGet('admin/config/development/configuration/sync/diff/' . $config_name); // Reset data back to original and add a key - $staging_data = $original_data; - $staging_data[$add_key] = $add_data; - $staging->write($config_name, $staging_data); + $sync_data = $original_data; + $sync_data[$add_key] = $add_data; + $sync->write($config_name, $sync_data); // Load the diff UI and verify that the diff reflects an added key. $this->drupalGet('admin/config/development/configuration/sync/diff/' . $config_name); @@ -335,11 +335,11 @@ public function testImportValidation() { } public function testConfigUninstallConfigException() { - $staging = $this->container->get('config.storage.staging'); + $sync = $this->container->get('config.storage.sync'); $core_extension = $this->config('core.extension')->get(); unset($core_extension['module']['config']); - $staging->write('core.extension', $core_extension); + $sync->write('core.extension', $core_extension); $this->drupalGet('admin/config/development/configuration'); $this->assertText('core.extension'); @@ -350,11 +350,11 @@ public function testConfigUninstallConfigException() { } function prepareSiteNameUpdate($new_site_name) { - $staging = $this->container->get('config.storage.staging'); + $sync = $this->container->get('config.storage.sync'); // Create updated configuration object. $config_data = $this->config('system.site')->get(); $config_data['name'] = $new_site_name; - $staging->write('system.site', $config_data); + $sync->write('system.site', $config_data); } /** @@ -363,7 +363,7 @@ function prepareSiteNameUpdate($new_site_name) { function testImportErrorLog() { $name_primary = 'config_test.dynamic.primary'; $name_secondary = 'config_test.dynamic.secondary'; - $staging = $this->container->get('config.storage.staging'); + $sync = $this->container->get('config.storage.sync'); $uuid = $this->container->get('uuid'); $values_primary = array( @@ -379,7 +379,7 @@ function testImportErrorLog() { 'size_value' => NULL, 'protected_property' => NULL, ); - $staging->write($name_primary, $values_primary); + $sync->write($name_primary, $values_primary); $values_secondary = array( 'uuid' => $uuid->generate(), 'langcode' => 'en', @@ -396,7 +396,7 @@ function testImportErrorLog() { 'size_value' => NULL, 'protected_property' => NULL, ); - $staging->write($name_secondary, $values_secondary); + $sync->write($name_secondary, $values_secondary); // Verify that there are configuration differences to import. $this->drupalGet('admin/config/development/configuration'); $this->assertNoText(t('There are no configuration changes to import.')); @@ -416,7 +416,7 @@ function testImportErrorLog() { */ public function testEntityBundleDelete() { \Drupal::service('module_installer')->install(array('node')); - $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.staging')); + $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.sync')); $node_type = $this->drupalCreateContentType(); $node = $this->drupalCreateNode(array('type' => $node_type->id())); @@ -463,9 +463,9 @@ public function testExtensionValidation() { \Drupal::service('theme_handler')->install(['bartik']); $this->rebuildContainer(); - $staging = $this->container->get('config.storage.staging'); - $this->copyConfig($this->container->get('config.storage'), $staging); - $core = $staging->read('core.extension'); + $sync = $this->container->get('config.storage.sync'); + $this->copyConfig($this->container->get('config.storage'), $sync); + $core = $sync->read('core.extension'); // Node depends on text. unset($core['module']['text']); $module_data = system_rebuild_module_data(); @@ -478,7 +478,7 @@ public function testExtensionValidation() { $core['module']['does_not_exist'] = 0; // This theme does not exist. $core['theme']['does_not_exist'] = 0; - $staging->write('core.extension', $core); + $sync->write('core.extension', $core); $this->drupalPostForm('admin/config/development/configuration', array(), t('Import all')); $this->assertText('The configuration cannot be imported because it failed validation for the following reasons:'); diff --git a/core/modules/config/src/Tests/ConfigImporterMissingContentTest.php b/core/modules/config/src/Tests/ConfigImporterMissingContentTest.php index 26bc66b..695c9da 100644 --- a/core/modules/config/src/Tests/ConfigImporterMissingContentTest.php +++ b/core/modules/config/src/Tests/ConfigImporterMissingContentTest.php @@ -45,11 +45,11 @@ protected function setUp() { // so it has to be cleared out manually. unset($GLOBALS['hook_config_test']); - $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.staging')); + $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.sync')); // Set up the ConfigImporter object for testing. $storage_comparer = new StorageComparer( - $this->container->get('config.storage.staging'), + $this->container->get('config.storage.sync'), $this->container->get('config.storage'), $this->container->get('config.manager') ); @@ -75,10 +75,10 @@ protected function setUp() { function testMissingContent() { \Drupal::state()->set('config_import_test.config_import_missing_content', TRUE); - // Update a configuration entity in the staging directory to have a + // Update a configuration entity in the sync directory to have a // dependency on two content entities that do not exist. $storage = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); + $sync = $this->container->get('config.storage.sync'); $entity_one = entity_create('entity_test', array('name' => 'one')); $entity_two = entity_create('entity_test', array('name' => 'two')); $entity_three = entity_create('entity_test', array('name' => 'three')); @@ -93,7 +93,7 @@ function testMissingContent() { // Entity three will be resolved by // \Drupal\Core\Config\Importer\FinalMissingContentSubscriber. $original_dynamic_data['dependencies']['content'][] = $entity_three->getConfigDependencyName(); - $staging->write($dynamic_name, $original_dynamic_data); + $sync->write($dynamic_name, $original_dynamic_data); // Import. $this->configImporter->reset()->import(); diff --git a/core/modules/config/src/Tests/ConfigImporterTest.php b/core/modules/config/src/Tests/ConfigImporterTest.php index c830b45..70e0434 100644 --- a/core/modules/config/src/Tests/ConfigImporterTest.php +++ b/core/modules/config/src/Tests/ConfigImporterTest.php @@ -43,11 +43,11 @@ protected function setUp() { // so it has to be cleared out manually. unset($GLOBALS['hook_config_test']); - $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.staging')); + $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.sync')); // Set up the ConfigImporter object for testing. $storage_comparer = new StorageComparer( - $this->container->get('config.storage.staging'), + $this->container->get('config.storage.sync'), $this->container->get('config.storage'), $this->container->get('config.manager') ); @@ -79,12 +79,12 @@ function testNoImport() { } /** - * Tests that trying to import from an empty staging configuration directory + * Tests that trying to import from an empty sync configuration directory * fails. */ function testEmptyImportFails() { try { - $this->container->get('config.storage.staging')->deleteAll(); + $this->container->get('config.storage.sync')->deleteAll(); $this->configImporter->reset()->import(); $this->fail('ConfigImporterException thrown, successfully stopping an empty import.'); } @@ -97,12 +97,12 @@ function testEmptyImportFails() { * Tests verification of site UUID before importing configuration. */ function testSiteUuidValidate() { - $staging = \Drupal::service('config.storage.staging'); + $sync = \Drupal::service('config.storage.sync'); // Create updated configuration object. $config_data = $this->config('system.site')->get(); // Generate a new site UUID. $config_data['uuid'] = \Drupal::service('uuid')->generate(); - $staging->write('system.site', $config_data); + $sync->write('system.site', $config_data); try { $this->configImporter->reset()->import(); $this->fail('ConfigImporterException not thrown, invalid import was not stopped due to mis-matching site UUID.'); @@ -121,14 +121,14 @@ function testSiteUuidValidate() { function testDeleted() { $dynamic_name = 'config_test.dynamic.dotted.default'; $storage = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); + $sync = $this->container->get('config.storage.sync'); // Verify the default configuration values exist. $config = $this->config($dynamic_name); $this->assertIdentical($config->get('id'), 'dotted.default'); - // Delete the file from the staging directory. - $staging->delete($dynamic_name); + // Delete the file from the sync directory. + $sync->delete($dynamic_name); // Import. $this->configImporter->reset()->import(); @@ -158,7 +158,7 @@ function testDeleted() { function testNew() { $dynamic_name = 'config_test.dynamic.new'; $storage = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); + $sync = $this->container->get('config.storage.sync'); // Verify the configuration to create does not exist yet. $this->assertIdentical($storage->exists($dynamic_name), FALSE, $dynamic_name . ' not found.'); @@ -177,9 +177,9 @@ function testNew() { 'size_value' => '', 'protected_property' => '', ); - $staging->write($dynamic_name, $original_dynamic_data); + $sync->write($dynamic_name, $original_dynamic_data); - $this->assertIdentical($staging->exists($dynamic_name), TRUE, $dynamic_name . ' found.'); + $this->assertIdentical($sync->exists($dynamic_name), TRUE, $dynamic_name . ' found.'); // Import. $this->configImporter->reset()->import(); @@ -212,7 +212,7 @@ function testNew() { function testSecondaryWritePrimaryFirst() { $name_primary = 'config_test.dynamic.primary'; $name_secondary = 'config_test.dynamic.secondary'; - $staging = $this->container->get('config.storage.staging'); + $sync = $this->container->get('config.storage.sync'); $uuid = $this->container->get('uuid'); $values_primary = array( @@ -221,7 +221,7 @@ function testSecondaryWritePrimaryFirst() { 'weight' => 0, 'uuid' => $uuid->generate(), ); - $staging->write($name_primary, $values_primary); + $sync->write($name_primary, $values_primary); $values_secondary = array( 'id' => 'secondary', 'label' => 'Secondary Sync', @@ -232,7 +232,7 @@ function testSecondaryWritePrimaryFirst() { 'config' => array($name_primary), ) ); - $staging->write($name_secondary, $values_secondary); + $sync->write($name_secondary, $values_secondary); // Import. $this->configImporter->reset()->import(); @@ -258,7 +258,7 @@ function testSecondaryWritePrimaryFirst() { function testSecondaryWriteSecondaryFirst() { $name_primary = 'config_test.dynamic.primary'; $name_secondary = 'config_test.dynamic.secondary'; - $staging = $this->container->get('config.storage.staging'); + $sync = $this->container->get('config.storage.sync'); $uuid = $this->container->get('uuid'); $values_primary = array( @@ -271,14 +271,14 @@ function testSecondaryWriteSecondaryFirst() { 'config' => array($name_secondary), ) ); - $staging->write($name_primary, $values_primary); + $sync->write($name_primary, $values_primary); $values_secondary = array( 'id' => 'secondary', 'label' => 'Secondary Sync', 'weight' => 0, 'uuid' => $uuid->generate(), ); - $staging->write($name_secondary, $values_secondary); + $sync->write($name_secondary, $values_secondary); // Import. $this->configImporter->reset()->import(); @@ -307,7 +307,7 @@ function testSecondaryUpdateDeletedDeleterFirst() { $name_deletee = 'config_test.dynamic.deletee'; $name_other = 'config_test.dynamic.other'; $storage = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); + $sync = $this->container->get('config.storage.sync'); $uuid = $this->container->get('uuid'); $values_deleter = array( @@ -318,7 +318,7 @@ function testSecondaryUpdateDeletedDeleterFirst() { ); $storage->write($name_deleter, $values_deleter); $values_deleter['label'] = 'Updated Deleter'; - $staging->write($name_deleter, $values_deleter); + $sync->write($name_deleter, $values_deleter); $values_deletee = array( 'id' => 'deletee', 'label' => 'Deletee', @@ -331,7 +331,7 @@ function testSecondaryUpdateDeletedDeleterFirst() { ); $storage->write($name_deletee, $values_deletee); $values_deletee['label'] = 'Updated Deletee'; - $staging->write($name_deletee, $values_deletee); + $sync->write($name_deletee, $values_deletee); // Ensure that import will continue after the error. $values_other = array( @@ -347,7 +347,7 @@ function testSecondaryUpdateDeletedDeleterFirst() { ); $storage->write($name_other, $values_other); $values_other['label'] = 'Updated other'; - $staging->write($name_other, $values_other); + $sync->write($name_other, $values_other); // Check update changelist order. $updates = $this->configImporter->reset()->getStorageComparer()->getChangelist('update'); @@ -392,7 +392,7 @@ function testSecondaryUpdateDeletedDeleteeFirst() { $name_deleter = 'config_test.dynamic.deleter'; $name_deletee = 'config_test.dynamic.deletee'; $storage = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); + $sync = $this->container->get('config.storage.sync'); $uuid = $this->container->get('uuid'); $values_deleter = array( @@ -407,7 +407,7 @@ function testSecondaryUpdateDeletedDeleteeFirst() { ); $storage->write($name_deleter, $values_deleter); $values_deleter['label'] = 'Updated Deleter'; - $staging->write($name_deleter, $values_deleter); + $sync->write($name_deleter, $values_deleter); $values_deletee = array( 'id' => 'deletee', 'label' => 'Deletee', @@ -416,7 +416,7 @@ function testSecondaryUpdateDeletedDeleteeFirst() { ); $storage->write($name_deletee, $values_deletee); $values_deletee['label'] = 'Updated Deletee'; - $staging->write($name_deletee, $values_deletee); + $sync->write($name_deletee, $values_deletee); // Import. $this->configImporter->reset()->import(); @@ -480,21 +480,21 @@ function testUpdated() { $name = 'config_test.system'; $dynamic_name = 'config_test.dynamic.dotted.default'; $storage = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); + $sync = $this->container->get('config.storage.sync'); // Verify that the configuration objects to import exist. $this->assertIdentical($storage->exists($name), TRUE, $name . ' found.'); $this->assertIdentical($storage->exists($dynamic_name), TRUE, $dynamic_name . ' found.'); // Replace the file content of the existing configuration objects in the - // staging directory. + // sync directory. $original_name_data = array( 'foo' => 'beer', ); - $staging->write($name, $original_name_data); + $sync->write($name, $original_name_data); $original_dynamic_data = $storage->read($dynamic_name); $original_dynamic_data['label'] = 'Updated'; - $staging->write($dynamic_name, $original_dynamic_data); + $sync->write($dynamic_name, $original_dynamic_data); // Verify the active configuration still returns the default values. $config = $this->config($name); @@ -513,8 +513,8 @@ function testUpdated() { $this->assertIdentical($config->get('label'), 'Updated'); // Verify that the original file content is still the same. - $this->assertIdentical($staging->read($name), $original_name_data); - $this->assertIdentical($staging->read($dynamic_name), $original_dynamic_data); + $this->assertIdentical($sync->read($name), $original_name_data); + $this->assertIdentical($sync->read($dynamic_name), $original_dynamic_data); // Verify that appropriate module API hooks have been invoked. $this->assertTrue(isset($GLOBALS['hook_config_test']['load'])); @@ -549,29 +549,29 @@ function testIsInstallable() { */ public function testUnmetDependency() { $storage = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); + $sync = $this->container->get('config.storage.sync'); // Test an unknown configuration owner. - $staging->write('unknown.config', ['test' => 'test']); + $sync->write('unknown.config', ['test' => 'test']); // Make a config entity have unmet dependencies. - $config_entity_data = $staging->read('config_test.dynamic.dotted.default'); + $config_entity_data = $sync->read('config_test.dynamic.dotted.default'); $config_entity_data['dependencies'] = ['module' => ['unknown']]; - $staging->write('config_test.dynamic.dotted.module', $config_entity_data); + $sync->write('config_test.dynamic.dotted.module', $config_entity_data); $config_entity_data['dependencies'] = ['theme' => ['unknown']]; - $staging->write('config_test.dynamic.dotted.theme', $config_entity_data); + $sync->write('config_test.dynamic.dotted.theme', $config_entity_data); $config_entity_data['dependencies'] = ['config' => ['unknown']]; - $staging->write('config_test.dynamic.dotted.config', $config_entity_data); + $sync->write('config_test.dynamic.dotted.config', $config_entity_data); - // Make an active config depend on something that is missing in staging. + // Make an active config depend on something that is missing in sync. // The whole configuration needs to be consistent, not only the updated one. $config_entity_data['dependencies'] = []; $storage->write('config_test.dynamic.dotted.deleted', $config_entity_data); $config_entity_data['dependencies'] = ['config' => ['config_test.dynamic.dotted.deleted']]; $storage->write('config_test.dynamic.dotted.existing', $config_entity_data); - $staging->write('config_test.dynamic.dotted.existing', $config_entity_data); + $sync->write('config_test.dynamic.dotted.existing', $config_entity_data); - $extensions = $staging->read('core.extension'); + $extensions = $sync->read('core.extension'); // Add a module and a theme that do not exist. $extensions['module']['unknown_module'] = 0; $extensions['theme']['unknown_theme'] = 0; @@ -579,7 +579,7 @@ public function testUnmetDependency() { $extensions['module']['book'] = 0; $extensions['theme']['bartik'] = 0; - $staging->write('core.extension', $extensions); + $sync->write('core.extension', $extensions); try { $this->configImporter->reset()->import(); $this->fail('ConfigImporterException not thrown; an invalid import was not stopped due to missing dependencies.'); @@ -604,13 +604,13 @@ public function testUnmetDependency() { } // Make a config entity have mulitple unmet dependencies. - $config_entity_data = $staging->read('config_test.dynamic.dotted.default'); + $config_entity_data = $sync->read('config_test.dynamic.dotted.default'); $config_entity_data['dependencies'] = ['module' => ['unknown', 'dblog']]; - $staging->write('config_test.dynamic.dotted.module', $config_entity_data); + $sync->write('config_test.dynamic.dotted.module', $config_entity_data); $config_entity_data['dependencies'] = ['theme' => ['unknown', 'seven']]; - $staging->write('config_test.dynamic.dotted.theme', $config_entity_data); + $sync->write('config_test.dynamic.dotted.theme', $config_entity_data); $config_entity_data['dependencies'] = ['config' => ['unknown', 'unknown2']]; - $staging->write('config_test.dynamic.dotted.config', $config_entity_data); + $sync->write('config_test.dynamic.dotted.config', $config_entity_data); try { $this->configImporter->reset()->import(); $this->fail('ConfigImporterException not thrown, invalid import was not stopped due to missing dependencies.'); @@ -635,8 +635,8 @@ public function testUnmetDependency() { * @see \Drupal\Core\EventSubscriber\ConfigImportSubscriber */ public function testMissingCoreExtension() { - $staging = $this->container->get('config.storage.staging'); - $staging->delete('core.extension'); + $sync = $this->container->get('config.storage.sync'); + $sync->delete('core.extension'); try { $this->configImporter->reset()->import(); $this->fail('ConfigImporterException not thrown, invalid import was not stopped due to missing dependencies.'); diff --git a/core/modules/config/src/Tests/ConfigOverrideTest.php b/core/modules/config/src/Tests/ConfigOverrideTest.php index c2061ca..7db29d7 100644 --- a/core/modules/config/src/Tests/ConfigOverrideTest.php +++ b/core/modules/config/src/Tests/ConfigOverrideTest.php @@ -25,7 +25,7 @@ class ConfigOverrideTest extends KernelTestBase { protected function setUp() { parent::setUp(); - $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.staging')); + $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.sync')); } /** @@ -93,15 +93,15 @@ function testConfOverride() { $this->assertIdentical($config->getOriginal('baz', FALSE), $expected_original_data['baz']); $this->assertIdentical($config->getOriginal('404', FALSE), $expected_original_data['404']); - // Write file to staging. - $staging = $this->container->get('config.storage.staging'); + // Write file to sync. + $sync = $this->container->get('config.storage.sync'); $expected_new_data = array( 'foo' => 'barbar', '404' => 'herpderp', ); - $staging->write('config_test.system', $expected_new_data); + $sync->write('config_test.system', $expected_new_data); - // Import changed data from staging to active. + // Import changed data from sync to active. $this->configImporter()->import(); $data = $active->read('config_test.system'); diff --git a/core/modules/config/src/Tests/ConfigSnapshotTest.php b/core/modules/config/src/Tests/ConfigSnapshotTest.php index d42582a..cbb67b7 100644 --- a/core/modules/config/src/Tests/ConfigSnapshotTest.php +++ b/core/modules/config/src/Tests/ConfigSnapshotTest.php @@ -32,7 +32,7 @@ protected function setUp() { // Update the config snapshot. This allows the parent::setUp() to write // configuration files. \Drupal::service('config.manager')->createSnapshot(\Drupal::service('config.storage'), \Drupal::service('config.storage.snapshot')); - $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.staging')); + $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.sync')); } /** @@ -40,7 +40,7 @@ protected function setUp() { */ function testSnapshot() { $active = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); + $sync = $this->container->get('config.storage.sync'); $snapshot = $this->container->get('config.storage.snapshot'); $config_manager = $this->container->get('config.manager'); $config_name = 'config_test.system'; @@ -48,7 +48,7 @@ function testSnapshot() { $new_data = 'foobar'; $active_snapshot_comparer = new StorageComparer($active, $snapshot, $config_manager); - $staging_snapshot_comparer = new StorageComparer($staging, $snapshot, $config_manager); + $sync_snapshot_comparer = new StorageComparer($sync, $snapshot, $config_manager); // Verify that we have an initial snapshot that matches the active // configuration. This has to be true as no config should be installed. @@ -66,17 +66,17 @@ function testSnapshot() { // objects. $this->assertFalse($active_snapshot_comparer->reset()->hasChanges()); - // Change a configuration value in staging. - $staging_data = $this->config($config_name)->get(); - $staging_data[$config_key] = $new_data; - $staging->write($config_name, $staging_data); + // Change a configuration value in sync. + $sync_data = $this->config($config_name)->get(); + $sync_data[$config_key] = $new_data; + $sync->write($config_name, $sync_data); - // Verify that active and snapshot match, and that staging doesn't match + // Verify that active and snapshot match, and that sync doesn't match // active. $this->assertFalse($active_snapshot_comparer->reset()->hasChanges()); - $this->assertTrue($staging_snapshot_comparer->createChangelist()->hasChanges()); + $this->assertTrue($sync_snapshot_comparer->createChangelist()->hasChanges()); - // Import changed data from staging to active. + // Import changed data from sync to active. $this->configImporter()->import(); // Verify changed config was properly imported. diff --git a/core/modules/content_translation/src/Tests/ContentTranslationConfigImportTest.php b/core/modules/content_translation/src/Tests/ContentTranslationConfigImportTest.php index c06fdb2..9d3450c 100644 --- a/core/modules/content_translation/src/Tests/ContentTranslationConfigImportTest.php +++ b/core/modules/content_translation/src/Tests/ContentTranslationConfigImportTest.php @@ -39,11 +39,11 @@ protected function setUp() { parent::setUp(); $this->installEntitySchema('entity_test_mul'); - $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.staging')); + $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.sync')); // Set up the ConfigImporter object for testing. $storage_comparer = new StorageComparer( - $this->container->get('config.storage.staging'), + $this->container->get('config.storage.sync'), $this->container->get('config.storage'), $this->container->get('config.manager') ); @@ -68,7 +68,7 @@ function testConfigImportUpdates() { $config_id = $entity_type_id . '.' . $entity_type_id; $config_name = 'language.content_settings.' . $config_id; $storage = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); + $sync = $this->container->get('config.storage.sync'); // Verify the configuration to create does not exist yet. $this->assertIdentical($storage->exists($config_name), FALSE, $config_name . ' not found.'); @@ -90,8 +90,8 @@ function testConfigImportUpdates() { 'content_translation' => array('enabled' => TRUE), ), ); - $staging->write($config_name, $data); - $this->assertIdentical($staging->exists($config_name), TRUE, $config_name . ' found.'); + $sync->write($config_name, $data); + $this->assertIdentical($sync->exists($config_name), TRUE, $config_name . ' found.'); // Import. $this->configImporter->reset()->import(); diff --git a/core/modules/field/src/Tests/FieldImportChangeTest.php b/core/modules/field/src/Tests/FieldImportChangeTest.php index c34ff31..8cf3f9c 100644 --- a/core/modules/field/src/Tests/FieldImportChangeTest.php +++ b/core/modules/field/src/Tests/FieldImportChangeTest.php @@ -37,16 +37,16 @@ function testImportChange() { $field_config_name = "field.field.$field_id"; $active = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); - $this->copyConfig($active, $staging); + $sync = $this->container->get('config.storage.sync'); + $this->copyConfig($active, $sync); - // Save as files in the staging directory. + // Save as files in the sync directory. $field = $active->read($field_config_name); $new_label = 'Test update import field'; $field['label'] = $new_label; - $staging->write($field_config_name, $field); + $sync->write($field_config_name, $field); - // Import the content of the staging directory. + // Import the content of the sync directory. $this->configImporter()->import(); // Check that the updated config was correctly imported. diff --git a/core/modules/field/src/Tests/FieldImportCreateTest.php b/core/modules/field/src/Tests/FieldImportCreateTest.php index 0d46566..82cb962 100644 --- a/core/modules/field/src/Tests/FieldImportCreateTest.php +++ b/core/modules/field/src/Tests/FieldImportCreateTest.php @@ -77,14 +77,14 @@ function testImportCreateDefault() { */ function testImportCreate() { // A field storage with one single field. - $field_name = 'field_test_import_staging'; + $field_name = 'field_test_import_sync'; $field_storage_id = "entity_test.$field_name"; $field_id = "entity_test.entity_test.$field_name"; $field_storage_config_name = "field.storage.$field_storage_id"; $field_config_name = "field.field.$field_id"; // A field storage with two fields. - $field_name_2 = 'field_test_import_staging_2'; + $field_name_2 = 'field_test_import_sync_2'; $field_storage_id_2 = "entity_test.$field_name_2"; $field_id_2a = "entity_test.test_bundle.$field_name_2"; $field_id_2b = "entity_test.test_bundle_2.$field_name_2"; @@ -93,32 +93,32 @@ function testImportCreate() { $field_config_name_2b = "field.field.$field_id_2b"; $active = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); - $this->copyConfig($active, $staging); + $sync = $this->container->get('config.storage.sync'); + $this->copyConfig($active, $sync); - // Add the new files to the staging directory. - $src_dir = drupal_get_path('module', 'field_test_config') . '/staging'; - $target_dir = $this->configDirectories[CONFIG_STAGING_DIRECTORY]; + // Add the new files to the sync directory. + $src_dir = drupal_get_path('module', 'field_test_config') . '/sync'; + $target_dir = $this->configDirectories[CONFIG_SYNC_DIRECTORY]; $this->assertTrue(file_unmanaged_copy("$src_dir/$field_storage_config_name.yml", "$target_dir/$field_storage_config_name.yml")); $this->assertTrue(file_unmanaged_copy("$src_dir/$field_config_name.yml", "$target_dir/$field_config_name.yml")); $this->assertTrue(file_unmanaged_copy("$src_dir/$field_storage_config_name_2.yml", "$target_dir/$field_storage_config_name_2.yml")); $this->assertTrue(file_unmanaged_copy("$src_dir/$field_config_name_2a.yml", "$target_dir/$field_config_name_2a.yml")); $this->assertTrue(file_unmanaged_copy("$src_dir/$field_config_name_2b.yml", "$target_dir/$field_config_name_2b.yml")); - // Import the content of the staging directory. + // Import the content of the sync directory. $this->configImporter()->import(); // Check that the field and storage were created. $field_storage = FieldStorageConfig::load($field_storage_id); - $this->assertTrue($field_storage, 'Test import storage field from staging exists'); + $this->assertTrue($field_storage, 'Test import storage field from sync exists'); $field = FieldConfig::load($field_id); - $this->assertTrue($field, 'Test import field from staging exists'); + $this->assertTrue($field, 'Test import field from sync exists'); $field_storage = FieldStorageConfig::load($field_storage_id_2); - $this->assertTrue($field_storage, 'Test import storage field 2 from staging exists'); + $this->assertTrue($field_storage, 'Test import storage field 2 from sync exists'); $field = FieldConfig::load($field_id_2a); - $this->assertTrue($field, 'Test import field 2a from staging exists'); + $this->assertTrue($field, 'Test import field 2a from sync exists'); $field = FieldConfig::load($field_id_2b); - $this->assertTrue($field, 'Test import field 2b from staging exists'); + $this->assertTrue($field, 'Test import field 2b from sync exists'); } } diff --git a/core/modules/field/src/Tests/FieldImportDeleteTest.php b/core/modules/field/src/Tests/FieldImportDeleteTest.php index 721d52b..8333c20 100644 --- a/core/modules/field/src/Tests/FieldImportDeleteTest.php +++ b/core/modules/field/src/Tests/FieldImportDeleteTest.php @@ -63,18 +63,18 @@ public function testImportDelete() { $field_storage_uuid_2 = FieldStorageConfig::load($field_storage_id_2)->uuid(); $active = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); - $this->copyConfig($active, $staging); - $this->assertTrue($staging->delete($field_storage_config_name), SafeMarkup::format('Deleted field storage: !field_storage', array('!field_storage' => $field_storage_config_name))); - $this->assertTrue($staging->delete($field_storage_config_name_2), SafeMarkup::format('Deleted field storage: !field_storage', array('!field_storage' => $field_storage_config_name_2))); - $this->assertTrue($staging->delete($field_config_name), SafeMarkup::format('Deleted field: !field', array('!field' => $field_config_name))); - $this->assertTrue($staging->delete($field_config_name_2a), SafeMarkup::format('Deleted field: !field', array('!field' => $field_config_name_2a))); - $this->assertTrue($staging->delete($field_config_name_2b), SafeMarkup::format('Deleted field: !field', array('!field' => $field_config_name_2b))); + $sync = $this->container->get('config.storage.sync'); + $this->copyConfig($active, $sync); + $this->assertTrue($sync->delete($field_storage_config_name), SafeMarkup::format('Deleted field storage: !field_storage', array('!field_storage' => $field_storage_config_name))); + $this->assertTrue($sync->delete($field_storage_config_name_2), SafeMarkup::format('Deleted field storage: !field_storage', array('!field_storage' => $field_storage_config_name_2))); + $this->assertTrue($sync->delete($field_config_name), SafeMarkup::format('Deleted field: !field', array('!field' => $field_config_name))); + $this->assertTrue($sync->delete($field_config_name_2a), SafeMarkup::format('Deleted field: !field', array('!field' => $field_config_name_2a))); + $this->assertTrue($sync->delete($field_config_name_2b), SafeMarkup::format('Deleted field: !field', array('!field' => $field_config_name_2b))); $deletes = $this->configImporter()->getUnprocessedConfiguration('delete'); $this->assertEqual(count($deletes), 5, 'Importing configuration will delete 3 fields and 2 field storages.'); - // Import the content of the staging directory. + // Import the content of the sync directory. $this->configImporter()->import(); // Check that the field storages and fields are gone. diff --git a/core/modules/field/src/Tests/FieldImportDeleteUninstallTest.php b/core/modules/field/src/Tests/FieldImportDeleteUninstallTest.php index cf1ad8c..b5b2d157 100644 --- a/core/modules/field/src/Tests/FieldImportDeleteUninstallTest.php +++ b/core/modules/field/src/Tests/FieldImportDeleteUninstallTest.php @@ -81,17 +81,17 @@ public function testImportDeleteUninstall() { $unrelated_field_storage->delete(); $active = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); - $this->copyConfig($active, $staging); + $sync = $this->container->get('config.storage.sync'); + $this->copyConfig($active, $sync); // Stage uninstall of the Telephone module. $core_extension = $this->config('core.extension')->get(); unset($core_extension['module']['telephone']); - $staging->write('core.extension', $core_extension); + $sync->write('core.extension', $core_extension); // Stage the field deletion - $staging->delete('field.storage.entity_test.field_test'); - $staging->delete('field.field.entity_test.entity_test.field_test'); + $sync->delete('field.storage.entity_test.field_test'); + $sync->delete('field.field.entity_test.entity_test.field_test'); $steps = $this->configImporter()->initialize(); $this->assertIdentical($steps[0], array('\Drupal\field\ConfigImporterFieldPurger', 'process'), 'The additional process configuration synchronization step has been added.'); @@ -143,13 +143,13 @@ public function testImportAlreadyDeletedUninstall() { $field_storage->delete(); $active = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); - $this->copyConfig($active, $staging); + $sync = $this->container->get('config.storage.sync'); + $this->copyConfig($active, $sync); // Stage uninstall of the Telephone module. $core_extension = $this->config('core.extension')->get(); unset($core_extension['module']['telephone']); - $staging->write('core.extension', $core_extension); + $sync->write('core.extension', $core_extension); $deleted_storages = \Drupal::state()->get('field.storage.deleted') ?: array(); $this->assertTrue(isset($deleted_storages[$field_storage_uuid]), 'Field has been deleted and needs purging before configuration synchronization.'); diff --git a/core/modules/field/src/Tests/FieldImportDeleteUninstallUiTest.php b/core/modules/field/src/Tests/FieldImportDeleteUninstallUiTest.php index de793dd..58766e8 100644 --- a/core/modules/field/src/Tests/FieldImportDeleteUninstallUiTest.php +++ b/core/modules/field/src/Tests/FieldImportDeleteUninstallUiTest.php @@ -79,17 +79,17 @@ public function testImportDeleteUninstall() { $this->assertEqual($entity->field_tel[0]->value, $value); $active = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); - $this->copyConfig($active, $staging); + $sync = $this->container->get('config.storage.sync'); + $this->copyConfig($active, $sync); // Stage uninstall of the Telephone module. $core_extension = $this->config('core.extension')->get(); unset($core_extension['module']['telephone']); - $staging->write('core.extension', $core_extension); + $sync->write('core.extension', $core_extension); // Stage the field deletion - $staging->delete('field.storage.entity_test.field_tel'); - $staging->delete('field.field.entity_test.entity_test.field_tel'); + $sync->delete('field.storage.entity_test.field_tel'); + $sync->delete('field.field.entity_test.entity_test.field_tel'); $this->drupalGet('admin/config/development/configuration'); // Test that the message for one field being purged during a configuration // synchronization is correct. @@ -98,7 +98,7 @@ public function testImportDeleteUninstall() { // Stage an uninstall of the datetime module to test the message for // multiple fields. unset($core_extension['module']['datetime']); - $staging->write('core.extension', $core_extension); + $sync->write('core.extension', $core_extension); $this->drupalGet('admin/config/development/configuration'); $this->assertText('This synchronization will delete data from the fields: entity_test.field_tel, entity_test.field_date.'); diff --git a/core/modules/field/tests/modules/field_test_config/staging/field.field.entity_test.entity_test.field_test_import_staging.yml b/core/modules/field/tests/modules/field_test_config/staging/field.field.entity_test.entity_test.field_test_import_staging.yml deleted file mode 100644 index 0bf637c..0000000 --- a/core/modules/field/tests/modules/field_test_config/staging/field.field.entity_test.entity_test.field_test_import_staging.yml +++ /dev/null @@ -1,16 +0,0 @@ -id: entity_test.entity_test.field_test_import_staging -uuid: ea711065-6940-47cd-813d-618f64095481 -langcode: en -field_name: field_test_import_staging -entity_type: entity_test -bundle: entity_test -label: 'Import from staging' -description: '' -required: '0' -default_value: { } -default_value_callback: '' -settings: { } -field_type: text -dependencies: - config: - - field.storage.entity_test.field_test_import_staging diff --git a/core/modules/field/tests/modules/field_test_config/staging/field.field.entity_test.test_bundle.field_test_import_staging_2.yml b/core/modules/field/tests/modules/field_test_config/staging/field.field.entity_test.test_bundle.field_test_import_staging_2.yml deleted file mode 100644 index 1e77c84..0000000 --- a/core/modules/field/tests/modules/field_test_config/staging/field.field.entity_test.test_bundle.field_test_import_staging_2.yml +++ /dev/null @@ -1,16 +0,0 @@ -id: entity_test.test_bundle.field_test_import_staging_2 -uuid: f07794a2-d7cc-45b6-b40d-13cf021b5552 -langcode: en -field_name: field_test_import_staging_2 -entity_type: entity_test -bundle: test_bundle -label: 'Test import field 2 on test bundle' -description: '' -required: '0' -default_value: { } -default_value_callback: '' -settings: { } -field_type: text -dependencies: - config: - - field.storage.entity_test.field_test_import_staging_2 diff --git a/core/modules/field/tests/modules/field_test_config/staging/field.field.entity_test.test_bundle_2.field_test_import_staging_2.yml b/core/modules/field/tests/modules/field_test_config/staging/field.field.entity_test.test_bundle_2.field_test_import_staging_2.yml deleted file mode 100644 index de66085..0000000 --- a/core/modules/field/tests/modules/field_test_config/staging/field.field.entity_test.test_bundle_2.field_test_import_staging_2.yml +++ /dev/null @@ -1,16 +0,0 @@ -id: entity_test.test_bundle_2.field_test_import_staging_2 -uuid: 49d6dd19-5097-443d-8f00-fc79525bebce -langcode: en -field_name: field_test_import_staging_2 -entity_type: entity_test -bundle: test_bundle_2 -label: 'Test import field 2 on test bundle 2' -description: '' -required: '0' -default_value: { } -default_value_callback: '' -settings: { } -field_type: text -dependencies: - config: - - field.storage.entity_test.field_test_import_staging_2 diff --git a/core/modules/field/tests/modules/field_test_config/staging/field.storage.entity_test.field_test_import_staging.yml b/core/modules/field/tests/modules/field_test_config/staging/field.storage.entity_test.field_test_import_staging.yml deleted file mode 100644 index 5c67c7b..0000000 --- a/core/modules/field/tests/modules/field_test_config/staging/field.storage.entity_test.field_test_import_staging.yml +++ /dev/null @@ -1,20 +0,0 @@ -id: entity_test.field_test_import_staging -uuid: 0bf654cc-f14a-4881-b94c-76959e47466b -langcode: en -field_name: field_test_import_staging -entity_type: entity_test -type: text -settings: - max_length: '255' -module: text -locked: '0' -cardinality: '1' -translatable: '0' -indexes: - format: - - format -dependencies: - module: - - entity_test - - text -persist_with_no_fields: false diff --git a/core/modules/field/tests/modules/field_test_config/staging/field.storage.entity_test.field_test_import_staging_2.yml b/core/modules/field/tests/modules/field_test_config/staging/field.storage.entity_test.field_test_import_staging_2.yml deleted file mode 100644 index 6113d7e..0000000 --- a/core/modules/field/tests/modules/field_test_config/staging/field.storage.entity_test.field_test_import_staging_2.yml +++ /dev/null @@ -1,20 +0,0 @@ -id: entity_test.field_test_import_staging_2 -uuid: 2165d9aa-9a0c-41a1-be02-2a49f3405c00 -langcode: en -field_name: field_test_import_staging_2 -entity_type: entity_test -type: text -settings: - max_length: '255' -module: text -locked: '0' -cardinality: '1' -translatable: '0' -indexes: - format: - - format -dependencies: - module: - - entity_test - - text -persist_with_no_fields: false diff --git a/core/modules/field/tests/modules/field_test_config/sync/field.field.entity_test.entity_test.field_test_import_sync.yml b/core/modules/field/tests/modules/field_test_config/sync/field.field.entity_test.entity_test.field_test_import_sync.yml new file mode 100644 index 0000000..678c9fa --- /dev/null +++ b/core/modules/field/tests/modules/field_test_config/sync/field.field.entity_test.entity_test.field_test_import_sync.yml @@ -0,0 +1,16 @@ +id: entity_test.entity_test.field_test_import_sync +uuid: ea711065-6940-47cd-813d-618f64095481 +langcode: en +field_name: field_test_import_sync +entity_type: entity_test +bundle: entity_test +label: 'Import from sync' +description: '' +required: '0' +default_value: { } +default_value_callback: '' +settings: { } +field_type: text +dependencies: + config: + - field.storage.entity_test.field_test_import_sync diff --git a/core/modules/field/tests/modules/field_test_config/sync/field.field.entity_test.test_bundle.field_test_import_sync_2.yml b/core/modules/field/tests/modules/field_test_config/sync/field.field.entity_test.test_bundle.field_test_import_sync_2.yml new file mode 100644 index 0000000..e483418 --- /dev/null +++ b/core/modules/field/tests/modules/field_test_config/sync/field.field.entity_test.test_bundle.field_test_import_sync_2.yml @@ -0,0 +1,16 @@ +id: entity_test.test_bundle.field_test_import_sync_2 +uuid: f07794a2-d7cc-45b6-b40d-13cf021b5552 +langcode: en +field_name: field_test_import_sync_2 +entity_type: entity_test +bundle: test_bundle +label: 'Test import field 2 on test bundle' +description: '' +required: '0' +default_value: { } +default_value_callback: '' +settings: { } +field_type: text +dependencies: + config: + - field.storage.entity_test.field_test_import_sync_2 diff --git a/core/modules/field/tests/modules/field_test_config/sync/field.field.entity_test.test_bundle_2.field_test_import_sync_2.yml b/core/modules/field/tests/modules/field_test_config/sync/field.field.entity_test.test_bundle_2.field_test_import_sync_2.yml new file mode 100644 index 0000000..3afd2e2 --- /dev/null +++ b/core/modules/field/tests/modules/field_test_config/sync/field.field.entity_test.test_bundle_2.field_test_import_sync_2.yml @@ -0,0 +1,16 @@ +id: entity_test.test_bundle_2.field_test_import_sync_2 +uuid: 49d6dd19-5097-443d-8f00-fc79525bebce +langcode: en +field_name: field_test_import_sync_2 +entity_type: entity_test +bundle: test_bundle_2 +label: 'Test import field 2 on test bundle 2' +description: '' +required: '0' +default_value: { } +default_value_callback: '' +settings: { } +field_type: text +dependencies: + config: + - field.storage.entity_test.field_test_import_sync_2 diff --git a/core/modules/field/tests/modules/field_test_config/sync/field.storage.entity_test.field_test_import_sync.yml b/core/modules/field/tests/modules/field_test_config/sync/field.storage.entity_test.field_test_import_sync.yml new file mode 100644 index 0000000..e47a615 --- /dev/null +++ b/core/modules/field/tests/modules/field_test_config/sync/field.storage.entity_test.field_test_import_sync.yml @@ -0,0 +1,20 @@ +id: entity_test.field_test_import_sync +uuid: 0bf654cc-f14a-4881-b94c-76959e47466b +langcode: en +field_name: field_test_import_sync +entity_type: entity_test +type: text +settings: + max_length: '255' +module: text +locked: '0' +cardinality: '1' +translatable: '0' +indexes: + format: + - format +dependencies: + module: + - entity_test + - text +persist_with_no_fields: false diff --git a/core/modules/field/tests/modules/field_test_config/sync/field.storage.entity_test.field_test_import_sync_2.yml b/core/modules/field/tests/modules/field_test_config/sync/field.storage.entity_test.field_test_import_sync_2.yml new file mode 100644 index 0000000..fee4cbe --- /dev/null +++ b/core/modules/field/tests/modules/field_test_config/sync/field.storage.entity_test.field_test_import_sync_2.yml @@ -0,0 +1,20 @@ +id: entity_test.field_test_import_sync_2 +uuid: 2165d9aa-9a0c-41a1-be02-2a49f3405c00 +langcode: en +field_name: field_test_import_sync_2 +entity_type: entity_test +type: text +settings: + max_length: '255' +module: text +locked: '0' +cardinality: '1' +translatable: '0' +indexes: + format: + - format +dependencies: + module: + - entity_test + - text +persist_with_no_fields: false diff --git a/core/modules/image/src/Tests/ImageAdminStylesTest.php b/core/modules/image/src/Tests/ImageAdminStylesTest.php index dedb9b5..a4d9962 100644 --- a/core/modules/image/src/Tests/ImageAdminStylesTest.php +++ b/core/modules/image/src/Tests/ImageAdminStylesTest.php @@ -442,11 +442,11 @@ function testConfigImport() { $this->drupalGet('node/' . $nid); $this->assertRaw($style->buildUrl($original_uri), format_string('Image displayed using style @style.', array('@style' => $style_name))); - // Copy config to staging, and delete the image style. - $staging = $this->container->get('config.storage.staging'); + // Copy config to sync, and delete the image style. + $sync = $this->container->get('config.storage.sync'); $active = $this->container->get('config.storage'); - $this->copyConfig($active, $staging); - $staging->delete('image.style.' . $style_name); + $this->copyConfig($active, $sync); + $sync->delete('image.style.' . $style_name); $this->configImporter()->import(); $this->assertFalse(ImageStyle::load($style_name), 'Style deleted after config import.'); diff --git a/core/modules/language/src/Tests/LanguageConfigOverrideImportTest.php b/core/modules/language/src/Tests/LanguageConfigOverrideImportTest.php index 537584d..c750648 100644 --- a/core/modules/language/src/Tests/LanguageConfigOverrideImportTest.php +++ b/core/modules/language/src/Tests/LanguageConfigOverrideImportTest.php @@ -29,9 +29,9 @@ class LanguageConfigOverrideImportTest extends WebTestBase { */ public function testConfigOverrideImport() { ConfigurableLanguage::createFromLangcode('fr')->save(); - /* @var \Drupal\Core\Config\StorageInterface $staging */ - $staging = \Drupal::service('config.storage.staging'); - $this->copyConfig(\Drupal::service('config.storage'), $staging); + /* @var \Drupal\Core\Config\StorageInterface $sync */ + $sync = \Drupal::service('config.storage.sync'); + $this->copyConfig(\Drupal::service('config.storage'), $sync); // Uninstall the language module and its dependencies so we can test // enabling the language module and creating overrides at the same time @@ -41,11 +41,11 @@ public function testConfigOverrideImport() { // ConfigFactory. $this->rebuildContainer(); - /* @var \Drupal\Core\Config\StorageInterface $override_staging */ - $override_staging = $staging->createCollection('language.fr'); - // Create some overrides in staging. - $override_staging->write('system.site', array('name' => 'FR default site name')); - $override_staging->write('system.maintenance', array('message' => 'FR message: @site is currently under maintenance. We should be back shortly. Thank you for your patience')); + /* @var \Drupal\Core\Config\StorageInterface $override_sync */ + $override_sync = $sync->createCollection('language.fr'); + // Create some overrides in sync. + $override_sync->write('system.site', array('name' => 'FR default site name')); + $override_sync->write('system.maintenance', array('message' => 'FR message: @site is currently under maintenance. We should be back shortly. Thank you for your patience')); $this->configImporter()->import(); $this->rebuildContainer(); @@ -71,14 +71,14 @@ public function testConfigOverrideImportEvents() { ConfigurableLanguage::createFromLangcode('fr')->save(); - /* @var \Drupal\Core\Config\StorageInterface $staging */ - $staging = \Drupal::service('config.storage.staging'); - $this->copyConfig(\Drupal::service('config.storage'), $staging); + /* @var \Drupal\Core\Config\StorageInterface $sync */ + $sync = \Drupal::service('config.storage.sync'); + $this->copyConfig(\Drupal::service('config.storage'), $sync); - /* @var \Drupal\Core\Config\StorageInterface $override_staging */ - $override_staging = $staging->createCollection('language.fr'); - // Create some overrides in staging. - $override_staging->write('system.site', array('name' => 'FR default site name')); + /* @var \Drupal\Core\Config\StorageInterface $override_sync */ + $override_sync = $sync->createCollection('language.fr'); + // Create some overrides in sync. + $override_sync->write('system.site', array('name' => 'FR default site name')); \Drupal::state()->set('config_events_test.event', FALSE); $this->configImporter()->import(); diff --git a/core/modules/node/src/Tests/Config/NodeImportChangeTest.php b/core/modules/node/src/Tests/Config/NodeImportChangeTest.php index 4e1fbc1..33f07c2 100644 --- a/core/modules/node/src/Tests/Config/NodeImportChangeTest.php +++ b/core/modules/node/src/Tests/Config/NodeImportChangeTest.php @@ -44,16 +44,16 @@ public function testImportChange() { // Simulate config data to import: // - a modified version (modified label) of the node type config. $active = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); - $this->copyConfig($active, $staging); + $sync = $this->container->get('config.storage.sync'); + $this->copyConfig($active, $sync); $node_type = $active->read($node_type_config_name); $new_label = 'Test update import field'; $node_type['name'] = $new_label; - // Save as files in the staging directory. - $staging->write($node_type_config_name, $node_type); + // Save as files in the sync directory. + $sync->write($node_type_config_name, $node_type); - // Import the content of the staging directory. + // Import the content of the sync directory. $this->configImporter()->import(); // Check that the updated config was correctly imported. diff --git a/core/modules/node/src/Tests/Config/NodeImportCreateTest.php b/core/modules/node/src/Tests/Config/NodeImportCreateTest.php index 97fe51f..8b7c502 100644 --- a/core/modules/node/src/Tests/Config/NodeImportCreateTest.php +++ b/core/modules/node/src/Tests/Config/NodeImportCreateTest.php @@ -61,19 +61,19 @@ public function testImportCreate() { // Simulate config data to import. $active = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); - $this->copyConfig($active, $staging); + $sync = $this->container->get('config.storage.sync'); + $this->copyConfig($active, $sync); // Manually add new node type. - $src_dir = drupal_get_path('module', 'node_test_config') . '/staging'; - $target_dir = $this->configDirectories[CONFIG_STAGING_DIRECTORY]; + $src_dir = drupal_get_path('module', 'node_test_config') . '/sync'; + $target_dir = $this->configDirectories[CONFIG_SYNC_DIRECTORY]; $this->assertTrue(file_unmanaged_copy("$src_dir/$node_type_config_name.yml", "$target_dir/$node_type_config_name.yml")); - // Import the content of the staging directory. + // Import the content of the sync directory. $this->configImporter()->import(); // Check that the content type was created. $node_type = NodeType::load($node_type_id); - $this->assertTrue($node_type, 'Import node type from staging was created.'); + $this->assertTrue($node_type, 'Import node type from sync was created.'); $this->assertFalse(FieldConfig::loadByName('node', $node_type_id, 'body')); } diff --git a/core/modules/node/src/Tests/NodeTypeRenameConfigImportTest.php b/core/modules/node/src/Tests/NodeTypeRenameConfigImportTest.php index af29bce..7eb848c 100644 --- a/core/modules/node/src/Tests/NodeTypeRenameConfigImportTest.php +++ b/core/modules/node/src/Tests/NodeTypeRenameConfigImportTest.php @@ -62,11 +62,11 @@ public function testConfigurationRename() { $fields['status']->getConfig($content_type->id())->setDefaultValue(FALSE)->save(); $active = $this->container->get('config.storage'); - $staging = $this->container->get('config.storage.staging'); + $sync = $this->container->get('config.storage.sync'); $config_name = $content_type->getEntityType()->getConfigPrefix() . '.' . $content_type->id(); - // Emulate a staging operation. - $this->copyConfig($active, $staging); + // Emulate a sync operation. + $this->copyConfig($active, $sync); // Change the machine name of the content type. $content_type->set('type', Unicode::strtolower($this->randomMachineName(8))); diff --git a/core/modules/node/tests/modules/node_test_config/staging/node.type.import.yml b/core/modules/node/tests/modules/node_test_config/staging/node.type.import.yml deleted file mode 100644 index f1bafe4..0000000 --- a/core/modules/node/tests/modules/node_test_config/staging/node.type.import.yml +++ /dev/null @@ -1,9 +0,0 @@ -type: import -name: Import -description: 'Import description.' -help: '' -new_revision: false -display_submitted: true -preview_mode: 1 -status: true -langcode: en diff --git a/core/modules/node/tests/modules/node_test_config/sync/node.type.import.yml b/core/modules/node/tests/modules/node_test_config/sync/node.type.import.yml new file mode 100644 index 0000000..f1bafe4 --- /dev/null +++ b/core/modules/node/tests/modules/node_test_config/sync/node.type.import.yml @@ -0,0 +1,9 @@ +type: import +name: Import +description: 'Import description.' +help: '' +new_revision: false +display_submitted: true +preview_mode: 1 +status: true +langcode: en diff --git a/core/modules/options/src/Tests/OptionsFloatFieldImportTest.php b/core/modules/options/src/Tests/OptionsFloatFieldImportTest.php index 5be5840..7a46a9f 100644 --- a/core/modules/options/src/Tests/OptionsFloatFieldImportTest.php +++ b/core/modules/options/src/Tests/OptionsFloatFieldImportTest.php @@ -48,8 +48,8 @@ public function testImport() { $admin_path = 'admin/structure/types/manage/' . $type . '/fields/node.' . $type . '.' . $field_name . '/storage'; - // Export active config to staging - $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.staging')); + // Export active config to sync + $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.sync')); // Set the active to not use dots in the allowed values key names. $edit = array('settings[allowed_values]' => "0|Zero\n1|One"); diff --git a/core/modules/simpletest/src/KernelTestBase.php b/core/modules/simpletest/src/KernelTestBase.php index 481b031..dcac73e 100644 --- a/core/modules/simpletest/src/KernelTestBase.php +++ b/core/modules/simpletest/src/KernelTestBase.php @@ -112,13 +112,13 @@ protected function beforePrepareEnvironment() { * @see config_get_config_directory() * * @throws \RuntimeException - * Thrown when CONFIG_ACTIVE_DIRECTORY or CONFIG_STAGING_DIRECTORY cannot + * Thrown when CONFIG_ACTIVE_DIRECTORY or CONFIG_SYNC_DIRECTORY cannot * be created or made writable. */ protected function prepareConfigDirectories() { $this->configDirectories = array(); include_once DRUPAL_ROOT . '/core/includes/install.inc'; - foreach (array(CONFIG_ACTIVE_DIRECTORY, CONFIG_STAGING_DIRECTORY) as $type) { + foreach (array(CONFIG_ACTIVE_DIRECTORY, CONFIG_SYNC_DIRECTORY) as $type) { // Assign the relative path to the global variable. $path = $this->siteDirectory . '/config_' . $type; $GLOBALS['config_directories'][$type] = $path; diff --git a/core/modules/simpletest/src/TestBase.php b/core/modules/simpletest/src/TestBase.php index 5471ed6..dc4565c 100644 --- a/core/modules/simpletest/src/TestBase.php +++ b/core/modules/simpletest/src/TestBase.php @@ -1599,7 +1599,7 @@ public function configImporter() { if (!$this->configImporter) { // Set up the ConfigImporter object for testing. $storage_comparer = new StorageComparer( - $this->container->get('config.storage.staging'), + $this->container->get('config.storage.sync'), $this->container->get('config.storage'), $this->container->get('config.manager') ); diff --git a/core/modules/system/src/Tests/Entity/ConfigEntityImportTest.php b/core/modules/system/src/Tests/Entity/ConfigEntityImportTest.php index 57a97c2..abae28e 100644 --- a/core/modules/system/src/Tests/Entity/ConfigEntityImportTest.php +++ b/core/modules/system/src/Tests/Entity/ConfigEntityImportTest.php @@ -31,7 +31,7 @@ class ConfigEntityImportTest extends WebTestBase { protected function setUp() { parent::setUp(); - $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.staging')); + $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.sync')); } /** @@ -58,7 +58,7 @@ protected function doActionUpdate() { $this->checkSinglePluginConfigSync($entity, 'configuration', 'message', ''); - // Read the existing data, and prepare an altered version in staging. + // Read the existing data, and prepare an altered version in sync. $custom_data = $original_data = $this->container->get('config.storage')->read($name); $custom_data['configuration']['message'] = 'Granny Smith'; $this->assertConfigUpdateImport($name, $original_data, $custom_data); @@ -78,7 +78,7 @@ protected function doBlockUpdate() { $this->checkSinglePluginConfigSync($block, 'settings', 'label', 'Red Delicious'); - // Read the existing data, and prepare an altered version in staging. + // Read the existing data, and prepare an altered version in sync. $custom_data = $original_data = $this->container->get('config.storage')->read($name); $custom_data['settings']['label'] = 'Granny Smith'; $this->assertConfigUpdateImport($name, $original_data, $custom_data); @@ -110,7 +110,7 @@ protected function doFilterFormatUpdate() { $this->assertIdentical($filters, $entity->get('filters')); $this->assertIdentical($filters, $plugin_collection->getConfiguration()); - // Read the existing data, and prepare an altered version in staging. + // Read the existing data, and prepare an altered version in sync. $custom_data = $original_data = $this->container->get('config.storage')->read($name); $custom_data['filters']['filter_url']['settings']['filter_url_length'] = 100; $this->assertConfigUpdateImport($name, $original_data, $custom_data); @@ -145,7 +145,7 @@ protected function doImageStyleUpdate() { $this->assertIdentical($effects, $entity->get('effects')); $this->assertIdentical($effects, $plugin_collection->getConfiguration()); - // Read the existing data, and prepare an altered version in staging. + // Read the existing data, and prepare an altered version in sync. $custom_data = $original_data = $this->container->get('config.storage')->read($name); $effect_name = key($original_data['effects']); @@ -167,7 +167,7 @@ protected function doSearchPageUpdate() { $this->checkSinglePluginConfigSync($entity, 'configuration', 'boost', 'bi'); - // Read the existing data, and prepare an altered version in staging. + // Read the existing data, and prepare an altered version in sync. $custom_data = $original_data = $this->container->get('config.storage')->read($name); $custom_data['configuration']['boost'] = 'asdf'; $this->assertConfigUpdateImport($name, $original_data, $custom_data); @@ -218,7 +218,7 @@ protected function checkSinglePluginConfigSync(EntityWithPluginCollectionInterfa * The new data to store in the config object. */ public function assertConfigUpdateImport($name, $original_data, $custom_data) { - $this->container->get('config.storage.staging')->write($name, $custom_data); + $this->container->get('config.storage.sync')->write($name, $custom_data); // Verify the active configuration still returns the default values. $config = $this->config($name); diff --git a/core/modules/system/src/Tests/Entity/ContentEntityNullStorageTest.php b/core/modules/system/src/Tests/Entity/ContentEntityNullStorageTest.php index 69ad3b9..376b02e 100644 --- a/core/modules/system/src/Tests/Entity/ContentEntityNullStorageTest.php +++ b/core/modules/system/src/Tests/Entity/ContentEntityNullStorageTest.php @@ -51,11 +51,11 @@ public function testDeleteThroughImport() { $contact_form = ContactForm::create(['id' => 'test']); $contact_form->save(); - $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.staging')); + $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.sync')); // Set up the ConfigImporter object for testing. $storage_comparer = new StorageComparer( - $this->container->get('config.storage.staging'), + $this->container->get('config.storage.sync'), $this->container->get('config.storage'), $this->container->get('config.manager') ); @@ -71,9 +71,9 @@ public function testDeleteThroughImport() { $this->container->get('string_translation') ); - // Delete the contact message in staging. - $staging = $this->container->get('config.storage.staging'); - $staging->delete($contact_form->getConfigDependencyName()); + // Delete the contact message in sync. + $sync = $this->container->get('config.storage.sync'); + $sync->delete($contact_form->getConfigDependencyName()); // Import. $config_importer->reset()->import(); diff --git a/core/modules/system/src/Tests/Installer/InstallerExistingSettingsNoProfileTest.php b/core/modules/system/src/Tests/Installer/InstallerExistingSettingsNoProfileTest.php index 61dd5be..f71a6c6 100644 --- a/core/modules/system/src/Tests/Installer/InstallerExistingSettingsNoProfileTest.php +++ b/core/modules/system/src/Tests/Installer/InstallerExistingSettingsNoProfileTest.php @@ -48,13 +48,13 @@ protected function setUp() { 'value' => conf_path() . '/files/config_active', 'required' => TRUE, ), - CONFIG_STAGING_DIRECTORY => (object) array( - 'value' => conf_path() . '/files/config_staging', + CONFIG_SYNC_DIRECTORY => (object) array( + 'value' => conf_path() . '/files/config_sync', 'required' => TRUE, ), ); mkdir($this->settings['config_directories'][CONFIG_ACTIVE_DIRECTORY]->value, 0777, TRUE); - mkdir($this->settings['config_directories'][CONFIG_STAGING_DIRECTORY]->value, 0777, TRUE); + mkdir($this->settings['config_directories'][CONFIG_SYNC_DIRECTORY]->value, 0777, TRUE); parent::setUp(); } diff --git a/core/modules/system/src/Tests/Installer/InstallerExistingSettingsTest.php b/core/modules/system/src/Tests/Installer/InstallerExistingSettingsTest.php index 08ae978..709d271 100644 --- a/core/modules/system/src/Tests/Installer/InstallerExistingSettingsTest.php +++ b/core/modules/system/src/Tests/Installer/InstallerExistingSettingsTest.php @@ -59,13 +59,13 @@ protected function setUp() { 'value' => $site_path . '/files/config_active', 'required' => TRUE, ), - CONFIG_STAGING_DIRECTORY => (object) array( - 'value' => $site_path . '/files/config_staging', + CONFIG_SYNC_DIRECTORY => (object) array( + 'value' => $site_path . '/files/config_sync', 'required' => TRUE, ), ); mkdir($this->settings['config_directories'][CONFIG_ACTIVE_DIRECTORY]->value, 0777, TRUE); - mkdir($this->settings['config_directories'][CONFIG_STAGING_DIRECTORY]->value, 0777, TRUE); + mkdir($this->settings['config_directories'][CONFIG_SYNC_DIRECTORY]->value, 0777, TRUE); parent::setUp(); } diff --git a/core/modules/views/src/Tests/Entity/ViewEntityDependenciesTest.php b/core/modules/views/src/Tests/Entity/ViewEntityDependenciesTest.php index 8805214..9545d4c 100644 --- a/core/modules/views/src/Tests/Entity/ViewEntityDependenciesTest.php +++ b/core/modules/views/src/Tests/Entity/ViewEntityDependenciesTest.php @@ -138,7 +138,7 @@ public function testCalculateDependencies() { $dependencies = $view->calculateDependencies(); $this->assertEqual($expected[$view_id], $dependencies); $config = $this->config('views.view.' . $view_id); - \Drupal::service('config.storage.staging')->write($view_id, $config->get()); + \Drupal::service('config.storage.sync')->write($view_id, $config->get()); } // Ensure that dependencies are calculated on the display level. diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php index 65139dc..5131630 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -223,13 +223,13 @@ * Location of the site configuration files. * * The $config_directories array specifies the location of file system - * directories used for configuration data. On install, "active" and "staging" - * directories are created for configuration. The staging directory is used for + * directories used for configuration data. On install, "active" and "sync" + * directories are created for configuration. The sync directory is used for * configuration imports; the active directory is not used by default, since the * default storage for active configuration is the database rather than the file * system (this can be changed; see "Active configuration settings" below). * - * The default location for the active and staging directories is inside a + * The default location for the active and sync directories is inside a * randomly-named directory in the public files path; this setting allows you to * override these locations. If you use files for the active configuration, you * can enhance security by putting the active configuration outside your @@ -239,7 +239,7 @@ * @code * $config_directories = array( * CONFIG_ACTIVE_DIRECTORY => '/some/directory/outside/webroot', - * CONFIG_STAGING_DIRECTORY => '/another/directory/outside/webroot', + * CONFIG_SYNC_DIRECTORY => '/another/directory/outside/webroot', * ); * @endcode */