Review main Merged

90472[FEATURE] Add new AfterRichtextConfigurationPreparedEvent

Andreas Nedbal CR +2 V +2 Hard +237 −20 updated 09/02/25, 12:06

Commit message

This commit adds a new event that allows to adjust the richtext
configuration after it has been fetched from YAML and initially
prepared.

The main (core-side) use case of this has also been implemented,
which is moving of the CKEditor5Migrator class into the rte-ckeditor
system extension, properly separating concerns further.

Review

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

Issues 1

Files 9

Review log 1930

Show 35 earlier messages
  1. Andreas Nedbal uploaded patch set 1 08/22/25, 09:48

  2. core-ci voted on patch set 1 V -1 08/22/25, 09:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83749

  3. Andreas Nedbal uploaded patch set 2 V -1 08/22/25, 10:05

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

  5. Andreas Nedbal uploaded patch set 3 V -1 08/22/25, 10:38

  1. core-ci voted on patch set 3 V -1 08/22/25, 10:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83753

  2. Andreas Nedbal uploaded patch set 4 V -1 08/22/25, 12:43

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

  4. Andreas Nedbal uploaded patch set 5 V -1 08/22/25, 12:56

  5. core-ci voted on patch set 5 V +1 08/22/25, 13:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83761

  6. Garvin Hicking commented on patch set 5 V +1 08/22/25, 18:44

    phpstan-baseline.neon:643

    How do you feel about fixing this as a drive-by (since we're already main-only here)? ``` if ($res === false || $res === 0) { return $ruleConfig; } $name = $matches[1]; $properties = $matches[2]; $config = true; if ($properties !== null) { ``` Here, $matches[2] can probably never be null, because the if clause at the beginning already excludes failed regexp matches.

    Richtext.php:82

    Could we use DI for eventDispatcher here to prevent GUmI?

    Feature-107322-NewPSR-14AfterRichtextConfigurationPreparedEvent.rst:41

    ```suggestion $config = $event->getConfiguration(); $config['someSetting'] = 'someValue'; $event->setConfiguration($config); ``` maybe that would make it clearer and also involve the getter. Even better if you figure out a good config value to change here (maybe with dynamic evaluation of something to showcase why having this can be cool...?)

    AfterRichtextConfigurationPreparedEventListener.php:24

    ```suggestion final readonly class AfterRichtextConfigurationPreparedEventListener ```
  7. Andreas Nedbal uploaded patch set 6 V +1 08/25/25, 11:52

  8. Andreas Nedbal commented on patch set 6 08/25/25, 11:54

    phpstan-baseline.neon:643 Reply

    Done

    Richtext.php:82 Reply

    Done

    Feature-107322-NewPSR-14AfterRichtextConfigurationPreparedEvent.rst:41 Reply

    Done

    AfterRichtextConfigurationPreparedEventListener.php:24 Reply

    Done
  9. core-ci voted on patch set 6 V -1 08/25/25, 12:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83845

  10. Andreas Nedbal uploaded patch set 7 V -1 08/25/25, 13:15

  11. core-ci voted on patch set 7 V -1 08/25/25, 13:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83849

  12. Andreas Nedbal uploaded patch set 8 V -1 08/29/25, 09:14

  13. core-ci voted on patch set 8 V +1 08/29/25, 09:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83973

  14. Oli Bartsch commented on patch set 8 08/29/25, 09:33

    AfterRichtextConfigurationPreparedEventTest.php:24

    IMO we can skip this test and should instead add a test to `RichtextTest`, which acutally verifies, that the event is dispatched and updated configuration is used. See `*EventIsCalled` for similar tests in the code base.
  15. Andreas Nedbal uploaded patch set 9 V +1 08/29/25, 10:39

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

  17. Andreas Nedbal uploaded patch set 10 V -1 08/29/25, 11:24

  18. core-ci voted on patch set 10 V +1 08/29/25, 11:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83976

  19. Andreas Nedbal commented on patch set 10 08/29/25, 11:35

    AfterRichtextConfigurationPreparedEventTest.php:24 Reply

    Done
  20. Garvin Hicking commented on patch set 10 CR +1 V +1 08/29/25, 20:50

    \o/
  21. Garvin Hicking rebased onto patch set 11 CR +1 V +1 08/29/25, 21:04

  22. Garvin Hicking commented on patch set 11 CR +1 V +1 08/29/25, 21:09

    Sorry, git-fail on my part, never mind the relation chain (I promise to try harder)
  23. core-ci voted on patch set 11 V +1 08/29/25, 21:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84016

  24. Benni Mack voted on patch set 11 CR +2 V +2 09/02/25, 12:06

  25. Benni Mack merged patch set 12 09/02/25, 12:06