1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 11:13:59 +02:00

[ticket/14124] Automatically translate exceptions in CLI

PHPBB3-14124
This commit is contained in:
Tristan Darricau
2015-08-24 12:04:22 +02:00
parent f6a4843c6d
commit 17e7a89a60
9 changed files with 109 additions and 0 deletions

View File

@@ -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()

View File

@@ -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);
}
}
/**