Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Console] SupportProgressBar::iterate() on empty array#52605
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
GromNaN left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We could deprecate passing0 for unknown max, but that's not necessary to fix the reported issue.
I create a branch with the deprecation, that we can discuss for 7.1:6.4...GromNaN:symfony:issue-47259-deprecate
| publicfunctiongetMaxSteps():int | ||
| { | ||
| return$this->max; | ||
| return$this->max ??0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
$this->max can benull, but keep returning0 for backward compatibility.
Co-authored-by: Florian Reimair <office@florianreimair.at>
fabpot commentedNov 16, 2023
Merging in 7.1 as this is a behavior change. |
fabpot commentedNov 16, 2023
Thank you@GromNaN. |
Uh oh!
There was an error while loading.Please reload this page.
Alternative to#47259
Use
$max = nullto indicate that the value is unknown. This allows0to be displayed by directly setting the progress bar to 100%.Zero is only supported for
iterate(). When passed to the constructor orsetMaxSteps, it means "unknown max".