73808[BUGFIX] Fix sorting of module registry
Commit message
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
- typo3/sysext/backend/Classes/Module/BaseModule.php+11 −22
- typo3/sysext/backend/Classes/Module/ModuleRegistry.php+178 −61
- typo3/sysext/backend/Configuration/Backend/Modules.php+3 −3
- typo3/sysext/backend/Tests/Unit/Module/ModuleRegistryTest.phpnew+256 −0
- typo3/sysext/beuser/Configuration/Backend/Modules.php+1 −1
- typo3/sysext/core/Documentation/Changelog/12.0/Feature-96733-NewBackendModuleRegistrationAPI.rst+6 −4
- typo3/sysext/dashboard/Configuration/Backend/Modules.php+1 −1
Review log 1724
-
Benni Mack uploaded patch set 1 03/04/22, 12:39
-
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
-
Benni Mack uploaded patch set 2 03/04/22, 13:00
-
Benni Mack uploaded patch set 3 03/04/22, 14:40
-
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
-
Benni Mack uploaded patch set 4 03/04/22, 15:12
-
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
-
Benni Mack uploaded patch set 5 03/04/22, 15:41
-
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
-
Benni Mack uploaded patch set 6 03/04/22, 20:32
-
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
-
Nikita Hovratov voted on patch set 6 V +1 03/04/22, 21:57
-
Oli Bartsch commented on patch set 6 V -1 03/04/22, 22:01
On it -
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. -
Oli Bartsch uploaded patch set 7 03/04/22, 23:52
-
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
-
Oli Bartsch uploaded patch set 8 03/05/22, 01:08
-
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? -
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
-
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. -
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. -
Nikita Hovratov voted on patch set 8 V +1 CR +1 03/07/22, 11:21
-
Benni Mack voted on patch set 8 V +2 CR +2 03/07/22, 12:02
-
Benni Mack merged patch set 9 03/07/22, 12:02