Document Mautic 8 class-name dispatch for ReportBundle events - #650
Draft
promptless-for-oss wants to merge 1 commit into
Draft
Document Mautic 8 class-name dispatch for ReportBundle events#650promptless-for-oss wants to merge 1 commit into
promptless-for-oss wants to merge 1 commit 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.
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