Review main Merged

74352[BUGFIX] Use proper EventDispatcherInterface mock

Stefan Bürk CR +2 V +2 Easy +30 −5 updated 04/18/22, 23:26

Commit message

Introducing two new PSR-14 events with #96975 added corresponding tests
with prophesized EventDispatcherInterface objects. This works on core ci
and locally until a real instance with installed styleguide data and
site configurations exists. SiteConfigurations will be looped and the
called prophesized EventDispatcher returned null instead of an event,
emitting a php error.

This patch uses proper anonymous class mocks which simply return the
given event to avoid this issue.

Review

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

Issues 2

Files 2

Review log 912

  1. Stefan Bürk uploaded patch set 1 04/18/22, 19:19

  2. Stefan Bürk updated the commit message in patch set 2 04/18/22, 19:21

  3. crell commented on patch set 2 CR +1 04/18/22, 19:26

    At some point, it will make sense to just have a `NoopEventDispatcher` lying around for testing purposes that is essentially this. Whether now is that point or not I'm not sure, but we'll want one eventually. Giving a +1 for now, because I'm good either way on that front.
  4. core-ci voted on patch set 2 V +1 04/18/22, 19:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26166

  5. core-ci voted on patch set 1 V +1 04/18/22, 19:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26165

  6. Nikita Hovratov updated the commit message in patch set 3 04/18/22, 20:03

  7. Nikita Hovratov voted on patch set 3 V +1 CR +1 04/18/22, 20:05

  8. core-ci voted on patch set 3 V +1 04/18/22, 20:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26169

  9. crell voted on patch set 3 CR +1 04/18/22, 20:24

  10. Oliver Klee voted on patch set 3 V +1 CR +1 04/18/22, 21:54

  11. Benni Mack voted on patch set 3 V +2 CR +2 04/18/22, 23:25

  12. Benni Mack merged patch set 4 04/18/22, 23:26