diff --git a/src/Spryker/Yves/Locale/Plugin/Application/LocaleApplicationPlugin.php b/src/Spryker/Yves/Locale/Plugin/Application/LocaleApplicationPlugin.php index ee32fee..f64b012 100644 --- a/src/Spryker/Yves/Locale/Plugin/Application/LocaleApplicationPlugin.php +++ b/src/Spryker/Yves/Locale/Plugin/Application/LocaleApplicationPlugin.php @@ -48,14 +48,14 @@ public function provide(ContainerInterface $container): ContainerInterface */ protected function addLocale(ContainerInterface $container): ContainerInterface { - $container[static::BC_FEATURE_FLAG_LOCALE_LISTENER] = false; - $container[static::SERVICE_LOCALE] = function (ContainerInterface $container) { + $container->set(static::BC_FEATURE_FLAG_LOCALE_LISTENER, false); + $container->set(static::SERVICE_LOCALE, function (ContainerInterface $container) { $localeName = $this->getLocaleTransfer($container)->getLocaleName(); $this->getFactory()->getStore()->setCurrentLocale($localeName); ApplicationEnvironment::initializeLocale($localeName); return $localeName; - }; + }); return $container; } diff --git a/src/Spryker/Zed/Locale/Communication/Plugin/Application/LocaleApplicationPlugin.php b/src/Spryker/Zed/Locale/Communication/Plugin/Application/LocaleApplicationPlugin.php index 6240aa3..0bf27b5 100644 --- a/src/Spryker/Zed/Locale/Communication/Plugin/Application/LocaleApplicationPlugin.php +++ b/src/Spryker/Zed/Locale/Communication/Plugin/Application/LocaleApplicationPlugin.php @@ -38,14 +38,14 @@ class LocaleApplicationPlugin extends AbstractPlugin implements ApplicationPlugi */ public function provide(ContainerInterface $container): ContainerInterface { - $container[static::BC_FEATURE_FLAG_LOCALE_LISTENER] = false; - $container[static::SERVICE_LOCALE] = function (ContainerInterface $container): string { + $container->set(static::BC_FEATURE_FLAG_LOCALE_LISTENER, false); + $container->set(static::SERVICE_LOCALE, function (ContainerInterface $container): string { $localeTransfer = $this->getFactory()->getLocalePlugin()->getLocaleTransfer($container); $this->getFacade()->setCurrentLocale($localeTransfer); return $localeTransfer->getLocaleName(); - }; + }); return $container; }