Skip to content

Conversation

@peterjaap
Copy link
Contributor

The old example throws this error; PHP Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Console\Helper\ProgressBar::iterate() must be iterable, object given

Copy link
Contributor

@HeahDude HeahDude left a comment

Choose a reason for hiding this comment

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

Thanks for this fix!


// $iterable can be for example an array ([1, 2, 3, ...]) or a generator
// $iterable = function () { yield 1; yield 2; ... };
// $iterable can be for example an array ([1, 2, 3, ...])
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it could be reworded now to something like // $iterable can be an array

@HeahDude HeahDude added this to the 4.4 milestone Feb 4, 2020
@OskarStark OskarStark changed the base branch from 5.0 to 4.4 February 5, 2020 07:08
@OskarStark
Copy link
Contributor

OskarStark commented Feb 5, 2020

Good job, thanks Peter and congrats on your first contribution to the Symfony documentation. I made the changes requested by @HeahDude in fe6c38f

OskarStark added a commit that referenced this pull request Feb 5, 2020
This PR was submitted for the 5.0 branch but it was squashed and merged into the 4.4 branch instead (closes #13027). Discussion ---------- Fix example with iterable The old example throws this error; `PHP Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Console\Helper\ProgressBar::iterate() must be iterable, object given` <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- 36b6e43 Fix example with iterable
OskarStark added a commit that referenced this pull request Feb 5, 2020
@OskarStark OskarStark merged commit 36b6e43 into symfony:4.4 Feb 5, 2020
OskarStark added a commit that referenced this pull request Feb 5, 2020
* 4.4: minor. refs #13027 Fix example with iterable
OskarStark added a commit that referenced this pull request Feb 5, 2020
* 5.0: minor. refs #13027 Fix example with iterable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment