mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 12:28:52 +00:00
[ticket/14990] Move dispatcher object to the front of the options array
PHPBB3-14990
This commit is contained in:
parent
1ea114ca20
commit
fcc8e155ec
12 changed files with 15 additions and 10 deletions
|
@ -11,8 +11,8 @@ services:
|
||||||
- '%core.template.cache_path%'
|
- '%core.template.cache_path%'
|
||||||
- '@ext.manager'
|
- '@ext.manager'
|
||||||
- '@template.twig.loader'
|
- '@template.twig.loader'
|
||||||
- []
|
|
||||||
- '@dispatcher'
|
- '@dispatcher'
|
||||||
|
- []
|
||||||
calls:
|
calls:
|
||||||
- [setLexer, ['@template.twig.lexer']]
|
- [setLexer, ['@template.twig.lexer']]
|
||||||
|
|
||||||
|
|
|
@ -84,8 +84,8 @@ services:
|
||||||
- '%core.template.cache_path%'
|
- '%core.template.cache_path%'
|
||||||
- null
|
- null
|
||||||
- '@template.twig.loader'
|
- '@template.twig.loader'
|
||||||
- []
|
|
||||||
- null
|
- null
|
||||||
|
- []
|
||||||
calls:
|
calls:
|
||||||
- [setLexer, ['@template.twig.lexer']]
|
- [setLexer, ['@template.twig.lexer']]
|
||||||
|
|
||||||
|
|
|
@ -672,8 +672,8 @@ class messenger
|
||||||
new \phpbb\template\twig\loader(
|
new \phpbb\template\twig\loader(
|
||||||
$phpbb_container->get('filesystem')
|
$phpbb_container->get('filesystem')
|
||||||
),
|
),
|
||||||
array(),
|
$phpbb_dispatcher,
|
||||||
$phpbb_dispatcher
|
array()
|
||||||
);
|
);
|
||||||
$template_environment->setLexer($phpbb_container->get('template.twig.lexer'));
|
$template_environment->setLexer($phpbb_container->get('template.twig.lexer'));
|
||||||
|
|
||||||
|
|
|
@ -56,10 +56,10 @@ class environment extends \Twig_Environment
|
||||||
* @param string $cache_path The path to the cache directory
|
* @param string $cache_path The path to the cache directory
|
||||||
* @param \phpbb\extension\manager $extension_manager phpBB extension manager
|
* @param \phpbb\extension\manager $extension_manager phpBB extension manager
|
||||||
* @param \Twig_LoaderInterface $loader Twig loader interface
|
* @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 \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;
|
$this->phpbb_config = $phpbb_config;
|
||||||
|
|
||||||
|
|
|
@ -114,6 +114,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
|
||||||
$cache_path,
|
$cache_path,
|
||||||
null,
|
null,
|
||||||
$loader,
|
$loader,
|
||||||
|
new \phpbb\event\dispatcher($container),
|
||||||
array(
|
array(
|
||||||
'cache' => false,
|
'cache' => false,
|
||||||
'debug' => false,
|
'debug' => false,
|
||||||
|
|
|
@ -81,13 +81,13 @@ class phpbb_email_parsing_test extends phpbb_test_case
|
||||||
$cache_path,
|
$cache_path,
|
||||||
null,
|
null,
|
||||||
new \phpbb\template\twig\loader($filesystem, ''),
|
new \phpbb\template\twig\loader($filesystem, ''),
|
||||||
|
new \phpbb\event\dispatcher($phpbb_container),
|
||||||
array(
|
array(
|
||||||
'cache' => false,
|
'cache' => false,
|
||||||
'debug' => false,
|
'debug' => false,
|
||||||
'auto_reload' => true,
|
'auto_reload' => true,
|
||||||
'autoescape' => false,
|
'autoescape' => false,
|
||||||
),
|
)
|
||||||
new \phpbb\event\dispatcher($phpbb_container)
|
|
||||||
);
|
);
|
||||||
$twig->addExtension($twig_extension);
|
$twig->addExtension($twig_extension);
|
||||||
$phpbb_container->set('template.twig.lexer', new \phpbb\template\twig\lexer($twig));
|
$phpbb_container->set('template.twig.lexer', new \phpbb\template\twig\lexer($twig));
|
||||||
|
|
|
@ -70,6 +70,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
|
||||||
$cache_path,
|
$cache_path,
|
||||||
null,
|
null,
|
||||||
$loader,
|
$loader,
|
||||||
|
new \phpbb\event\dispatcher($container),
|
||||||
array(
|
array(
|
||||||
'cache' => false,
|
'cache' => false,
|
||||||
'debug' => 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(
|
$this->migrator = new \phpbb\db\migrator(
|
||||||
$container,
|
$container,
|
||||||
$this->config,
|
$this->config,
|
||||||
|
|
|
@ -67,6 +67,7 @@ class phpbb_template_allfolder_test extends phpbb_template_template_test_case
|
||||||
$cache_path,
|
$cache_path,
|
||||||
$this->extension_manager,
|
$this->extension_manager,
|
||||||
$loader,
|
$loader,
|
||||||
|
new \phpbb\event\dispatcher($container),
|
||||||
array(
|
array(
|
||||||
'cache' => false,
|
'cache' => false,
|
||||||
'debug' => false,
|
'debug' => false,
|
||||||
|
|
|
@ -161,6 +161,7 @@ Zeta test event in all',
|
||||||
$cache_path,
|
$cache_path,
|
||||||
$this->extension_manager,
|
$this->extension_manager,
|
||||||
$loader,
|
$loader,
|
||||||
|
new \phpbb\event\dispatcher($container),
|
||||||
array(
|
array(
|
||||||
'cache' => false,
|
'cache' => false,
|
||||||
'debug' => false,
|
'debug' => false,
|
||||||
|
|
|
@ -53,6 +53,7 @@ class phpbb_template_template_includecss_test extends phpbb_template_template_te
|
||||||
$cache_path,
|
$cache_path,
|
||||||
null,
|
null,
|
||||||
$loader,
|
$loader,
|
||||||
|
new \phpbb\event\dispatcher($container),
|
||||||
array(
|
array(
|
||||||
'cache' => false,
|
'cache' => false,
|
||||||
'debug' => false,
|
'debug' => false,
|
||||||
|
|
|
@ -105,6 +105,7 @@ class phpbb_template_template_test_case extends phpbb_test_case
|
||||||
$cache_path,
|
$cache_path,
|
||||||
null,
|
null,
|
||||||
$loader,
|
$loader,
|
||||||
|
new \phpbb\event\dispatcher($container),
|
||||||
array(
|
array(
|
||||||
'cache' => false,
|
'cache' => false,
|
||||||
'debug' => false,
|
'debug' => false,
|
||||||
|
|
|
@ -48,6 +48,7 @@ class phpbb_template_template_test_case_with_tree extends phpbb_template_templat
|
||||||
$cache_path,
|
$cache_path,
|
||||||
null,
|
null,
|
||||||
$loader,
|
$loader,
|
||||||
|
new \phpbb\event\dispatcher($container),
|
||||||
array(
|
array(
|
||||||
'cache' => false,
|
'cache' => false,
|
||||||
'debug' => false,
|
'debug' => false,
|
||||||
|
|
Loading…
Add table
Reference in a new issue