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

Collection replace and replaceRecursively functions #20220

Closed
wants to merge 2 commits into from

Conversation

salarmehr
Copy link

No description provided.

@lk77
Copy link

lk77 commented Jul 23, 2017

I think replacing in collections is not needed by the framework,
a PR was declined on this functionality recently if i remember correctly
You should use map function instead.

*
* @param mixed $items
* @return static
* @see http://php.net/manual/en/function.array-replace-recursive.php
Copy link

@lk77 lk77 Jul 23, 2017

Choose a reason for hiding this comment

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

it's http://php.net/manual/en/function.array-replace.php
And why there is a non-used and non-documented $recursive parameter?

@taylorotwell
Copy link
Member

No plans to add this.

@salarmehr
Copy link
Author

@taylorotwell
Thanks for you comment. Can you please give a hint that what sort of things are planed? In the collection there are a number of non-essential methods (e.g. median()) while the "replacing" items is such important that php has two build-in function for that. (or is there any downside for including replace)

BTW, the last year that I pushed this for the first time it seems the reaction to that was positive #15157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants