/**
  * {@inheritdoc}
  */
 public function execute(InputInterface $input, OutputInterface $output)
 {
     /** @var Application $application */
     $application = $this->getApplication();
     DoctrineCommandHelper::setApplicationConnection($application, $input->getOption('db-configuration'));
     DoctrineCommand::configureMigrations($application->getKernel()->getContainer(), $this->getMigrationConfiguration($input, $output));
     parent::execute($input, $output);
 }
 public function execute(InputInterface $input, OutputInterface $output)
 {
     // EM and DB options cannot be set at same time
     if (null !== $input->getOption('em') && null !== $input->getOption('db')) {
         throw new \InvalidArgumentException('Cannot set both "em" and "db" for command execution.');
     }
     Helper\DoctrineCommandHelper::setApplicationHelper($this->getApplication(), $input);
     $configuration = $this->getMigrationConfiguration($input, $output);
     DoctrineCommand::configureMigrations($this->getApplication()->getKernel()->getContainer(), $configuration);
     parent::execute($input, $output);
 }