Exemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 protected function initialize(InputInterface $input, OutputInterface $output)
 {
     parent::initialize($input, $output);
     if ($input->getOption('em')) {
         CommandHelper::setApplicationEntityManager($this->getHelper('container'), $input->getOption('em'));
     }
     $this->cacheCleaner->invalidate();
 }
 /**
  * Hack to simulate behaviour of newer doctrine for older 2.4.* versions users.
  * It does the check but doesn't return exit code for that check.
  *
  * @param InputInterface $input
  * @param OutputInterface $output
  * @return int|null
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $exit = parent::execute($input, $output);
     if ($input->getOption('skip-sync')) {
         if ($exit >= 2) {
             $exit -= 2;
         }
     }
     if ($input->getOption('skip-mapping')) {
         if ($exit === 1 || $exit === 3) {
             $exit -= 1;
         }
     }
     return $exit;
 }
Exemplo n.º 3
0
 /**
  * {@inheritDoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));
     return parent::execute($input, $output);
 }
 protected function initialize(InputInterface $input, OutputInterface $output)
 {
     parent::initialize($input, $output);
     $this->cacheCleaner->invalidate();
 }