X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fsymfony%2Ftranslation%2FLoggingTranslator.php;h=337c114330bb8f7d5ad7f1cb529c79496eedb6d2;hb=9e65bae52407293a5182f19dc57b5628b09e92f4;hp=b259df5e0aa49d394950c486e6b894b06e5d06b5;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/vendor/symfony/translation/LoggingTranslator.php b/vendor/symfony/translation/LoggingTranslator.php index b259df5e0..337c11433 100644 --- a/vendor/symfony/translation/LoggingTranslator.php +++ b/vendor/symfony/translation/LoggingTranslator.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Translation; use Psr\Log\LoggerInterface; +use Symfony\Component\Translation\Exception\InvalidArgumentException; /** * @author Abdellatif Ait boudad @@ -23,9 +24,6 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface */ private $translator; - /** - * @var LoggerInterface - */ private $logger; /** @@ -35,7 +33,7 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface public function __construct(TranslatorInterface $translator, LoggerInterface $logger) { if (!$translator instanceof TranslatorBagInterface) { - throw new \InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface and TranslatorBagInterface.', get_class($translator))); + throw new InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface and TranslatorBagInterface.', get_class($translator))); } $this->translator = $translator; @@ -95,7 +93,7 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface */ public function getFallbackLocales() { - if ($this->translator instanceof Translator) { + if ($this->translator instanceof Translator || method_exists($this->translator, 'getFallbackLocales')) { return $this->translator->getFallbackLocales(); }