makinacorpus / drush-progressbar
Simple progress bar API for Drush
1.0.0
2016-06-02 09:15 UTC
Requires (Dev)
- phpunit/phpunit: ^5.1
This package is auto-updated.
Last update: 2026-03-11 00:48:01 UTC
README
Usage
Given that:
- you have
$totalwhich is the total number of items to process; - and
$doneis the item count processed so far;
you may do:
$total = some_count(); $bar = \DrushProgressBar::create(); $bar->start(); $done = 0; foreach ($items as $item) { process_item($item); // Note that here, you could also change the total (yes you can). $bar->setProgress($total, ++$done); } $bar->end();