Review main Merged

81965[TASK] Extract ext_tables.php loading to a factory

Christian Kuhn CR +2 V +2 Hard +134 −282 updated 11/27/23, 09:21

Commit message

Having ext_tables.php loading related code within
static ExtensionManagementUtility is unflexible and no
good architecture.

The patch extracts ext_tables.php loading to a factory
used by bootstrap for the different scopes.

This obsoletes static ExtensionManagerUtility
$eventDispatcher and $cacheManager properties.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Torben Hansen +1
    • Benni Mack +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Torben Hansen +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 3

Files 10

Review log 1214

  1. Christian Kuhn uploaded patch set 1 11/26/23, 13:08

  2. core-ci voted on patch set 1 V +1 11/26/23, 13:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49950

  3. Oliver Klee voted on patch set 1 V +1 11/26/23, 13:52

  4. Oliver Klee commented on patch set 1 11/26/23, 13:58

    Looks generally very good to me. I’ve commented a place where a change was unclear to me and another where we could improve the code structure.

    BootService.php:145

    Just for readability, I think that having two nested `if` would communicate the intended control flow of the code more clearly.

    Bootstrap.php:152

    This looks unrelated to me. Why is this line removed?
  5. Torben Hansen commented on patch set 1 CR +1 V +1 11/26/23, 18:11

    Bootstrap.php:152 Reply

    The method `setEventDispatcher` has been removed from `ExtensionManagementUtility` (as well as the whole EventDispatcher usage in that class)
  6. Christian Kuhn commented on patch set 1 11/26/23, 18:51

    BootService.php:145 Reply

    thought about that, too, but decided to go with this since it's still simple enough to grasp to my perception.
  7. Oliver Klee commented on patch set 1 11/26/23, 20:33

    BootService.php:145 Reply

    Honestly, this construct confused me, and I needed to think twice to understand what the purpose of the code was. That’s why I suggest changing the structure in order to save future code readers this confusion. :-)

    Bootstrap.php:152 Reply

    That’s what I had gathered as well. My point was: Does this change remove the usage of the EventDispatcher in that class? (If I’m not mistaken, there was not usage left in the first place.) So I’d prefer to have that removal as a pre-patch to keep unrelated changes out of this changes, and to have single-purpose changes. Or am I missing something here?
  8. Christian Kuhn commented on patch set 1 11/27/23, 08:51

    BootService.php:145 Reply

    Done

    Bootstrap.php:152 Reply

    EMU::setEventDispatcher() is removed with this patch, ext_tables stuff was last usage.
  9. Christian Kuhn uploaded patch set 2 CR +1 V +1 11/27/23, 08:52

  10. Torben Hansen voted on patch set 2 CR +1 V +1 11/27/23, 08:59

  11. core-ci voted on patch set 2 V +1 11/27/23, 09:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49969

  12. Benni Mack voted on patch set 2 CR +1 V +1 11/27/23, 09:19

  13. Christian Kuhn voted on patch set 2 CR +2 V +2 11/27/23, 09:20

  14. Christian Kuhn merged patch set 3 11/27/23, 09:21