Open rklak opened 6 years ago
Are you using $this->io()->write
or something of that nature to output "Dropping database schema..." et. al., or are you calling some library that is printing those messages?
If you are printing from your tasks, you should instead use $this->logger->notice("...")
to display your progress messages. That will automatically hide and then re-display the progress bar.
I use native task from symfony. I dont change them. I just run taskExec in my collection. Droping databse schema comes from symfony bin/console doctrine:schema:drop
https://symfony.com/doc/current/doctrine.html#doctrine-creating-the-database-tables-schema
Got it. taskExec
should automatically hide and re-show the progress bar.
Anyway is there an option to disable the progress bar in collection? I cant find it in documentation.
If you'd like to make a PR, just call hideProgressIndicator() and showProgressIndicator() in taskExec. If you implement ProgressIndicatorAwareInterface and use ProgressIndicatorAwareTrait, then dependency injection should be done for you automatically.
Steps to reproduce
Add tasks to the collection Watch the output oafter the progress bar for each task
Expected behavior
The output of each task should start from the new line or there should be option to disable progress bar (In my case I dont need it)
Actual behavior
Progress bar and task output are in the same line.
System Configuration
Ubuntu 16.04 / PHP 5.6
I have site based on symfony. And when I run collection tasks, the progress bar brokes the output of each task:
The task output is written right after the progress bar of collection. It should start from a new line. Maybe it will be better to disable the progress bar by some option?