diff --git a/DependencyInjection/LexikTranslationExtension.php b/DependencyInjection/LexikTranslationExtension.php index 2ba0d3ef..5044e502 100644 --- a/DependencyInjection/LexikTranslationExtension.php +++ b/DependencyInjection/LexikTranslationExtension.php @@ -233,7 +233,11 @@ protected function buildDevServicesDefinition(ContainerBuilder $container) protected function registerTranslatorConfiguration(array $config, ContainerBuilder $container) { // use the Lexik translator as default translator service - $container->setAlias('translator', 'lexik_translation.translator'); + $alias = $container->setAlias('translator', 'lexik_translation.translator'); + + if (Kernel::VERSION_ID >= 30400) { + $alias->setPublic(true); + } $translator = $container->findDefinition('lexik_translation.translator'); $translator->addMethodCall('setFallbackLocales', array($config['fallback_locale'])); diff --git a/Resources/config/services.xml b/Resources/config/services.xml index bb8919cc..a82b3036 100644 --- a/Resources/config/services.xml +++ b/Resources/config/services.xml @@ -46,6 +46,7 @@ Lexik\Bundle\TranslationBundle\Util\Profiler\TokenFinder Lexik\Bundle\TranslationBundle\Command\ImportTranslationsCommand + Lexik\Bundle\TranslationBundle\Command\ExportTranslationsCommand false 15 @@ -152,10 +153,16 @@ + - - + + + + + + + diff --git a/Tests/Command/ImportTranslationsCommandTest.php b/Tests/Command/ImportTranslationsCommandTest.php index 35ff592f..1800a16e 100644 --- a/Tests/Command/ImportTranslationsCommandTest.php +++ b/Tests/Command/ImportTranslationsCommandTest.php @@ -79,7 +79,7 @@ private static function runCommand($commandName, $options = array()) */ public function testExecute() { - static::$application->add(new ImportTranslationsCommand(self::$kernel->getContainer()->get('lexik_translation.translator'))); + static::$application->add(new ImportTranslationsCommand(self::$kernel->getContainer()->get('translator'))); $command = static::$application->find("lexik:translations:import"); $command->setContainer(static::$kernel->getContainer());