Review main Merged

77362[FEATURE] Outgoing Webhooks for TYPO3

Frank Nägler CR +2 V +2 Nightmare +3588 −72 updated 03/24/23, 21:28

Commit message

A webhook is an automated message sent from one application
to another via HTTP. Most modern web applications have the ability
to communicate either via outgoing or incoming webhooks.
This way of communication allows application users to integrate
multiple systems without writing code (so-called no-code/low-code
integrations).

TYPO3 provides the incoming webhooks part via the system extension
"reactions". This feature now allows configuring
outgoing webhooks in the TYPO3 backend - completing the round trip.

A new backend module is added called "Webhooks" where any
administrative user can create a webhook. At its' core a webhook
consists of a trigger (when something should happen) and a
target URL (what should happen). Every time the webhook is triggered,
an HTTP request is sent to the target URL. With this feature,
the request can be either a POST or a GET request. POST requests
commonly contain data, and GET requests can trigger actions
in third-party systems.

The webhooks extension provides various triggers as examples - for
example a trigger when a page is created or updated, or a file is added
or removed - however, additional triggers can be provided in the future
and custom triggers can be written by extension authors and project
developers.

The backend module also enforces the setting of a secret for each webhook
which can be used to verify that the webhook request originated from the
TYPO3 system and its' payload has not been modified in the meantime.

Under the hood, the webhooks extension uses the TYPO3 queue and
therefore the Symfony messenger component, which provides a flexible
and extensible way for handling messages either synchronously or
asynchronously.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Oli Bartsch +1
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oli Bartsch +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 50

Show 30 more files

Review log 95144

