-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] removed the Translation component dependency on FrameworkBundle #20070
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,8 +85,10 @@ public function build(ContainerBuilder $container) | |
$container->addCompilerPass(new AddCacheWarmerPass()); | ||
$container->addCompilerPass(new AddCacheClearerPass()); | ||
$container->addCompilerPass(new AddExpressionLanguageProvidersPass()); | ||
$container->addCompilerPass(new TranslationExtractorPass()); | ||
$container->addCompilerPass(new TranslationDumperPass()); | ||
if (class_exists('Symfony\Component\Translation\Translator')) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. all other compiler passes are always registered, and return early when the service does not exist (accounting for disabling by configuration too). Shouldn't it be done here too ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And for those as well. It was more about not even registering them if the translation component is not installed. But that's probably not really needed as this is for build only. I'm going to revert this change. |
||
$container->addCompilerPass(new TranslationExtractorPass()); | ||
$container->addCompilerPass(new TranslationDumperPass()); | ||
} | ||
$container->addCompilerPass(new FragmentRendererPass(), PassConfig::TYPE_AFTER_REMOVING); | ||
$container->addCompilerPass(new SerializerPass()); | ||
$container->addCompilerPass(new PropertyInfoPass()); | ||
|
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.
You can use
::class
notation here