Review main Merged

93566[TASK] Move EXT:setup into backend extension

Benni Mack CR +2 V +2 Expert +441 −710 updated 04/11/26, 10:26

Commit message

This change removes the separate "setup" system extension
which existed for historical reasons and nowadays
is a really bad name, as "setup" is usually connected
for setting up a system and not for changing user
settings.

In modern times, a "user profile" to change a users'
own password, MFA information or name, should never
be optional in a Web UI and thus, is now moved
into the main backend extension.

The module can still be disabled via user preferences,
but not via installation of the extension.

The main benefit is for site admins and newcomers,
that they never have to worry about missing an
extension for this basic functionality.

A composer package alias is added to "typo3/cms-backend"
so that updates do not struggle with a missing / outdated
dependency.

The event `TYPO3\CMS\Setup\Event\AddJavaScriptModulesEvent`
is added as a specific PSR-4 autoload entry so that it
can work as before. It is deprecated and superseded
by the new event `AddUserSettingsJavaScriptModulesEvent`.

The best part is also that the setup extension mainly
existed of the module, and a custom FormEngine rendering
part as well as the TCA definition for the setup, making
the migration a breeze and fully backwards-compatible.

Review

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

Issues 1

Files 45

Show 25 more files

Review log 2937

Show 712 earlier messages
  1. Benni Mack uploaded patch set 1 04/08/26, 15:52

  2. core-ci voted on patch set 1 V -1 04/08/26, 16:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99776

  3. Benni Mack uploaded patch set 2 V -1 04/09/26, 05:54

  4. core-ci voted on patch set 2 V -1 04/09/26, 06:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99814

  5. Garvin Hicking uploaded patch set 3 V -1 04/09/26, 10:34

    fix extension test order
  6. Garvin Hicking commented on patch set 3 04/09/26, 10:35

    The tests currently fail because of the new wording "User Settings" => "Profile Settings". (Personally I would prefer to keep "User Settings" because currently using "user_settings" and "user_profile" and "profile_settings" mezzo mix is adding more confusion that it solves)
  7. core-ci voted on patch set 3 V -1 04/09/26, 10:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99838

  8. Benni Mack uploaded patch set 4 V -1 04/09/26, 15:17

  9. Benni Mack commented on patch set 4 04/09/26, 15:18

    Reply

    please re-review
  10. core-ci voted on patch set 4 V -1 04/09/26, 15:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99868

  11. Benni Mack uploaded patch set 5 V -1 04/09/26, 15:41

  12. core-ci voted on patch set 5 V +1 04/09/26, 15:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99871

  1. Garvin Hicking commented on patch set 5 CR +1 V +1 04/09/26, 16:02

    Reply

    Thanks. Seems to work.
  2. Christian Kuhn commented on patch set 5 04/09/26, 17:40

    missing verb.
    dieser satz kein verb.

    ext_localconf.php:31

    the array is deprecated with v14, is it? let's maybe add an @deprecated note here so we don't forget to remove it in v15?
  3. Christian Kuhn commented on patch set 5 04/09/26, 17:43

    ClassAliasMap.php:19

    did you test this? i remember i struggled with a similar event rename in v14 and had to come up with a different solution since consumers run into compat issues when they want to support both v13 and v14. i'll look it up.
  4. Christian Kuhn commented on patch set 5 04/09/26, 18:25

  5. Garvin Hicking commented on patch set 5 V 0 CR -1 04/09/26, 19:12

    Reply

    Never enough. Never, never.

    ClassAliasMap.php:19 Reply

    I just tested this and you're right. It does not work with the aliased class. Also...the "AddJavaScriptModulesEvent" inside Backend\Event is IMO misleadingly large. It sounds as if it would affect the whole EXT:backend scope, when in reality it only applies to the SetupModule. So it should be named like "AddJavaScriptModulesForSetupEvent" or so... We could add a composer.json entry to provide ``` "autoload": { "psr-4": { "TYPO3\\CMS\\Backend\\": "Classes/", "TYPO3\\CMS\\Setup\\": "LegacyClasses/" } } ``` and put the old event there under the "old" namespace so that it's available "for real". Then we could even rename the new event to something more fitting, and note that in the ReST file...?
  6. Christian Kuhn commented on patch set 5 04/09/26, 19:29

    ClassAliasMap.php:19 Reply

    ok. so: * new cleaned up event * old event moved in filesystem, but available with old namespace * dispatch both events * v15: remove old event, dispatch only new one extension v13&v14: listen to old event only. no deprecation. extension v14&v15: listen to new event only. sounds good to me. do you find time and motivation to take care and test along the way? now that you created a test bed on your side already ;)
  7. Garvin Hicking commented on patch set 5 04/09/26, 19:39

    ClassAliasMap.php:19 Reply

    happily so. Can it wait until tuesday? Am a bit short on time in my vacation ;)
  8. Garvin Hicking commented on patch set 5 04/10/26, 06:13

    on it
  9. Garvin Hicking uploaded patch set 6 CR -1 V +1 04/10/26, 07:05

  10. Garvin Hicking commented on patch set 6 04/10/26, 07:06

    Reply

    Done

    Reply

    Done

    Reply

    Done

    ClassAliasMap.php:19 Reply

    I added ReST files and aliasing... and... it feels kinda bad?! I wonder if we could instead make the dispatcher work with class alias maps properly instead? But I don't have the time to touch this right now.

    ext_localconf.php:31 Reply

    Done
  11. core-ci voted on patch set 6 V +1 04/10/26, 07:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99902

  12. Christian Kuhn commented on patch set 6 04/10/26, 21:25

    ClassAliasMap.php:19 Reply

    i looked that up back then: this is a symfony restriction, or something, not easy to circumvent iirc. no so, aliasing probably won't work easily and may have drawbacks, as well.
  13. Christian Kuhn commented on patch set 6 04/10/26, 21:28

    ClassAliasMap.php:19 Reply

    and tbh: that solution looks quite straight forward in the end, and it will be gone from main in a few weeks again ^^
  14. Garvin Hicking uploaded patch set 7 V +1 04/11/26, 07:23

  15. Garvin Hicking commented on patch set 7 CR +1 V +1 04/11/26, 07:25

    ClassAliasMap.php:19 Reply

    I was just thinking that even DI should theoretically be able to use composer autoload classmaps so I still wonder what the root cause is (and maybe if Symfony worked around it). Anyhow, I'd be fine with this with only one teary eye.
  16. Christian Kuhn commented on patch set 7 04/11/26, 07:32

    ClassAliasMap.php:20

    iirc, we need an entry for this in backend/composer.json, don't we?

    UserSettingsSchema.php:50

    thx!
  17. core-ci voted on patch set 7 V +1 04/11/26, 07:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99954

  18. Christian Kuhn uploaded patch set 8 CR +1 V +1 04/11/26, 07:37

  19. Christian Kuhn commented on patch set 7 04/11/26, 07:37

    ClassAliasMap.php:20 Reply

    in monorepo composer.json as well.
  20. Christian Kuhn commented on patch set 8 CR +1 V +1 04/11/26, 07:39

    this looks good to me, on testing, the module comes up and saves a change. hope we didn't miss something, but i don't see anything obvious anymore.
  21. Garvin Hicking commented on patch set 8 V -1 04/11/26, 07:44

    ClassAliasMap.php:20 Reply

    Let me verify with this change if the dispatching might not have worked because this was missing.
  22. core-ci voted on patch set 8 V +1 04/11/26, 07:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99955

  23. Garvin Hicking commented on patch set 8 CR +1 V +1 04/11/26, 08:44

    ClassAliasMap.php:20 Reply

    I tested this with: https://gist.github.com/fe-hicking/30619a46a381486c7f5432edfcf3796f and I still could not get dispatching the moved event to work. So I guess we'll need this workaround with a really existing "old event" class.
  24. Benni Mack voted on patch set 8 CR +2 V +2 04/11/26, 10:26

  25. Benni Mack merged patch set 9 04/11/26, 10:26