Commit 0240732b authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Migration vers laminas

parent d507f84b
Pipeline #11068 passed with stage
in 25 seconds
...@@ -6,8 +6,8 @@ use BjyAuthorize\Service\Authorize; ...@@ -6,8 +6,8 @@ use BjyAuthorize\Service\Authorize;
use Interop\Container\ContainerInterface; use Interop\Container\ContainerInterface;
use UnicaenAuth\Event\EventManager; use UnicaenAuth\Event\EventManager;
use UnicaenAuth\Service\UserContext; use UnicaenAuth\Service\UserContext;
use Zend\ServiceManager\FactoryInterface; use Laminas\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface; use Laminas\ServiceManager\ServiceLocatorInterface;
/** /**
* Intsancie une chaîne de fournisseurs d'identité. * Intsancie une chaîne de fournisseurs d'identité.
......
...@@ -7,7 +7,7 @@ use UnicaenApp\Entity\Ldap\People; ...@@ -7,7 +7,7 @@ use UnicaenApp\Entity\Ldap\People;
use UnicaenApp\HostLocalization\HostLocalizationAwareTrait; use UnicaenApp\HostLocalization\HostLocalizationAwareTrait;
use UnicaenAuth\Entity\Db\AbstractRole; use UnicaenAuth\Entity\Db\AbstractRole;
use UnicaenAuth\Service\Traits\RoleServiceAwareTrait; use UnicaenAuth\Service\Traits\RoleServiceAwareTrait;
use Zend\Ldap\Ldap; use Laminas\Ldap\Ldap;
use ZfcUser\Entity\UserInterface; use ZfcUser\Entity\UserInterface;
use Traversable; use Traversable;
...@@ -116,7 +116,7 @@ class Db extends AuthenticationIdentityProvider implements ChainableProvider, \B ...@@ -116,7 +116,7 @@ class Db extends AuthenticationIdentityProvider implements ChainableProvider, \B
{ {
try { try {
return 1 === $this->getLdap()->count($role->getLdapFilter(), $dn, Ldap::SEARCH_SCOPE_SUB); return 1 === $this->getLdap()->count($role->getLdapFilter(), $dn, Ldap::SEARCH_SCOPE_SUB);
} catch (\Zend\Ldap\Exception\LdapException $e) { } catch (\Laminas\Ldap\Exception\LdapException $e) {
return false; return false;
} }
} }
......
...@@ -4,9 +4,9 @@ namespace UnicaenAuth\Provider\Identity; ...@@ -4,9 +4,9 @@ namespace UnicaenAuth\Provider\Identity;
use Interop\Container\ContainerInterface; use Interop\Container\ContainerInterface;
use UnicaenApp\Options\ModuleOptions; use UnicaenApp\Options\ModuleOptions;
use Zend\Ldap\Ldap; use Laminas\Ldap\Ldap;
use Zend\ServiceManager\FactoryInterface; use Laminas\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface; use Laminas\ServiceManager\ServiceLocatorInterface;
/** /**
* Db identity provider factory * Db identity provider factory
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
namespace UnicaenAuth\Provider\Identity; namespace UnicaenAuth\Provider\Identity;
use Interop\Container\ContainerInterface; use Interop\Container\ContainerInterface;
use Zend\ServiceManager\FactoryInterface; use Laminas\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface; use Laminas\ServiceManager\ServiceLocatorInterface;
/** /**
* LDAP identity provider factory * LDAP identity provider factory
......
...@@ -4,8 +4,8 @@ namespace UnicaenAuth\Provider\Role; ...@@ -4,8 +4,8 @@ namespace UnicaenAuth\Provider\Role;
use BjyAuthorize\Exception\InvalidArgumentException; use BjyAuthorize\Exception\InvalidArgumentException;
use Interop\Container\ContainerInterface; use Interop\Container\ContainerInterface;
use Zend\ServiceManager\FactoryInterface; use Laminas\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface; use Laminas\ServiceManager\ServiceLocatorInterface;
/** /**
* Factory responsible of instantiating {@see \UnicaenAuth\Provider\Role\Config} * Factory responsible of instantiating {@see \UnicaenAuth\Provider\Role\Config}
......
...@@ -4,8 +4,8 @@ namespace UnicaenAuth\Provider\Role; ...@@ -4,8 +4,8 @@ namespace UnicaenAuth\Provider\Role;
use Interop\Container\ContainerInterface; use Interop\Container\ContainerInterface;
use UnicaenAuth\Service\RoleService; use UnicaenAuth\Service\RoleService;
use Zend\ServiceManager\FactoryInterface; use Laminas\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface; use Laminas\ServiceManager\ServiceLocatorInterface;
/** /**
* Factory responsible of instantiating {@see \UnicaenAuth\Provider\Role\DbRole} * Factory responsible of instantiating {@see \UnicaenAuth\Provider\Role\DbRole}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace UnicaenAuth\Provider\Role; namespace UnicaenAuth\Provider\Role;
use BjyAuthorize\Provider\Role\ProviderInterface; use BjyAuthorize\Provider\Role\ProviderInterface;
use Zend\Authentication\AuthenticationService; use Laminas\Authentication\AuthenticationService;
use ZfcUser\Entity\UserInterface; use ZfcUser\Entity\UserInterface;
use UnicaenAuth\Acl\NamedRole; use UnicaenAuth\Acl\NamedRole;
...@@ -45,7 +45,7 @@ class Username implements ProviderInterface ...@@ -45,7 +45,7 @@ class Username implements ProviderInterface
} }
/** /**
* @return \Zend\Permissions\Acl\Role\RoleInterface[] * @return \Laminas\Permissions\Acl\Role\RoleInterface[]
*/ */
public function getRoles() public function getRoles()
{ {
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
namespace UnicaenAuth\Provider\Role; namespace UnicaenAuth\Provider\Role;
use Interop\Container\ContainerInterface; use Interop\Container\ContainerInterface;
use Zend\ServiceManager\FactoryInterface; use Laminas\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface; use Laminas\ServiceManager\ServiceLocatorInterface;
/** /**
* Description of UsernameServiceFactory * Description of UsernameServiceFactory
...@@ -30,7 +30,7 @@ class UsernameServiceFactory implements FactoryInterface ...@@ -30,7 +30,7 @@ class UsernameServiceFactory implements FactoryInterface
$providerConfig = $config['role_providers']['UnicaenAuth\Provider\Role\Username']; $providerConfig = $config['role_providers']['UnicaenAuth\Provider\Role\Username'];
$authService = $container->get('zfcuser_auth_service'); /* @var $authService \Zend\Authentication\AuthenticationService */ $authService = $container->get('zfcuser_auth_service'); /* @var $authService \Laminas\Authentication\AuthenticationService */
return new Username($authService, $providerConfig); return new Username($authService, $providerConfig);
} }
......
...@@ -5,7 +5,7 @@ namespace UnicaenAuth\Provider\Rule; ...@@ -5,7 +5,7 @@ namespace UnicaenAuth\Provider\Rule;
use BjyAuthorize\Provider\Rule\ProviderInterface; use BjyAuthorize\Provider\Rule\ProviderInterface;
use UnicaenAuth\Provider\Privilege\PrivilegeProviderAwareTrait; use UnicaenAuth\Provider\Privilege\PrivilegeProviderAwareTrait;
use UnicaenAuth\Provider\Privilege\Privileges; use UnicaenAuth\Provider\Privilege\Privileges;
use Zend\ServiceManager\ServiceLocatorInterface; use Laminas\ServiceManager\ServiceLocatorInterface;
/** /**
* Rule provider based on a given array of rules * Rule provider based on a given array of rules
......
...@@ -4,8 +4,8 @@ namespace UnicaenAuth\Service; ...@@ -4,8 +4,8 @@ namespace UnicaenAuth\Service;
use BjyAuthorize\Provider\Identity\ProviderInterface; use BjyAuthorize\Provider\Identity\ProviderInterface;
use Interop\Container\ContainerInterface; use Interop\Container\ContainerInterface;
use Zend\ServiceManager\FactoryInterface; use Laminas\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface; use Laminas\ServiceManager\ServiceLocatorInterface;
/** /**
* Factory responsible of building the {@see \BjyAuthorize\Service\Authorize} service * Factory responsible of building the {@see \BjyAuthorize\Service\Authorize} service
......
...@@ -7,8 +7,8 @@ use phpCAS; ...@@ -7,8 +7,8 @@ use phpCAS;
use UnicaenApp\Mapper\Ldap\People as LdapPeopleMapper; use UnicaenApp\Mapper\Ldap\People as LdapPeopleMapper;
use UnicaenApp\Entity\Ldap\People as LdapPeople; use UnicaenApp\Entity\Ldap\People as LdapPeople;
use UnicaenAuth\Options\ModuleOptions; use UnicaenAuth\Options\ModuleOptions;
use Zend\Router\RouteInterface; use Laminas\Router\RouteInterface;
use Zend\Router\RouteStackInterface; use Laminas\Router\RouteStackInterface;
use ZfcUser\Authentication\Adapter\ChainableAdapter; use ZfcUser\Authentication\Adapter\ChainableAdapter;
class CasService class CasService
......
...@@ -4,8 +4,8 @@ namespace UnicaenAuth\Service; ...@@ -4,8 +4,8 @@ namespace UnicaenAuth\Service;
use Interop\Container\ContainerInterface; use Interop\Container\ContainerInterface;
use UnicaenAuth\Entity\Db\Privilege; use UnicaenAuth\Entity\Db\Privilege;
use Zend\ServiceManager\FactoryInterface; use Laminas\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface; use Laminas\ServiceManager\ServiceLocatorInterface;
class PrivilegeServiceFactory implements FactoryInterface class PrivilegeServiceFactory implements FactoryInterface
{ {
......
...@@ -4,8 +4,8 @@ namespace UnicaenAuth\Service; ...@@ -4,8 +4,8 @@ namespace UnicaenAuth\Service;
use Interop\Container\ContainerInterface; use Interop\Container\ContainerInterface;
use UnicaenAuth\Entity\Db\Role; use UnicaenAuth\Entity\Db\Role;
use Zend\ServiceManager\FactoryInterface; use Laminas\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface; use Laminas\ServiceManager\ServiceLocatorInterface;
class RoleServiceFactory implements FactoryInterface class RoleServiceFactory implements FactoryInterface
{ {
......
...@@ -9,8 +9,8 @@ use UnicaenApp\Exception\LogicException; ...@@ -9,8 +9,8 @@ use UnicaenApp\Exception\LogicException;
use UnicaenApp\Exception\RuntimeException; use UnicaenApp\Exception\RuntimeException;
use UnicaenAuth\Entity\Db\AbstractUser; use UnicaenAuth\Entity\Db\AbstractUser;
use UnicaenAuth\Entity\Shibboleth\ShibUser; use UnicaenAuth\Entity\Shibboleth\ShibUser;
use Zend\Router\Http\TreeRouteStack; use Laminas\Router\Http\TreeRouteStack;
use Zend\Session\Container; use Laminas\Session\Container;
/** /**
* Shibboleth service. * Shibboleth service.
......
...@@ -11,17 +11,17 @@ use UnicaenAuth\Entity\Db\AbstractUser; ...@@ -11,17 +11,17 @@ use UnicaenAuth\Entity\Db\AbstractUser;
use UnicaenAuth\Entity\Shibboleth\ShibUser; use UnicaenAuth\Entity\Shibboleth\ShibUser;
use UnicaenAuth\Event\UserAuthenticatedEvent; use UnicaenAuth\Event\UserAuthenticatedEvent;
use UnicaenAuth\Options\ModuleOptions; use UnicaenAuth\Options\ModuleOptions;
use Zend\Crypt\Password\Bcrypt; use Laminas\Crypt\Password\Bcrypt;
use Zend\EventManager\EventManagerAwareInterface; use Laminas\EventManager\EventManagerAwareInterface;
use Zend\EventManager\EventManagerInterface; use Laminas\EventManager\EventManagerInterface;
use Zend\Form\Element\Csrf; use Laminas\Form\Element\Csrf;
use Zend\Form\Element\Password; use Laminas\Form\Element\Password;
use Zend\Form\Element\Submit; use Laminas\Form\Element\Submit;
use Zend\Form\Element\Text; use Laminas\Form\Element\Text;
use Zend\Form\Form; use Laminas\Form\Form;
use Zend\InputFilter\Input; use Laminas\InputFilter\Input;
use Zend\Validator\EmailAddress; use Laminas\Validator\EmailAddress;
use Zend\Validator\Identical; use Laminas\Validator\Identical;
use ZfcUser\Entity\UserInterface; use ZfcUser\Entity\UserInterface;
use ZfcUser\Options\ModuleOptions as ZfcUserModuleOptions; use ZfcUser\Options\ModuleOptions as ZfcUserModuleOptions;
......
...@@ -4,8 +4,8 @@ namespace UnicaenAuth\Service; ...@@ -4,8 +4,8 @@ namespace UnicaenAuth\Service;
use Interop\Container\ContainerInterface; use Interop\Container\ContainerInterface;
use UnicaenAuth\Entity\Ldap\People; use UnicaenAuth\Entity\Ldap\People;
use Zend\ServiceManager\InitializerInterface; use Laminas\ServiceManager\InitializerInterface;
use Zend\ServiceManager\ServiceLocatorInterface; use Laminas\ServiceManager\ServiceLocatorInterface;
use ZfcUser\Entity\UserInterface; use ZfcUser\Entity\UserInterface;
/** /**
...@@ -34,12 +34,12 @@ class UserAwareInitializer implements InitializerInterface ...@@ -34,12 +34,12 @@ class UserAwareInitializer implements InitializerInterface
public function __invoke(ContainerInterface $container, $instance) public function __invoke(ContainerInterface $container, $instance)
{ {
// test d'éligibilité à faire au plus tôt pour éviter l'erreur // test d'éligibilité à faire au plus tôt pour éviter l'erreur
// 'Circular dependency for LazyServiceLoader was found for instance Zend\Authentication\AuthenticationService' // 'Circular dependency for LazyServiceLoader was found for instance Laminas\Authentication\AuthenticationService'
if (!$this->canInitialize($instance)) { if (!$this->canInitialize($instance)) {
return; return;
} }
$authenticationService = $container->get('Zend\Authentication\AuthenticationService'); $authenticationService = $container->get('Laminas\Authentication\AuthenticationService');
if (!$authenticationService->hasIdentity()) { if (!$authenticationService->hasIdentity()) {
return; return;
} }
......
...@@ -18,10 +18,10 @@ use UnicaenAuth\Event\UserRoleSelectedEvent; ...@@ -18,10 +18,10 @@ use UnicaenAuth\Event\UserRoleSelectedEvent;
use UnicaenAuth\Formatter\RoleFormatter; use UnicaenAuth\Formatter\RoleFormatter;
use UnicaenAuth\Options\Traits\ModuleOptionsAwareTrait; use UnicaenAuth\Options\Traits\ModuleOptionsAwareTrait;
use UnicaenAuth\Provider\Identity\Chain; use UnicaenAuth\Provider\Identity\Chain;
use Zend\Authentication\AuthenticationService; use Laminas\Authentication\AuthenticationService;
use Zend\EventManager\EventManagerAwareInterface; use Laminas\EventManager\EventManagerAwareInterface;
use Zend\EventManager\EventManagerAwareTrait; use Laminas\EventManager\EventManagerAwareTrait;
use Zend\Permissions\Acl\Role\RoleInterface; use Laminas\Permissions\Acl\Role\RoleInterface;
use ZfcUser\Entity\UserInterface; use ZfcUser\Entity\UserInterface;
/** /**
......
...@@ -4,7 +4,7 @@ namespace UnicaenAuth\Service; ...@@ -4,7 +4,7 @@ namespace UnicaenAuth\Service;
use Interop\Container\ContainerInterface; use Interop\Container\ContainerInterface;
use UnicaenAuth\Options\ModuleOptions; use UnicaenAuth\Options\ModuleOptions;
use Zend\Authentication\AuthenticationService; use Laminas\Authentication\AuthenticationService;
class UserContextFactory class UserContextFactory
{ {
...@@ -15,7 +15,7 @@ class UserContextFactory ...@@ -15,7 +15,7 @@ class UserContextFactory
public function __invoke(ContainerInterface $container) public function __invoke(ContainerInterface $container)
{ {
/** @var AuthenticationService $authenticationService */ /** @var AuthenticationService $authenticationService */
$authenticationService = $container->get('Zend\Authentication\AuthenticationService'); $authenticationService = $container->get('Laminas\Authentication\AuthenticationService');
/** @var ModuleOptions $moduleOptions */ /** @var ModuleOptions $moduleOptions */
$moduleOptions = $container->get('unicaen-auth_module_options'); $moduleOptions = $container->get('unicaen-auth_module_options');
......
...@@ -4,8 +4,8 @@ namespace UnicaenAuth\Service; ...@@ -4,8 +4,8 @@ namespace UnicaenAuth\Service;
use Interop\Container\ContainerInterface; use Interop\Container\ContainerInterface;
use UnicaenAuth\Options\ModuleOptions; use UnicaenAuth\Options\ModuleOptions;
use Zend\ServiceManager\FactoryInterface; use Laminas\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface; use Laminas\ServiceManager\ServiceLocatorInterface;
use ZfcUser\Options\ModuleOptions as ZfcUserModuleOptions; use ZfcUser\Options\ModuleOptions as ZfcUserModuleOptions;
class UserFactory implements FactoryInterface class UserFactory implements FactoryInterface
......
...@@ -5,8 +5,8 @@ namespace UnicaenAuth\Service; ...@@ -5,8 +5,8 @@ namespace UnicaenAuth\Service;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Interop\Container\ContainerInterface; use Interop\Container\ContainerInterface;
use UnicaenAuth\Options\ModuleOptions; use UnicaenAuth\Options\ModuleOptions;
use Zend\ServiceManager\FactoryInterface; use Laminas\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface; use Laminas\ServiceManager\ServiceLocatorInterface;
class UserMapperFactory implements FactoryInterface class UserMapperFactory implements FactoryInterface
{ {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment