/** * Adds the transformer.transformation.post event to advance the progressbar. * * @param \Symfony\Component\Console\Input\InputInterface $input * * @return \Symfony\Component\Console\Helper\HelperInterface|null */ protected function getProgressBar(InputInterface $input) { $progress = parent::getProgressBar($input); if (!$progress) { return null; } $this->getService('event_dispatcher')->addListener('transformer.transformation.post', function () use($progress) { $progress->advance(); }); return $progress; }
/** * Adds the parser.file.pre event to the advance the progressbar. * * @param InputInterface $input * * @return \Symfony\Component\Console\Helper\HelperInterface|null */ protected function getProgressBar(InputInterface $input) { $progress = parent::getProgressBar($input); if (!$progress) { return null; } $this->getService('event_dispatcher')->addListener('parser.file.pre', function (PreFileEvent $event) use($progress) { $progress->advance(); }); return $progress; }