Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SymfonyStyle: Progress Bar Styling Logic Reversed ? #16577

Closed
weaverryan opened this issue Nov 17, 2015 · 1 comment
Closed

SymfonyStyle: Progress Bar Styling Logic Reversed ? #16577

weaverryan opened this issue Nov 17, 2015 · 1 comment
Labels

Comments

@weaverryan
Copy link
Member

The SymfonyStyle::createProgressBar() currently looks like this:

    public function createProgressBar($max = 0)
    {
        $progressBar = parent::createProgressBar($max);
        if ('\\' === DIRECTORY_SEPARATOR) {
            $progressBar->setEmptyBarCharacter('░'); // light shade character \u2591
            $progressBar->setProgressCharacter('');
            $progressBar->setBarCharacter('▓'); // dark shade character \u2593
        }
        return $progressBar;
    }

The \\ is a check to see if we're in Windows. So, these styles are only shown in Windows. Is that backwards?

Ping @kbond I think this line originally came from your commit - maybe you remember what the issue was.

Thanks!

@kbond
Copy link
Member

kbond commented Nov 17, 2015

Right you are! Found this comment: #14057 (comment) - looks like I copied the fix wrong.

@xabbuh xabbuh added the Console label Nov 17, 2015
fabpot added a commit that referenced this issue Nov 18, 2015
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #16578).

Discussion
----------

[Console] Fix bug in windows detection

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #16577
| License       | MIT
| Doc PR        | n/a

Commits
-------

c4068d9 Fix bug in windows detection
@fabpot fabpot closed this as completed Nov 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants