Skip to content

Commit

Permalink
skip compiler pass if interface doesn't exist
Browse files Browse the repository at this point in the history
The FrameworkBundle doesn't depend on the `symfony/translation`
component and therefore does not enforce a high enough version of this
package. Thus, with `symfony/translation` versions before `2.6`, the
`translator` service does exist, but the `TranslatorBagInterface` is
not present.
  • Loading branch information
xabbuh committed Dec 17, 2014
1 parent c18cb4c commit beff6fa
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ public function process(ContainerBuilder $container)
return;
}

// skip if the symfony/translation version is lower than 2.6
if (!interface_exists('Symfony\Component\Translation\TranslatorBagInterface')) {
return;
}

if ($container->getParameter('translator.logging')) {
$translatorAlias = $container->getAlias('translator');
$definition = $container->getDefinition((string) $translatorAlias);
Expand Down

0 comments on commit beff6fa

Please sign in to comment.