Review main Merged

77207[TASK] Enforce types in HtmlParser / RteHtmlParser

Benni Mack CR +2 V +2 Normal +27 −52 updated 01/04/23, 16:02

Commit message

This change adds types to all protected properties
and methods within the RTE classes.

Review

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

Issues 1

Files 2

Review log 1013

  1. Benni Mack uploaded patch set 1 12/23/22, 13:33

  2. core-ci voted on patch set 1 V +1 12/23/22, 13:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35328

  3. Benni Mack updated the commit message in patch set 2 V +1 12/23/22, 21:26

  4. core-ci voted on patch set 2 V +1 12/23/22, 21:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35331

  5. Oliver Klee commented on patch set 2 12/23/22, 22:51

    HtmlParser.php:3

    Shouldn't this file then also be strict?

    RteHtmlParser.php:253

    We can remove this line now.

    RteHtmlParser.php:478

    Why did the default value get removed? (That is a change in behavior.)
  6. Benni Mack commented on patch set 2 01/03/23, 22:45

    RteHtmlParser.php:478 Reply

    The method is protected and always called with an argument, thus, no need to keep a default value for the argument.
  7. Oli Bartsch uploaded patch set 3 V +1 01/04/23, 08:28

  8. Oli Bartsch commented on patch set 2 V +1 CR +1 01/04/23, 08:33

    HtmlParser.php:3 Reply

    In the current state, this would lead to a couple of TypeError exceptions. The purpose of this patch is to "just" add types to protected properties and methods. I therefore think we should do a separate patch to introduce strict types for this class, since this requires a lot more work. Do you agree?

    RteHtmlParser.php:253 Reply

    Done

    RteHtmlParser.php:478 Reply

    Done
  9. core-ci voted on patch set 3 V +1 01/04/23, 08:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35455

  10. Oliver Klee commented on patch set 3 V +1 CR +1 01/04/23, 13:44

    HtmlParser.php:3 Reply

    Ack
  11. Oli Bartsch voted on patch set 3 CR +2 01/04/23, 16:02

  12. Oli Bartsch voted on patch set 3 V +2 01/04/23, 16:02

  13. Oli Bartsch merged patch set 4 01/04/23, 16:02