Skip to content
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

[NFR]: Change return type of Phalcon\Collection:getIterator() to ArrayIterator #15714

Open
Jeckerson opened this issue Oct 11, 2021 · 1 comment
Assignees
Labels
5.0 The issues we want to solve in the 5.0 release breaks bc Functionality that breaks Backwards Compatibility external dependency This issue depends on external issue to be resolved. new feature request Planned Feature or New Feature Request

Comments

@Jeckerson
Copy link
Member

Jeckerson commented Oct 11, 2021

Current Traversable interface does not has any methods signatures, which is not practical in terms of autocomplete of methods and for static code analysers.

public function getIterator() -> <Traversable>

@Jeckerson Jeckerson added new feature request Planned Feature or New Feature Request breaks bc Functionality that breaks Backwards Compatibility 5.0 The issues we want to solve in the 5.0 release labels Oct 11, 2021
@Jeckerson Jeckerson self-assigned this Oct 11, 2021
@niden
Copy link
Member

niden commented Oct 12, 2021

After discussion, we will make changes to this method and remove the return type. The body of the code will be a loop utilizing yield.

This is currently work in progress in Zephir.

Related (and blocker): zephir-lang/zephir#1849

@niden niden added this to Phalcon v5 Aug 25, 2022
@niden niden moved this to Active Sprint Tasks in Phalcon v5 Aug 25, 2022
@Jeckerson Jeckerson added the external dependency This issue depends on external issue to be resolved. label Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0 The issues we want to solve in the 5.0 release breaks bc Functionality that breaks Backwards Compatibility external dependency This issue depends on external issue to be resolved. new feature request Planned Feature or New Feature Request
Projects
Status: Active Sprint
Development

No branches or pull requests

2 participants