Symfony 控制台进度条不是在同一行上前进,而是在新行上创建
1/2 [==============>-------------] 50%
! [NOTE] No changes made to Categories/CategoriesSchema
2/2 [============================] 100%
2/2 [============================] 100%
我假设进度条只会在同一行上移动,直到操作完成。这是我的代码
$io = new SymfonyStyle($input, $output);
$progressbar = new ProgressBar($output, count($elements));
$progressbar->start();
foreach ($elements as $element) {
//work on element
io->note("No changes made to ".ucfirst($name));
$progressbar->advance();
$io->newLine();
}
$progressbar->finish();
我做错了什么??