Skip to content

Commit

Permalink
fix: fix wrong return type-hint depending on which symfony/translatio…
Browse files Browse the repository at this point in the history
…n version is installed
  • Loading branch information
deguif committed Dec 12, 2023
1 parent 6a3f801 commit 85b0a91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Translation/Loader/Symfony/XliffLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

use JMS\TranslationBundle\Exception\RuntimeException;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Translation\Loader\LoaderInterface;
use Symfony\Component\Translation\MessageCatalogue;
use Symfony\Component\Translation\TranslatorBagInterface;

/**
* XLIFF loader.
Expand Down Expand Up @@ -66,7 +66,7 @@ protected function loadInternal($resource, $locale, $domain = 'messages')
}
}

$isSf6 = version_compare(Kernel::VERSION, '6.0.0') >= 0;
$isSf6 = method_exists(TranslatorBagInterface::class, 'getCatalogues');

if ($isSf6) {
// phpcs:ignore
Expand Down

0 comments on commit 85b0a91

Please sign in to comment.