Review main Merged

76571[TASK] Streamline TYPO3\CMS\Core\Utility\ArrayUtility::filterRecursive

Oliver Hader CR +2 V +2 Easy +31 −15 updated 11/15/22, 19:24

Commit message

* actually use `array_filter` internally
* allow using `array_filter` modes `ARRAY_FILTER_USE_KEY`
  and `ARRAY_FILTER_USE_BOTH`

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Georg Ringer +1
    • Nikita Hovratov +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Georg Ringer +1
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1519

  1. Oliver Hader uploaded patch set 1 11/12/22, 16:04

  2. core-ci voted on patch set 1 V -1 11/12/22, 16:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33638

  3. Oliver Hader uploaded patch set 2 11/12/22, 16:35

  4. core-ci voted on patch set 2 V -1 11/12/22, 16:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33643

  5. Oliver Hader uploaded patch set 3 11/12/22, 16:53

  6. Oliver Hader commented on patch set 3 11/12/22, 16:55

    ArrayUtility.php:945

    This was actually a bug, since the unmodified `$value` is used, which could have been changed already in `$array[$key]`. That's why one test case was adjusted.
  7. core-ci voted on patch set 3 V +1 11/12/22, 17:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33645

  8. Stefan Bürk voted on patch set 3 CR +1 11/12/22, 17:49

  9. Nikita Hovratov commented on patch set 3 11/12/22, 18:21

    ArrayUtility.php:941

    We could change this annotation for phpstan checks to: @param 0|ARRAY_FILTER_USE_KEY|ARRAY_FILTER_USE_BOTH $mode This would require to add it in ArrayUtilityTest as well, though.
  10. Stefan Bürk uploaded patch set 4 11/13/22, 00:48

  11. Stefan Bürk commented on patch set 4 11/13/22, 00:48

    ArrayUtility.php:941 Reply

    Done
  12. Stefan Bürk commented on patch set 4 11/13/22, 00:50

    Also this change may be "safe", it is a signature change of a public method. Would say it's not really breaking ... so not sure about the backport here. Should we really do it ?
  13. core-ci voted on patch set 4 V +1 11/13/22, 00:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33658

  14. Christian Kuhn commented on patch set 4 11/14/22, 07:32

    Reply

    adding an additional argument is safe to backport.
  15. Georg Ringer voted on patch set 4 V +1 CR +1 11/14/22, 09:13

  16. Oliver Klee commented on patch set 4 11/14/22, 09:25

    ArrayUtility.php:945 Reply

    Ack
  17. Nikita Hovratov voted on patch set 4 V +1 CR +1 11/14/22, 09:40

  18. Stefan Bürk voted on patch set 4 V +2 CR +2 11/15/22, 19:24

  19. Stefan Bürk merged patch set 5 11/15/22, 19:24