Commit 4e944be
committed
feature symfony#52605 [Console] Support
This PR was merged into the 7.1 branch.
Discussion
----------
[Console] Support `ProgressBar::iterate()` on empty array
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix symfony#47244
| License | MIT
Alternative to symfony#47259
Use `$max = null` to indicate that the value is unknown. This allows `0` to be displayed by directly setting the progress bar to 100%.
Zero is only supported for `iterate()`. When passed to the constructor or `setMaxSteps`, it means "unknown max".
Commits
-------
574b8a3 Fix ProgressBar::iterate on empty iteratorProgressBar::iterate() on empty array (GromNaN)File tree
2 files changed
+58
-17
lines changed- src/Symfony/Component/Console
- Helper
- Tests/Helper
2 files changed
+58
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
| 256 | + | |
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
319 | 333 | | |
320 | 334 | | |
321 | 335 | | |
| |||
373 | 387 | | |
374 | 388 | | |
375 | 389 | | |
376 | | - | |
377 | | - | |
378 | | - | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
379 | 393 | | |
380 | | - | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
381 | 399 | | |
382 | 400 | | |
383 | 401 | | |
| |||
398 | 416 | | |
399 | 417 | | |
400 | 418 | | |
401 | | - | |
| 419 | + | |
402 | 420 | | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
403 | 425 | | |
404 | | - | |
405 | | - | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
406 | 433 | | |
407 | 434 | | |
408 | 435 | | |
409 | 436 | | |
410 | 437 | | |
411 | 438 | | |
412 | 439 | | |
413 | | - | |
| 440 | + | |
414 | 441 | | |
415 | 442 | | |
416 | 443 | | |
417 | | - | |
| 444 | + | |
418 | 445 | | |
419 | 446 | | |
420 | 447 | | |
421 | 448 | | |
422 | | - | |
| 449 | + | |
423 | 450 | | |
424 | 451 | | |
425 | 452 | | |
| |||
542 | 569 | | |
543 | 570 | | |
544 | 571 | | |
545 | | - | |
| 572 | + | |
546 | 573 | | |
547 | 574 | | |
548 | 575 | | |
549 | 576 | | |
550 | 577 | | |
551 | 578 | | |
552 | | - | |
| 579 | + | |
553 | 580 | | |
554 | 581 | | |
555 | 582 | | |
| |||
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1092 | 1092 | | |
1093 | 1093 | | |
1094 | 1094 | | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
1095 | 1109 | | |
1096 | 1110 | | |
1097 | 1111 | | |
| |||
1263 | 1277 | | |
1264 | 1278 | | |
1265 | 1279 | | |
1266 | | - | |
| 1280 | + | |
1267 | 1281 | | |
1268 | 1282 | | |
1269 | 1283 | | |
| |||
0 commit comments