Skip to content
Snippets Groups Projects
Commit 2c313d68 authored by catch's avatar catch
Browse files

Issue #3405798 by alexpott, bircher: Config deleted during import does not...

Issue #3405798 by alexpott, bircher: Config deleted during import does not have correct initial values set

(cherry picked from commit cf5e2c17)
parent 84181889
No related branches found
No related tags found
19 merge requests!8376Drupal views: adding more granularity to the ‘use ajax’ functionality,!8300Issue #3443586 View area displays even when parent view has no results.,!7567Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7565Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7509Change label "Block description" to "Block type",!7344Issue #3292350 by O'Briat, KlemenDEV, hswong3i, smustgrave, quietone: Update...,!6922Issue #3412959 by quietone, smustgrave, longwave: Fix 12 'un' words,!6848Issue #3417553 by longwave: Remove withConsecutive() in CacheCollectorTest,!6720Revert "Issue #3358581 by pfrenssen, _tarik_, a.dmitriiev, smustgrave:...,!6560Update ClaroPreRender.php, confirming classes provided are in array format,!6528Issue #3414261 by catch: Add authenticated user umami performance tests,!6501Issue #3263668 by omkar-pd, Wim Leers, hooroomoo: Re-enable inline form errors...,!6354Draft: Issue #3380392 by phma: Updating language weight from the overview reverts label if translated,!6324Issue #3416723 by Ludo.R: Provide a "node type" views default argument,!6119Issue #3405704 by Spokje, longwave: symfony/psr-http-message-bridge major version bump,!5950Issue #3403653 by alexpott, longwave: Incorporate improvements to how contrib runs PHPStan to core,!5858Issue #3401971 by fjgarlin: Test-only job shouldn't require constant rebases...,!5716Draft: Issue #3401102 by Spokje, longwave, smustgrave: Nightwatch artifacts on GitLab not retained,!5674Transaction autocommit during shutdown relies on unreliable object destruction order
Pipeline #58914 passed with warnings
Pipeline: drupal

#58935

    Pipeline: drupal

    #58932

      Pipeline: drupal

      #58929

        +1
        ......@@ -992,13 +992,13 @@ protected function importConfig($collection, $op, $name) {
        else {
        $config = new Config($name, $this->storageComparer->getTargetStorage($collection), $this->eventDispatcher, $this->typedConfigManager);
        }
        if ($old_data = $this->storageComparer->getTargetStorage($collection)->read($name)) {
        $config->initWithData($old_data);
        }
        if ($op == 'delete') {
        $config->delete();
        }
        else {
        if ($old_data = $this->storageComparer->getTargetStorage($collection)->read($name)) {
        $config->initWithData($old_data);
        }
        $data = $this->storageComparer->getSourceStorage($collection)->read($name);
        $config->setData($data ? $data : []);
        $config->save();
        ......
        ......@@ -918,6 +918,16 @@ public function testConfigEvents(): void {
        $this->assertSame(['key' => 'bar'], $event['current_config_data']);
        $this->assertSame(['key' => 'bar'], $event['raw_config_data']);
        $this->assertSame(['key' => 'foo'], $event['original_config_data']);
        // Import the configuration that deletes 'config_events_test.test'.
        $this->container->get('config.storage.sync')->delete('config_events_test.test');
        $this->configImporter()->import();
        $this->assertFalse($this->container->get('config.storage')->exists('config_events_test.test'));
        $event = \Drupal::state()->get('config_events_test.event', []);
        $this->assertSame(ConfigEvents::DELETE, $event['event_name']);
        $this->assertSame([], $event['current_config_data']);
        $this->assertSame([], $event['raw_config_data']);
        $this->assertSame(['key' => 'bar'], $event['original_config_data']);
        }
        /**
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment