From 8d081b832eb944cb184778a8463f09320d701cd8 Mon Sep 17 00:00:00 2001 From: Daniel Subiabre Date: Fri, 10 Jan 2025 11:53:07 +0100 Subject: [PATCH] Call Locale class from global namespace --- src/Service/LocalizationService.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Service/LocalizationService.php b/src/Service/LocalizationService.php index c53d06d..9adc359 100644 --- a/src/Service/LocalizationService.php +++ b/src/Service/LocalizationService.php @@ -2,7 +2,6 @@ namespace App\Service; -use Locale; use Symfony\Component\Intl\Languages; class LocalizationService @@ -47,7 +46,7 @@ public function getLanguages(string $tags): array private function getPrimaryLanguage(string $tag): string { - $language = Locale::getPrimaryLanguage($tag); + $language = \Locale::getPrimaryLanguage($tag); if ($language === null) { throw new \Exception(\sprintf(self::ERROR_TAG_INVALID_LANG, $tag)); }