Skip to content

Commit

Permalink
Don't pass wrong object to legacy constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
alcaeus committed Jun 12, 2019
1 parent 3f29412 commit 5720cde
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Command/LoadDataFixturesDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Symfony\Component\Console\Style\SymfonyStyle;
use const E_USER_DEPRECATED;
use function implode;
use function method_exists;
use function sprintf;
use function trigger_error;

Expand All @@ -38,7 +39,8 @@ public function __construct(SymfonyFixturesLoader $fixturesLoader, ?ManagerRegis
), E_USER_DEPRECATED);
}

parent::__construct($doctrine);
// @todo The method_exists call can be removed once the DoctrineBundle dependency has been bumped to at least 1.10
parent::__construct(method_exists($this, 'getDoctrine') ? $doctrine : null);

$this->fixturesLoader = $fixturesLoader;
}
Expand Down

0 comments on commit 5720cde

Please sign in to comment.