Skip to content

Commit c45566f

Browse files
committed
Removed pre-processing progress message.
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.
1 parent be561d1 commit c45566f

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/PHPSemVerChecker/Console/Command/CompareCommand.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
4040
$sourceAfter = $input->getArgument('source-after');
4141
$sourceAfter = $fileIterator->getFilesAsArray($sourceAfter, '.php');
4242

43-
$output->writeln('');
44-
45-
$progress = new ProgressBar($output, count($sourceBefore) + count($sourceAfter));
46-
$progress->setFormat("%message%\n%current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%");
47-
$progress->setMessage('Pre-processing before/after files');
48-
$progress->start();
49-
5043
$sourceFilter = new SourceFilter();
5144
$identicalCount = $sourceFilter->filter($sourceBefore, $sourceAfter);
5245

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

0 commit comments

Comments
 (0)