diff --git a/phpBB/config/default/container/services_messenger.yml b/phpBB/config/default/container/services_messenger.yml index c28789f6c5..d6625430ef 100644 --- a/phpBB/config/default/container/services_messenger.yml +++ b/phpBB/config/default/container/services_messenger.yml @@ -13,6 +13,7 @@ services: class: phpbb\messenger\method\base shared: false arguments: + - '@assets.bag' - '@config' - '@dispatcher' - '@language' diff --git a/phpBB/phpbb/messenger/method/base.php b/phpBB/phpbb/messenger/method/base.php index 8bf7b0cee3..809d2b2854 100644 --- a/phpBB/phpbb/messenger/method/base.php +++ b/phpBB/phpbb/messenger/method/base.php @@ -22,6 +22,7 @@ use phpbb\log\log_interface; use phpbb\path_helper; use phpbb\request\request; use phpbb\messenger\queue; +use phpbb\template\assets_bag; use phpbb\template\twig\lexer; use phpbb\user; @@ -33,6 +34,9 @@ abstract class base /** @var array */ protected $additional_headers = []; + /** @var assets_bag */ + protected $assets_bag; + /** @var config */ protected $config; @@ -87,6 +91,7 @@ abstract class base /** * Messenger base class constructor * + * @param assets_bag $assets_bag * @param config $config * @param dispatcher $dispatcher * @param language $language @@ -102,6 +107,7 @@ abstract class base * @param string $phpbb_root_path */ function __construct( + assets_bag $assets_bag, config $config, dispatcher $dispatcher, language $language, @@ -117,6 +123,7 @@ abstract class base $phpbb_root_path ) { + $this->assets_bag = $assets_bag; $this->config = $config; $this->dispatcher = $dispatcher; $this->language = $language; @@ -472,6 +479,7 @@ abstract class base } $template_environment = new \phpbb\template\twig\environment( + $this->assets_bag, $this->config, new \phpbb\filesystem\filesystem(), $this->path_helper, diff --git a/tests/email/email_parsing_test.php b/tests/email/email_parsing_test.php index 76770c789a..1a464e86aa 100644 --- a/tests/email/email_parsing_test.php +++ b/tests/email/email_parsing_test.php @@ -124,7 +124,7 @@ class phpbb_email_parsing_test extends phpbb_test_case $phpbb_container->set('messenger.queue', $messenger_queue); $this->email = new \phpbb\messenger\method\phpbb_email( - $config, $dispatcher, $lang, $log, $request, $user, $messenger_queue, + $assets_bag, $config, $dispatcher, $lang, $log, $request, $user, $messenger_queue, $phpbb_path_helper, $extension_manager, $twig_extensions_collection, $twig_lexer, $cache_path, $phpbb_root_path ); diff --git a/tests/notification/notification_method_webpush_test.php b/tests/notification/notification_method_webpush_test.php index 1116a62c6f..e52bf9a7ac 100644 --- a/tests/notification/notification_method_webpush_test.php +++ b/tests/notification/notification_method_webpush_test.php @@ -180,7 +180,7 @@ class notification_method_webpush_test extends phpbb_tests_notification_base $phpbb_root_path, $phpEx, $phpbb_container->getParameter('tables.notification_push'), - $phpbb_container->getParameter('tables.push_subscriptions') + $phpbb_container->getParameter('tables.push_subscriptions'), ); $phpbb_container->set('notification.method.webpush', $this->notification_method_webpush);