80764[BUGFIX] Ensure minimal sorting order for active packages
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 29
- typo3/sysext/adminpanel/ext_emconf.php1+2 −0
- typo3/sysext/backend/Tests/Functional/SiteConfiguration/Fixtures/Extensions/test_configoverride_second/ext_emconf.php+1 −1
- typo3/sysext/belog/ext_emconf.php1+1 −0
- typo3/sysext/beuser/ext_emconf.php1+1 −0
- typo3/sysext/core/Classes/Package/PackageManager.php2+28 −1
- typo3/sysext/core/Tests/Functional/Package/PackageManagerTest.php2new+152 −0
- typo3/sysext/dashboard/ext_emconf.php1+1 −0
- typo3/sysext/extensionmanager/ext_emconf.php+1 −0
- typo3/sysext/felogin/ext_emconf.php+1 −0
- typo3/sysext/filelist/ext_emconf.php+1 −0
- typo3/sysext/form/ext_emconf.php+2 −0
- typo3/sysext/impexp/Tests/Functional/AbstractImportExportTestCase.php+47 −3
- typo3/sysext/impexp/ext_emconf.php+1 −0
- typo3/sysext/indexed_search/ext_emconf.php+1 −0
- typo3/sysext/info/ext_emconf.php+1 −0
- typo3/sysext/lowlevel/ext_emconf.php+1 −0
- typo3/sysext/opendocs/ext_emconf.php+1 −0
- typo3/sysext/recycler/ext_emconf.php+1 −0
- typo3/sysext/redirects/ext_emconf.php+2 −0
- typo3/sysext/reports/ext_emconf.php+1 −0
Show 9 more files
- typo3/sysext/rte_ckeditor/ext_emconf.php+1 −0
- typo3/sysext/scheduler/ext_emconf.php+1 −0
- typo3/sysext/seo/ext_emconf.php+2 −0
- typo3/sysext/setup/ext_emconf.php+1 −0
- typo3/sysext/sys_note/ext_emconf.php+1 −0
- typo3/sysext/t3editor/ext_emconf.php+1 −0
- typo3/sysext/tstemplate/ext_emconf.php+1 −0
- typo3/sysext/viewpage/ext_emconf.php+2 −0
- typo3/sysext/workspaces/ext_emconf.php+2 −0
Review log 2127
Show 12 earlier messages
-
Oliver Hader uploaded patch set 1 08/30/23, 17:49
-
core-ci voted on patch set 1 V -1 08/30/23, 18:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46058
-
Oliver Klee commented on patch set 1 08/30/23, 18:33
-
Oliver Hader commented on patch set 1 08/30/23, 18:39
PackageManagerTest.php:52ReplyThanks for your feedback. This is just a work-in-progress patch... I don't even know whether this is going somewhere. There are too many things that are missing in terms of package dependencies. > `activePackagesAreOrderedAlphabeticallyAndByDependency` That one aspect that is not clear yet in this scope, for instance, just sorting packages alphabetically would not be helpful in the scope of this topic. -
Oliver Hader abandoned the change 08/30/23, 18:41
Giving up here. Too much work would be involved. Dependency ordering produces a flat sequence, but actually should be a nested tree that can be serialized for different strategies (e.g. items without dependencies first or last - depends on the actual use case). -
Oliver Hader restored the change 08/31/23, 11:17
-
Oliver Hader uploaded patch set 2
V -108/31/23, 11:21 -
core-ci voted on patch set 2 V -1 08/31/23, 11:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46087
-
Oliver Hader uploaded patch set 3
V -108/31/23, 11:48 -
core-ci voted on patch set 3 V -1 08/31/23, 11:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46090
-
Oliver Hader commented on patch set 3 08/31/23, 12:53
The changed order in functional tests is okay... The XML assertions needs to be done on the first level elements (without sorting order) instead of the whole serialized string (with order). -
Oliver Hader uploaded patch set 4
V -108/31/23, 13:39 -
Oliver Hader rebased onto patch set 5 08/31/23, 13:45
-
Oliver Hader commented on patch set 5 08/31/23, 13:49
This change is ready for review. -
core-ci voted on patch set 4 V -1 08/31/23, 13:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46100
-
core-ci voted on patch set 5 V -1 08/31/23, 14:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46101
-
Oliver Hader uploaded patch set 6
V -108/31/23, 14:15 -
Oliver Hader commented on patch set 6 08/31/23, 14:21
Reply
Done -
core-ci voted on patch set 6 V +1 08/31/23, 14:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46106
-
Helmut Hummel commented on patch set 6 CR -1 08/31/23, 17:45
From how I understand the code, the changes and the problem description, I'm not quite sure whether this addresses the issue without negative side effects. Please let me help to better understand this issue and the changes. ThanksUnresolved
Can you please elaborate a bit more on the scenario when this happens? I think some steps to reproduce would be helpful in the forge bug descriptionUnresolved
see above. how exactly can this reproduced? is it in (unit/ functional) tests only? then some change in the testing framework might be more appropriate. Or install tool? Then some changes in FailsafePackageManager might be required. Or is it reproducible with existing PackageStates.php (or in Composer mode), then a more detailed example would be helpful.PackageManager.php:634UnresolvedCan you explain why you think, this is necessary? Dependency sorting should only be needed, when package states config is not populated yet. Or to put it differently. The packageStatesConfiguration array must be ordered already. getActivePackages is meant as runtime method, which should not call "expensive" sorting functions.PackageManager.php:666Unresolvedwhen is this method called, without the packages being populated, that makes this fallback required? -
Helmut Hummel commented on patch set 6 08/31/23, 17:52
I did stop looking at the ext_emconf.php changes after the first three revealed inconsistencies with composer.json. These should for sure be brought in sync again (and maybe revised generally)ext_emconf.php:16UnresolvedI don't know when these files diverged from the composer.json, but to be technically correct, the dependencies here must be identical to the dependencies declared in the composer.json fileext_emconf.php:15Unresolvedif a dep is added here, it must also be added to composer.json, otherwise the ordering in composer and non composer mode might be differentext_emconf.php:15Unresolvedsame as belogext_emconf.php:15Unresolvedsame as adminpanel -
Oliver Klee commented on patch set 6 08/31/23, 18:06
Unresolved
Maybe we can add the missing dependencies first in a pre-patch to keep the changes smaller, easier to review and more focused. -
Oliver Hader commented on patch set 6 CR -2 08/31/23, 18:16
Thanks Helmut, I get back to you via Slack... -
Oliver Hader marked it work in progress 08/31/23, 18:17
-
Markus Klein commented on patch set 6 08/31/23, 20:55
Unresolved
Without knowing the details, but reading the actual problem to be solved in the commit message: Please do not infer any order for any feature from extension loading order except PHP class dependencies. The extension ordering is way too general to derive any order for any other feature/configuration/etc. without running into issues again, maybe later. Please consider introducing a dedicated sorting mechanism (possibly suing the DependencyOrderingService) for CSP instead of trying to "fix" the extension loading order. Just my 2c -
Oliver Hader commented on patch set 6 09/19/23, 12:00
→ moved to https://review.typo3.org/c/Packages/TYPO3.CMS/+/81076 which just tackles the testing-framework -
Oliver Hader abandoned the change 09/19/23, 12:00
PackageManagerTest.php:52