Review main Merged

71843[BUGFIX] Prevent PHP 8 warning exception due to missing array keys

Daniel Dorndorf CR +2 V +2 Easy +4 −0 updated 10/17/21, 20:39

Commit message

This prevents an exception for missing array keys when using an
extbase repository in the "render-preProcess" hook.

Review

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

Issues 1

Files 1

Review log 2025

  1. Daniel Dorndorf uploaded patch set 1 10/17/21, 13:56

  2. Simon Gilli commented on patch set 1 CR -1 10/17/21, 14:08

    FrontendConfigurationManager.php:159

    The change is valid but I don't like the unwanted behavior afterwards which can lead to a "valid" pluginConfig with a wrong signature. So I really like to have an early return for this case. This will also speedup the code a little bit because no call to getTypoScriptSetup(). if (!isset($frameworkConfiguration['extensionName']) || !isset($frameworkConfiguration['pluginName']) { return $frameworkConfiguration; }
  3. Simon Gilli commented on patch set 1 10/17/21, 14:08

    no 11.5 branch so far, please remove.
  4. Daniel Dorndorf uploaded patch set 2 10/17/21, 14:11

  5. Daniel Dorndorf commented on patch set 2 10/17/21, 14:14

    Reply

    okay, but will this be added to the next 11.5 patch?

    FrontendConfigurationManager.php:159 Reply

    You're right, did changed this
  6. Daniel Dorndorf uploaded patch set 3 10/17/21, 14:16

  7. core-ci voted on patch set 1 V +1 10/17/21, 14:19 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18243

  8. Simon Gilli commented on patch set 3 CR -1 10/17/21, 14:23

    Reply

    Yes. Currenlty master is 11.5. Branch off will happen in some months, so long you do not need it here.

    FrontendConfigurationManager.php:158

    We do not use Yoda conditions in the core. The rest looks fine imho.
  9. core-ci voted on patch set 2 V -1 10/17/21, 14:25 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18244

  10. Daniel Dorndorf uploaded patch set 4 10/17/21, 14:25

  11. Daniel Dorndorf commented on patch set 4 10/17/21, 14:26

    Reply

    ok

    FrontendConfigurationManager.php:158 Reply

    Also adjusted this
  12. core-ci voted on patch set 3 V +1 10/17/21, 14:30 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18245

  13. core-ci voted on patch set 4 V +1 10/17/21, 14:39 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18246

  14. Daniel Dorndorf commented on patch set 4 10/17/21, 14:43

    FrontendConfigurationManager.php:159 Reply

    Done
  15. Simon Gilli commented on patch set 4 CR +1 10/17/21, 14:47

    Great thx!
  16. Christian Kuhn commented on patch set 4 10/17/21, 15:42

    FrontendConfigurationManager.php:158

    funny. did run into the very same issue within functional tests recently and decided to not fix it in code, but to prepare the test better.
  17. Simon Gilli commented on patch set 4 10/17/21, 16:15

    FrontendConfigurationManager.php:158 Reply

    Looks there are some real edge cases here. Not sure if it's a valid and recommended usage though but fixing does not hurt imho...
  18. Christian Kuhn commented on patch set 4 10/17/21, 19:57

    FrontendConfigurationManager.php:158 Reply

    yeah. guess we should sanitize it. alternative is an exception but that would be breaking ... so, i'd go with the v11 sanitation as proposed. for v12 it's prettyl likely we'll kill ConfigurationManager entirely since it's a trainwreck of an api anyway and is on my kill-list for quite some time already since it hurts.
  19. Christian Kuhn updated the commit message in patch set 5 10/17/21, 19:58

  20. Oliver Klee voted on patch set 5 CR +1 10/17/21, 20:05

  21. Stefan Bürk voted on patch set 5 V +1 CR +1 10/17/21, 20:09

  22. Christian Kuhn commented on patch set 5 10/17/21, 20:11

    FrontendConfigurationManager.php:158 Reply

    Done
  23. core-ci voted on patch set 5 V +1 10/17/21, 20:18 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18265

  24. Christian Kuhn voted on patch set 5 V +2 CR +2 10/17/21, 20:39

  25. Christian Kuhn merged patch set 6 10/17/21, 20:39