Review main Merged

77210[FEATURE] Add event after record published in workspaces

Susi Moog CR +2 V +2 Normal +193 −0 updated 01/18/23, 13:11

Commit message

A new PSR-14 event has been added to allow extension
developers to react on record publishing in workspaces.

The event does not allow any modifications, but
provides context related information, such as the
table name, the current workspace and the record uid.

Review

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

Issues 1

Files 6

Review log 2535

Show 710 earlier messages
  1. Susi Moog uploaded patch set 1 12/27/22, 08:42

  2. core-ci voted on patch set 1 V -1 12/27/22, 08:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35360

  3. Susi Moog updated the commit message in patch set 2 V -1 12/27/22, 08:56

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

  5. Susi Moog uploaded patch set 3 V -1 12/27/22, 09:13

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

  7. Guido Schmechel voted on patch set 3 CR +1 12/28/22, 15:16

  8. Jörg Bösche voted on patch set 3 CR +1 01/13/23, 09:39

  9. Christian Kuhn commented on patch set 3 01/13/23, 13:41

    'swap' has been removed.

    Feature-99430-AddEventAfterRecordPublishingInWorkspaces.rst:16

    there is no 'swap' anymore. there might be code leftovers, but swapping can't be triggered anymore iirc.

    AfterRecordPublishingEvent.php:29

    we may want to rename this.

    DataHandlerHook.php:723

    we may want to rename $swapWith along the way since the name is misleading: swap was an action where the 'live' record became the ws-record on publish. we ditched that a while ago and i assume the variable name is just an unfortunate leftover.
  10. Susi Moog commented on patch set 3 01/13/23, 14:21

    DataHandlerHook.php:723 Reply

    there are > 30 usages of swapWith and even more with the naming version_swap - we should do that in a separate patch I guess. For the event: which name would you prefer for the variable in the event or is this now _always_ the same as $id? I don't quite grasp all the usages / callees.
  1. Christian Kuhn commented on patch set 3 01/13/23, 15:51

    DataHandlerHook.php:723 Reply

    > I don't quite grasp all the usages / callees. me neither. guess that's the live record at this point?
  2. Susi Moog uploaded patch set 4 CR +1 V +1 01/16/23, 07:24

  3. Susi Moog updated the commit message in patch set 5 01/16/23, 07:25

  4. Susi Moog commented on patch set 5 01/16/23, 07:26

    Reply

    Done

    Feature-99430-AddEventAfterRecordPublishingInWorkspaces.rst:16 Reply

    Done

    AfterRecordPublishingEvent.php:29 Reply

    Done

    DataHandlerHook.php:723 Reply

    I just removed the var now, as in the context of this event it isn't necessary and we can avoid the naming things thing.
  5. core-ci voted on patch set 4 V +1 01/16/23, 07:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35833

  6. core-ci voted on patch set 5 V -1 01/16/23, 07:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35834

  7. core-ci commented on patch set 5 01/16/23, 19:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35834

  8. Susi Moog rebased onto patch set 6 V -1 01/17/23, 13:38

  9. core-ci voted on patch set 6 V +1 01/17/23, 13:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35964

  10. Jörg Bösche voted on patch set 6 CR +1 01/17/23, 13:46

  11. Christian Kuhn commented on patch set 6 V +1 CR +1 01/17/23, 14:37

    DataHandlerHook.php:723 Reply

    Done
  12. Christian Kuhn voted on patch set 6 V 0 CR 0 01/17/23, 14:38

  13. Christian Kuhn commented on patch set 6 01/17/23, 14:42

    AfterRecordPublishingEvent.php:28

    please have getters for event properties: all our events use getters, plus they give us the opportunity to deprecate if needed, which is more troublesome with public properties. (same feedback from oli bartsch). other than that: fine with me for the patch. thanks for resolving the 'swap' thing!
  14. Christian Kuhn voted on patch set 6 CR -1 01/17/23, 14:42

  15. Stefan Bürk commented on patch set 6 01/17/23, 21:39

    Feature-99430-AddEventAfterRecordPublishingInWorkspaces.rst:24

    As already mentioned, event should have private properties .. and public getter's. Should be corrected here then also.

    AfterRecordPublishingEvent.php:28 Reply

    ack on that. `private or protected readonly` + getter's (and if needed setter'ss) This should be also corrected in the rest file, where `public properties` are mentioned for the event.
  16. Susi Moog uploaded patch set 7 CR +1 V +1 01/18/23, 10:48

  17. core-ci voted on patch set 7 V +1 01/18/23, 11:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36072

  18. Oli Bartsch commented on patch set 7 CR -1 01/18/23, 11:13

    On it
  19. Oli Bartsch uploaded patch set 8 CR -1 V +1 01/18/23, 12:20

  20. core-ci voted on patch set 8 V +1 01/18/23, 12:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36082

  21. Oli Bartsch uploaded patch set 9 V +1 01/18/23, 12:33

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

  23. Oli Bartsch commented on patch set 9 V +1 CR +1 01/18/23, 12:56

    Feature-99430-AddEventAfterRecordPublishingInWorkspaces.rst:24 Reply

    Done

    AfterRecordPublishingEvent.php:28 Reply

    Done
  24. Christian Kuhn voted on patch set 9 V +2 CR +2 01/18/23, 13:11

  25. Christian Kuhn merged patch set 10 01/18/23, 13:11