Skip to content

Ticket/17722 Add core.messenger_template_paths event - #7097

Closed
bonelifer wants to merge 1 commit into
phpbb:3.3.xfrom
bonelifer:ticket/17722-3.3
Closed

bonelifer wants to merge 1 commit into
phpbb:3.3.xfrom
bonelifer:ticket/17722-3.3

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-17722

This is the 3.3.x version of #7054, which added core.messenger_template_paths to master for 4.0.0-b1. The ticket targets 3.3, so this adds the same event to messenger::template() in includes/functions_messenger.php, just before set_template_paths(), with the same variables (template_lang, template_dir_prefix, template_paths). A listening extension can add its own directory to template_paths and supply an override for a core notification email .txt template (for example post_in_queue.txt) without patching core.

tests/email/email_parsing_test.php now sets a mock $phpbb_dispatcher, because messenger::template() uses it now. This matches the dispatcher mock change in #7054's test.

Merging 3.3.x up into master will give a modify/delete conflict on includes/functions_messenger.php, because master removed that file when it moved the messenger to messenger\method\base. Keep master's deletion: master already has this event from #7054, so no separate master PR is needed.


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

Add a core.messenger_template_paths event to messenger::template(),
fired just before the email template search paths are passed to
set_template_paths(). A listener can add its own directory to
template_paths so an enabled extension can override a core
notification email .txt template without patching core.

This is the 3.3.x version of the event already merged into master.

PHPBB-17722
@github-actions

Copy link
Copy Markdown

The attempt to merge branch 3.3.x into master has completed after considering the changes in this PR.

  • Merge result: Conflict ❌

A separate PR will be needed to merge 3.3.x into master.

@bonelifer

Copy link
Copy Markdown
Member Author

Closing in favor of #7098, which is the same change under its own 3.3 ticket, PHPBB-17750. PHPBB-17722 is already closed as fixed for 4.0.0-b1.


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

@bonelifer bonelifer closed this Oct 20, 2026
@bonelifer
bonelifer deleted the ticket/17722-3.3 branch October 20, 2026 04:26
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