@@ -74,7 +74,7 @@ protected function initialize(InputInterface $input, OutputInterface $output)
7474 $ this ->resetter = $ this ->getContainer ()->get ('fos_elastica.resetter ' );
7575 $ this ->progressClosureBuilder = new ProgressClosureBuilder ();
7676
77- if (!$ input ->getOption ('no-overwrite-format ' )) {
77+ if (!$ input ->getOption ('no-overwrite-format ' ) && class_exists ( ' Symfony \\ Component \\ Console \\ Helper \\ ProgressBar ' ) ) {
7878 ProgressBar::setFormatDefinition ('normal ' , " %current%/%max% [%bar%] %percent:3s%% \n%message% " );
7979 ProgressBar::setFormatDefinition ('verbose ' , " %current%/%max% [%bar%] %percent:3s%% %elapsed:6s% \n%message% " );
8080 ProgressBar::setFormatDefinition ('very_verbose ' , " %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% \n%message% " );
@@ -91,11 +91,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
9191 $ type = $ input ->getOption ('type ' );
9292 $ reset = !$ input ->getOption ('no-reset ' );
9393 $ options = array (
94- 'batch_size ' => $ input ->getOption ('batch-size ' ),
9594 'ignore_errors ' => $ input ->getOption ('ignore-errors ' ),
9695 'offset ' => $ input ->getOption ('offset ' ),
9796 'sleep ' => $ input ->getOption ('sleep ' )
9897 );
98+ if ($ input ->getOption ('batch-size ' )) {
99+ $ options ['batch_size ' ] = (int ) $ input ->getOption ('batch-size ' );
100+ }
99101
100102 if ($ input ->isInteractive () && $ reset && $ input ->getOption ('offset ' )) {
101103 /** @var DialogHelper $dialog */
0 commit comments