mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/13266] Enable the debug extension in the development environment
PHPBB3-13266
This commit is contained in:
parent
0a49dad112
commit
6850169095
4 changed files with 19 additions and 1 deletions
|
@ -41,3 +41,6 @@ services:
|
|||
- @router
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
|
||||
template.twig.extensions.debug:
|
||||
class: Twig_Extension_Debug
|
||||
|
|
|
@ -3,3 +3,6 @@ imports:
|
|||
|
||||
core:
|
||||
require_dev_dependencies: true
|
||||
|
||||
twig:
|
||||
enable_debug_extension: true
|
||||
|
|
|
@ -31,6 +31,12 @@ class container_configuration implements ConfigurationInterface
|
|||
$rootNode
|
||||
->children()
|
||||
->booleanNode('require_dev_dependencies')->defaultValue(false)->end()
|
||||
->arrayNode('twig')
|
||||
->addDefaultsIfNotSet()
|
||||
->children()
|
||||
->booleanNode('enable_debug_extension')->defaultValue(false)->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
;
|
||||
return $treeBuilder;
|
||||
|
|
|
@ -67,6 +67,12 @@ class core extends Extension
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ($config['twig']['enable_debug_extension'])
|
||||
{
|
||||
$definition = $container->getDefinition('template.twig.extensions.debug');
|
||||
$definition->addTag('twig.extension');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue