upgraded FosUserBundle and Symfony 4.3 (#1005)

This commit is contained in:
Kevin Papst
2019-08-02 16:52:30 +02:00
committed by GitHub
parent 614a50ce0b
commit e11a2a6089
57 changed files with 1577 additions and 1184 deletions

View File

@@ -14,7 +14,9 @@ use App\Entity\Timesheet;
use App\Utils\Duration;
use App\Utils\LocaleSettings;
use NumberFormatter;
use Symfony\Component\Intl\Intl;
use Symfony\Component\Intl\Countries;
use Symfony\Component\Intl\Currencies;
use Symfony\Component\Intl\Locales;
use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;
use Twig\TwigFunction;
@@ -136,7 +138,7 @@ class Extensions extends AbstractExtension
*/
public function currency($currency)
{
return Intl::getCurrencyBundle()->getCurrencySymbol($currency);
return Currencies::getSymbol($currency);
}
/**
@@ -145,7 +147,7 @@ class Extensions extends AbstractExtension
*/
public function country($country)
{
return Intl::getRegionBundle()->getCountryName($country);
return Countries::getName($country);
}
/**
@@ -190,7 +192,7 @@ class Extensions extends AbstractExtension
{
$locales = [];
foreach ($this->localeSettings->getAvailableLanguages() as $locale) {
$locales[] = ['code' => $locale, 'name' => Intl::getLocaleBundle()->getLocaleName($locale, $locale)];
$locales[] = ['code' => $locale, 'name' => Locales::getName($locale, $locale)];
}
return $locales;