Skip to content

Document Mautic 8 class-name dispatch for Email, Point, User, API, and Category bundle events - #652

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

Document Mautic 8 class-name dispatch for Email, Point, User, API, and Category bundle events#652
promptless-for-oss wants to merge 6 commits into
mautic:8.0from
Promptless:promptless/pr-17217-events-by-class

Conversation

@promptless-for-oss

Copy link
Copy Markdown
Contributor

Open in Promptless

Mautic 8 continues migrating bundle events from *Events string-constant dispatch to native Symfony 4.3+ class-name dispatch (source PR mautic/mautic#17217, following the same pattern as the already-documented Core, Report, Stage, Dashboard, and SMS bundles). For a converted event, Mautic now dispatches by the event object alone, so plugin developers must key getSubscribedEvents() on the event class rather than the old constant. The *Events constants remain defined for backward compatibility but no longer dispatch these events — a subscriber still keyed on the old constant silently stops firing, with no exception and nothing logged.

This updates the two subscriber examples in the developer docs that reference a converted event — MonitoredEmailEvent in the Monitored Inbox Integration section and ApiPlatformPermissionContextEvent in the API permission-context event section — to key on EventClass::class, adds a migration note and a bin/console debug:event-dispatcher verification tip to each, and corrects the now-inaccurate blanket "always use the event constants" guidance on the Available events page. Of the eleven events this PR converts, these are the only two currently documented with a subscriber example; the Email note also flags that EMAIL_PRE_FETCH and EMAIL_PARSE in the same subscriber are unchanged and keep their string constants.

Files touched: docs/plugin_extensions/emails.rst, docs/plugin_extensions/api.rst, docs/plugins/event_listeners.rst.

Trigger Events

…d Category bundle events

Mautic 8 (mautic/mautic#17217) migrates selected bundle events from *Events
string-constant dispatch to Symfony 4.3+ class-name dispatch. Update the two
documented subscriber examples that reference converted events (MonitoredEmailEvent,
ApiPlatformPermissionContextEvent) to key getSubscribedEvents() on EventClass::class,
add migration notes and debug:event-dispatcher verification tips, and correct the
blanket 'always use the event constants' advice on the Available events page.
Comment thread docs/plugin_extensions/emails.rst Outdated
Comment thread docs/plugin_extensions/emails.rst
Comment thread docs/plugin_extensions/api.rst
Comment thread docs/plugin_extensions/api.rst
Comment thread docs/plugins/event_listeners.rst Outdated

@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. I'll run Vale on the changed RST files, fix the flagged warnings, and push the update to this PR shortly.

@adiati98 adiati98 added this to the 8.0 milestone Sep 2, 2026
adiati98 and others added 2 commits September 2, 2026 09:05
…c 8 dispatch notes

Rewrites the passive constructions Vale (Google.Passive) flagged on the
lines this PR changed in the Monitored Inbox and API permission-context
sections. Names Mautic as the actor and the old-to-new dispatch contrast
(class vs. string constant); technical meaning is unchanged.
@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Done @adiati98 — addressed the Vale warnings on the changed lines by converting the flagged passive voice to active in docs/plugin_extensions/emails.rst and docs/plugin_extensions/api.rst. Vale now reports zero findings on the PR-touched lines. Pushed to this PR branch — ready for another look.

@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!

@promptless-for-oss
promptless-for-oss changed the base branch from 7.2 to 8.0 September 9, 2026 16:12
promptless Bot and others added 2 commits September 9, 2026 16:52
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