Review main Merged

81413[TASK] Remove TYPO3_CONF_VARS BE/flexformForceCDATA

Christian Kuhn CR +2 V +2 Normal +50 −69 updated 10/12/23, 11:08

Commit message

TYPO3_CONF_VARS BE/flexformForceCDATA is an ancient
setting introduced 2009 with #19338 in TYPO3 4.3 to
work around a weird behavior in libxml at that time.

It is the last usage of 'useCDATA' in GU::array2xml()
and some others. We can remove both.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
    • Garvin Hicking +1
    • Stefan Bürk +1
    • Simon Schaufelberger +1
    • Benni Mack +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
    • Garvin Hicking +1
    • Stefan Bürk +1
    • Simon Schaufelberger +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 11

Review log 2430

Show 35 earlier messages
  1. Christian Kuhn uploaded patch set 1 10/11/23, 16:45

  2. core-ci voted on patch set 1 V -1 10/11/23, 16:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47688

  3. Christian Kuhn uploaded patch set 2 V -1 10/11/23, 17:13

  4. core-ci voted on patch set 2 V +1 10/11/23, 17:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47689

  5. Christian Kuhn commented on patch set 1 10/11/23, 17:22

    GeneralUtility.php:1214

    note this was always true due to the string cast on $v above for a while already.
  1. Garvin Hicking commented on patch set 2 10/11/23, 17:23

    GeneralUtility.php:1219

    Accidentally removed this evaluation maybe? Doesnt seem related to the CDATA option? (I know its WIP, but since I read it "by squirrelaccident"...)
  2. Christian Kuhn uploaded patch set 3 V +1 10/11/23, 17:34

  3. Christian Kuhn commented on patch set 3 10/11/23, 17:36

    GeneralUtility.php:1219 Reply

    should be better now?
  4. Christian Kuhn uploaded patch set 4 10/11/23, 17:40

  5. core-ci voted on patch set 3 V +1 10/11/23, 17:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47690

  6. core-ci voted on patch set 4 V +1 10/11/23, 17:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47691

  7. Christian Kuhn commented on patch set 4 10/11/23, 17:52

    GeneralUtility.php:1219 Reply

    the $dtype===string is always true due to the cast above, elseif never kicks in. useCDATA is always false, so the entire thing can go.
  8. Oliver Klee voted on patch set 4 V +1 CR +1 10/11/23, 18:19

  9. Christian Kuhn commented on patch set 5 CR +1 V +1 10/11/23, 18:24

    Published edit on patch set 4.
  10. Oliver Klee voted on patch set 5 V +1 CR +1 10/11/23, 18:26

  11. Christian Kuhn commented on patch set 5 CR -1 10/11/23, 18:27

    mom, dealing with details.
  12. core-ci voted on patch set 5 V +1 10/11/23, 18:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47693

  13. Simon Schaufelberger voted on patch set 5 CR +1 10/11/23, 20:00

  14. Garvin Hicking commented on patch set 5 10/12/23, 06:34

    Checked into it a bit. I believe this code here is definitely required to be kept: ``` $dType = gettype($v); if ($dType !== 'string' && !($options['disableTypeAttrib'] ?? false)) { $attr .= ' type="' . $dType . '"'; } ``` (slightly optimized). Otherwise, the returned output would be missing an output like `<arraykey type="(integer|boolean|double|float|NULL|object)">`. The option `disableTypeAttrib` is not set by default, so by default this output would always be included. BTW: I also grepped my source of all current TYPO3 packagist sources; the key "flexformForceCDATA" only occurs in two (irrelevant) extensions (fnagel/beautyofcode in an RST, friendsoftypo3/compatibility6 for you guessed it). 'useCDATA' occurs in: templavoila, compatibility6, franzholz/div2007, dmkebusinessgmbh/typo3-mkdam2fal - and I doubt these places have relevancy.
  15. Garvin Hicking commented on patch set 5 10/12/23, 06:39

    For completion sake, 'disableTypeAttrib=2' (thus suppressing what has also been removed in this current state of the patch) is actively used in quite a few extensions (19), but there's no reverse indication on how many use the current default of depending on the attribute.
  16. Christian Kuhn uploaded patch set 6 CR +1 V +1 10/12/23, 10:30

  17. Christian Kuhn commented on patch set 5 CR -1 10/12/23, 10:31

    Reply

    agreed. thank you! i mixed up $stringValue and $v. good catch. i had a look at extension usages of flexformForceCDATA and useCDATA as well, looks as if this should not have impact.
  18. Garvin Hicking commented on patch set 6 V +1 CR +1 10/12/23, 10:34

    👍
  19. Simon Schaufelberger voted on patch set 6 V +1 CR +1 10/12/23, 10:36

  20. core-ci voted on patch set 6 V +1 10/12/23, 10:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47709

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

  22. Stefan Bürk voted on patch set 6 V +1 CR +1 10/12/23, 11:02

  23. Benni Mack voted on patch set 6 V +1 CR +1 10/12/23, 11:03

  24. Christian Kuhn voted on patch set 6 V +2 CR +2 10/12/23, 11:07

  25. Christian Kuhn merged patch set 7 10/12/23, 11:08