diff options
author | rxu <rxu@mail.ru> | 2017-04-16 20:53:59 +0700 |
---|---|---|
committer | rxu <rxu@mail.ru> | 2017-04-16 23:40:16 +0700 |
commit | fcc8e155ec309669bebbf6e0370cecfe64c95193 (patch) | |
tree | 99bdec140f08170e7de71febb0393adf25a4c1ec | |
parent | 1ea114ca20bd4613420284d7bfc4c92ab0a817b4 (diff) | |
download | forums-fcc8e155ec309669bebbf6e0370cecfe64c95193.tar forums-fcc8e155ec309669bebbf6e0370cecfe64c95193.tar.gz forums-fcc8e155ec309669bebbf6e0370cecfe64c95193.tar.bz2 forums-fcc8e155ec309669bebbf6e0370cecfe64c95193.tar.xz forums-fcc8e155ec309669bebbf6e0370cecfe64c95193.zip |
[ticket/14990] Move dispatcher object to the front of the options array
PHPBB3-14990
-rw-r--r-- | phpBB/config/default/container/services_twig.yml | 2 | ||||
-rw-r--r-- | phpBB/config/installer/container/services.yml | 2 | ||||
-rw-r--r-- | phpBB/includes/functions_messenger.php | 4 | ||||
-rw-r--r-- | phpBB/phpbb/template/twig/environment.php | 4 | ||||
-rw-r--r-- | tests/controller/common_helper_route.php | 1 | ||||
-rw-r--r-- | tests/email/email_parsing_test.php | 4 | ||||
-rw-r--r-- | tests/extension/metadata_manager_test.php | 3 | ||||
-rw-r--r-- | tests/template/template_allfolder_test.php | 1 | ||||
-rw-r--r-- | tests/template/template_events_test.php | 1 | ||||
-rw-r--r-- | tests/template/template_includecss_test.php | 1 | ||||
-rw-r--r-- | tests/template/template_test_case.php | 1 | ||||
-rw-r--r-- | tests/template/template_test_case_with_tree.php | 1 |
12 files changed, 15 insertions, 10 deletions
diff --git a/phpBB/config/default/container/services_twig.yml b/phpBB/config/default/container/services_twig.yml index 132b1a3df8..a9b5b6d4cd 100644 --- a/phpBB/config/default/container/services_twig.yml +++ b/phpBB/config/default/container/services_twig.yml @@ -11,8 +11,8 @@ services: - '%core.template.cache_path%' - '@ext.manager' - '@template.twig.loader' - - [] - '@dispatcher' + - [] calls: - [setLexer, ['@template.twig.lexer']] diff --git a/phpBB/config/installer/container/services.yml b/phpBB/config/installer/container/services.yml index 7bab8f7835..7203c0ab10 100644 --- a/phpBB/config/installer/container/services.yml +++ b/phpBB/config/installer/container/services.yml @@ -84,8 +84,8 @@ services: - '%core.template.cache_path%' - null - '@template.twig.loader' - - [] - null + - [] calls: - [setLexer, ['@template.twig.lexer']] diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 983cc91688..802246c1c5 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -672,8 +672,8 @@ class messenger new \phpbb\template\twig\loader( $phpbb_container->get('filesystem') ), - array(), - $phpbb_dispatcher + $phpbb_dispatcher, + array() ); $template_environment->setLexer($phpbb_container->get('template.twig.lexer')); diff --git a/phpBB/phpbb/template/twig/environment.php b/phpBB/phpbb/template/twig/environment.php index d9e84b042e..ac4b16e457 100644 --- a/phpBB/phpbb/template/twig/environment.php +++ b/phpBB/phpbb/template/twig/environment.php @@ -56,10 +56,10 @@ class environment extends \Twig_Environment * @param string $cache_path The path to the cache directory * @param \phpbb\extension\manager $extension_manager phpBB extension manager * @param \Twig_LoaderInterface $loader Twig loader interface - * @param array $options Array of options to pass to Twig * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object + * @param array $options Array of options to pass to Twig */ - public function __construct(\phpbb\config\config $phpbb_config, \phpbb\filesystem\filesystem $filesystem, \phpbb\path_helper $path_helper, $cache_path, \phpbb\extension\manager $extension_manager = null, \Twig_LoaderInterface $loader = null, $options = array(), \phpbb\event\dispatcher_interface $phpbb_dispatcher = null) + public function __construct(\phpbb\config\config $phpbb_config, \phpbb\filesystem\filesystem $filesystem, \phpbb\path_helper $path_helper, $cache_path, \phpbb\extension\manager $extension_manager = null, \Twig_LoaderInterface $loader = null, \phpbb\event\dispatcher_interface $phpbb_dispatcher = null, $options = array()) { $this->phpbb_config = $phpbb_config; diff --git a/tests/controller/common_helper_route.php b/tests/controller/common_helper_route.php index 367c15a667..ea2bc042b1 100644 --- a/tests/controller/common_helper_route.php +++ b/tests/controller/common_helper_route.php @@ -114,6 +114,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case $cache_path, null, $loader, + new \phpbb\event\dispatcher($container), array( 'cache' => false, 'debug' => false, diff --git a/tests/email/email_parsing_test.php b/tests/email/email_parsing_test.php index a8366cf076..8fdfe3035e 100644 --- a/tests/email/email_parsing_test.php +++ b/tests/email/email_parsing_test.php @@ -81,13 +81,13 @@ class phpbb_email_parsing_test extends phpbb_test_case $cache_path, null, new \phpbb\template\twig\loader($filesystem, ''), + new \phpbb\event\dispatcher($phpbb_container), array( 'cache' => false, 'debug' => false, 'auto_reload' => true, 'autoescape' => false, - ), - new \phpbb\event\dispatcher($phpbb_container) + ) ); $twig->addExtension($twig_extension); $phpbb_container->set('template.twig.lexer', new \phpbb\template\twig\lexer($twig)); diff --git a/tests/extension/metadata_manager_test.php b/tests/extension/metadata_manager_test.php index 8ef41f3673..533da68c57 100644 --- a/tests/extension/metadata_manager_test.php +++ b/tests/extension/metadata_manager_test.php @@ -70,6 +70,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case $cache_path, null, $loader, + new \phpbb\event\dispatcher($container), array( 'cache' => false, 'debug' => false, @@ -78,8 +79,6 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case ) ); - $container = new phpbb_mock_container_builder(); - $this->migrator = new \phpbb\db\migrator( $container, $this->config, diff --git a/tests/template/template_allfolder_test.php b/tests/template/template_allfolder_test.php index 9a0a42fabd..63a6ef08ea 100644 --- a/tests/template/template_allfolder_test.php +++ b/tests/template/template_allfolder_test.php @@ -67,6 +67,7 @@ class phpbb_template_allfolder_test extends phpbb_template_template_test_case $cache_path, $this->extension_manager, $loader, + new \phpbb\event\dispatcher($container), array( 'cache' => false, 'debug' => false, diff --git a/tests/template/template_events_test.php b/tests/template/template_events_test.php index e245c90aee..3a93c91e11 100644 --- a/tests/template/template_events_test.php +++ b/tests/template/template_events_test.php @@ -161,6 +161,7 @@ Zeta test event in all', $cache_path, $this->extension_manager, $loader, + new \phpbb\event\dispatcher($container), array( 'cache' => false, 'debug' => false, diff --git a/tests/template/template_includecss_test.php b/tests/template/template_includecss_test.php index 764652c9c2..bc871aa612 100644 --- a/tests/template/template_includecss_test.php +++ b/tests/template/template_includecss_test.php @@ -53,6 +53,7 @@ class phpbb_template_template_includecss_test extends phpbb_template_template_te $cache_path, null, $loader, + new \phpbb\event\dispatcher($container), array( 'cache' => false, 'debug' => false, diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php index e52d3b76dd..8adbafb1b2 100644 --- a/tests/template/template_test_case.php +++ b/tests/template/template_test_case.php @@ -105,6 +105,7 @@ class phpbb_template_template_test_case extends phpbb_test_case $cache_path, null, $loader, + new \phpbb\event\dispatcher($container), array( 'cache' => false, 'debug' => false, diff --git a/tests/template/template_test_case_with_tree.php b/tests/template/template_test_case_with_tree.php index ff35d16120..75e3918f44 100644 --- a/tests/template/template_test_case_with_tree.php +++ b/tests/template/template_test_case_with_tree.php @@ -48,6 +48,7 @@ class phpbb_template_template_test_case_with_tree extends phpbb_template_templat $cache_path, null, $loader, + new \phpbb\event\dispatcher($container), array( 'cache' => false, 'debug' => false, |