Skip to content

Commit 7e9151a

Browse files
committed
don't load translator services if not required
1 parent e98c068 commit 7e9151a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function load(array $configs, ContainerBuilder $container)
8787
// A translator must always be registered (as support is included by
8888
// default in the Form component). If disabled, an identity translator
8989
// will be used and everything will still work as expected.
90-
if (class_exists('Symfony\Component\Translation\Translator') || $this->isConfigEnabled($container, $config['form'])) {
90+
if ($this->isConfigEnabled($container, $config['translator']) || $this->isConfigEnabled($container, $config['form'])) {
9191
if (!class_exists('Symfony\Component\Translation\Translator')) {
9292
throw new LogicException('Form support cannot be enabled as the Translation component is not installed.');
9393
}

0 commit comments

Comments
 (0)