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

Skip to content

Make ProgressBar::setMaxSteps public #26449

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
Mar 19, 2018
Merged

Conversation

ostrolucky
Copy link
Contributor

@ostrolucky ostrolucky commented Mar 7, 2018

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #24100
License MIT
Doc PR -

This is useful in cases when target of tracking changes its size during progress advancement. My exact use case is showing progress of file upload for file which is still being downloading.

@Destroy666x
Copy link

A test for the described use case would be nice. Also a test for setting the value for a progress bar that didn't have max steps earlier.

@ostrolucky
Copy link
Contributor Author

This is simple setter and is tested by proxy in existing integration tests. Will write test if required by maintainers.

@Simperfit
Copy link
Contributor

If you change from private to public, I think a test is needed.

@ostrolucky
Copy link
Contributor Author

test added

@nicolas-grekas nicolas-grekas added this to the 4.1 milestone Mar 12, 2018
{
$this->format = null;
Copy link
Member

@nicolas-grekas nicolas-grekas Mar 12, 2018

Choose a reason for hiding this comment

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

is this a bug fix? or a behavioral BC break?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bug fix. Wasn't issue before though, because this method was being called on the start only. Please note that format explicitly set by user is saved in different property.

Copy link
Member

Choose a reason for hiding this comment

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

got it
what about moving the method up with other public ones?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will do

This is useful in cases when target of tracking
changes its size during progress advancement.
@fabpot
Copy link
Member

fabpot commented Mar 19, 2018

Thank you @ostrolucky.

@fabpot fabpot merged commit 2b3c37a into symfony:master Mar 19, 2018
fabpot added a commit that referenced this pull request Mar 19, 2018
This PR was merged into the 4.1-dev branch.

Discussion
----------

Make ProgressBar::setMaxSteps public

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #24100
| License       | MIT
| Doc PR        | -

This is useful in cases when target of tracking changes its size during progress advancement. My exact use case is showing progress of file upload for file which is still being downloading.

Commits
-------

2b3c37a Make ProgressBar::setMaxSteps public
@fabpot fabpot mentioned this pull request May 7, 2018
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