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]: Implement additional methods in class \Phalcon\Helper\Arr. #14801

Closed
TimurFlush opened this issue Feb 1, 2020 · 5 comments
Closed

[NFR]: Implement additional methods in class \Phalcon\Helper\Arr. #14801

TimurFlush opened this issue Feb 1, 2020 · 5 comments
Labels
new feature request Planned Feature or New Feature Request

Comments

@TimurFlush
Copy link

TimurFlush commented Feb 1, 2020

Hello!

In my opinion, the Phalcon\Helper\Arr helper lacks two important methods:

  1. Phalcon\Helper\Arr::blackList() - is a method that removes the specified keys from the passed array. In its own way it is the opposite copy of the Arr::whiteList()

  2. Phalcon\Helper\App::map()- is the alias of \array_map()

P.S I will create PR as soon as i can

@TimurFlush TimurFlush added the new feature request Planned Feature or New Feature Request label Feb 1, 2020
@ruudboon
Copy link
Member

ruudboon commented Feb 1, 2020

  1. This could be helpful

  2. I wouldn't vote for adding a method that is creating an alias only. It will create unnecessary overhead and would advice just to use the native array_map.

Any additional methods should go to 4.1 release otherwise we break semver.

@TimurFlush
Copy link
Author

  1. This could be helpful
  2. I wouldn't vote for adding a method that is creating an alias only. It will create unnecessary overhead and would advice just to use the native array_map.

Any additional methods should go to 4.1 release otherwise we break semver.

Then I wonder why there are methods Arr::chunk() and Arr::filter()?

@niden
Copy link
Member

niden commented Feb 1, 2020

Arr::filter() was introduced to reduce the common code in the class. As you will see it is used in quite a few methods there so...

@TimurFlush
Copy link
Author

Arr::filter() was introduced to reduce the common code in the class. As you will see it is used in quite a few methods there so...

Okay

@TimurFlush TimurFlush reopened this Feb 4, 2020
niden pushed a commit that referenced this issue Feb 4, 2020
niden pushed a commit that referenced this issue Feb 4, 2020
niden pushed a commit that referenced this issue Feb 4, 2020
@niden niden added the 4.1.0 label Feb 4, 2020
@niden
Copy link
Member

niden commented Feb 4, 2020

Resolved in #14809

Thank you @TimurFlush

@niden niden closed this as completed Feb 4, 2020
@niden niden moved this to Released in Phalcon v5 Aug 25, 2022
@niden niden added this to Phalcon v5 Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature request Planned Feature or New Feature Request
Projects
Archived in project
Development

No branches or pull requests

3 participants