Review main Ready for review

97575[FEATURE] Allow webhook messages to target specific webhooks

Josua Vogel CR 0 V 0 Hard +519 −1 updated 11/19/26, 10:23

Commit message

A webhook message is delivered to every active webhook of its type.
Messages whose payload belongs to one backend configuration, like
the data of one form, need to reach selected endpoints only.

The new TargetedWebhookMessageInterface lets a message name the
webhook identifiers it is meant for. WebhookMessageHandler then
delivers it to the listed active webhooks of the message's type
only. An empty list delivers nothing, and identifiers of webhooks
of another type are ignored and logged.

Custom handlers of webhook messages receive targeted messages as well.
The interface and the manual of EXT:webhooks now state that they must
respect the targets, and show how a targeted message is dispatched.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 3
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/75/97575/3 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/75/97575/3 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Relation chain 2

  1. main 97596[FEATURE] Add webhook finisher to the form framework Based on this change Work in progress Merge conflict Josua Vogel CR 0 V 0 Expert +2219 −18
  2. 97575 [FEATURE] Allow webhook messages to target specific webhooks This change

Merge conflicts 2

Issues 2

Files 12

Review log 710

  1. Josua Vogel uploaded patch set 1 11/12/26, 10:34

  2. core-ci voted on patch set 1 V +1 11/12/26, 10:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114178

  3. Josua Vogel marked it ready for review 11/12/26, 15:58

  4. Oli Bartsch commented on patch set 1 11/12/26, 21:27

    TargetedWebhookMessageInterface.php:30

    Because the interface extends `WebhookMessageInterface`, custom handlers, XCLASSes and subclasses of `WebhookMessageHandler` overriding `__invoke()` also receive targeted messages and silently ignore `getTargetWebhookIdentifiers()`. For something like a form submission, that sends personal data to every endpoint of that type. I suggest to keep the inheritance, but document in the interface docblock and in `AdvancedUsage/Index.rst` that handlers must respect the targets, and add a short section to `Triggers/Index.rst` showing a targeted message dispatched directly to the bus.

    TargetedWebhookMessageInterface.php:35

    This adds new public API whose only planned consumer, the EXT:form finisher, is not yet available. Whether UUIDs are the right key and how the form editor lists webhooks of a type (`WebhookRepository` and `WebhookTypesRegistry` are both `@internal`) can't really be judged without it. Could you push #111025 in a relation chain, so we can test this properly?
  5. Josua Vogel uploaded patch set 2 V +1 11/13/26, 08:03

  6. Josua Vogel commented on patch set 2 11/13/26, 08:05

    TargetedWebhookMessageInterface.php:30 Reply

    Done

    TargetedWebhookMessageInterface.php:35 Reply

    Yes, I pushed a WIP
  7. core-ci voted on patch set 2 V +1 11/13/26, 08:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114283

  8. Josua Vogel uploaded patch set 3 V +1 11/15/26, 16:16

  9. core-ci voted on patch set 3 V +1 11/15/26, 16:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114549

  10. Josua Vogel commented on patch set 3 11/19/26, 10:23

    TargetedWebhookMessageInterface.php:35 Reply

    Done