Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Console] Add ability to regress the ProgressBar #19824

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

Merged
merged 1 commit into from
Sep 14, 2016

Conversation

jameshalsall
Copy link
Contributor

@jameshalsall jameshalsall commented Sep 2, 2016

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #15227
License MIT
Doc PR https://github.com/symfony/symfony-docs/pull/6949/files

@jameshalsall
Copy link
Contributor Author

The build failure in AppVeyor does not look related to these changes.

*
* @param int $step Number of steps to regress
*/
public function regress($step = 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need a new method. What about just allowing negative numbers for advance?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could do that, but that sounds like an oxymoron calling advance() to actually step backwards, adding regress() at least keeps the API consistent

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it would keep it consistent with the progress property too, although I'm fine with both, I don't see anything shocking about using negative here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer a clean API with simple, straight-forward methods, myself.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then, we need an exception in advance when used with a negative number and another one in regress when used with a negative number as well.

Copy link
Member

@nicolas-grekas nicolas-grekas Sep 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An exception would be a DX issue, forcing one to call the correct method with boilerplate just for the sign. I agree with the first comment, we need only progress.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has now been updated so there is no regress() method.

@jameshalsall jameshalsall force-pushed the progress-bar-step-backward branch from ceecd00 to 42971bb Compare September 14, 2016 07:47
@fabpot
Copy link
Member

fabpot commented Sep 14, 2016

Thank you @jameshalsall.

@fabpot fabpot merged commit 42971bb into symfony:master Sep 14, 2016
fabpot added a commit that referenced this pull request Sep 14, 2016
…shalsall)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[Console] Add ability to regress the ProgressBar

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #15227
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/6949/files

Commits
-------

42971bb [Console] Add ability to regress the ProgressBar
xabbuh added a commit to symfony/symfony-docs that referenced this pull request Oct 14, 2016
…halsall)

This PR was squashed before being merged into the master branch (closes #6949).

Discussion
----------

Update ProgressBar docs with regress information

Doc updates for changes introduced in symfony/symfony#19824

Commits
-------

d3346d8 Update ProgressBar docs with regress information
@fabpot fabpot mentioned this pull request Oct 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants