aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/di
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-10-07 14:47:23 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-10-07 14:47:23 +0200
commitda4d6dfa28bff4a869277fe1ca102ce46ead7ef4 (patch)
treef8c34183520c6f37745bef367c7b42277406f068 /phpBB/phpbb/di
parentd7109fb130511c213859ede614a11e9fbccf0c75 (diff)
parentd13d66fc01688e0e9f49bae5cf368dc16220aa40 (diff)
downloadforums-da4d6dfa28bff4a869277fe1ca102ce46ead7ef4.tar
forums-da4d6dfa28bff4a869277fe1ca102ce46ead7ef4.tar.gz
forums-da4d6dfa28bff4a869277fe1ca102ce46ead7ef4.tar.bz2
forums-da4d6dfa28bff4a869277fe1ca102ce46ead7ef4.tar.xz
forums-da4d6dfa28bff4a869277fe1ca102ce46ead7ef4.zip
Merge pull request #3857 from Nicofuma/ticket/14124
[ticket/14124] Automatically translate exceptions in CLI
Diffstat (limited to 'phpBB/phpbb/di')
-rw-r--r--phpBB/phpbb/di/extension/container_configuration.php6
-rw-r--r--phpBB/phpbb/di/extension/core.php7
2 files changed, 13 insertions, 0 deletions
diff --git a/phpBB/phpbb/di/extension/container_configuration.php b/phpBB/phpbb/di/extension/container_configuration.php
index 4cc7c7c0d1..4585d6509e 100644
--- a/phpBB/phpbb/di/extension/container_configuration.php
+++ b/phpBB/phpbb/di/extension/container_configuration.php
@@ -31,6 +31,12 @@ class container_configuration implements ConfigurationInterface
$rootNode
->children()
->booleanNode('require_dev_dependencies')->defaultValue(false)->end()
+ ->arrayNode('debug')
+ ->addDefaultsIfNotSet()
+ ->children()
+ ->booleanNode('exceptions')->defaultValue(false)->end()
+ ->end()
+ ->end()
->arrayNode('twig')
->addDefaultsIfNotSet()
->children()
diff --git a/phpBB/phpbb/di/extension/core.php b/phpBB/phpbb/di/extension/core.php
index 91b321a684..c48a80a558 100644
--- a/phpBB/phpbb/di/extension/core.php
+++ b/phpBB/phpbb/di/extension/core.php
@@ -80,6 +80,7 @@ class core extends Extension
{
$twig_environment_options['auto_reload'] = true;
}
+
// Replace the 8th argument, the options passed to the environment
$definition->replaceArgument(7, $twig_environment_options);
@@ -88,6 +89,12 @@ class core extends Extension
$definition = $container->getDefinition('template.twig.extensions.debug');
$definition->addTag('twig.extension');
}
+
+ // Set the debug options
+ foreach ($config['debug'] as $name => $value)
+ {
+ $container->setParameter('debug.' . $name, $value);
+ }
}
/**