Review main Merged

86253[TASK] Deprecate plugin content element and plugin subtypes (list_type)

Torben Hansen CR +2 V +2 Hard +587 −270 updated 10/07/24, 14:53

Commit message

Historically, plugins were commonly registered as subtypes of the
content element `list` by using the `list_type` field. In this setup,
`CType` was set to `list` for all plugins, while the actual plugin
key was defined in the `list_type` field.

This approach however led to several problems:

* Different plugins required different fields in the backend form,
  resulting in complex and often convoluted TCA configurations to
  manage form behavior.
* The existence of the `list_type` made a separate layer of content
  element definitions in the TypoScript necessary.
* The use of `list_type` did not provide any significant benefits
  and made permission handling and other backend processes more
  cumbersome.

The recommended way to create plugins is to use dedicated `CType`
content elements for each plugin. Several popular TER extensions
have already migrated from `list_type` to `CType` plugins.

In order to unify content element registration and to remove
various `list_type` related core hacks, the plugin content element
and plugin subtypes have therefore been deprecated.

The deprecation introduces the new `AbstractListTypeToCTypeUpdate`
update wizard, which 3rd party extension authors can extend in
order to add a update wizard to custom extension, which performs
the required record and backend user permission migration.

To prevent hundreds of functional tests showing a deprecation
warning, several fixture extensions have been adapted, so
plugins are configured as `CType`.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Christian Kuhn +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 18

Review log 4669

