mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-12 03:34:04 +02:00
[ticket/14742] Increase user feedback by improving progress bar
We now count and display each step that was done by increasing the task count. PHPBB3-14742
This commit is contained in:
@@ -198,6 +198,16 @@ class cli_iohandler extends iohandler_base
|
||||
|
||||
if ($this->output->getVerbosity() === OutputInterface::VERBOSITY_NORMAL)
|
||||
{
|
||||
if ($this->progress_bar !== null)
|
||||
{
|
||||
// Symfony's ProgressBar is immutable regarding task_count, so delete the old and create a new one.
|
||||
$this->progress_bar->clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->io->newLine(2);
|
||||
}
|
||||
|
||||
$this->progress_bar = $this->io->createProgressBar($task_count);
|
||||
$this->progress_bar->setFormat(
|
||||
" %current:3s%/%max:-3s% %bar% %percent:3s%%\n" .
|
||||
@@ -212,7 +222,6 @@ class cli_iohandler extends iohandler_base
|
||||
}
|
||||
|
||||
$this->progress_bar->setMessage('');
|
||||
$this->io->newLine(2);
|
||||
$this->progress_bar->start();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user