Skip to content

[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

Merged
merged 1 commit into from
Sep 28, 2016

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Sep 28, 2016

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no (except for people using FrameworkBundle without requiring symfony/symfony which should be pretty rare; and fixing this is easy by adding symfony/translation explicitly)
Deprecations? no
Tests pass? yes
Fixed tickets #15748 partially
License MIT
Doc PR n/a

Another PR to reduce the number of required dependencies on FrameworkBundle. This PR removes the Translation component from the list.

@fabpot fabpot merged commit a496a2a into symfony:master Sep 28, 2016
fabpot added a commit that referenced this pull request Sep 28, 2016
…pendency on FrameworkBundle (fabpot)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] removed the Translation component dependency on FrameworkBundle

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no (except for people using FrameworkBundle without requiring symfony/symfony which should be pretty rare; and fixing this is easy by adding symfony/translation explicitly)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #15748 partially
| License       | MIT
| Doc PR        | n/a

Another PR to reduce the number of required dependencies on FrameworkBundle. This PR removes the Translation component from the list.

Commits
-------

a496a2a [FrameworkBundle] removed the Translation component dependency on FrameworkBundle
@@ -87,6 +87,18 @@ protected function configure()
/**
* {@inheritdoc}
*/
public function isEnabled()
{
if (!class_exists('Symfony\Component\Translation\Translator')) {
Copy link
Contributor

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

@@ -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')) {
Copy link
Member

Choose a reason for hiding this comment

The 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 ?

Copy link
Member Author

Choose a reason for hiding this comment

The 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.

@fabpot fabpot deleted the translation-dep-frameworkbundle branch October 1, 2016 05:07
@fabpot fabpot mentioned this pull request Oct 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants