Task #83350

Provide array_filter_recursive in ArrayUtility

Added by Stefan Neufeind over 1 year ago. Updated 10 months ago.

Status:
Closed
Priority:
Should have
Category:
Miscellaneous
Target version:
-
Start date:
2017-12-16
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

The php-function array_filter() can't iterate over nested arrays. To filter such arrays a recursive functionality would be useful.

This is intended to be used in another feature-issue. Maybe reviewing that function separately makes sense.

Upon trying to come up with an ideal solution, at the security code-sprint in Wiesbaden, it took quite some testing and research. But imho we found an ideal solution, which I'd like to propose for ArrayUtility.


Related issues

Related to TYPO3 Core - Task #83334: GeneralUtility::implodeArrayForUrl should always encode param-names Closed 2017-12-14
Related to TYPO3 Core - Bug #84485: misuse as closure of callable-typed $callback in ArrayUtility::filterRecursive Closed 2018-03-19

Associated revisions

Revision 3bf495c7 (diff)
Added by Stefan Neufeind over 1 year ago

[FEATURE] Add ArrayUtility::filterRecursive() method

Add a new method ArrayUtility::filterRecursive() as an
enhancement to the PHP function array_filter() to filter
nested arrays.

Resolves: #83350
Releases: master
Change-Id: If291f1695eeef934ddf858ad28c54b30185e8bbc
Reviewed-on: https://review.typo3.org/55106
Reviewed-by: Stephan GroƟberndt <>
Tested-by: TYPO3com <>
Reviewed-by: Mathias Brodala <>
Tested-by: Mathias Brodala <>
Reviewed-by: Stefan Neufeind <>
Reviewed-by: Henning Liebe <>
Tested-by: Henning Liebe <>
Reviewed-by: Alexander Opitz <>
Tested-by: Alexander Opitz <>
Reviewed-by: Benjamin Kluge <>

History

#1 Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55106

#2 Updated by Stefan Neufeind over 1 year ago

  • Related to Task #83334: GeneralUtility::implodeArrayForUrl should always encode param-names added

#3 Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55106

#4 Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55106

#5 Updated by Gerrit Code Review over 1 year ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55106

#6 Updated by Gerrit Code Review over 1 year ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55106

#7 Updated by Gerrit Code Review over 1 year ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55106

#8 Updated by Gerrit Code Review over 1 year ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55106

#9 Updated by Gerrit Code Review over 1 year ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55106

#10 Updated by Gerrit Code Review over 1 year ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55106

#11 Updated by Gerrit Code Review over 1 year ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55106

#12 Updated by Gerrit Code Review over 1 year ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55106

#13 Updated by Gerrit Code Review over 1 year ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55106

#14 Updated by Gerrit Code Review over 1 year ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55106

#15 Updated by Stefan Neufeind over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#16 Updated by Christian Kuhn over 1 year ago

  • Related to Bug #84485: misuse as closure of callable-typed $callback in ArrayUtility::filterRecursive added

#17 Updated by Benni Mack 10 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF