Review main Merged

77798[FEATURE] Introduce TCA type "json"

Frank Nägler CR +2 V +2 Expert +1066 −102 updated 03/07/23, 05:33

Commit message

A new TCA type "json" is introduced, which
allows to simplify the configuration when
working with fields, containing JSON data.

It replaces the previously introduced dbtype=json
of TCA type "user" (see: #99226).

FormEngine will display the JSON data using
codemirror, in case EXT:t3editor is installed
and enabled for the field. Otherwise, a standard
textarea HTML element is used.

Using the new type, corresponding database
columns are added automatically.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Nikita Hovratov +1
  • Verified V +2 Done
    • Benni Mack +2
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 2

Files 31

Show 11 more files

Review log 2739

Show 1014 earlier messages
  1. Frank Nägler uploaded patch set 1 02/09/23, 11:39

  2. core-ci voted on patch set 1 V -1 02/09/23, 11:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37438

  3. Frank Nägler uploaded patch set 2 V -1 02/09/23, 12:54

  4. core-ci voted on patch set 2 V +1 02/09/23, 13:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37450

  5. Benni Mack commented on patch set 2 02/09/23, 14:37

    should we just use a type=text, and dbType=json and renderType=code or something like that?
  6. Frank Nägler commented on patch set 2 02/10/23, 11:26

    Reply

    To be honest, I don't care, for me the whole system with type, dbType and rednerTypo is confusing. JSON is pure text, but JSON is stored as JSON in DB, rendering can be a textarea without t3editor or as code-mirror field if t3editor is installed (checks are missing btw). DataHandler (at the moment) handles JSON only as type=user and dbType=json. I am missing a concept here, or I did not see it yet.
  7. Frank Nägler marked it work in progress 02/10/23, 11:26

  8. Frank Nägler commented on patch set 2 02/10/23, 11:27

    This change is ready for review.

    Reply

    and my test record is configured like that at the moment: 't3editor_3' => [ 'label' => 't3editor_3', 'description' => '', 'config' => [ 'type' => 'json', 'dbType' => 'json', 'default' => null, ], ],
  9. Frank Nägler marked it work in progress 02/10/23, 11:27

  10. Frank Nägler rebased onto patch set 3 V +1 02/23/23, 12:52

  11. core-ci voted on patch set 3 V +1 02/23/23, 13:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38017

  12. Oli Bartsch rebased onto patch set 4 V +1 02/24/23, 12:41

  13. core-ci voted on patch set 4 V +1 02/24/23, 13:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38053

  14. Oli Bartsch uploaded patch set 5 V +1 03/04/23, 21:48

  1. core-ci voted on patch set 5 V +1 03/04/23, 21:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38458

  2. Oli Bartsch uploaded patch set 6 V +1 03/04/23, 22:07

  3. Oli Bartsch marked it ready for review 03/04/23, 22:07

  4. core-ci voted on patch set 6 V +1 03/04/23, 22:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38459

  5. Simon Schaufelberger commented on patch set 6 03/05/23, 03:22

    Feature-99226-IntroduceDbTypeJsonForTCATypeUser.rst:1

    I'm not sure if it is wise to delete that file as it still relates to a forge issue.
  6. Oli Bartsch uploaded patch set 7 V +1 03/05/23, 09:23

  7. Oli Bartsch commented on patch set 7 03/05/23, 09:23

    Feature-99226-IntroduceDbTypeJsonForTCATypeUser.rst:1 Reply

    Good point. Added a warning on top instead.
  8. core-ci voted on patch set 7 V +1 03/05/23, 09:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38481

  9. Oli Bartsch uploaded patch set 8 V +1 03/05/23, 09:38

  10. core-ci voted on patch set 8 V +1 03/05/23, 09:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38482

  11. Benni Mack commented on patch set 8 03/06/23, 08:28

    BackendUtility.php:1550

    can now be moved to the switch/case statement
  12. Nikita Hovratov uploaded patch set 9 V +1 03/06/23, 09:31

  13. Nikita Hovratov commented on patch set 8 03/06/23, 09:31

    BackendUtility.php:1550 Reply

    Done
  14. core-ci voted on patch set 9 V +1 03/06/23, 09:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38524

  15. Nikita Hovratov uploaded patch set 10 V +1 03/06/23, 09:47

  16. Nikita Hovratov voted on patch set 10 V +1 CR +1 03/06/23, 09:47

  17. Nikita Hovratov uploaded patch set 11 CR +1 V +1 03/06/23, 09:52

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

  19. core-ci voted on patch set 11 V -1 03/06/23, 10:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38530

  20. Nikita Hovratov uploaded patch set 12 V -1 03/06/23, 10:41

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

  22. Nikita Hovratov voted on patch set 12 V +1 CR +1 03/06/23, 11:06

  23. Benni Mack voted on patch set 12 V +2 CR +2 03/06/23, 12:00

  24. Benni Mack merged patch set 13 03/06/23, 12:00

  25. Stefan Bürk commented on patch set 13 03/07/23, 05:33

    DefaultTcaSchema.php:520

    Post -1 Default values for `json` fields are not allowed by all DBMS. Fix: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78043