Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
fabpot merged 1 commit intosymfony:7.1fromGromNaN:issue-47259
Nov 16, 2023

Conversation

@GromNaN
Copy link
Member

@GromNaNGromNaN commentedNov 15, 2023
edited
Loading

QA
Branch?7.1
Bug fix?no
New feature?yes
Deprecations?no
IssuesFix#47244
LicenseMIT

Alternative to#47259

Use$max = null to indicate that the value is unknown. This allows0 to be displayed by directly setting the progress bar to 100%.

Zero is only supported foriterate(). When passed to the constructor orsetMaxSteps, it means "unknown max".

Copy link
MemberAuthor

@GromNaNGromNaN left a comment
edited
Loading

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;
Copy link
MemberAuthor

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>
@fabpotfabpot changed the base branch from6.4 to7.1November 16, 2023 18:07
@fabpotfabpot modified the milestones:6.4,7.1Nov 16, 2023
@fabpot
Copy link
Member

Merging in 7.1 as this is a behavior change.

@fabpot
Copy link
Member

Thank you@GromNaN.

@fabpotfabpot merged commit4e944be intosymfony:7.1Nov 16, 2023
@GromNaNGromNaN deleted the issue-47259 branchNovember 16, 2023 18:11
@GromNaNGromNaN added Feature and removed Bug labelsNov 16, 2023
@fabpotfabpot mentioned this pull requestMay 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

+1 more reviewer

@maxbeckersmaxbeckersmaxbeckers approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

7.1

Development

Successfully merging this pull request may close these issues.

[ProgressBar] Empty iterable throws Exception on "maximum number of steps is not set"

4 participants

@GromNaN@fabpot@maxbeckers@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp