Review main Merged

88261[BUGFIX] Except when 'renderType' is not string in NodeFactory

Garvin Hicking CR +2 V +2 Easy +6 −0 updated 02/20/25, 08:23

Commit message

In cases where `array_merge_recursive` is used to append
to a TCA configuration multiple times with the same
key, it will lead to transforming an array key with
a single value to an array of values instead.

The NodeFactory can not deal with this case.

This patch throws an exception in case no string
is found, and tries to hint at this possible
array scenario.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Stefan Bürk +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Stefan Bürk +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1621

  1. Garvin Hicking uploaded patch set 1 02/18/25, 12:50

  2. Garvin Hicking updated the commit message in patch set 2 02/18/25, 12:52

  3. core-ci voted on patch set 1 V +1 02/18/25, 12:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74314

  4. core-ci voted on patch set 2 V +1 02/18/25, 12:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74315

  5. Oliver Wand voted on patch set 2 CR +1 02/18/25, 14:20

  6. Georg Ringer commented on patch set 2 CR +1 V +1 02/18/25, 16:03

    I am a big fan of sprintf to avoid all those string concats but I am also fine leaving it like that
  7. Garvin Hicking commented on patch set 2 02/18/25, 17:06

    Reply

    I usually get tunnel vision if something similar exists I try to use the style already in place, to keep the diff somewhat readable... maybe as a follow-up?
  8. Oli Bartsch commented on patch set 2 02/18/25, 17:18

    NodeFactory.php:162

    $type has to be a string. I therefore suggest to explicitly check for this instead of an is_array check.
  9. Garvin Hicking commented on patch set 3 CR +1 V +1 02/18/25, 18:20

    Published edit on patch set 2.
  10. Garvin Hicking commented on patch set 3 02/18/25, 18:21

    NodeFactory.php:162 Reply

    Done, even though now the exception does not fit all scenarios, and I dont want to check for each possible type it could have... so the array situation will be the case of 99,99% of cases and I lect the exception text mostly unchanged. ok?
  11. core-ci voted on patch set 3 V +1 02/18/25, 18:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74340

  12. Oli Bartsch commented on patch set 3 CR +1 V +1 02/18/25, 18:38

    NodeFactory.php:162 Reply

    Acknowledged
  13. Georg Ringer commented on patch set 4 CR +1 V +1 02/18/25, 19:14

    Published edit on patch set 3.
  14. core-ci voted on patch set 4 V +1 02/18/25, 19:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74343

  15. Christian Kuhn voted on patch set 4 CR +1 V +1 02/19/25, 17:14

  16. Christian Kuhn uploaded patch set 5 CR +1 V +1 02/19/25, 17:16

  17. Christian Kuhn voted on patch set 5 CR +1 V +1 02/19/25, 17:16

  18. Stefan Bürk voted on patch set 5 CR +1 V +1 02/19/25, 17:16

  19. core-ci voted on patch set 5 V +1 02/19/25, 17:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74405

  20. Garvin Hicking voted on patch set 5 CR +2 V +2 02/20/25, 08:23

  21. Garvin Hicking merged patch set 6 02/20/25, 08:23