Skip to content

Commit 14e7a37

Browse files
authored
Merge pull request #1358 from magento-south/MAGETWO-67363
MAGETWO-67363: Setup fixture priority can be duplicated
2 parents 5186237 + 981da28 commit 14e7a37

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

setup/src/Magento/Setup/Fixtures/ConfigsApplyFixture.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ConfigsApplyFixture extends Fixture
1414
/**
1515
* @var int
1616
*/
17-
protected $priority = 150;
17+
protected $priority = 0;
1818

1919
/**
2020
* {@inheritdoc}

setup/src/Magento/Setup/Fixtures/FixtureModel.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ public function loadFixtures()
109109
'fixtureModel' => $this,
110110
]
111111
);
112+
if (isset($this->fixtures[$fixture->getPriority()])) {
113+
throw new \InvalidArgumentException(
114+
sprintf('Duplicate priority %d in fixture %s', $fixture->getPriority(), $type)
115+
);
116+
}
112117
$this->fixtures[$fixture->getPriority()] = $fixture;
113118
}
114119

0 commit comments

Comments
 (0)