Skip to content

Commit 0c3c091

Browse files
committed
Use the interface as it was intended
1 parent 9ebc720 commit 0c3c091

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/LegacyTranslationReader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Translation\SymfonyStorage;
1313

1414
use Symfony\Component\Translation\MessageCatalogue;
15-
use Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader;
15+
use Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader as SymfonyTranslationLoader;
1616

1717
/**
1818
* This loader is just a wrapper for Symfony TranslationLoader
@@ -29,7 +29,7 @@ final class LegacyTranslationReader // implements Symfony\Component\Translation\
2929

3030
public function __construct($loader)
3131
{
32-
if (!$loader instanceof TranslationLoader) {
32+
if (!($loader instanceof TranslationLoader) && !($loader instanceof SymfonyTranslationLoader)) {
3333
throw new \LogicException(sprintf('PHP-Translation/SymfonyStorage does not support a TranslationReader of type "%s".', get_class($loader)));
3434
}
3535
$this->loader = $loader;

0 commit comments

Comments
 (0)