The tick method of \cli\Notify::tick() is augmented in its grandchild class, \cli\Progress\Bar to have an optional second parameter which updates its _message property. As items are processed, the message may be optionally changed to reflect the nature of the work being performed.
The current behavior of the progress bar suppresses any output until the first tick occurs. In use cases where the developer wishes to display the initial message and then alter it during the first tick, they should manually call the public display() method of the progress bar before work is performed and the tick occurs.
The use case of displaying a message describing work about to be performed would be better served by supplementing this updated tick() method with a setter for the _message property whereby the message is manually changed before work is performed, then the tick is used to increment progress separately.
As discussed in #125
The tick method of
\cli\Notify::tick()
is augmented in its grandchild class,\cli\Progress\Bar
to have an optional second parameter which updates its_message
property. As items are processed, the message may be optionally changed to reflect the nature of the work being performed.The current behavior of the progress bar suppresses any output until the first tick occurs. In use cases where the developer wishes to display the initial message and then alter it during the first tick, they should manually call the public
display()
method of the progress bar before work is performed and the tick occurs.The use case of displaying a message describing work about to be performed would be better served by supplementing this updated
tick()
method with a setter for the_message
property whereby the message is manually changed before work is performed, then the tick is used to increment progress separately.