Skip to content

Commit

Permalink
Merge pull request #223 from ruudk/fix-broken-merge
Browse files Browse the repository at this point in the history
Fix strict comparison in DependentFixtureInterface
  • Loading branch information
alcaeus authored Dec 4, 2017
2 parents 73b1fe9 + 6521e17 commit 7fc29d2
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Loader/SymfonyFixturesLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,10 @@ public function addFixtures(array $fixtures)
public function addFixture(FixtureInterface $fixture)
{
$class = get_class($fixture);
if (isset($this->loadedFixtures[$class]) && $this->loadedFixtures[$class] !== $fixture) {
throw new \LogicException(sprintf(
'The "%s" fixture class is already loaded and instantiated. It is not possible to add a new instance of this fixture. Upgrade to "doctrine/data-fixtures" version 1.3 or higher to support this.',
$class
));
if (!isset($this->loadedFixtures[$class])) {
$this->loadedFixtures[$class] = $fixture;
}

$this->loadedFixtures[$class] = $fixture;

// see https://github.com/doctrine/data-fixtures/pull/274
// this is to give a clear error if you do not have this version
if (!method_exists(Loader::class, 'createFixture')) {
Expand Down

0 comments on commit 7fc29d2

Please sign in to comment.