Review main Merged

88841[TASK] Deprecate methods in BackendUtility

Georg Ringer CR +2 V +2 Expert +876 −642 updated 07/29/25, 05:34

Commit message

The following methods in BackendUtility are deprecated:

 - BackendUtility::getCommonSelectFields()
 - BackendUtility::getItemLabel()
 - BackendUtility::isTableLocalizable()
 - BackendUtility::isTableWorkspaceEnabled()
 - BackendUtility::isRootLevelRestrictionIgnored

They internally worked with $GLOBALS['TCA'], while
their functionality can simply be done via the Schema
API directly. Corresponding migrations are shown in
the RST.

Review

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

Issues 2

Files 41

Show 21 more files

Review log 3042

Show 1117 earlier messages
  1. Georg Ringer uploaded patch set 1 03/30/25, 19:09

  2. core-ci voted on patch set 1 V -1 03/30/25, 19:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76680

  3. Georg Ringer uploaded patch set 2 V -1 03/30/25, 19:22

  4. core-ci voted on patch set 2 V -1 03/30/25, 19:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76681

  5. Georg Ringer uploaded patch set 3 V -1 03/30/25, 19:33

  6. core-ci voted on patch set 3 V -1 03/30/25, 19:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76682

  7. Benni Mack uploaded patch set 4 V -1 04/01/25, 11:38

  8. core-ci voted on patch set 4 V -1 04/01/25, 11:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76776

  9. Georg Ringer uploaded patch set 5 V -1 04/01/25, 16:01

  10. core-ci voted on patch set 5 V -1 04/01/25, 16:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76800

  11. Georg Ringer commented on patch set 6 V -1 04/01/25, 16:12

    Published edit on patch set 5.
  12. Georg Ringer commented on patch set 6 04/01/25, 16:12

    This change is ready for review.
  13. core-ci voted on patch set 6 V +1 04/01/25, 16:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76802

  14. Benni Mack commented on patch set 6 04/01/25, 18:41

    BackendUtility.php:1860

    I mean, usually you could remove this method directly - it is internal! but since you've put in the efforts, and it is not blocking anything with new APIs, let's move forward as is.
  15. Benni Mack voted on patch set 6 CR +1 V +1 04/01/25, 19:27

  16. Andreas Kienast commented on patch set 6 CR -1 04/02/25, 14:11

    AbstractItemProvider.php:1202

    ```suggestion return array_map(static fn(string $value): string => $table . '.' . $value, $fields); ```

    Deprecation-106393-VariousMethodsInBackendUtility.rst:50

    Why should I copy anything? Can't we simply provide an example how to do this with the Schema API?
  17. Benni Mack commented on patch set 6 04/02/25, 14:21

    Deprecation-106393-VariousMethodsInBackendUtility.rst:50 Reply

    Schema API isn't public API (yet)
  1. Benjamin Franzke commented on patch set 6 04/04/25, 04:38

    Deprecation-106393-VariousMethodsInBackendUtility.rst:50 Reply

    @benni@typo3.org that means we should not deprecate anything (yet), right?
  2. Benni Mack commented on patch set 6 04/04/25, 06:54

    Deprecation-106393-VariousMethodsInBackendUtility.rst:50 Reply

    well, you might have seen in the past months - I'm trying to migrate to Schema API everywhere to fully understand what we need to adapt, then adapt everything in Schema API and then make it "not internal" anymore. When somebody wants to deprecate something, we need to tell them the current non-internal way (= either copy+paste or use TCA directly) and then update the RST once Schema API is ripe.
  3. Georg Ringer rebased onto patch set 7 CR +1 V +1 04/09/25, 21:11

  4. core-ci voted on patch set 7 V +1 04/09/25, 21:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77323

  5. Simon Schaufelberger commented on patch set 7 05/13/25, 22:36

    @georg.ringer@gmail.com can you please rebase this one? I've tried it myself but now there is a new call to BackendUtility::getCommonSelectFields in AbstractItemProvider
  6. Benni Mack uploaded patch set 8 V +1 07/24/25, 09:22

  7. Benni Mack commented on patch set 8 07/24/25, 09:32

    We could also deprecate getItemLabel() - see https://review.typo3.org/c/Packages/TYPO3.CMS/+/89822 in the same change
  8. core-ci voted on patch set 8 V -1 07/24/25, 09:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82227

  9. Oli Bartsch uploaded patch set 9 V -1 07/25/25, 16:13

  10. core-ci voted on patch set 9 V -1 07/25/25, 16:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82329

  11. Benni Mack commented on patch set 9 07/25/25, 17:37

    RecordListDownloadController.php:159

    can use $this->tcaSchemaFactory now

    RelationHandler.php:212

    isn't this the opposite?
  12. Oli Bartsch uploaded patch set 10 V -1 07/25/25, 19:55

  13. core-ci voted on patch set 10 V -1 07/25/25, 20:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82334

  14. Oli Bartsch uploaded patch set 11 V -1 07/25/25, 20:49

  15. Oli Bartsch commented on patch set 11 07/25/25, 20:49

    Reply

    Done

    RecordListDownloadController.php:159 Reply

    Done

    AbstractItemProvider.php:1202 Reply

    Done

    BackendUtility.php:1860 Reply

    Done

    RelationHandler.php:212 Reply

    Done

    Deprecation-106393-VariousMethodsInBackendUtility.rst:50 Reply

    Done
  16. core-ci voted on patch set 11 V +1 07/25/25, 20:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82339

  17. Benni Mack voted on patch set 11 CR +1 V +1 07/25/25, 22:53

  18. Christian Kuhn commented on patch set 11 07/28/25, 15:56

    DatabaseEditRow.php:35

    as a leaf class, this should be injected using __construct().
  19. Oli Bartsch uploaded patch set 12 CR +1 V +1 07/28/25, 17:17

  20. Oli Bartsch commented on patch set 12 07/28/25, 17:17

    DatabaseEditRow.php:35 Reply

    Thx! Done.
  21. core-ci voted on patch set 12 V +1 07/28/25, 17:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82442

  22. Christian Kuhn voted on patch set 12 CR +1 V +1 07/28/25, 17:53

  23. Georg Ringer voted on patch set 12 CR +1 V +1 07/28/25, 20:38

  24. Georg Ringer voted on patch set 12 CR +2 V +2 07/29/25, 05:34

  25. Georg Ringer merged patch set 13 07/29/25, 05:34