Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -84,6 +84,18 @@ protected function configure() | ||
| ; | ||
| } | ||
| /** | ||
| * {@inheritdoc} | ||
| */ | ||
| public function isEnabled() | ||
| { | ||
| if (!class_exists('Symfony\Component\Translation\Translator')) { | ||
Contributor 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. You can use | ||
| return false; | ||
| } | ||
| return parent::isEnabled(); | ||
| } | ||
| /** | ||
| * {@inheritdoc} | ||
| */ | ||
| 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()); | ||
| if (class_exists('Symfony\Component\Translation\Translator')) { | ||
Member 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 ? MemberAuthor 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()); | ||