Document Mautic 8 class-name dispatch for LeadBundle events - #653
Document Mautic 8 class-name dispatch for LeadBundle events#653promptless-for-oss wants to merge 6 commits into
Conversation
Mautic 8 (mautic/mautic PR #17218) dispatches 24 LeadBundle events by their event object (Symfony 4.3+ style) instead of the LeadEvents string constants. A subscriber or tagged listener still registered under the old event name silently stops firing. Add a migration note and a full old-name -> constant -> event-class mapping table to the Available events section so plugin authors can re-key affected listeners, plus a debug:event-dispatcher verify tip.
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the Vale warnings.
|
Thanks @adiati98 — on it. We'll resolve the Vale warnings on the changed files and push the fixes to this PR shortly. |
Resolve the Google.Headings warning by adding LeadBundle to the Mautic Vale vocabulary, and clear the Google.Parens/Passive/Semicolons suggestions in docs/plugins/event_listeners.rst by rewording in place. Technical content and code examples are unchanged.
|
Thanks @adiati98 — the Vale warnings are all resolved. Vale now runs clean on |
|
I noticed that some CI checks failed for this PR. I'm investigating whether the failures are caused by this suggestion. If they're unrelated or pre-existing, I'll leave this suggestion unchanged and create a separate suggestion if a standalone docs fix is needed. |
Replace this page's copy of the general Mautic 8 class-name event dispatch explanation with a cross-reference to the shared "Mautic 8: class-name event dispatch" section in plugins/event_listeners.rst, keeping the bundle-specific facts. Part of consolidating the duplicated note across the open Mautic 8 dev-docs PRs.
Open in Promptless
Mautic 8 dispatches 24 LeadBundle events by their event object (Symfony 4.3+ class-name style) instead of by the
Mautic\LeadBundle\LeadEvents::*string constants. The constants remain defined for backward compatibility, but because dispatch no longer passes the old string name, a plugin subscriber or akernel.event_listener-tagged service still registered under a converted constant (or its rawmautic.*string) silently stops receiving the event — no error and no log entry.This updates the developer documentation's "Available events" section (
docs/plugins/event_listeners.rst) with a Mautic 8 migration note, a full mapping table of the 24 converted events (old event name →LeadEventsconstant → new event class), the namespace split for the six lead-field-column classes (Mautic\LeadBundle\Field\Event) versus the other 18 (Mautic\LeadBundle\Event), theCHANNEL_SUBSCRIPTION_CHANGEDexception (its string value stays the Webhook type identifier, so Webhook configuration is unaffected), a before/aftergetSubscribedEvents()example, and adebug:event-dispatcherverification tip. It mirrors the previously merged CoreBundle treatment, scoped to the LeadBundleLeadEventsfamily. The events shown in the page's other examples (LEAD_POST_SAVE,TAG_PRE_MERGE,TIMELINE_ON_GENERATE) were intentionally not converted by the source change and remain correct.Trigger Events