Show 3044 earlier messages
  1. Torben Hansen uploaded patch set 1 09/22/24, 06:48

  2. Torben Hansen updated the commit message in patch set 2 09/22/24, 06:49

  3. core-ci voted on patch set 2 V +1 09/22/24, 06:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66385

  4. core-ci voted on patch set 1 V +1 09/22/24, 06:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66384

  5. Garvin Hicking commented on patch set 2 09/22/24, 09:57

    Deprecation-105076-PluginContentElementAndPluginSubtypes.rst:62

    Could/should we add scanner patterns for it? I guess having these might be pretty common and indicating affected places could help in the migration process...?
  6. Torben Hansen uploaded patch set 3 V +1 09/22/24, 10:16

  7. core-ci voted on patch set 3 V +1 09/22/24, 10:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66389

  8. Torben Hansen uploaded patch set 4 V +1 09/22/24, 10:28

  9. Torben Hansen commented on patch set 4 09/22/24, 10:31

    Deprecation-105076-PluginContentElementAndPluginSubtypes.rst:62 Reply

    I added a ClassConstantMatcher for `TYPO3\CMS\Extbase\Utility\ExtensionUtility::PLUGIN_TYPE_PLUGIN`, but this will for sure only cover a small part of extensions. Additionally I added a MethodArgumentRequiredStaticMatcher to make sure, that it is checked, that Extbase `ExtensionUtility::configurePlugin` will always be called with 5 arguments (so the 5th argument must now be `PLUGIN_TYPE_CONTENT_ELEMENT`). For the other possible scenarios, I have no idea, since I but could not find out, how to tell extension scanner, that method argument X must not be a special value. AFAIK this is not possible.
  10. core-ci voted on patch set 4 V +1 09/22/24, 10:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66390

  11. Garvin Hicking commented on patch set 4 09/22/24, 10:38

    Deprecation-105076-PluginContentElementAndPluginSubtypes.rst:62 Reply

    I feel confident this should be possible with a little adaptation of the matcher. I will look into this in a distinct patch, then we can add it to this one later.
  12. Benjamin Franzke commented on patch set 4 09/23/24, 06:12

    Deprecation-105076-PluginContentElementAndPluginSubtypes.rst:29

    I like the deprecation in general, thanks! I just want to ask: Is it technically inevitable to remove support in v14? I think this is such a long-term feature, it would make life easier for developers to have a 2 major releases grace period and only remove in v15. I'm fine with v14 removal though, if this blocks refactorings/tcaschema cleanups/complexity-removal or so…
  13. Garvin Hicking commented on patch set 4 09/23/24, 14:58

    Deprecation-105076-PluginContentElementAndPluginSubtypes.rst:62 Reply

    FYI: https://review.typo3.org/c/Packages/TYPO3.CMS/+/86266 Has some caveats but maybe still helfpul for this. Slack discussion also mentioned the want/need for a migration wizard on this.
  14. Torben Hansen uploaded patch set 5 V +1 09/23/24, 16:13

  15. Torben Hansen commented on patch set 5 09/23/24, 16:14

    Deprecation-105076-PluginContentElementAndPluginSubtypes.rst:29 Reply

    I'm not aware of any blockers her, but I agree, that we should provide a 2 major releases grace period in this case, since the deprecation will affect many users.
  16. core-ci voted on patch set 5 V +1 09/23/24, 16:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66448

  17. Torben Hansen uploaded patch set 6 V +1 09/23/24, 16:22

  18. core-ci voted on patch set 6 V +1 09/23/24, 16:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66449

  19. Benjamin Franzke commented on patch set 6 09/24/24, 13:32

    Deprecation-105076-PluginContentElementAndPluginSubtypes.rst:29 Reply

    talked to benni, there are alot advantages (in terms of complexity-removal) if we drop this early), so v14 is fine.
  20. Torben Hansen uploaded patch set 7 V +1 09/24/24, 13:51

  21. Torben Hansen commented on patch set 7 09/24/24, 13:52

    Deprecation-105076-PluginContentElementAndPluginSubtypes.rst:29 Reply

    Thanks. I changed it back to v14.
  22. core-ci voted on patch set 7 V +1 09/24/24, 13:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66499

  23. Torben Hansen marked it work in progress 09/26/24, 05:47

  24. Torben Hansen updated the commit message in patch set 8 V +1 09/26/24, 05:48

  25. core-ci voted on patch set 8 V +1 09/26/24, 05:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66634

  26. Torben Hansen uploaded patch set 9 V +1 09/28/24, 11:27

  27. Torben Hansen marked it ready for review 09/28/24, 11:28

  28. core-ci voted on patch set 9 V +1 09/28/24, 11:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66774

  29. Garvin Hicking commented on patch set 9 09/28/24, 11:48

    GenericListTypeToCTypeUpdate.php:57

    "be migrated to existing content elements"?

    GenericListTypeToCTypeUpdate.php:58

    "registered extensions"? and maybe point to the psr event? and what if none are registered? Unsure if the description appears if updateNecessary() is false (havent checked)
  30. Torben Hansen uploaded patch set 10 V +1 09/29/24, 05:44

  31. Torben Hansen commented on patch set 9 09/29/24, 05:44

    GenericListTypeToCTypeUpdate.php:57 Reply

    Done

    GenericListTypeToCTypeUpdate.php:58 Reply

    Description does not appear, if update is not required. I would not refer to the PSR-14 event, since the wizards are also often executed by integrators, who may not know about PSR-14 events. If no extensions have an event listener to the event, the updater is not executed. I however see a new problem here. If a website was updated and the wizards has been executed. it will not be executed again (did not test). So if an extension author decides to use the PSR-14 event and implement the listener as part of a minor or patchlevel release, the update wizard will most likely not be execured. So maybe make the updater an abstract, which extension authors must extend?
  32. core-ci voted on patch set 10 V +1 09/29/24, 05:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66790

  33. Torben Hansen uploaded patch set 11 V +1 09/29/24, 10:16

  34. core-ci voted on patch set 11 V -1 09/29/24, 10:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66792

  35. Torben Hansen uploaded patch set 12 V -1 09/29/24, 10:28

  36. core-ci voted on patch set 12 V +1 09/29/24, 10:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66793

  37. Benni Mack commented on patch set 12 09/30/24, 13:41

    we need to deal with ExtensionUtility::addPlugin() as well.... My personal opinion in this case is (also for ExtensionManagementUtility): set the argument to null, and if it is null, throw a deprecation and set it to list_type. Thus, people NEED to set it to avoid a deprecation. In v14 we then get rid of the list_type and the argument.
  38. Lina Wolf commented on patch set 12 10/01/24, 04:53

    Reply

    This sounds like a good solution to me
  39. Torben Hansen marked it work in progress 10/01/24, 17:56

  40. Torben Hansen updated the commit message in patch set 13 V +1 10/01/24, 17:56

  41. core-ci voted on patch set 13 V -1 10/01/24, 18:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66912

  42. Torben Hansen uploaded patch set 14 V -1 10/02/24, 05:45

  43. core-ci voted on patch set 14 V -1 10/02/24, 05:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66944

  44. Torben Hansen uploaded patch set 15 V -1 10/02/24, 05:57

  1. Torben Hansen commented on patch set 15 10/02/24, 05:59

    GenericListTypeToCTypeUpdate.php:58 Reply

    Added `AbstractListTypeToCTypeUpdate` instead. Extension authors should extend the abstract and overwrite `getTitle`, `getDescription` and `$listTypeToCTypeMapping`. I think this is the best way to provide "something" that extension authors can use and which is executed independent from other migration updates.
  2. core-ci voted on patch set 15 V -1 10/02/24, 06:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66945

  3. Torben Hansen rebased onto patch set 16 V -1 10/02/24, 16:44

  4. core-ci voted on patch set 16 V -1 10/02/24, 16:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66985

  5. Torben Hansen uploaded patch set 17 V -1 10/03/24, 05:14

  6. core-ci voted on patch set 17 V +1 10/03/24, 05:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66998

  7. Torben Hansen uploaded patch set 18 V +1 10/03/24, 06:31

  8. Torben Hansen marked it ready for review 10/03/24, 06:31

  9. Torben Hansen updated the commit message in patch set 19 10/03/24, 06:31

  10. core-ci voted on patch set 18 V +1 10/03/24, 06:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66999

  11. core-ci voted on patch set 19 V +1 10/03/24, 06:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67000

  12. Torben Hansen uploaded patch set 20 V +1 10/03/24, 09:45

  13. core-ci voted on patch set 20 V +1 10/03/24, 09:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67003

  14. Chris Müller uploaded patch set 21 V +1 10/03/24, 09:56

  15. core-ci voted on patch set 21 V +1 10/03/24, 10:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67004

  16. Benni Mack commented on patch set 21 CR +1 V +1 10/05/24, 21:02

    This one is fine for the time being, and a good start. we also need to deprecate "subtype_list" etc. and "flexform" registration which is usually coupled in this area. Also: are we going to remove the DB field "list_type" in v14?
  17. Oli Bartsch commented on patch set 21 CR -1 10/07/24, 08:31

    On it
  18. Oli Bartsch uploaded patch set 22 CR +1 V +1 10/07/24, 09:51

  19. core-ci voted on patch set 22 V +1 10/07/24, 10:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67218

  20. Oli Bartsch voted on patch set 22 CR +1 V +1 10/07/24, 12:29

  21. Christian Kuhn uploaded patch set 23 CR +1 V +1 10/07/24, 14:25

  22. Christian Kuhn voted on patch set 23 CR +1 V +1 10/07/24, 14:27

  23. core-ci voted on patch set 23 V +1 10/07/24, 14:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67245

  24. Oli Bartsch voted on patch set 23 CR +2 V +2 10/07/24, 14:53

  25. Oli Bartsch merged patch set 24 10/07/24, 14:53