Show 79119 earlier messages
  1. Frank Nägler uploaded patch set 1 01/11/23, 23:14

  2. Frank Nägler uploaded patch set 2 01/12/23, 08:03

  3. Frank Nägler uploaded patch set 3 01/13/23, 10:26

  4. Frank Nägler uploaded patch set 4 01/13/23, 10:56

  5. Frank Nägler uploaded patch set 5 01/13/23, 12:55

  6. Frank Nägler uploaded patch set 6 01/13/23, 23:00

  7. Frank Nägler uploaded patch set 7 01/17/23, 18:48

  8. Frank Nägler uploaded patch set 8 01/17/23, 19:46

  9. Frank Nägler uploaded patch set 9 01/18/23, 12:12

  10. Frank Nägler uploaded patch set 10 01/18/23, 13:15

  11. Frank Nägler uploaded patch set 11 01/18/23, 20:34

  12. Frank Nägler updated the commit message in patch set 12 01/18/23, 20:38

  13. Frank Nägler wrote 01/19/23, 08:49

    Unset private
  14. Frank Nägler uploaded patch set 13 01/19/23, 08:50

  15. Frank Nägler marked it work in progress 01/19/23, 08:52

  16. core-ci voted on patch set 13 V -1 01/19/23, 09:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36171

  17. Frank Nägler uploaded patch set 14 V -1 01/19/23, 12:56

  18. core-ci voted on patch set 14 V -1 01/19/23, 13:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36238

  19. Benjamin Franzke uploaded patch set 15 V -1 01/22/23, 19:14

  20. core-ci voted on patch set 15 V -1 01/22/23, 19:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36432

  21. Benjamin Franzke uploaded patch set 16 V -1 01/22/23, 19:34

  22. core-ci voted on patch set 16 V -1 01/22/23, 19:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36437

  23. Benjamin Franzke uploaded patch set 17 V -1 01/22/23, 20:07

  24. core-ci voted on patch set 17 V +1 01/22/23, 20:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36438

  25. Frank Nägler commented on patch set 17 CR -1 01/24/23, 11:32

    This change is ready for review.
    On it, creating tests and RST file
  26. Frank Nägler uploaded patch set 18 CR -1 V +1 01/24/23, 14:46

  27. Georg Ringer commented on patch set 18 01/24/23, 14:51

    PlainJsonElement.php:29

    what about moving that to public API? i need such thing all the time and as we have even native json sql type, that would perfectly fit together!
  28. Frank Nägler marked it work in progress 01/24/23, 14:54

  29. Frank Nägler commented on patch set 18 01/24/23, 14:55

    This change is ready for review.

    PlainJsonElement.php:29 Reply

    We can also move this into core or backend, not sure. I have to add a validator, that is missing in this patch too.
  30. Frank Nägler marked it work in progress 01/24/23, 14:56

  31. core-ci voted on patch set 18 V -1 01/24/23, 15:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36558

  32. Andreas Kienast uploaded patch set 19 V -1 01/26/23, 09:59

  33. core-ci voted on patch set 19 V -1 01/26/23, 10:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36644

  34. Frank Nägler commented on patch set 19 CR +1 01/27/23, 08:22

    on it, finalize the tests
  35. Frank Nägler voted on patch set 19 CR -1 01/27/23, 08:22

  36. Frank Nägler uploaded patch set 20 CR -1 V -1 01/27/23, 10:02

  37. core-ci voted on patch set 20 V -1 01/27/23, 10:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36682

  38. core-ci commented on patch set 20 01/27/23, 11:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36682

  39. Frank Nägler uploaded patch set 21 V -1 01/27/23, 11:04

  40. core-ci voted on patch set 21 V +1 01/27/23, 11:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36688

  41. Frank Nägler uploaded patch set 22 V +1 02/09/23, 09:04

  42. core-ci voted on patch set 22 V +1 02/09/23, 09:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37431

  43. Frank Nägler uploaded patch set 23 V +1 03/13/23, 11:11

  44. Frank Nägler commented on patch set 23 03/13/23, 11:11

    PlainJsonElement.php:29 Reply

    Done
  45. core-ci voted on patch set 23 V -1 03/13/23, 11:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38874

  46. Frank Nägler uploaded patch set 24 V -1 03/15/23, 16:08

  47. core-ci voted on patch set 24 V +1 03/15/23, 16:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38994

  48. Chris Müller uploaded patch set 25 V +1 03/15/23, 18:42

  49. core-ci voted on patch set 25 V +1 03/15/23, 18:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39000

  50. Georg Ringer commented on patch set 25 03/15/23, 19:48

    This change is ready for review.

    WebhookInstruction.php:22

    just from reading: what about using real properties instead of just using the array? that would make it easier to populate the object, also in the factory as there are real type hints, ...
  51. Frank Nägler commented on patch set 25 CR -1 03/16/23, 10:21

    on it

    WebhookInstruction.php:22 Reply

    I agree, that is a leftover from the first iteration.
  52. Frank Nägler uploaded patch set 26 CR -1 V +1 03/16/23, 10:42

  53. Frank Nägler commented on patch set 26 03/16/23, 10:45

    WebhookInstruction.php:22 Reply

    Done
  54. core-ci voted on patch set 26 V -1 03/16/23, 10:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39050

  55. Georg Ringer commented on patch set 26 03/16/23, 10:58

    Feature-99629-Webhooks-OutgoingWebhooksForTYPO3.rst:99

    is this still the way? do we need the create at all? I suggest to use here as well the new WebhookInstruction() also below
  56. Frank Nägler commented on patch set 26 03/16/23, 11:04

    Feature-99629-Webhooks-OutgoingWebhooksForTYPO3.rst:99 Reply

    I have no hard opinion here. Oliver Bartsch will maybe do some changes on the patch (I am out for the rest of the day), @Oliver if you have the same opinion we can remove the factory. It was an idea for a simpler API, but I am fine to skip that.
  57. Oli Bartsch uploaded patch set 27 V -1 03/16/23, 11:19

  58. core-ci voted on patch set 27 V +1 03/16/23, 11:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39052

  59. Oli Bartsch uploaded patch set 28 V +1 03/21/23, 13:06

  60. Oli Bartsch uploaded patch set 29 03/21/23, 13:25

  61. Oli Bartsch rebased onto patch set 30 03/21/23, 13:26

  62. core-ci voted on patch set 28 V -1 03/21/23, 13:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39321

  63. core-ci voted on patch set 29 V +1 03/21/23, 13:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39322

  64. core-ci voted on patch set 30 V -1 03/21/23, 13:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39323

  65. Oli Bartsch uploaded patch set 31 V -1 03/21/23, 16:26

  66. core-ci voted on patch set 31 V +1 03/21/23, 16:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39328

  67. Oli Bartsch uploaded patch set 32 V +1 03/21/23, 16:48

  68. core-ci voted on patch set 32 V +1 03/21/23, 16:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39330

  69. Oli Bartsch uploaded patch set 33 V +1 03/21/23, 20:08

  70. core-ci voted on patch set 33 V +1 03/21/23, 20:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39343

  71. Oli Bartsch commented on patch set 33 03/21/23, 20:31

    Feature-99629-Webhooks-OutgoingWebhooksForTYPO3.rst:99 Reply

    I would like to keep the example as it is. Using the Factory should be the suggested way. This allows underlying changes without breaking extension code. See for example https://review.typo3.org/c/Packages/TYPO3.CMS/+/77362/33/typo3/sysext/webhooks/Classes/Factory/WebhookInstructionFactory.php#71, which is a good example of such change.
  72. Oli Bartsch uploaded patch set 34 V +1 03/21/23, 21:11

  73. core-ci voted on patch set 34 V +1 03/21/23, 21:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39347

  74. Benni Mack uploaded patch set 35 V +1 03/22/23, 11:21

  75. core-ci voted on patch set 35 V +1 03/22/23, 11:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39375

  76. Andreas Kienast commented on patch set 35 03/22/23, 14:12

    WebhookService.php:46

    AFAICS we compose a simple tuple based on the database records without any further complexity. How do we profit from a cache here?
  77. Benni Mack commented on patch set 35 03/22/23, 14:32

    WebhookService.php:46 Reply

    One DB query vs. 1 Cache Entry reading (fIle-based by default). Much faster
  78. Benni Mack commented on patch set 35 03/22/23, 14:32

    WebhookService.php:46 Reply

    Done
  79. Frank Nägler uploaded patch set 36 V +1 03/22/23, 15:20

  80. core-ci voted on patch set 36 V -1 03/22/23, 15:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39391

  81. Frank Nägler uploaded patch set 37 V -1 03/22/23, 15:48

  82. core-ci voted on patch set 37 V -1 03/22/23, 15:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39398

  83. Frank Nägler uploaded patch set 38 V -1 03/22/23, 17:46

  84. core-ci voted on patch set 38 V -1 03/22/23, 18:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39406

  85. Benni Mack uploaded patch set 39 V -1 03/22/23, 20:25

  86. core-ci voted on patch set 39 V +1 03/22/23, 20:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39416

  87. Stefan Bürk commented on patch set 39 CR -1 03/22/23, 20:37

    on it (reviewing/testing) ...
  88. Stefan Bürk uploaded patch set 40 CR -1 V +1 03/22/23, 23:57

  89. core-ci voted on patch set 40 V +1 03/23/23, 00:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39428

  90. Frank Nägler commented on patch set 40 CR -1 03/23/23, 08:25

    on it again
  91. Benni Mack commented on patch set 40 03/23/23, 08:53

    I think we should not use PSR-14 events, but just use the EXT:webhooks extension to add EventListeners that trigger custom webhooks. This way, we can define the payload per use-case. The main benefit of the extension is then to a) ship a set of let's say 10 Webhook Messages (webhook type) that make a payload out of a PSR-14 event message. b) have a GUI for admins to define the endpoints etc.
  92. Frank Nägler uploaded patch set 41 CR -1 V +1 03/23/23, 11:03

  93. Frank Nägler commented on patch set 41 CR -1 03/23/23, 11:06

    still not ready
  94. core-ci voted on patch set 41 V +1 03/23/23, 11:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39460

  95. Benni Mack uploaded patch set 42 CR -1 V +1 03/23/23, 15:23

  96. core-ci voted on patch set 42 V -1 03/23/23, 15:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39480

  97. Benni Mack uploaded patch set 43 V -1 03/23/23, 16:57

  98. core-ci voted on patch set 43 V -1 03/23/23, 18:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39486

  99. Benni Mack uploaded patch set 44 V -1 03/23/23, 20:41

  100. Benni Mack uploaded patch set 45 03/23/23, 21:08

  101. core-ci voted on patch set 44 V -1 03/23/23, 21:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39494

  102. core-ci voted on patch set 45 V -1 03/23/23, 21:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39497

  103. Benni Mack uploaded patch set 46 V -1 03/23/23, 22:22

  104. core-ci voted on patch set 46 V -1 03/23/23, 22:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39499

  105. Benni Mack uploaded patch set 47 V -1 03/23/23, 22:43

  106. Michael Schams wrote 03/23/23, 22:44

    Removed cc Michael Schams.
  107. core-ci voted on patch set 47 V -1 03/23/23, 22:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39503

  108. Benni Mack uploaded patch set 48 V -1 03/23/23, 23:12

  109. core-ci voted on patch set 48 V +1 03/23/23, 23:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39505

  110. Stefan Bürk commented on patch set 43 03/24/23, 00:47

    GenericWebhookMessage.php:23

    I guess this should be a `abstract` class then ... does not make much sense to instantiate this class directly.
  111. Susi Moog commented on patch set 48 CR -1 03/24/23, 09:00

    on it
  112. Susi Moog uploaded patch set 49 CR -1 V +1 03/24/23, 10:35

  113. core-ci voted on patch set 49 V +1 03/24/23, 10:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39536

  114. Susi Moog commented on patch set 49 03/24/23, 10:50

    GenericWebhookMessage.php:23 Reply

    reworked it a bit, no more abstract class.
  115. Benni Mack uploaded patch set 50 V +1 03/24/23, 12:58

  116. Benni Mack commented on patch set 50 03/24/23, 13:03

    GenericWebhookMessage.php:23 Reply

    Done
  117. core-ci voted on patch set 50 V +1 03/24/23, 13:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39546

  118. Benni Mack uploaded patch set 51 V +1 03/24/23, 13:34

  119. core-ci voted on patch set 51 V +1 03/24/23, 13:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39550

  1. Susi Moog uploaded patch set 52 V +1 03/24/23, 13:55

  2. core-ci voted on patch set 52 V +1 03/24/23, 14:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39554

  3. Susi Moog uploaded patch set 53 V +1 03/24/23, 14:25

  4. core-ci voted on patch set 53 V +1 03/24/23, 14:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39559

  5. Susi Moog updated the commit message in patch set 54 V +1 03/24/23, 15:01

  6. Susi Moog updated the commit message in patch set 55 03/24/23, 15:04

  7. Benni Mack uploaded patch set 56 03/24/23, 15:11

  8. core-ci voted on patch set 54 V +1 03/24/23, 15:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39563

  9. core-ci voted on patch set 55 V -1 03/24/23, 15:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39564

  10. core-ci voted on patch set 56 V -1 03/24/23, 15:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39567

  11. Benni Mack uploaded patch set 57 V -1 03/24/23, 19:53

  12. Benni Mack voted on patch set 57 V +1 CR +1 03/24/23, 19:53

  13. core-ci voted on patch set 57 V -1 03/24/23, 20:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39591

  14. Benni Mack uploaded patch set 58 CR +1 V +1 03/24/23, 20:31

  15. Benni Mack voted on patch set 58 V +1 CR +1 03/24/23, 20:31

  16. core-ci voted on patch set 58 V +1 03/24/23, 20:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39599

  17. Benni Mack uploaded patch set 59 CR +1 V +1 03/24/23, 20:53

  18. core-ci voted on patch set 59 V +1 03/24/23, 21:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39601

  19. Oli Bartsch uploaded patch set 60 V +1 03/24/23, 21:04

  20. Oli Bartsch voted on patch set 60 V +1 CR +1 03/24/23, 21:08

  21. Benni Mack voted on patch set 60 V +1 CR +1 03/24/23, 21:09

  22. Stefan Bürk voted on patch set 60 CR -1 03/24/23, 21:09

  23. core-ci voted on patch set 60 V +1 03/24/23, 21:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39602

  24. Stefan Bürk voted on patch set 60 V +2 CR +2 03/24/23, 21:28

  25. Stefan Bürk merged patch set 61 03/24/23, 21:28