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

[DependencyInjection] Fix dumping of RewindableGenerator with empty IteratorArgument #22790

Merged
merged 1 commit into from May 21, 2017

Conversation

Projects
None yet
4 participants
@meyerbaptiste
Contributor

meyerbaptiste commented May 19, 2017

Q A
Branch? 3.3
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #22780
License MIT
Doc PR N/A

According with #22780 (comment), when an IteratorArgument is empty, the closure generated by the PhpDumper should be function () { return new EmptyIterator(); instead of function () {}, which is an invalid traversable for the RewindableGenerator.

@nicolas-grekas nicolas-grekas added this to the 3.3 milestone May 19, 2017

@nicolas-grekas

👍 (failures unrelated)

@nicolas-grekas

This comment has been minimized.

Show comment
Hide comment
@nicolas-grekas
Member

nicolas-grekas commented May 21, 2017

Thank you @meyerbaptiste.

@nicolas-grekas nicolas-grekas merged commit c2db0c1 into symfony:3.3 May 21, 2017

1 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
fabbot.io Some changes should be done to comply with our standards.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

nicolas-grekas added a commit that referenced this pull request May 21, 2017

bug #22790 [DependencyInjection] Fix dumping of RewindableGenerator w…
…ith empty IteratorArgument (meyerbaptiste)

This PR was merged into the 3.3 branch.

Discussion
----------

[DependencyInjection] Fix dumping of RewindableGenerator with empty IteratorArgument

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

According with #22780 (comment), when an `IteratorArgument` is empty, the closure generated by the `PhpDumper` should be `function () { return new EmptyIterator();` instead of `function () {}`, which is an invalid traversable for the `RewindableGenerator`.

Commits
-------

c2db0c1 [DependencyInjection] Fix dumping of RewindableGenerator with empty IteratorArgument

@fabpot fabpot referenced this pull request May 29, 2017

Merged

Release v3.3.0 #22949

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment