Document Mautic 8 class-name dispatch for ReportBundle events - #650
Open
promptless-for-oss wants to merge 3 commits into
Open
Document Mautic 8 class-name dispatch for ReportBundle events#650promptless-for-oss wants to merge 3 commits into
promptless-for-oss wants to merge 3 commits into
Conversation
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.
adiati98
reviewed
Sep 2, 2026
|
|
||
| .. note:: | ||
|
|
||
| Since Mautic 8, subscribers key ``getSubscribedEvents()`` on the event class (for example, ``ReportBuilderEvent::class``), following the Symfony 4.3 style rather than a ``ReportEvents`` constant. The ``ReportEvents`` constants remain defined, so code that references them still compiles. However, a subscriber that still keys on one of these ``ReportEvents`` constants no longer receives the event, and you must update it to key on the event class instead. |
Contributor
There was a problem hiding this comment.
@promptless-for-oss we use hypen instead of parentheses.
Contributor
Author
|
Thanks @adiati98 — on it. I'll rework the parenthetical asides in the added note to use the hyphen/dash convention and push the update to this PR shortly. |
Per maintainer @adiati98's review on PR mautic#650, convert the parenthetical aside in the ReportBundle events note to the repo's spaced-hyphen convention.
Contributor
Author
|
Done @adiati98 — reworked the parenthetical aside in the note to use the spaced-hyphen form ( |
promptless-for-oss
marked this pull request as ready for review
September 2, 2026 18:01
promptless-for-oss
requested review from
a team,
adiati98 and
favour-chibueze
September 2, 2026 18:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 exampleReportBuilderEvent::class) instead of aMautic\ReportBundle\ReportEventsstring constant.This updates the Reports plugin-extension page to match: the code example and prose now reference
ReportBuilderEvent,ReportGeneratorEvent, andReportGraphEvent, the now-unusedReportEventsimport is removed, and a note plus a constant-to-class mapping table explain the change. The note warns that theReportEventsconstants 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