From a37f10ae0951f16b115f4a175cc546a515cf7937 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Sat, 20 Aug 2016 22:40:37 +0200 Subject: [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 --- phpBB/phpbb/install/helper/iohandler/cli_iohandler.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'phpBB/phpbb/install/helper/iohandler/cli_iohandler.php') diff --git a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php index 2a41cb10ba..196cdcdaab 100644 --- a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php +++ b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php @@ -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(); } } -- cgit v1.2.1