Skip to content
Snippets Groups Projects

Stop doing unnecessary work when importing config entities

Closes #3415041

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 638 639
    640 /**
    641 * @covers ::set
    642 * @dataProvider providerTestSetAndPreSaveWithPluginCollections
    643 */
    644 public function testSetWithPluginCollections(bool $syncing, string $expected_value) {
    645 $instance_id = 'the_instance_id';
    646 $instance = new TestConfigurablePlugin(['foo' => 'original_value'], $instance_id, []);
    647
    648 $plugin_manager = $this->prophesize(PluginManagerInterface::class);
    649 if ($syncing) {
    650 $plugin_manager->createInstance(Argument::cetera())->shouldNotBeCalled();
    651 }
    652 else {
    653 $plugin_manager->createInstance($instance_id, Argument::any())->willReturn($instance);
    654 }
    • Comment on lines +649 to +654

      :thumbsup: This should also result in slightly faster test runs, because there's no more unnecessary plugin instantiation when setting config entity values?

    • Author Maintainer

      Well I don't think we do enough config syncing in tests for this to matter. But it should result in slightly quicker config imports for everyone because they will be doing less work.

    • Please register or sign in to reply
  • Alex Pott added 1 commit

    added 1 commit

    Compare with previous version

  • Alex Pott added 11 commits

    added 11 commits

    Compare with previous version

  • Alex Pott added 2 commits

    added 2 commits

    • 2fa31524 - 1 commit from branch project:11.x
    • 94f90b2f - Merge branch '11.x' into 3415041-creating-blocks-that

    Compare with previous version

  • Please register or sign in to reply
    Loading