Skip to content

Commit

Permalink
Merge pull request #1358 from magento-south/MAGETWO-67363
Browse files Browse the repository at this point in the history
MAGETWO-67363: Setup fixture priority can be duplicated
  • Loading branch information
slavvka authored Jul 25, 2017
2 parents 5186237 + 981da28 commit 14e7a37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup/src/Magento/Setup/Fixtures/ConfigsApplyFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ConfigsApplyFixture extends Fixture
/**
* @var int
*/
protected $priority = 150;
protected $priority = 0;

/**
* {@inheritdoc}
Expand Down
5 changes: 5 additions & 0 deletions setup/src/Magento/Setup/Fixtures/FixtureModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ public function loadFixtures()
'fixtureModel' => $this,
]
);
if (isset($this->fixtures[$fixture->getPriority()])) {
throw new \InvalidArgumentException(
sprintf('Duplicate priority %d in fixture %s', $fixture->getPriority(), $type)
);
}
$this->fixtures[$fixture->getPriority()] = $fixture;
}

Expand Down

0 comments on commit 14e7a37

Please sign in to comment.