-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] remove translation data collector when not usable #21637
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
Conversation
xabbuh
commented
Feb 16, 2017
Q | A |
---|---|
Branch? | 2.7 |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #17957 |
License | MIT |
Doc PR |
|
||
$translatorClass = $container->findDefinition('translator')->getClass(); | ||
|
||
if (!is_subclass_of($translatorClass, '\Symfony\Component\Translation\TranslatorBagInterface')) { |
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.
The leading \
can be removed I think.
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.
done
36f54fa
to
303bb73
Compare
Thank you @xabbuh. |
…ot usable (xabbuh) This PR was merged into the 2.7 branch. Discussion ---------- [FrameworkBundle] remove translation data collector when not usable | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #17957 | License | MIT | Doc PR | Commits ------- 303bb73 remove translation data collector when not usable
return; | ||
} | ||
|
||
$translatorClass = $container->findDefinition('translator')->getClass(); |
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 need to resolve the value, as the class may use a parameter
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.
see #21680
…es (xabbuh) This PR was merged into the 2.7 branch. Discussion ---------- [FrameworkBundle] resolve parameters in definition classes | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #21637 (comment) | License | MIT | Doc PR | Commits ------- 37ce682 resolve parameters in definition classes
…es (xabbuh) This PR was merged into the 2.7 branch. Discussion ---------- [FrameworkBundle] resolve parameters in definition classes | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony#21637 (comment) | License | MIT | Doc PR | Commits ------- 37ce682947 resolve parameters in definition classes