You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not throw exception when SF Translation collector is not found. (#108)
* Symfony profiler integration default value changed to "same as debug mode".
We do not longer throw exception when Symfony Translation collector was not found.
* Fixed broken tests
Copy file name to clipboardExpand all lines: DependencyInjection/CompilerPass/SymfonyProfilerPass.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,8 @@ public function process(ContainerBuilder $container)
30
30
}
31
31
32
32
if (!$container->hasDefinition('translator.data_collector')) {
33
-
thrownew \LogicException('[PHP-Translation] To integrate with the Symfony profiler you first need to enable it. Please set framework.translator.enabled: true');
33
+
// No Symfony translation data collector was found. We cannot use our collection without it.
->scalarNode('default_locale')->info('Your default language or fallback locale. Default will be kernel.default_locale')->end()
50
51
->arrayNode('symfony_profiler')
51
-
->canBeEnabled()
52
+
->addDefaultsIfNotSet()
53
+
->treatFalseLike(['enabled' => false])
54
+
->treatTrueLike(['enabled' => true])
55
+
->treatNullLike(['enabled' => $debug])
56
+
->info('Extend the debug profiler with information about requests.')
57
+
->children()
58
+
->booleanNode('enabled')
59
+
->info('Turn the symfony profiler integration on or off. Defaults to kernel debug mode.')
60
+
->defaultValue($debug)
61
+
->end()
62
+
->scalarNode('formatter')->defaultNull()->end()
63
+
->integerNode('captured_body_length')
64
+
->defaultValue(0)
65
+
->info('Limit long HTTP message bodies to x characters. If set to 0 we do not read the message body. Only available with the default formatter (FullHttpMessageFormatter).')
0 commit comments