Skip to content

ProgressBar formatters per progressbar #34929

@flip111

Description

@flip111

Could the logic surrounding formatters such as

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Console/Helper/ProgressBar.php#L91

be made on the object instead of static on the class ?

It gets too hairy to define placeholders for a specific bar or overriding existing placeholders. Now this "global / static" situation doesn't really allow anything from the domain or live values to be pulled in unless the placeholder renamed for each bar. For example for the estimate when i am reading 2 files, one of 100MB and one of 1GB it can last 1 minute and 10 minutes, but after the first file the estimate is now 2 minutes total. With filesizes know the estimated placeholder could be rewritten for that one bar, but this isn't possible with static.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions