diff --git a/composer.json b/composer.json index e717a52..1b223aa 100644 --- a/composer.json +++ b/composer.json @@ -22,9 +22,9 @@ } }, "require": { - "php": ">=5.4", - "zf-commons/zfc-user": "~1.2", - "zf-commons/zfc-user-doctrine-orm": "1.*" + "php": "^7.2|~8.0", + "zf-commons/zfc-user": "dev-patch-1", + "zf-commons/zfc-user-doctrine-orm": "dev-patch-3" }, "require-dev": { "phpunit/phpunit": "~4.0.0", @@ -35,5 +35,17 @@ "psr-0": { "Eye4web\\ZfcUser\\Settings\\": "src/" } - } + }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/samsonasik/ZfcUserDoctrineORM", + "no-api": true + }, + { + "type": "vcs", + "url": "https://github.com/samsonasik/ZfcUser", + "no-api": true + } + ] } diff --git a/src/Eye4web/ZfcUser/Settings/Factory/Controller/Plugin/UserSettingPluginFactory.php b/src/Eye4web/ZfcUser/Settings/Factory/Controller/Plugin/UserSettingPluginFactory.php index bfc2ea6..c5296be 100644 --- a/src/Eye4web/ZfcUser/Settings/Factory/Controller/Plugin/UserSettingPluginFactory.php +++ b/src/Eye4web/ZfcUser/Settings/Factory/Controller/Plugin/UserSettingPluginFactory.php @@ -22,12 +22,12 @@ use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -class UserSettingPluginFactory implements FactoryInterface +class UserSettingPluginFactory implements \Zend\ServiceManager\Factory\FactoryInterface { - public function createService(ServiceLocatorInterface $pluginManager) + public function __invoke(\Psr\Container\ContainerInterface $pluginManager, $requestedName, array $options = null) { /** @var ServiceLocatorInterface $serviceLocator */ - $serviceLocator = $pluginManager->getServiceLocator(); + $serviceLocator = $pluginManager; $userSettingsService = $serviceLocator->get('Eye4web\ZfcUser\Settings\Service\UserSettingsService'); diff --git a/src/Eye4web/ZfcUser/Settings/Factory/Mapper/DoctrineORM/UserSettingMapperFactory.php b/src/Eye4web/ZfcUser/Settings/Factory/Mapper/DoctrineORM/UserSettingMapperFactory.php index 7f831ee..fc0951e 100644 --- a/src/Eye4web/ZfcUser/Settings/Factory/Mapper/DoctrineORM/UserSettingMapperFactory.php +++ b/src/Eye4web/ZfcUser/Settings/Factory/Mapper/DoctrineORM/UserSettingMapperFactory.php @@ -22,7 +22,7 @@ use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -class UserSettingMapperFactory implements FactoryInterface +class UserSettingMapperFactory implements \Zend\ServiceManager\Factory\FactoryInterface { /** * Create service @@ -30,7 +30,7 @@ class UserSettingMapperFactory implements FactoryInterface * @param ServiceLocatorInterface $serviceLocator * @return mixed */ - public function createService(ServiceLocatorInterface $serviceLocator) + public function __invoke(\Psr\Container\ContainerInterface $serviceLocator, $requestedName, array $options = null) { $entityManager = $serviceLocator->get('zfcuser_doctrine_em'); diff --git a/src/Eye4web/ZfcUser/Settings/Factory/Service/UserSettingsServiceFactory.php b/src/Eye4web/ZfcUser/Settings/Factory/Service/UserSettingsServiceFactory.php index 37c37ea..661104a 100644 --- a/src/Eye4web/ZfcUser/Settings/Factory/Service/UserSettingsServiceFactory.php +++ b/src/Eye4web/ZfcUser/Settings/Factory/Service/UserSettingsServiceFactory.php @@ -22,7 +22,7 @@ use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -class UserSettingsServiceFactory implements FactoryInterface +class UserSettingsServiceFactory implements \Zend\ServiceManager\Factory\FactoryInterface { /** * Create service @@ -30,7 +30,7 @@ class UserSettingsServiceFactory implements FactoryInterface * @param ServiceLocatorInterface $serviceLocator * @return mixed */ - public function createService(ServiceLocatorInterface $serviceLocator) + public function __invoke(\Psr\Container\ContainerInterface $serviceLocator, $requestedName, array $options = null) { $mapper = $serviceLocator->get('Eye4web\ZfcUser\Settings\Mapper\DoctrineORM\UserSettingMapper'); diff --git a/src/Eye4web/ZfcUser/Settings/Factory/View/Helper/UserSettingHelperFactory.php b/src/Eye4web/ZfcUser/Settings/Factory/View/Helper/UserSettingHelperFactory.php index 296a68e..eac223d 100644 --- a/src/Eye4web/ZfcUser/Settings/Factory/View/Helper/UserSettingHelperFactory.php +++ b/src/Eye4web/ZfcUser/Settings/Factory/View/Helper/UserSettingHelperFactory.php @@ -22,7 +22,7 @@ use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -class UserSettingHelperFactory implements FactoryInterface +class UserSettingHelperFactory implements \Zend\ServiceManager\Factory\FactoryInterface { /** * Create service @@ -30,13 +30,10 @@ class UserSettingHelperFactory implements FactoryInterface * @param ServiceLocatorInterface $helperLocator * @return UserSettingHelper|mixed */ - public function createService(ServiceLocatorInterface $helperLocator) + public function __invoke(\Psr\Container\ContainerInterface $helperLocator, $requestedName, array $options = null) { - /** @var ServiceLocatorInterface $serviceLocator */ - $serviceLocator = $helperLocator->getServiceLocator(); - - $userSettingsService = $serviceLocator->get('Eye4web\ZfcUser\Settings\Service\UserSettingsService'); - $zfcUserIdentity = $helperLocator->get('ZfcUserIdentity'); + $userSettingsService = $helperLocator->get('Eye4web\ZfcUser\Settings\Service\UserSettingsService'); + $zfcUserIdentity = $helperLocator->get('ViewHelperManager')->get('ZfcUserIdentity'); return new UserSettingHelper($userSettingsService, $zfcUserIdentity); }