Review main Merged

76732[TASK] Consolidate DocType handling as Enum

Benni Mack CR +2 V +2 Hard +411 −135 updated 12/23/22, 14:57

Commit message

A new Enum "DocType" is introduced to finally streamline
the usage of various TypoScript options,
TSFE properties (xhtmlDoctype, xhtmlVersion)
various PageRenderer methods (setXmlPrologAndDocType, setRenderXhtml)
and keep them in sync by adding this information
to PageRenderer->docType.

The following TSFE public properties
are now marked as deprecated:
* TSFE->xhtmlDoctype
* TSFE->xhtmlVersion

The following PageRenderer methods are now
deprecated as this is now configured via the Enum
* PageRenderer->setRenderXhtml()
* PageRenderer->getRenderXhtml()
* PageRenderer->setMetaCharsetTag()
* PageRenderer->getMetaCharsetTag()
* PageRenderer->setCharSet()
* PageRenderer->getCharSet()

Review

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

Issues 1

Files 18

Review log 2031

Show 36 earlier messages
  1. Benni Mack uploaded patch set 1 11/19/22, 22:09

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

  3. Benni Mack uploaded patch set 2 V -1 12/22/22, 12:51

  4. core-ci voted on patch set 2 V -1 12/22/22, 13:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35304

  5. Benni Mack uploaded patch set 3 V -1 12/22/22, 20:13

  6. core-ci voted on patch set 3 V -1 12/22/22, 20:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35308

  1. Benni Mack uploaded patch set 4 V -1 12/22/22, 20:34

  2. core-ci voted on patch set 4 V -1 12/22/22, 20:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35309

  3. Benni Mack uploaded patch set 5 V -1 12/22/22, 20:50

  4. core-ci voted on patch set 5 V -1 12/22/22, 21:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35310

  5. Benni Mack uploaded patch set 6 V -1 12/22/22, 21:07

  6. core-ci voted on patch set 6 V -1 12/22/22, 21:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35312

  7. Benni Mack uploaded patch set 7 V -1 12/22/22, 21:24

  8. core-ci voted on patch set 7 V +1 12/22/22, 21:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35313

  9. Benni Mack uploaded patch set 8 V +1 12/22/22, 22:12

  10. core-ci voted on patch set 8 V -1 12/22/22, 22:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35314

  11. Benni Mack uploaded patch set 9 V -1 12/22/22, 23:00

  12. core-ci voted on patch set 9 V +1 12/22/22, 23:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35316

  13. Benni Mack uploaded patch set 10 V +1 12/22/22, 23:58

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

  15. Susi Moog commented on patch set 10 CR +1 12/23/22, 07:01

    PageRenderer.php:819

    used disabled?
  16. Oliver Klee commented on patch set 10 12/23/22, 08:33

    YouTubeRenderer.php:235

    From an architectural point of view, I'd see this method in the new DocType class. (Then we'd also avoid the duplication with the VimeoRendererClass.)
  17. Benni Mack uploaded patch set 11 CR +1 V +1 12/23/22, 09:32

  18. Benni Mack commented on patch set 10 12/23/22, 09:32

    PageRenderer.php:819 Reply

    Done

    YouTubeRenderer.php:235 Reply

    done, although I kept the wrapper method in there for mocking purposes in tests.
  19. Chris Müller commented on patch set 10 12/23/22, 09:34

    Perhaps name the DocType "DocumentType" to avoid confusion with the DokType of the pages table.
  20. core-ci voted on patch set 11 V +1 12/23/22, 09:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35325

  21. Benni Mack commented on patch set 11 12/23/22, 09:44

    Reply

    Thought about this as well, also discussed this with Susi. DOCTYPE is actually the main reasoning for defining the document. see https://developer.mozilla.org/en-US/docs/Glossary/Doctype Other ideas next to "DocumentType" was also "PageRenderingType" or "RenderingType" which both fit, but then this is all much more related to other places (e.g. "DocType::JSON" or "DocType::text" or something similar), but that would then happen at a later stage.
  22. Oliver Klee commented on patch set 11 12/23/22, 11:02

    YouTubeRenderer.php:235 Reply

    Ah, okay, I see. Thanks.
  23. Susi Moog voted on patch set 11 V +1 CR +1 12/23/22, 14:37

  24. Georg Ringer voted on patch set 11 V +2 CR +2 12/23/22, 14:57

  25. Georg Ringer merged patch set 12 12/23/22, 14:57