Review main Merged

82162[TASK] Extract registration of controller actions into separate method

Nikita Hovratov CR +2 V +2 Normal +84 −16 updated 12/13/23, 13:57

Commit message

EU::configurePlugin tightly couples registration of controller actions
and TypoScript generation for a frontend rendering definition.
Furthermore, lib.contentElement is only defined in fluid_styled_content,
which makes it an indirect requirement.

This patch extracts the part for the controller action registration, so
it can be used independently of fluid_styled_content. In addition, this
new method expects the controller actions to have an array shape
already. A converter method ensures compatibility for both string and
array syntax.

A concrete use-case for internal usage would be Content Blocks, as it
would be possible to separately define a Content Block of type "Plugin"
and in addition register controller actions for it.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Garvin Hicking +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Oliver Klee +1
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1416

  1. Nikita Hovratov uploaded patch set 1 12/09/23, 20:55

  2. core-ci voted on patch set 1 V +1 12/09/23, 21:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50538

  3. Oliver Klee voted on patch set 1 CR +1 V +1 12/10/23, 10:10

  4. Benni Mack commented on patch set 1 12/11/23, 07:01

    ExtensionUtility.php:102

    if it is possible, we can make the actionList receive an array of arrays for this method (= do this in the "original" method), which would solve another issue for registration in the future.
  5. Torben Hansen commented on patch set 1 12/11/23, 07:55

    ExtensionUtility.php:102 Reply

    Yes, lets do it. I think this is also a good chance to unify/simplify/harden the whole plugin registration/configuration code in extbase. Also fits good to this WIP patch (https://review.typo3.org/c/Packages/TYPO3.CMS/+/82154) for plugin registration/configuration in one configuration file.
  6. Nikita Hovratov uploaded patch set 2 CR +1 V +1 12/11/23, 08:33

  7. Nikita Hovratov commented on patch set 2 12/11/23, 08:35

    ExtensionUtility.php:102 Reply

    Good idea, done.
  8. core-ci voted on patch set 2 V +1 12/11/23, 08:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50555

  9. Benni Mack voted on patch set 2 CR +1 12/11/23, 12:12

  10. Oliver Klee voted on patch set 2 V +1 12/11/23, 13:02

  11. Oli Bartsch commented on patch set 2 12/11/23, 14:18

    ExtensionUtility.php:56

    Should we just call those in registerControllerActions()?
  12. Nikita Hovratov commented on patch set 2 12/11/23, 14:41

    ExtensionUtility.php:56 Reply

    According to Benni: > if it is possible, we can make the actionList receive an array of arrays for this method (= do this in the "original" method), which would solve another issue for registration in the future. I think the idea is to have a clean new API, without built-in migrations.
  13. Benni Mack commented on patch set 2 12/11/23, 14:49

    ExtensionUtility.php:56 Reply

    exactly. we declined a change in the past for v12 to add an array of actions instead of the list. theoretically this is now in place for future work.
  14. Garvin Hicking voted on patch set 2 CR +1 V +1 12/13/23, 10:33

  15. Oli Bartsch commented on patch set 2 CR +2 V +2 12/13/23, 13:40

    ExtensionUtility.php:56 Reply

    Acknowledged
  16. Oli Bartsch merged patch set 3 12/13/23, 13:57