Review main Merged

73808[BUGFIX] Fix sorting of module registry

Benni Mack CR +2 V +2 Hard +456 −92 updated 03/07/22, 12:02

Commit message

The new Module Registration API has not
considered sorting the same way as before.

This has now been modified and adapted.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Nikita Hovratov +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 1

Files 7

Review log 1724

  1. Benni Mack uploaded patch set 1 03/04/22, 12:39

  2. core-ci voted on patch set 1 V +1 03/04/22, 12:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24552

  3. Benni Mack uploaded patch set 2 03/04/22, 13:00

  4. Benni Mack uploaded patch set 3 03/04/22, 14:40

  5. core-ci voted on patch set 3 V -1 03/04/22, 14:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24559

  6. Benni Mack uploaded patch set 4 03/04/22, 15:12

  7. core-ci voted on patch set 4 V -1 03/04/22, 15:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24562

  8. Benni Mack uploaded patch set 5 03/04/22, 15:41

  9. core-ci voted on patch set 5 V +1 03/04/22, 15:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24566

  10. Benni Mack uploaded patch set 6 03/04/22, 20:32

  11. core-ci voted on patch set 6 V +1 03/04/22, 20:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24588

  12. Nikita Hovratov voted on patch set 6 V +1 03/04/22, 21:57

  13. Oli Bartsch commented on patch set 6 V -1 03/04/22, 22:01

    On it
  14. Nikita Hovratov commented on patch set 6 V -1 03/04/22, 22:50

    There is now a difference when using "top". Before the first module declaring "top" was always the first one, now it the last one, that is on the very top.
  15. Oli Bartsch uploaded patch set 7 03/04/22, 23:52

  16. core-ci voted on patch set 7 V -1 03/05/22, 00:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24597

  17. Oli Bartsch uploaded patch set 8 03/05/22, 01:08

  18. Oli Bartsch commented on patch set 8 03/05/22, 01:11

    Reply

    I added a Test class for the registry. Do you want to add a test case for you findings?
  19. core-ci voted on patch set 8 V +1 03/05/22, 01:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24603

  20. Nikita Hovratov commented on patch set 8 03/05/22, 02:34

    Reply

    Hmm, I tested by adding "top" to EXT:form. In v11 it appeared under the "List" module. In current main it appears at the very top. In the loading order form comes before backend, so this makes sense for main. Then it behaved wrong before I guess. Didn't dig deeper in v11, why it is like that.
  21. Oli Bartsch commented on patch set 8 V +1 CR +1 03/07/22, 10:14

    Reply

    Yes, this was actually one of the main problems of the previous implementation. Modules could have been added / changed / removed on runtime via the $GLOBALS['TBE_MODULES'] array. With the new module registration, all modules are now registered on build-time. This means the registry can properly apply the sorting without depending on the registration order. See ModuleRegistryTest::addModuleAppliesSortingAndHierarchy(), where the input array is always shuffled.
  22. Nikita Hovratov voted on patch set 8 V +1 CR +1 03/07/22, 11:21

  23. Benni Mack voted on patch set 8 V +2 CR +2 03/07/22, 12:02

  24. Benni Mack merged patch set 9 03/07/22, 12:02