Visitar URL original
Ticket/17751 Add core.notification_method_messenger_modify_template_vars event (master) by bonelifer · Pull Request #7100 · phpbb/phpbb · GitHub
Skip to content

Ticket/17751 Add core.notification_method_messenger_modify_template_vars event (master) - #7100

Open
bonelifer wants to merge 2 commits into
phpbb:masterfrom
bonelifer:ticket/17751-master
Open

bonelifer wants to merge 2 commits into
phpbb:masterfrom
bonelifer:ticket/17751-master

Conversation

@bonelifer

Copy link
Copy Markdown
Member

Checklist:

  • Correct branch: master for new features; 3.3.x for fixes
  • Tests pass
  • Code follows coding guidelines: master and 3.3.x
  • Commit follows commit message format

Tracker ticket:

https://tracker.phpbb.com/browse/PHPBB-17751

Master version of #7099. On master notify_using_messenger() loops over the messenger methods, so the event fires once per notification before that loop, and the resulting template_vars are assigned to every messenger method. @since is 3.3.20-RC1, the same as the 3.3.x version.

The test file has the same name as in #7099 but uses a mocked messenger method, because the messenger is a service collection on master. When 3.3.x is merged up, keep this branch's messenger_base.php and test file.


Investigated and written by Claude on behalf of William Jacoby (bonelifer).

Add core.notification_method_messenger_modify_template_vars to
messenger_base::notify_using_messenger() on master, fired once per
queued notification before the loop over the messenger methods. A
listener can add or change template_vars, which are then assigned to
every messenger method that sends the notification.

This is the master version of the 3.3.x change for the same ticket.
The code differs between the branches, so the 3.3.x commit does not
merge up cleanly. The test uses a mocked messenger method, because the
messenger is a service collection on master.

PHPBB-17751
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