Skip to content

docs: Describe generic entity events for Contact saves and deletes (8.0) - #993

Draft
promptless-for-oss wants to merge 2 commits into
mautic:8.0from
Promptless:promptless/pr-18409-contact-entity-events-8.0
Draft

promptless-for-oss wants to merge 2 commits into
mautic:8.0from
Promptless:promptless/pr-18409-contact-entity-events-8.0

Conversation

@promptless-for-oss

@promptless-for-oss promptless-for-oss commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Open in Promptless

Description

Updates the 8.0 developer docs for mautic/mautic#18409. That PR moves Contact saves and deletes to the generic entity events and removes LeadPreSaveEvent, LeadPostSaveEvent, LeadPreDeleteEvent, and LeadPostDeleteEvent.

All changes are in plugins/event_listeners.rst:

  • The opening subscriber example and the Attribute listeners example now listen to EntityPostSave and EntityPostDelete and return early unless getEntity() returns a Lead. They no longer use the removed classes.
  • Entity save and delete events now lists Mautic\LeadBundle\Entity\Lead and no longer names LeadModel as a model with its own events.
  • LeadBundle events dispatched by event class now says how to listen for Contact saves and deletes, including Contacts that Mautic creates to track a new visitor. It says LEAD_POST_SAVE and LEAD_POST_DELETE remain only as Webhook event type identifiers and drops the four rows that pointed to the removed classes. The subclass example now uses LeadPreMergeEvent and LeadPostMergeEvent.
  • The note on former shared classes no longer says Mautic dispatches LeadEvent directly. It now says LeadIdentifiedEvent extends LeadEvent and that the batch save events return one LeadEvent per Contact from getLeadsEvents().

Contact Webhook payloads don't change. This branch adds no migration content, since the source PR already lists the removed classes in UPGRADE-8.0.md.

Note: open suggestions for #18346, #18347, and #18405 (docs PR #991) edit nearby lines in this file, so whichever merges later may need a small merge.

Validation 2 passed 1 not run
  • ✓ Vale (collection config): 0 new findings
  • ✓ Vale (Promptless defaults): 0 new findings
  • Sphinx build / checklinks: not run locally; left to PR CI

Linked issue

Related to mautic/mautic#18409

Trigger Events

Comment thread docs/plugins/event_listeners.rst Resolved
@promptless-for-oss

promptless-for-oss commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

The build check failed on commit af8acf5 for the same reason it failed on c6dfc80, and this suggestion didn't cause it. Both times the Check links step reported two broken links on docs/index.rst line 48, which this PR doesn't change:

Both return 500 Internal Server Error because the Mautic Community Portal is down. PRs #991, #992, and #995 failed on the same two links. The links on docs/plugins/event_listeners.rst, the only file this PR changes, passed.

No docs change is needed. Both links still returned 500 at about 20:00 UTC, so the check wasn't re-run. Re-run it once community.mautic.org is back up, and it should pass. If the outage lasts, maintainers could add these links to linkcheck_ignore.

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