Skip to content
Snippets Groups Projects

#3406929 StorageComparer is not properly re-inject when the container is rebuilt

Open #3406929 StorageComparer is not properly re-inject when the container is rebuilt

Closes #3406929

Merge request reports

Members who can merge are allowed to add commits.
Code Quality is loading
Test summary results are being parsed
Ready to merge by members who can write to the target branch.
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Alex Pott added 2 commits

    added 2 commits

    Compare with previous version

  • Alex Pott resolved all threads

    resolved all threads

  • Alex Pott added 25 commits

    added 25 commits

    Compare with previous version

  • quietone added 75 commits

    added 75 commits

    Compare with previous version

  • quietone
  • 1013 1013 $this->assertSame($collections, $event_collections);
    1014 1014 }
    1015 1015
    1016 /**
    1017 * Tests the target storage caching during configuration import.
    • The comments in this test are really nice, they are an example of good practice.

      As a reviewer, it made my task easier and this will help anyone who works on this in the future.

    • Please register or sign in to reply
  • quietone
  • 1017 * Tests the target storage caching during configuration import.
    1018 */
    1019 public function testStorageComparerTargetStorage(): void {
    1020 $this->installConfig(['config_events_test']);
    1021 $this->copyConfig($this->container->get('config.storage'), $this->container->get('config.storage.sync'));
    1022 $this->assertTrue($this->container->get('module_installer')->uninstall(['config_test']));
    1023 \Drupal::state()->set('config_events_test.all_events', []);
    1024 \Drupal::state()->set('config_test_install.foo_value', 'transient');
    1025
    1026 // Prime the active config cache. If the ConfigImporter and StorageComparer
    1027 // do not manager the target storage correctly this cache can pollute the
    1028 // data.
    1029 \Drupal::configFactory()->get('config_test.system');
    1030
    1031 // Import the configuration. This results in a save event with the value
    1032 // changing from foo to bar.
    • Comment on lines +1031 to +1032

      I especially like that this is informing the reader of what is changing so I don't have to read the code to figure it out.

    • Please register or sign in to reply
  • I made two grammar fixes and added return type hints.

  • Alex Pott added 4 commits

    added 4 commits

    Compare with previous version

  • Alex Pott added 1 commit

    added 1 commit

    Compare with previous version

  • Please register or sign in to reply
    Loading