diff --git a/module/VuFind/src/VuFind/Bootstrapper.php b/module/VuFind/src/VuFind/Bootstrapper.php index d886c694e00edd5c07c58f15d267f0719cec7ca2..e31eb774755bd8c09de8663d09acacf5ed84684b 100644 --- a/module/VuFind/src/VuFind/Bootstrapper.php +++ b/module/VuFind/src/VuFind/Bootstrapper.php @@ -343,7 +343,7 @@ class Bootstrapper 'ExtendedIni', $domain, $domain, $language ); } - } catch (\Zend\Mvc\Exception\BadMethodCallException $e) { + } catch (\Zend\Mvc\I18n\Exception\BadMethodCallException $e) { if (!extension_loaded('intl')) { throw new \Exception( 'Translation broken due to missing PHP intl extension.' diff --git a/module/VuFind/src/VuFind/Service/Factory.php b/module/VuFind/src/VuFind/Service/Factory.php index ee9adec780da7e7d676addb08f6d2f922430a127..f374db1791410391dbbd726af4b0885a8e19cfdd 100644 --- a/module/VuFind/src/VuFind/Service/Factory.php +++ b/module/VuFind/src/VuFind/Service/Factory.php @@ -927,7 +927,7 @@ class Factory */ public static function getTranslator(ServiceManager $sm) { - $factory = new \Zend\Mvc\Service\TranslatorServiceFactory(); + $factory = new \Zend\Mvc\I18n\TranslatorFactory(); $translator = $factory->createService($sm); // Set up the ExtendedIni plugin: @@ -941,7 +941,7 @@ class Factory : [$config->Site->language, 'en']; try { $pm = $translator->getPluginManager(); - } catch (\Zend\Mvc\Exception\BadMethodCallException $ex) { + } catch (\Zend\Mvc\I18n\Exception\BadMethodCallException $ex) { // If getPluginManager is missing, this means that the user has // disabled translation in module.config.php or PHP's intl extension // is missing. We can do no further configuration of the object. diff --git a/module/VuFind/src/VuFind/View/Helper/Root/DisplayLanguageOption.php b/module/VuFind/src/VuFind/View/Helper/Root/DisplayLanguageOption.php index 9eccca4615659ce6ccdd91126514ffa2b672ac6b..1ce8b531f5db6ea7d3c91dec9c506c7a4fb914a9 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/DisplayLanguageOption.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/DisplayLanguageOption.php @@ -60,7 +60,7 @@ class DisplayLanguageOption extends \Zend\View\Helper\AbstractHelper 'ExtendedIni', null, 'default', 'native' ); $this->translator->setLocale('native'); - } catch (\Zend\Mvc\Exception\BadMethodCallException $e) { + } catch (\Zend\Mvc\I18n\Exception\BadMethodCallException $e) { if (!extension_loaded('intl')) { throw new \Exception( 'Translation broken due to missing PHP intl extension.' diff --git a/module/VuFind/src/VuFindTest/Unit/TestCase.php b/module/VuFind/src/VuFindTest/Unit/TestCase.php index d758182f105bc1de60e3fe7b405412409099fa2d..8e91e9fc3c11ed26ce04c2341befa15baa7596a9 100644 --- a/module/VuFind/src/VuFindTest/Unit/TestCase.php +++ b/module/VuFind/src/VuFindTest/Unit/TestCase.php @@ -205,7 +205,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase ) ); $this->serviceManager->setService('Config', []); - $factory = new \Zend\Mvc\Service\TranslatorServiceFactory(); + $factory = new \Zend\Mvc\I18n\TranslatorFactory(); $this->serviceManager->setService( 'VuFind\Translator', $factory->createService($this->serviceManager) ); diff --git a/module/VuFindTheme/src/VuFindTheme/Initializer.php b/module/VuFindTheme/src/VuFindTheme/Initializer.php index 871acc555076fa98436f30210f4b3fd906b544ee..34b3b94895dd330de090cfe6690841906a558be8 100644 --- a/module/VuFindTheme/src/VuFindTheme/Initializer.php +++ b/module/VuFindTheme/src/VuFindTheme/Initializer.php @@ -416,7 +416,7 @@ class Initializer $pm = $translator->getPluginManager(); $pm->get('ExtendedIni')->addToPathStack($pathStack); - } catch (\Zend\Mvc\Exception\BadMethodCallException $e) { + } catch (\Zend\Mvc\I18n\Exception\BadMethodCallException $e) { // This exception likely indicates that translation is disabled, // so we can't proceed. return;