Skip to content

Document Mautic 8 class-name dispatch for LeadBundle events - #653

Open
promptless-for-oss wants to merge 6 commits into
mautic:8.0from
Promptless:promptless/pr-17218-lead-events-by-class
Open

Document Mautic 8 class-name dispatch for LeadBundle events#653
promptless-for-oss wants to merge 6 commits into
mautic:8.0from
Promptless:promptless/pr-17218-lead-events-by-class

Conversation

@promptless-for-oss

Copy link
Copy Markdown
Contributor

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 a kernel.event_listener-tagged service still registered under a converted constant (or its raw mautic.* 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 → LeadEvents constant → new event class), the namespace split for the six lead-field-column classes (Mautic\LeadBundle\Field\Event) versus the other 18 (Mautic\LeadBundle\Event), the CHANNEL_SUBSCRIPTION_CHANGED exception (its string value stays the Webhook type identifier, so Webhook configuration is unaffected), a before/after getSubscribedEvents() example, and a debug:event-dispatcher verification tip. It mirrors the previously merged CoreBundle treatment, scoped to the LeadBundle LeadEvents family. 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

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.
Comment thread docs/plugins/event_listeners.rst
Comment thread docs/plugins/event_listeners.rst Outdated
Comment thread docs/plugins/event_listeners.rst Outdated
Comment thread docs/plugins/event_listeners.rst Outdated
Comment thread docs/plugins/event_listeners.rst Outdated
Comment thread docs/plugins/event_listeners.rst
Comment thread docs/plugins/event_listeners.rst Outdated
Comment thread docs/plugins/event_listeners.rst Outdated
Comment thread docs/plugins/event_listeners.rst Outdated
@promptless-for-oss
promptless-for-oss marked this pull request as ready for review September 2, 2026 18:00

@TomasVotruba TomasVotruba left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@adiati98 adiati98 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@promptless-for-oss please address the Vale warnings.

@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

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.
@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Thanks @adiati98 — the Vale warnings are all resolved. Vale now runs clean on docs/plugins/event_listeners.rst (0 errors, 0 warnings, 0 suggestions). We added LeadBundle to the project's Mautic Vale vocabulary to clear the heading-capitalization warning (consistent with the existing Mautic and Symfony entries), and reworded a few sentences in the "Available events" section to satisfy the Google parentheses, passive-voice, and semicolon rules. No technical content, code examples, or the event mapping table changed. The commit is 0791f5a.

@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

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.

@promptless-for-oss
promptless-for-oss changed the base branch from 7.2 to 8.0 September 9, 2026 16:12
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants