wiki/content/20201112130234-symfony_console_iterable_progress_bars.md

25 lines
433 B
Markdown
Raw Normal View History

2024-05-06 20:40:05 +00:00
---
2024-10-30 17:34:11 +00:00
date: 2020-11-12
2024-05-06 20:40:05 +00:00
id: b4fc3714-24f9-4eb6-9d46-3c42bdcd5be2
title: Symfony Console Iterable Progress Bars
---
# Changes
- [iterate() method](20201112130435-iterate_method)
# Syntax
``` php
use Symfony\Component\Console\Helper\ProgressBar;
$progressBar = new ProgressBar($output);
$progressBar->start();
// ... do some work
$progressBar->advance();
// needed to ensure that the bar reaches 100%
$progressBar->finish();
```