8000 [Filesystem] toIterable() in favor of toIterator() by ro0NL · Pull Request #24928 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Filesystem] toIterable() in favor of toIterator() #24928

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

Closed
wants to merge 2 commits into from
Closed

[Filesystem] toIterable() in favor of toIterator() #24928

wants to merge 2 commits into from

Conversation

ro0NL
Copy link
Contributor
@ro0NL ro0NL commented Nov 11, 2017
Q A
Branch? 3.4
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #...
License MIT
Doc PR symfony/symfony-docs#...

Enables to leverage iterable type as of 4.0, but really to avoid any useless ArrayObject inits.

Copy link
Member
@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

no fan of such changes, but ok :)

@ro0NL
Copy link
Contributor Author
ro0NL commented Nov 11, 2017

to further clarify; im spotting array|\Traversable API in master; probably to be intended as iterable type. Which we do favor.. no? :)

@nicolas-grekas
Copy link
Member

iterable didn't exist when we added array|\Traversable
but we're not (I'm not at least) going to change all of them for the fun of it...

@fabpot
Copy link
Member
fabpot commented Nov 12, 2017

Could be merged in 3.4, but not in 2.7 anyway.

@ro0NL
Copy link
Contributor Author
ro0NL commented Nov 12, 2017

Hm, why not? Safe change to me. Without involving php71 feats, this is indeed about changing the implementation from iterators to iterables; enabling removal of ArrayObject inits.

Done on 2.7 to avoid merge conflicts and not have toIterator(): iterable behavior 👼

@fabpot
Copy link
Member
fabpot commented Nov 12, 2017

That's not a bug fix, so it does not qualify for 2.7. We've been doing too many such changes in lower branches in the recent history. But that was a mistake.

@ro0NL ro0NL changed the base branch from 2.7 to 3.4 November 12, 2017 17:46
@ro0NL ro0NL changed the title [Filesystem][2.7] toIterable() in favor of toIterator() [Filesystem] toIterable() in favor of toIterator() Nov 12, 2017
@fabpot
Copy link
Member
fabpot commented Nov 12, 2017

Thank you @ro0NL.

fabpot added a commit that referenced this pull request Nov 12, 2017
This PR was squashed before being merged into the 3.4 branch (closes #24928).

Discussion
----------

[Filesystem] toIterable() in favor of toIterator()

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Enables to leverage iterable type as of 4.0, but really to avoid any useless `ArrayObject` inits.

Commits
-------

36462d6 [Filesystem] toIterable() in favor of toIterator()
@chalasr chalasr closed this Nov 12, 2017
@ro0NL ro0NL deleted the filesystem-iterable branch Nove 74B3 mber 13, 2017 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0