Skip to content

Commit

Permalink
Removed pre-processing progress message.
Browse files Browse the repository at this point in the history
Symfony's ProgressBar does not support displaying an unknown estimated time and throws a LogicException. Since there is little processing going on during the current pre-processing step, I preferred to remove its progress tracking.
  • Loading branch information
tomzx committed Jan 16, 2015
1 parent be561d1 commit c45566f
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/PHPSemVerChecker/Console/Command/CompareCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
$sourceAfter = $input->getArgument('source-after');
$sourceAfter = $fileIterator->getFilesAsArray($sourceAfter, '.php');

$output->writeln('');

$progress = new ProgressBar($output, count($sourceBefore) + count($sourceAfter));
$progress->setFormat("%message%\n%current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%");
$progress->setMessage('Pre-processing before/after files');
$progress->start();

$sourceFilter = new SourceFilter();
$identicalCount = $sourceFilter->filter($sourceBefore, $sourceAfter);

$progress->start(count($sourceBefore) + count($sourceAfter));

$progress = new ProgressBar($output, count($sourceBefore) + count($sourceAfter));
$progress->setFormat("%message%\n%current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%");
$output->writeln('');
$progress->setMessage('Scanning before files');
foreach ($sourceBefore as $file) {
$scannerBefore->scan($file);
Expand Down

0 comments on commit c45566f

Please sign in to comment.