Skip to content
Snippets Groups Projects
Unverified Commit b36543da authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2715145 by andypost, phenaproxima, longwave, alexpott, RenatoG,...

Issue #2715145 by andypost, phenaproxima, longwave, alexpott, RenatoG, quietone, catch: Remove system.authorize config
parent bd04c705
No related branches found
No related tags found
20 merge requests!12227Issue #3181946 by jonmcl, mglaman,!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1896Issue #2940605: Can only intentionally re-render an entity with references 20 times,!1101Issue #2412669 by claudiu.cristea, Julfabre, sidharrell, catch, daffie,...,!1039Issue #2556069 by claudiu.cristea, bnjmnm, lauriii, pfrenssen, Tim Bozeman,...,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!1012Issue #3226887: Hreflang on non-canonical content pages,!872Draft: Issue #3221319: Race condition when creating menu links and editing content deletes menu links,!594Put each entity type table into a details element on admin/config/regional/content-language,!592Issue #2957953: Editing menus user-experience has regressed,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493,!512Issue #3207771: Menu UI node type form documentation points to non-existent function,!485Sets the autocomplete attribute for username/password input field on login form.,!449Issue #2784233: Allow multiple vocabularies in the taxonomy filter,!231Issue #2671162: summary text wysiwyg patch working fine on 9.2.0-dev,!213Issue #2906496: Give Media a menu item under Content,!43Resolve #3173180: Add UI for 'loading' html attribute to images,!30Issue #3182188: Updates composer usage to point at ./vendor/bin/composer
filetransfer_default:
...@@ -53,14 +53,6 @@ system.maintenance: ...@@ -53,14 +53,6 @@ system.maintenance:
type: text type: text
label: 'Message to display when in maintenance mode' label: 'Message to display when in maintenance mode'
system.authorize:
type: config_object
label: 'Authorize settings'
mapping:
filetransfer_default:
type: string
label: 'Default file transfer protocol'
system.cron: system.cron:
type: config_object type: config_object
label: 'Cron settings' label: 'Cron settings'
... ...
......
...@@ -9,7 +9,11 @@ source: ...@@ -9,7 +9,11 @@ source:
- authorize_filetransfer_default - authorize_filetransfer_default
source_module: system source_module: system
process: process:
filetransfer_default: authorize_filetransfer_default filetransfer_default:
plugin: skip_on_empty
method: row
source: empty
destination: destination:
plugin: config plugin: config
config_name: system.authorize config_name: null
destination_module: system
...@@ -197,3 +197,10 @@ function system_post_update_service_advisory_settings() { ...@@ -197,3 +197,10 @@ function system_post_update_service_advisory_settings() {
$config = \Drupal::configFactory()->getEditable('system.advisories'); $config = \Drupal::configFactory()->getEditable('system.advisories');
$config->set('interval_hours', 6)->set('enabled', TRUE)->save(); $config->set('interval_hours', 6)->set('enabled', TRUE)->save();
} }
/**
* Remove obsolete system.authorize configuration.
*/
function system_post_update_delete_authorize_settings() {
\Drupal::configFactory()->getEditable('system.authorize')->delete();
}
<?php
namespace Drupal\Tests\system\Functional\Update;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
/**
* Tests the upgrade path for removal the system.authorize configuration.
*
* @see https://www.drupal.org/node/3206320
* @see system_post_update_delete_authorize_settings()
*
* @group Update
*/
class DeleteAuthorizeSettingsUpdateTest extends UpdatePathTestBase {
/**
* {@inheritdoc}
*/
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../fixtures/update/drupal-8.8.0.bare.standard.php.gz',
];
}
/**
* Tests system_post_update_delete_authorize_settings().
*/
public function testSystemAuthorizeRemoval() {
$this->assertArrayHasKey('filetransfer_default', $this->config('system.authorize')->getRawData());
$this->runUpdates();
$config = $this->config('system.authorize');
$this->assertTrue($config->isNew());
}
}
...@@ -14,9 +14,7 @@ class MigrateSystemConfigurationTest extends MigrateDrupal7TestBase { ...@@ -14,9 +14,7 @@ class MigrateSystemConfigurationTest extends MigrateDrupal7TestBase {
protected static $modules = ['action', 'file', 'system']; protected static $modules = ['action', 'file', 'system'];
protected $expectedConfig = [ protected $expectedConfig = [
'system.authorize' => [ 'system.authorize' => [],
'filetransfer_default' => 'ftp',
],
'system.cron' => [ 'system.cron' => [
'threshold' => [ 'threshold' => [
// autorun is not handled by the migration. // autorun is not handled by the migration.
...@@ -166,6 +164,9 @@ public function testConfigurationMigration() { ...@@ -166,6 +164,9 @@ public function testConfigurationMigration() {
unset($actual['_core']); unset($actual['_core']);
$this->assertSame($actual, $values, $config_id . ' matches expected values.'); $this->assertSame($actual, $values, $config_id . ' matches expected values.');
} }
// The d7_system_authorize migration should not create the system.authorize
// config.
$this->assertTrue($this->config('system.authorize')->isNew());
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment