Skip to content

Commit

Permalink
avoid deprecation notice from LoadDataFixturesDoctrineCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
craue committed Jun 8, 2019
1 parent 13b2e8e commit 4254b98
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Command/LoadDataFixturesDoctrineCommand.php
Expand Up @@ -83,9 +83,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
{
$ui = new SymfonyStyle($input, $output);

/** @var ManagerRegistry $doctrine */
$doctrine = $this->getContainer()->get('doctrine');
$em = $doctrine->getManager($input->getOption('em'));
$em = $this->getDoctrine()->getManager($input->getOption('em'));

if (! $input->getOption('append')) {
if (! $ui->confirm(sprintf('Careful, database "%s" will be purged. Do you want to continue?', $em->getConnection()->getDatabase()), ! $input->isInteractive())) {
Expand Down

0 comments on commit 4254b98

Please sign in to comment.