File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
src/Symfony/Bundle/FrameworkBundle/Resources/config Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 61
61
'debug ' => param ('kernel.debug ' ),
62
62
],
63
63
abstract_arg ('enabled locales ' ),
64
- service ('translation.fallback_locale_provider ' )
64
+ service ('translation.fallback_locale_provider ' )-> ignoreOnInvalid (),
65
65
])
66
66
->call ('setConfigCacheFactory ' , [service ('config_cache_factory ' )])
67
67
->tag ('kernel.locale_aware ' )
78
78
->set ('translator.formatter.default ' , MessageFormatter::class)
79
79
->args ([service ('identity_translator ' )])
80
80
81
- ->set ('translation.fallback_locale_provider ' , FallbackLocaleProvider::class)
82
- ->alias (FallbackLocaleProviderInterface::class, 'translation.fallback_locale_provider ' )
83
-
84
81
->set ('translation.loader.php ' , PhpFileLoader::class)
85
82
->tag ('translation.loader ' , ['alias ' => 'php ' ])
86
83
169
166
->tag ('container.service_subscriber ' , ['id ' => 'translator ' ])
170
167
->tag ('kernel.cache_warmer ' )
171
168
;
169
+
170
+ if (class_exists (FallbackLocaleProvider::class)) {
171
+ $ container ->services ()
172
+ ->set ('translation.fallback_locale_provider ' , FallbackLocaleProvider::class)
173
+ ->alias (FallbackLocaleProviderInterface::class, 'translation.fallback_locale_provider ' );
174
+ }
172
175
};
You can’t perform that action at this time.
0 commit comments