Review main Merged

76539[FEATURE] Add two PSR-14 events around auto create redirects

Stefan Bürk CR +2 V +2 Hard +576 −9 updated 03/07/23, 12:34

Commit message

With #91776 auto-created redirects have been stored with a
pid of the page, which the slug has been changed. This was
streamlined and changed to use the site rootPageId instead
with #99044, which reverted the original use-case.

This change implements two new PSR-14 events around each
auto-create-redirect:

* `ModifyAutoCreateRedirectRecordBeforePersistingEvent`:
   can be used to modify the redirect record before it is
   persisted

* `AfterAutoCreateRedirectHasBeenPersistedEvent`:
   can be used to chain further task after the redirect
   has been persisted to the database. It's kind of a
   plain notification event.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Sybille Peters +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • core-ci +1 CI

Issues 4

Files 10

Review log 2638

Show 813 earlier messages
  1. Stefan Bürk uploaded patch set 1 11/10/22, 12:13

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

  3. Stefan Bürk uploaded patch set 2 11/10/22, 14:36

  4. Stefan Bürk uploaded patch set 3 02/03/23, 16:31

  5. core-ci voted on patch set 3 V +1 02/03/23, 16:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36999

  6. Stefan Bürk updated the commit message in patch set 4 V +1 02/03/23, 16:43

  7. core-ci voted on patch set 4 V +1 02/03/23, 16:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37001

  8. Stefan Bürk uploaded patch set 5 V +1 02/05/23, 15:44

  9. core-ci voted on patch set 5 V +1 02/05/23, 15:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37118

  10. Stefan Bürk uploaded patch set 6 V +1 02/05/23, 16:37

  11. Stefan Bürk commented on patch set 6 02/05/23, 16:44

    https://review.typo3.org/c/Packages/TYPO3.CMS/+/77672 must be merged first, as referenced in the changelog.
  12. core-ci voted on patch set 6 V +1 02/05/23, 16:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37121

  13. Stefan Bürk commented on patch set 7 V +1 02/05/23, 19:56

    Published edit on patch set 6.
  1. core-ci voted on patch set 7 V +1 02/05/23, 20:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37130

  2. Benni Mack commented on patch set 8 V +1 02/08/23, 07:52

    Published edit on patch set 7.
  3. core-ci voted on patch set 8 V +1 02/08/23, 08:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37332

  4. Stefan Bürk voted on patch set 8 CR -1 02/09/23, 20:24

  5. Stefan Bürk uploaded patch set 9 CR -1 V +1 02/23/23, 10:52

  6. Stefan Bürk updated the commit message in patch set 10 02/23/23, 10:53

  7. Stefan Bürk commented on patch set 10 02/23/23, 10:53

    Reply

    Removed the cross reference for now, to avoid cross blocking. Should be fine without it anyway.
  8. core-ci voted on patch set 9 V +1 02/23/23, 11:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38007

  9. core-ci voted on patch set 10 V +1 02/23/23, 11:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38008

  10. Sybille Peters uploaded patch set 11 V +1 02/25/23, 14:55

  11. Sybille Peters commented on patch set 10 CR +1 02/25/23, 14:55

    Feature-99834-NewPSR-14EventAfterAutoCreateRedirectHasBeenPersisted.rst:16

    > redirect redirects

    Feature-99834-NewPSR-14EventAfterAutoCreateRedirectHasBeenPersisted.rst:27

    of the event listener

    Feature-99834-NewPSR-14EventAfterAutoCreateRedirectHasBeenPersisted.rst:66

    > Manual Manually

    Feature-99834-NewPSR-14EventModifyAutoCreateRedirectRecordBeforePersisting.rst:17

    > circumstance circumstances

    Feature-99834-NewPSR-14EventModifyAutoCreateRedirectRecordBeforePersisting.rst:23

    > manual manually

    Feature-99834-NewPSR-14EventModifyAutoCreateRedirectRecordBeforePersisting.rst:31

    could add :caption: Configuration/Services.yaml

    Feature-99834-NewPSR-14EventModifyAutoCreateRedirectRecordBeforePersisting.rst:78

    > Manual Manually
  12. core-ci voted on patch set 11 V +1 02/25/23, 15:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38099

  13. Sybille Peters voted on patch set 11 CR +1 02/25/23, 15:07

  14. Sybille Peters commented on patch set 11 CR 0 02/25/23, 15:25

    AfterAutoCreateRedirectHasBeenPersisted.php:31

    Why are events not named with Event suffix (this is the case with most of the other new events). > When creating a new event PHP class, it is recommended to add a Event suffix to the PHP class https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Events/EventDispatcher/Index.html
  15. Sybille Peters commented on patch set 11 02/25/23, 17:03

    Feature-99834-NewPSR-14EventModifyAutoCreateRedirectRecordBeforePersisting.rst:23 Reply

    Done
  16. Stefan Bürk uploaded patch set 12 V +1 02/26/23, 14:59

  17. Stefan Bürk commented on patch set 12 02/26/23, 15:02

    AfterAutoCreateRedirectHasBeenPersisted.php:31 Reply

    Good point. In fact, not all core events follows this recommendation. Beside this, in the world of "code style and guidelines" there are a lot of opionions, there are prominent voices that if "Event" is in the namespace it's not neccessary to redo it in the class name for example. (Just as a general note). I can live with such a suggestion, and if it is documented public that way, you are right. Changed to follow this recommendation. Thanks for pointing this out.
  18. Sybille Peters voted on patch set 12 CR +1 02/26/23, 15:06

  19. core-ci voted on patch set 12 V +1 02/26/23, 15:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38117

  20. Stefan Bürk uploaded patch set 13 CR +1 V +1 02/26/23, 15:07

  21. Sybille Peters voted on patch set 13 CR +1 02/26/23, 15:09

  22. core-ci voted on patch set 13 V +1 02/26/23, 15:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38118

  23. Georg Ringer voted on patch set 13 V +1 CR +1 03/03/23, 11:52

  24. Benni Mack voted on patch set 13 V +2 CR +2 03/07/23, 12:34

  25. Benni Mack merged patch set 14 03/07/23, 12:34