Skip to content

Document Mautic 8 class-name dispatch for ReportBundle events - #650

Draft
promptless-for-oss wants to merge 1 commit into
mautic:7.2from
Promptless:promptless/pr-17200-report-events-by-class
Draft

Document Mautic 8 class-name dispatch for ReportBundle events#650
promptless-for-oss wants to merge 1 commit into
mautic:7.2from
Promptless:promptless/pr-17200-report-events-by-class

Conversation

@promptless-for-oss

Copy link
Copy Markdown
Contributor

Open in Promptless

Mautic 8 dispatches ReportBundle events in the Symfony 4.3 style, where the event object alone identifies the event and its class name is the event name. A Report subscriber now keys getSubscribedEvents() on the event class (for example ReportBuilderEvent::class) instead of a Mautic\ReportBundle\ReportEvents string constant.

This updates the Reports plugin-extension page to match: the code example and prose now reference ReportBuilderEvent, ReportGeneratorEvent, and ReportGraphEvent, the now-unused ReportEvents import is removed, and a note plus a constant-to-class mapping table explain the change. The note warns that the ReportEvents constants remain defined for backwards compatibility but are no longer used for internal dispatch, so a subscriber still keyed on one of these constants stops receiving the event and must be updated to key on the event class.

Reflects mautic/mautic#17200 (base branch 8.x), so it targets docs branch 7.2 per the branch-targeting rule.

Trigger Events

Update the Reports plugin-extension page for the Symfony 4.3-style event
dispatch introduced in mautic/mautic#17200. Report subscribers now key
getSubscribedEvents() on the event class (ReportBuilderEvent::class, etc.)
instead of a ReportEvents string constant. Adds a migration note and a
constant-to-class mapping table, and converts the code example and prose
references accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant