New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FrameworkBundle] Move translation service configuration from xml to php #37186 #37258
[FrameworkBundle] Move translation service configuration from xml to php #37186 #37258
Conversation
src/Symfony/Bundle/FrameworkBundle/Resources/config/translation.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
Show resolved
Hide resolved
]) | ||
->call('setConfigCacheFactory', [service('config_cache_factory')]) | ||
->tag('kernel.locale_aware') | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh Github, my answer was not published -_- :D
That was also my first thought but at the end i just orientated on Fabiens PR src/Symfony/Bundle/TwigBundle/Resources/config/twig.php#67.
$container->services() | ||
->set('translator.default', Translator::class) | ||
->args([ | ||
service_locator([]), // translation loaders locator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be an abstract arg as well if you use abstract_arg for the other params anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for you suggestion @Tobion. I changed the call to abstract_arg
Thank you @malteschlueter. |
Move translation service configuration from xml to php