Issue #3612575: Make notification attachments enrichable: addAttachment() on OrchestraNotificationEvent

Evolves the notification attachment support from #3612558 so attachments can be enriched, not only seeded at construction.

Changes

  • OrchestraNotificationEvent: attachments are now mutable via addAttachment() and getAttachments(), still seeded by the (unchanged) constructor argument. New DELIVERY_PRIORITY constant.
  • orchestra_mail and orchestra_easy_email subscribe at DELIVERY_PRIORITY and read getAttachments(), so every enricher has contributed before a channel sends.

Why

A module often needs to attach a file to a notification it did not dispatch (the Yoyaku ticket submodule attaches a PDF to the confirmation the order notifier sends). Enrichment via a subscriber removes the need for a dispatcher-side seam, the standard Symfony pattern. The layering is unchanged: the neutral contract has no transport serializer, and each channel still owns its own mapping.

Tests

New kernel test: a subscriber-added attachment is delivered on the outgoing mail, proving the enrichment path and the channel priority ordering. Existing channel tests updated to the getter.

Follow-up to #3612558.

Merge request reports

Loading
Loading