diff --git a/core/modules/config/src/Form/ConfigImportForm.php b/core/modules/config/src/Form/ConfigImportForm.php index 2ee1917..7b29e3f 100644 --- a/core/modules/config/src/Form/ConfigImportForm.php +++ b/core/modules/config/src/Form/ConfigImportForm.php @@ -9,10 +9,8 @@ use Drupal\Core\Archiver\ArchiveTar; use Drupal\Core\Config\StorageInterface; -use Drupal\Core\Config\ConfigManagerInterface; use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Render\RendererInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -28,53 +26,13 @@ class ConfigImportForm extends FormBase { protected $configStorage; /** - * The staging configuration object. - * - * @var \Drupal\Core\Config\StorageInterface - */ - protected $stagingStorage; - - /** - * The active configuration object. - * - * @var \Drupal\Core\Config\StorageInterface - */ - protected $activeStorage; - - /** - * The snapshot configuration object. - * - * @var \Drupal\Core\Config\StorageInterface - */ - protected $snapshotStorage; - - /** - * The configuration manager. - * - * @var \Drupal\Core\Config\ConfigManagerInterface; - */ - protected $configManager; - - /** - * The renderer. - * - * @var \Drupal\Core\Render\RendererInterface - */ - protected $renderer; - - /** * Constructs a new ConfigImportForm. * * @param \Drupal\Core\Config\StorageInterface $config_storage * The configuration storage. */ - public function __construct(StorageInterface $staging_storage, StorageInterface $active_storage, StorageInterface $snapshot_storage, StorageInterface $config_storage, ConfigManagerInterface $config_manager, RendererInterface $renderer) { - $this->stagingStorage = $staging_storage; - $this->activeStorage = $active_storage; - $this->snapshotStorage = $snapshot_storage; + public function __construct(StorageInterface $config_storage) { $this->configStorage = $config_storage; - $this->configManager = $config_manager; - $this->renderer = $renderer; } /** @@ -82,12 +40,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'), - $container->get('config.storage.snapshot'), - $container->get('config.storage.staging'), - $container->get('config.manager'), - $container->get('renderer') + $container->get('config.storage.staging') ); } @@ -112,7 +65,6 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#type' => 'submit', '#value' => $this->t('Upload'), ); - return $form; } diff --git a/core/modules/config/src/Form/ConfigSync.php b/core/modules/config/src/Form/ConfigSync.php index be4e21a..7bb098e 100644 --- a/core/modules/config/src/Form/ConfigSync.php +++ b/core/modules/config/src/Form/ConfigSync.php @@ -7,24 +7,15 @@ namespace Drupal\config\Form; -use Drupal\Component\Uuid\UuidInterface; -use Drupal\Core\Config\ConfigImporterException; use Drupal\Core\Config\ConfigImporter; -use Drupal\Core\Config\TypedConfigManagerInterface; -use Drupal\Core\Entity\EntityManagerInterface; -use Drupal\Core\Extension\ModuleHandlerInterface; -use Drupal\Core\Extension\ModuleInstallerInterface; -use Drupal\Core\Extension\ThemeHandlerInterface; use Drupal\Core\Config\ConfigManagerInterface; use Drupal\Core\Form\FormBase; use Drupal\Core\Config\StorageInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface; -use Drupal\Core\Lock\LockBackendInterface; use Drupal\Core\Config\StorageComparer; use Drupal\Core\Render\RendererInterface; use Drupal\Core\Url; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -33,13 +24,6 @@ class ConfigSync extends FormBase { /** - * The database lock object. - * - * @var \Drupal\Core\Lock\LockBackendInterface - */ - protected $lock; - - /** * The staging configuration object. * * @var \Drupal\Core\Config\StorageInterface @@ -61,13 +45,6 @@ class ConfigSync extends FormBase { protected $snapshotStorage; /** - * Event dispatcher. - * - * @var \Symfony\Component\EventDispatcher\EventDispatcherInterface - */ - protected $eventDispatcher; - - /** * The configuration manager. * * @var \Drupal\Core\Config\ConfigManagerInterface; @@ -75,34 +52,6 @@ class ConfigSync extends FormBase { protected $configManager; /** - * The typed config manager. - * - * @var \Drupal\Core\Config\TypedConfigManagerInterface - */ - protected $typedConfigManager; - - /** - * The module handler. - * - * @var \Drupal\Core\Extension\ModuleHandlerInterface - */ - protected $moduleHandler; - - /** - * The theme handler. - * - * @var \Drupal\Core\Extension\ThemeHandlerInterface - */ - protected $themeHandler; - - /** - * The module installer. - * - * @var \Drupal\Core\Extension\ModuleInstallerInterface - */ - protected $moduleInstaller; - - /** * The renderer. * * @var \Drupal\Core\Render\RendererInterface @@ -125,35 +74,18 @@ class ConfigSync extends FormBase { * The target storage. * @param \Drupal\Core\Config\StorageInterface $snapshot_storage * The snapshot storage. - * @param \Drupal\Core\Lock\LockBackendInterface $lock - * The lock object. - * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface - * $event_dispatcher - * Event dispatcher. * @param \Drupal\Core\Config\ConfigManagerInterface $config_manager * Configuration manager. - * @param \Drupal\Core\Config\TypedConfigManagerInterface $typed_config - * The typed configuration manager. - * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler - * The module handler. - * @param \Drupal\Core\Extension\ModuleInstallerInterface $module_installer - * The module installer. - * @param \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler - * The theme handler. * @param \Drupal\Core\Render\RendererInterface $renderer * The renderer. + * @param \Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface $key_value_expirable + * The expirable key/value store. */ - 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, RendererInterface $renderer, KeyValueStoreExpirableInterface $key_value_expirable) { + public function __construct(StorageInterface $staging_storage, StorageInterface $active_storage, StorageInterface $snapshot_storage, ConfigManagerInterface $config_manager, RendererInterface $renderer, KeyValueStoreExpirableInterface $key_value_expirable) { $this->stagingStorage = $staging_storage; $this->activeStorage = $active_storage; $this->snapshotStorage = $snapshot_storage; - $this->lock = $lock; - $this->eventDispatcher = $event_dispatcher; $this->configManager = $config_manager; - $this->typedConfigManager = $typed_config; - $this->moduleHandler = $module_handler; - $this->moduleInstaller = $module_installer; - $this->themeHandler = $theme_handler; $this->renderer = $renderer; $this->keyValueExpirable = $key_value_expirable; } @@ -166,13 +98,7 @@ public static function create(ContainerInterface $container) { $container->get('config.storage.staging'), $container->get('config.storage'), $container->get('config.storage.snapshot'), - $container->get('lock.persistent'), - $container->get('event_dispatcher'), $container->get('config.manager'), - $container->get('config.typed'), - $container->get('module_handler'), - $container->get('module_installer'), - $container->get('theme_handler'), $container->get('renderer'), $container->get('keyvalue.expirable')->get('config_import') ); diff --git a/core/modules/config/src/Form/ConfigSyncConfirmForm.php b/core/modules/config/src/Form/ConfigSyncConfirmForm.php index 735b8ce..dfbe7a5 100644 --- a/core/modules/config/src/Form/ConfigSyncConfirmForm.php +++ b/core/modules/config/src/Form/ConfigSyncConfirmForm.php @@ -97,9 +97,22 @@ public function getFormId() { /** * Constructs a ConfigSyncConfirmForm object. * - * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface - * $event_dispatcher + * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher * The event dispatcher. + * @param \Drupal\Core\Config\ConfigManagerInterface $config_manager + * Configuration manager. + * @param \Drupal\Core\Lock\LockBackendInterface $lock + * The lock object. + * @param \Drupal\Core\Config\TypedConfigManagerInterface $typed_config_manager + * The typed configuration manager. + * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler + * The module handler. + * @param \Drupal\Core\Extension\ModuleInstallerInterface $module_installer + * The module installer. + * @param \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler + * The theme handler. + * @param \Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface $key_value_expirable + * The expirable key/value store. */ public function __construct(EventDispatcherInterface $event_dispatcher, ConfigManagerInterface $config_manager, LockBackendInterface $lock, TypedConfigManagerInterface $typed_config_manager, ModuleHandlerInterface $module_handler, ModuleInstallerInterface $module_installer, ThemeHandlerInterface $theme_handler, KeyValueStoreExpirableInterface $key_value_expirable) { $this->eventDispatcher = $event_dispatcher; diff --git a/core/modules/config/src/Tests/ConfigExportImportUITest.php b/core/modules/config/src/Tests/ConfigExportImportUITest.php index 6f8813c..a0d9a1c 100644 --- a/core/modules/config/src/Tests/ConfigExportImportUITest.php +++ b/core/modules/config/src/Tests/ConfigExportImportUITest.php @@ -176,7 +176,7 @@ public function testExportImport() { // We now have to confirm the import. $this->assertText(t('This action cannot be undone.')); - $this->drupalPostForm('admin/config/development/configuration/sync/confirm', array(), 'Import'); + $this->drupalPostForm('admin/config/development/configuration/sync/confirm', array(), t('Import')); // After importing the snapshot has been updated an there are no warnings. $this->assertNoText(t('Warning message')); @@ -297,7 +297,7 @@ public function testExportImportCollections() { // We now have to confirm the import. $this->assertText(t('This action cannot be undone.')); - $this->drupalPostForm('admin/config/development/configuration/sync/confirm', array(), 'Import'); + $this->drupalPostForm('admin/config/development/configuration/sync/confirm', array(), t('Import')); $this->assertText(t('There are no configuration changes to import.')); diff --git a/core/modules/config/src/Tests/ConfigImportAllTest.php b/core/modules/config/src/Tests/ConfigImportAllTest.php index 0de3a03..5e5d11b 100644 --- a/core/modules/config/src/Tests/ConfigImportAllTest.php +++ b/core/modules/config/src/Tests/ConfigImportAllTest.php @@ -130,7 +130,7 @@ public function testInstallUninstall() { // Import the configuration thereby re-installing all the modules. $this->drupalPostForm('admin/config/development/configuration', array(), t('Import all')); - $this->drupalPostForm('admin/config/development/configuration/sync/confirm', array(), 'Import'); + $this->drupalPostForm('admin/config/development/configuration/sync/confirm', array(), t('Import')); // Modules have been installed that have services. $this->rebuildContainer(); diff --git a/core/modules/config/src/Tests/ConfigImportInstallProfileTest.php b/core/modules/config/src/Tests/ConfigImportInstallProfileTest.php index 4527d2d..0f63ad0 100644 --- a/core/modules/config/src/Tests/ConfigImportInstallProfileTest.php +++ b/core/modules/config/src/Tests/ConfigImportInstallProfileTest.php @@ -31,7 +31,7 @@ class ConfigImportInstallProfileTest extends WebTestBase { public static $modules = array('config'); /** - * A user with the 'import configuration' permission. + * A user with the 'synchronize configuration' permission. * * @var \Drupal\user\UserInterface */ diff --git a/core/modules/config/src/Tests/ConfigImportUITest.php b/core/modules/config/src/Tests/ConfigImportUITest.php index 0eeb6ef..442f5db 100644 --- a/core/modules/config/src/Tests/ConfigImportUITest.php +++ b/core/modules/config/src/Tests/ConfigImportUITest.php @@ -26,7 +26,7 @@ class ConfigImportUITest extends WebTestBase { public static $modules = array('config', 'config_test', 'config_import_test', 'text', 'options'); /** - * A user with the 'Import configuration' permission. + * A user with the 'synchronize configuration' permission. * * @var \Drupal\user\UserInterface */ @@ -123,7 +123,7 @@ function testImport() { // Import and verify that both do not appear anymore. $this->drupalPostForm(NULL, array(), t('Import all')); - $this->drupalPostForm('admin/config/development/configuration/sync/confirm', array(), 'Import'); + $this->drupalPostForm('admin/config/development/configuration/sync/confirm', array(), t('Import')); $this->assertNoRaw('' . $name); $this->assertNoRaw('' . $dynamic_name); $this->assertNoRaw('core.extension'); @@ -196,7 +196,7 @@ function testImport() { // Import and verify that both do not appear anymore. $this->drupalPostForm(NULL, array(), t('Import all')); - $this->drupalPostForm('admin/config/development/configuration/sync/confirm', array(), 'Import'); + $this->drupalPostForm('admin/config/development/configuration/sync/confirm', array(), t('Import')); $this->assertNoRaw('core.extension'); $this->assertNoRaw('system.theme'); $this->assertNoRaw('action.settings'); diff --git a/core/modules/field/field.module b/core/modules/field/field.module index b39170c..d09049e 100644 --- a/core/modules/field/field.module +++ b/core/modules/field/field.module @@ -281,7 +281,7 @@ function field_config_import_steps_alter(&$sync_steps, ConfigImporter $config_im * * @see \Drupal\field\ConfigImporterFieldPurger */ -function field_form_config_import_form_alter(&$form, FormStateInterface $form_state) { +function field_form_config_admin_import_form_alter(&$form, FormStateInterface $form_state) { // Only display the message when there is a storage comparer available and the // form is not submitted. $user_input = $form_state->getUserInput(); diff --git a/sites/default/default.services.yml b/sites/default/default.services.yml index 36011ee..e20002d 100644 --- a/sites/default/default.services.yml +++ b/sites/default/default.services.yml @@ -51,7 +51,7 @@ parameters: # changes (see auto_reload below). # # For more information about debugging Twig templates, see - # http://drupal.org/node/1906392. + # https://www.drupal.org/node/1906392. # # Not recommended in production environments # @default false diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php index cbef15b..9ad5cae 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -22,7 +22,7 @@ * 'sites/default' will be used. * * For example, for a fictitious site installed at - * http://www.drupal.org:8080/mysite/test/, the 'settings.php' file is searched + * https://www.drupal.org:8080/mysite/test/, the 'settings.php' file is searched * for in the following directories: * * - sites/8080.www.drupal.org.mysite.test @@ -44,7 +44,7 @@ * * Note that if you are installing on a non-standard port number, prefix the * hostname with that number. For example, - * http://www.drupal.org:8080/mysite/test/ could be loaded from + * https://www.drupal.org:8080/mysite/test/ could be loaded from * sites/8080.www.drupal.org.mysite.test/. * * @see example.sites.php @@ -440,7 +440,7 @@ * the code directly via SSH or FTP themselves. This setting completely * disables all functionality related to these authorized file operations. * - * @see http://drupal.org/node/244924 + * @see https://www.drupal.org/node/244924 * * Remove the leading hash signs to disable. */ @@ -473,8 +473,8 @@ * Note: Caches need to be cleared when this value is changed to make the * private:// stream wrapper available to the system. * - * See http://drupal.org/documentation/modules/file for more information about - * securing private files. + * See https://www.drupal.org/documentation/modules/file for more information + * about securing private files. */ # $settings['file_private_path'] = '';