diff --git a/Module.php b/Module.php index 7e2263d6fc11c2201eb1051a5411c3b421518c57..510eee7a0138d02c2d277389cda4fcd35e47f9ca 100644 --- a/Module.php +++ b/Module.php @@ -2,10 +2,10 @@ namespace ZfcUser; -use Zend\ModuleManager\Feature\ConfigProviderInterface; -use Zend\ModuleManager\Feature\ControllerPluginProviderInterface; -use Zend\ModuleManager\Feature\ControllerProviderInterface; -use Zend\ModuleManager\Feature\ServiceProviderInterface; +use Laminas\ModuleManager\Feature\ConfigProviderInterface; +use Laminas\ModuleManager\Feature\ControllerPluginProviderInterface; +use Laminas\ModuleManager\Feature\ControllerProviderInterface; +use Laminas\ModuleManager\Feature\ServiceProviderInterface; class Module implements ControllerProviderInterface, @@ -52,10 +52,10 @@ class Module implements { return array( 'aliases' => array( - 'zfcuser_zend_db_adapter' => \Zend\Db\Adapter\Adapter::class, + 'zfcuser_zend_db_adapter' => \Laminas\Db\Adapter\Adapter::class, ), 'invokables' => array( - 'zfcuser_register_form_hydrator' => \Zend\Hydrator\ClassMethods::class, + 'zfcuser_register_form_hydrator' => \Laminas\Hydrator\ClassMethods::class, ), 'factories' => array( 'zfcuser_redirect_callback' => \ZfcUser\Factory\Controller\RedirectCallbackFactory::class, @@ -63,7 +63,7 @@ class Module implements 'ZfcUser\Authentication\Adapter\AdapterChain' => \ZfcUser\Authentication\Adapter\AdapterChainServiceFactory::class, // We alias this one because it's ZfcUser's instance of - // Zend\Authentication\AuthenticationService. We don't want to + // Laminas\Authentication\AuthenticationService. We don't want to // hog the FQCN service alias for a Zend\* class. 'zfcuser_auth_service' => \ZfcUser\Factory\AuthenticationService::class, diff --git a/README.md b/README.md index ee5a7b7277714cd8bf08d5b911b507d8bfe46b12..c87b727a528cb3ed0d37b6b2397df2f3830552b6 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Introduction ------------ ZfcUser is a user registration and authentication module for Zend Framework 2. -Out of the box, ZfcUser works with Zend\Db, however alternative storage adapter +Out of the box, ZfcUser works with Laminas\Db, however alternative storage adapter modules are available (see below). ZfcUser provides the foundations for adding user authentication and registration to your ZF2 site. It is designed to be very simple and easy to extend. @@ -30,7 +30,7 @@ Please use below table to figure out what version of ZfcUser you should use. Storage Adapter Modules ----------------------- -By default, ZfcUser ships with support for using Zend\Db for persisting users. +By default, ZfcUser ships with support for using Laminas\Db for persisting users. However, by installing an optional alternative storage adapter module, you can take advantage of other methods of persisting users: @@ -50,7 +50,7 @@ Features / Goals username and use strictly email) [COMPLETE] * User registration [COMPLETE] * Forms protected against CSRF [COMPLETE] -* Out-of-the-box support for Doctrine2 _and_ Zend\Db [COMPLETE] +* Out-of-the-box support for Doctrine2 _and_ Laminas\Db [COMPLETE] * Robust event system to allow for extending [COMPLETE] * Provide ActionController plugin and view helper [COMPLETE] @@ -106,9 +106,9 @@ Coming soon... Coming soon... -### Post-Install: Zend\Db +### Post-Install: Laminas\Db -1. If you do not already have a valid Zend\Db\Adapter\Adapter in your service +1. If you do not already have a valid Laminas\Db\Adapter\Adapter in your service manager configuration, put the following in `./config/autoload/database.local.php`: ```php @@ -123,7 +123,7 @@ return array( ), 'service_manager' => array( 'factories' => array( - 'Zend\Db\Adapter\Adapter' => 'Zend\Db\Adapter\AdapterServiceFactory', + 'Laminas\Db\Adapter\Adapter' => 'Laminas\Db\Adapter\AdapterServiceFactory', ), ), ); @@ -182,8 +182,8 @@ The following options are available: after they successfully register. Default value is `false`. - **use_registration_form_captcha** - Boolean value, determines if a captcha should be utilized on the user registration form. Default value is `true`. (Note, - right now this only utilizes a weak Zend\Text\Figlet CAPTCHA, but I have plans - to make all Zend\Captcha adapters work.) + right now this only utilizes a weak Laminas\Text\Figlet CAPTCHA, but I have plans + to make all Laminas\Captcha adapters work.) - **login_form_timeout** - Integer value, specify the timeout for the CSRF security field of the login form in seconds. Default value is 300 seconds. - **user_form_timeout** - Integer value, specify the timeout for the CSRF security @@ -225,7 +225,7 @@ module.config.php, or a dedicated recaptcha.config.php): 'instance'=>array( 'alias'=>array( // OTHER ELEMENTS.... - 'recaptcha_element' => 'Zend\Form\Element\Captcha', + 'recaptcha_element' => 'Laminas\Form\Element\Captcha', ), 'recaptcha_element' => array( 'parameters' => array( diff --git a/composer.json b/composer.json index 75b7a93862e213af245ecaefc0d4889d881d3ecd..10c8e05acdee1133907a766caa92c616956bdbd7 100644 --- a/composer.json +++ b/composer.json @@ -1,36 +1,37 @@ { "name": "unicaen/zfc-user", - "description": "A generic user registration and authentication module for ZF2. Supports Zend\\Db and Doctrine2.", + "description": "A generic user registration and authentication module for ZF2. Supports Laminas\\Db and Doctrine2.", "type": "library", "require": { "php": "^5.5|^7.0", - "zendframework/zend-authentication": "^2.5", - "zendframework/zend-crypt": "^3.0", - "zendframework/zend-form": "^2.9", - "zendframework/zend-inputfilter": "^2.7", - "zendframework/zend-loader": "^2.5", - "zendframework/zend-modulemanager": "^2.7", - "zendframework/zend-mvc": "^3.0", - "zendframework/zend-servicemanager": "^3.0", - "zendframework/zend-stdlib": "^3.0", - "zendframework/zend-validator": "^2.8", - "zendframework/zend-db": "^2.8", - "zendframework/zend-view": "^2.8", - "zendframework/zend-session" : "^2.7", - "zendframework/zend-http" : "^2.5", - "zendframework/zend-mvc-plugin-flashmessenger": "^1.0", - "zendframework/zend-i18n": "^2.7", - "zendframework/zend-mvc-plugin-prg": "^1.0", - "zendframework/zend-hydrator": "^2.0" + "laminas/laminas-authentication": "^2.5", + "laminas/laminas-crypt": "^3.0", + "laminas/laminas-form": "^2.9", + "laminas/laminas-inputfilter": "^2.7", + "laminas/laminas-loader": "^2.5", + "laminas/laminas-modulemanager": "^2.7", + "laminas/laminas-mvc": "^3.0", + "laminas/laminas-servicemanager": "^3.0", + "laminas/laminas-stdlib": "^3.0", + "laminas/laminas-validator": "^2.8", + "laminas/laminas-db": "^2.8", + "laminas/laminas-view": "^2.8", + "laminas/laminas-session": "^2.7", + "laminas/laminas-http": "^2.5", + "laminas/laminas-mvc-plugin-flashmessenger": "^1.0", + "laminas/laminas-i18n": "^2.7", + "laminas/laminas-mvc-plugin-prg": "^1.0", + "laminas/laminas-hydrator": "^2.0", + "laminas/laminas-dependency-plugin": "^2.1" }, - "require-dev" : { - "phpunit/phpunit" : ">=3.7,<4", - "phpmd/phpmd" : "1.4.*", - "squizlabs/php_codesniffer" : "1.4.*", - "zendframework/zend-captcha" : "^2.6" + "require-dev": { + "phpunit/phpunit": ">=3.7,<4", + "phpmd/phpmd": "1.4.*", + "squizlabs/php_codesniffer": "1.4.*", + "laminas/laminas-captcha": "^2.6" }, "suggest": { - "zendframework/zend-captcha" : "Zend\\Captcha if you want to use the captcha component" + "laminas/laminas-captcha": "Laminas\\Captcha if you want to use the captcha component" }, "autoload": { "psr-0": { diff --git a/config/zfcuser.global.php.dist b/config/zfcuser.global.php.dist index c7b53f3548a05d01c0e727f2ed9163962c028cb0..9e230fe410cde35e4bd634c2e3e514b29959ea61 100644 --- a/config/zfcuser.global.php.dist +++ b/config/zfcuser.global.php.dist @@ -7,12 +7,12 @@ */ $settings = array( /** - * Zend\Db\Adapter\Adapter DI Alias + * Laminas\Db\Adapter\Adapter DI Alias * - * Please specify the DI alias for the configured Zend\Db\Adapter\Adapter + * Please specify the DI alias for the configured Laminas\Db\Adapter\Adapter * instance that ZfcUser should use. */ - //'zend_db_adapter' => 'Zend\Db\Adapter\Adapter', + //'zend_db_adapter' => 'Laminas\Db\Adapter\Adapter', /** * User Model Entity Class @@ -115,7 +115,7 @@ $settings = array( * Form Captcha Options * * Currently used for the registration form, but re-usable anywhere. Use - * this to configure which Zend\Captcha adapter to use, and the options to + * this to configure which Laminas\Captcha adapter to use, and the options to * pass to it. The default uses the Figlet captcha. */ /*'form_captcha_options' => array( @@ -229,7 +229,7 @@ return array( 'zfcuser' => $settings, 'service_manager' => array( 'aliases' => array( - 'zfcuser_zend_db_adapter' => (isset($settings['zend_db_adapter'])) ? $settings['zend_db_adapter']: 'Zend\Db\Adapter\Adapter', + 'zfcuser_zend_db_adapter' => (isset($settings['zend_db_adapter'])) ? $settings['zend_db_adapter']: 'Laminas\Db\Adapter\Adapter', ), ), ); diff --git a/src/ZfcUser/Authentication/Adapter/AbstractAdapter.php b/src/ZfcUser/Authentication/Adapter/AbstractAdapter.php index a47d9a3247de6f39814759cbf0602ac6c886aeda..876310e86a2570bfc962009900129847812115c7 100644 --- a/src/ZfcUser/Authentication/Adapter/AbstractAdapter.php +++ b/src/ZfcUser/Authentication/Adapter/AbstractAdapter.php @@ -2,7 +2,7 @@ namespace ZfcUser\Authentication\Adapter; -use Zend\Authentication\Storage; +use Laminas\Authentication\Storage; abstract class AbstractAdapter implements ChainableAdapter { diff --git a/src/ZfcUser/Authentication/Adapter/AdapterChain.php b/src/ZfcUser/Authentication/Adapter/AdapterChain.php index a75023867ff0d0390ba94a63449cd66e6520ab63..9752cccc06983680ec610310d4b5811632683bfe 100644 --- a/src/ZfcUser/Authentication/Adapter/AdapterChain.php +++ b/src/ZfcUser/Authentication/Adapter/AdapterChain.php @@ -2,12 +2,12 @@ namespace ZfcUser\Authentication\Adapter; -use Zend\Authentication\Adapter\AdapterInterface; -use Zend\Authentication\Result as AuthenticationResult; -use Zend\EventManager\Event; -use Zend\EventManager\EventManagerAwareTrait; -use Zend\Stdlib\RequestInterface as Request; -use Zend\Stdlib\ResponseInterface as Response; +use Laminas\Authentication\Adapter\AdapterInterface; +use Laminas\Authentication\Result as AuthenticationResult; +use Laminas\EventManager\Event; +use Laminas\EventManager\EventManagerAwareTrait; +use Laminas\Stdlib\RequestInterface as Request; +use Laminas\Stdlib\ResponseInterface as Response; use ZfcUser\Exception; class AdapterChain implements AdapterInterface diff --git a/src/ZfcUser/Authentication/Adapter/AdapterChainEvent.php b/src/ZfcUser/Authentication/Adapter/AdapterChainEvent.php index 4423f8de65b1e22b1de0f46d467b99ba9e7e7e4d..a6235395758f0b00583f9f480e63af633a1309cc 100644 --- a/src/ZfcUser/Authentication/Adapter/AdapterChainEvent.php +++ b/src/ZfcUser/Authentication/Adapter/AdapterChainEvent.php @@ -2,8 +2,8 @@ namespace ZfcUser\Authentication\Adapter; -use Zend\EventManager\Event; -use Zend\Stdlib\RequestInterface as Request; +use Laminas\EventManager\Event; +use Laminas\Stdlib\RequestInterface as Request; class AdapterChainEvent extends Event { diff --git a/src/ZfcUser/Authentication/Adapter/AdapterChainServiceFactory.php b/src/ZfcUser/Authentication/Adapter/AdapterChainServiceFactory.php index 06c89e1646a018b1735bcb1be387488ee153a369..2417c73adf050b1f5eda1e890e41de90358b95e6 100644 --- a/src/ZfcUser/Authentication/Adapter/AdapterChainServiceFactory.php +++ b/src/ZfcUser/Authentication/Adapter/AdapterChainServiceFactory.php @@ -3,10 +3,10 @@ namespace ZfcUser\Authentication\Adapter; use Interop\Container\ContainerInterface; use Interop\Container\Exception\ContainerException; -use Zend\ServiceManager\Exception\ServiceNotCreatedException; -use Zend\ServiceManager\Exception\ServiceNotFoundException; -use Zend\ServiceManager\Factory\FactoryInterface; -use Zend\ServiceManager\ServiceLocatorInterface; +use Laminas\ServiceManager\Exception\ServiceNotCreatedException; +use Laminas\ServiceManager\Exception\ServiceNotFoundException; +use Laminas\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\ServiceLocatorInterface; use ZfcUser\Authentication\Adapter\AdapterChain; use ZfcUser\Options\ModuleOptions; use ZfcUser\Authentication\Adapter\Exception\OptionsNotFoundException; diff --git a/src/ZfcUser/Authentication/Adapter/ChainableAdapter.php b/src/ZfcUser/Authentication/Adapter/ChainableAdapter.php index 748d7e1dca997b833f3c7065844762d75db9faee..620b944cd6ba48f77df40af637e5b46220fbca9f 100644 --- a/src/ZfcUser/Authentication/Adapter/ChainableAdapter.php +++ b/src/ZfcUser/Authentication/Adapter/ChainableAdapter.php @@ -2,8 +2,8 @@ namespace ZfcUser\Authentication\Adapter; -use Zend\Authentication\Storage\StorageInterface; -use Zend\EventManager\EventInterface; +use Laminas\Authentication\Storage\StorageInterface; +use Laminas\EventManager\EventInterface; interface ChainableAdapter { diff --git a/src/ZfcUser/Authentication/Adapter/Db.php b/src/ZfcUser/Authentication/Adapter/Db.php index 891e3e918ca467241a1755259fae09aaeacdef79..40de25a72feec7bfce4ae423ef1c5c93d2fda29c 100644 --- a/src/ZfcUser/Authentication/Adapter/Db.php +++ b/src/ZfcUser/Authentication/Adapter/Db.php @@ -3,11 +3,11 @@ namespace ZfcUser\Authentication\Adapter; use Interop\Container\ContainerInterface; -use Zend\Authentication\Result as AuthenticationResult; -use Zend\EventManager\EventInterface; -use Zend\ServiceManager\ServiceManager; -use Zend\Crypt\Password\Bcrypt; -use Zend\Session\Container as SessionContainer; +use Laminas\Authentication\Result as AuthenticationResult; +use Laminas\EventManager\EventInterface; +use Laminas\ServiceManager\ServiceManager; +use Laminas\Crypt\Password\Bcrypt; +use Laminas\Session\Container as SessionContainer; use ZfcUser\Entity\UserInterface; use ZfcUser\Mapper\UserInterface as UserMapperInterface; use ZfcUser\Options\ModuleOptions; diff --git a/src/ZfcUser/Authentication/Adapter/Exception/OptionsNotFoundException.php b/src/ZfcUser/Authentication/Adapter/Exception/OptionsNotFoundException.php index 685d053a4de1fe5afb5e514c8bfac5e8d8fb6190..dcb043617e4fc7cce2490252d45d14c0c5013fbd 100644 --- a/src/ZfcUser/Authentication/Adapter/Exception/OptionsNotFoundException.php +++ b/src/ZfcUser/Authentication/Adapter/Exception/OptionsNotFoundException.php @@ -2,7 +2,7 @@ namespace ZfcUser\Authentication\Adapter\Exception; -use Zend\Math\Exception\RuntimeException; +use Laminas\Math\Exception\RuntimeException; class OptionsNotFoundException extends RuntimeException { diff --git a/src/ZfcUser/Authentication/Storage/Db.php b/src/ZfcUser/Authentication/Storage/Db.php index 0a5383ee0eeac22bd84ae0ca131215a7baf52129..c9b1b844504425c4d3d5cd1f9fe0c7538f66cd6a 100644 --- a/src/ZfcUser/Authentication/Storage/Db.php +++ b/src/ZfcUser/Authentication/Storage/Db.php @@ -3,9 +3,9 @@ namespace ZfcUser\Authentication\Storage; use Interop\Container\ContainerInterface; -use Zend\Authentication\Storage; -use Zend\Authentication\Storage\StorageInterface; -use Zend\ServiceManager\ServiceManager; +use Laminas\Authentication\Storage; +use Laminas\Authentication\Storage\StorageInterface; +use Laminas\ServiceManager\ServiceManager; use ZfcUser\Mapper\UserInterface as UserMapper; class Db implements Storage\StorageInterface @@ -33,7 +33,7 @@ class Db implements Storage\StorageInterface /** * Returns true if and only if storage is empty * - * @throws \Zend\Authentication\Exception\InvalidArgumentException If it is impossible to determine whether + * @throws \Laminas\Authentication\Exception\InvalidArgumentException If it is impossible to determine whether * storage is empty or not * @return boolean */ @@ -56,7 +56,7 @@ class Db implements Storage\StorageInterface * * Behavior is undefined when storage is empty. * - * @throws \Zend\Authentication\Exception\InvalidArgumentException If reading contents from storage is impossible + * @throws \Laminas\Authentication\Exception\InvalidArgumentException If reading contents from storage is impossible * @return mixed */ public function read() @@ -84,7 +84,7 @@ class Db implements Storage\StorageInterface * Writes $contents to storage * * @param mixed $contents - * @throws \Zend\Authentication\Exception\InvalidArgumentException If writing $contents to storage is impossible + * @throws \Laminas\Authentication\Exception\InvalidArgumentException If writing $contents to storage is impossible * @return void */ public function write($contents) @@ -96,7 +96,7 @@ class Db implements Storage\StorageInterface /** * Clears contents from storage * - * @throws \Zend\Authentication\Exception\InvalidArgumentException If clearing contents from storage is impossible + * @throws \Laminas\Authentication\Exception\InvalidArgumentException If clearing contents from storage is impossible * @return void */ public function clear() diff --git a/src/ZfcUser/Controller/Plugin/ZfcUserAuthentication.php b/src/ZfcUser/Controller/Plugin/ZfcUserAuthentication.php index a3fd6cc8ca301ed382a5613fcd10a069cb02f40b..7b7d810bfa3f2b14b9033f636e6f7c8a9ec3bae3 100644 --- a/src/ZfcUser/Controller/Plugin/ZfcUserAuthentication.php +++ b/src/ZfcUser/Controller/Plugin/ZfcUserAuthentication.php @@ -2,9 +2,9 @@ namespace ZfcUser\Controller\Plugin; -use Zend\Mvc\Controller\Plugin\AbstractPlugin; -use Zend\Authentication\AuthenticationService; -use Zend\ServiceManager\ServiceLocatorInterface; +use Laminas\Mvc\Controller\Plugin\AbstractPlugin; +use Laminas\Authentication\AuthenticationService; +use Laminas\ServiceManager\ServiceLocatorInterface; use ZfcUser\Authentication\Adapter\AdapterChain as AuthAdapter; class ZfcUserAuthentication extends AbstractPlugin diff --git a/src/ZfcUser/Controller/RedirectCallback.php b/src/ZfcUser/Controller/RedirectCallback.php index 0056c3f24a8f711857dc423441cd60ac1991ef2c..8a4b35d4846ee545a3355d4cc5062bf70a9142f0 100644 --- a/src/ZfcUser/Controller/RedirectCallback.php +++ b/src/ZfcUser/Controller/RedirectCallback.php @@ -2,10 +2,10 @@ namespace ZfcUser\Controller; -use Zend\Mvc\Application; -use Zend\Router\RouteInterface; -use Zend\Router\Exception; -use Zend\Http\PhpEnvironment\Response; +use Laminas\Mvc\Application; +use Laminas\Router\RouteInterface; +use Laminas\Router\Exception; +use Laminas\Http\PhpEnvironment\Response; use ZfcUser\Options\ModuleOptions; /** diff --git a/src/ZfcUser/Controller/UserController.php b/src/ZfcUser/Controller/UserController.php index 7c5a16bca14d33d49a23c27589b1f6b65d9eadf6..b011b06a4f191ebdc146014381d27461712177db 100644 --- a/src/ZfcUser/Controller/UserController.php +++ b/src/ZfcUser/Controller/UserController.php @@ -2,12 +2,12 @@ namespace ZfcUser\Controller; -use Zend\Form\FormInterface; -use Zend\Mvc\Controller\AbstractActionController; -use Zend\ServiceManager\ServiceLocatorInterface; -use Zend\Stdlib\ResponseInterface as Response; -use Zend\Stdlib\Parameters; -use Zend\View\Model\ViewModel; +use Laminas\Form\FormInterface; +use Laminas\Mvc\Controller\AbstractActionController; +use Laminas\ServiceManager\ServiceLocatorInterface; +use Laminas\Stdlib\ResponseInterface as Response; +use Laminas\Stdlib\Parameters; +use Laminas\View\Model\ViewModel; use ZfcUser\Service\User as UserService; use ZfcUser\Options\UserControllerOptionsInterface; diff --git a/src/ZfcUser/Db/Adapter/MasterSlaveAdapter.php b/src/ZfcUser/Db/Adapter/MasterSlaveAdapter.php index d6fd0016ab83b173662f7740a2e654bf848f0a84..40298192f0caba02f367fec6ca2fd105f5b8a621 100644 --- a/src/ZfcUser/Db/Adapter/MasterSlaveAdapter.php +++ b/src/ZfcUser/Db/Adapter/MasterSlaveAdapter.php @@ -1,9 +1,9 @@ <?php namespace ZfcBase\Db\Adapter; -use Zend\Db\Adapter\Adapter; -use Zend\Db\Adapter\Platform; -use Zend\Db\ResultSet; +use Laminas\Db\Adapter\Adapter; +use Laminas\Db\Adapter\Platform; +use Laminas\Db\ResultSet; class MasterSlaveAdapter extends Adapter implements MasterSlaveAdapterInterface { diff --git a/src/ZfcUser/Db/Adapter/MasterSlaveAdapterInterface.php b/src/ZfcUser/Db/Adapter/MasterSlaveAdapterInterface.php index a291ba8d6e73e23b5220ed7579b90f78963d3073..e7ef2c2cd4b778e6031b908375537fb152436a0a 100644 --- a/src/ZfcUser/Db/Adapter/MasterSlaveAdapterInterface.php +++ b/src/ZfcUser/Db/Adapter/MasterSlaveAdapterInterface.php @@ -4,7 +4,7 @@ namespace ZfcUser\Db\Adapter; interface MasterSlaveAdapterInterface { /** - * @return \Zend\Db\Adapter\Adapter + * @return \Laminas\Db\Adapter\Adapter */ public function getSlaveAdapter(); } diff --git a/src/ZfcUser/EventManager/EventProvider.php b/src/ZfcUser/EventManager/EventProvider.php index 46ef8599315b573de79b3778900015c3b4984c60..6e9b030bca4109f5416e4fa923af4114f00abe02 100644 --- a/src/ZfcUser/EventManager/EventProvider.php +++ b/src/ZfcUser/EventManager/EventProvider.php @@ -2,10 +2,10 @@ namespace ZfcUser\EventManager; use Traversable; -use Zend\EventManager\EventManagerAwareInterface; -use Zend\EventManager\EventManagerInterface; -use Zend\EventManager\EventManager; -use Zend\EventManager\SharedEventManager; +use Laminas\EventManager\EventManagerAwareInterface; +use Laminas\EventManager\EventManagerInterface; +use Laminas\EventManager\EventManager; +use Laminas\EventManager\SharedEventManager; abstract class EventProvider implements EventManagerAwareInterface { diff --git a/src/ZfcUser/Factory/Authentication/Adapter/DbFactory.php b/src/ZfcUser/Factory/Authentication/Adapter/DbFactory.php index 8af7b858eb7826c7c8c5361396bae9f2e94ee84d..e46b0e51c1ead4763dfe8984a84e3d98351cd292 100644 --- a/src/ZfcUser/Factory/Authentication/Adapter/DbFactory.php +++ b/src/ZfcUser/Factory/Authentication/Adapter/DbFactory.php @@ -3,8 +3,8 @@ namespace ZfcUser\Factory\Authentication\Adapter; use Interop\Container\ContainerInterface; -use Zend\ServiceManager\Factory\FactoryInterface; -use Zend\ServiceManager\ServiceLocatorInterface; +use Laminas\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\ServiceLocatorInterface; use ZfcUser\Authentication\Adapter\Db; class DbFactory implements FactoryInterface diff --git a/src/ZfcUser/Factory/Authentication/Storage/DbFactory.php b/src/ZfcUser/Factory/Authentication/Storage/DbFactory.php index 3c9ae6b716b93b12552818f3317896c5b1538308..7b9d92512bf87da60a6c127380d8c7cd3802c02d 100644 --- a/src/ZfcUser/Factory/Authentication/Storage/DbFactory.php +++ b/src/ZfcUser/Factory/Authentication/Storage/DbFactory.php @@ -3,8 +3,8 @@ namespace ZfcUser\Factory\Authentication\Storage; use Interop\Container\ContainerInterface; -use Zend\ServiceManager\Factory\FactoryInterface; -use Zend\ServiceManager\ServiceLocatorInterface; +use Laminas\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\ServiceLocatorInterface; use ZfcUser\Authentication\Storage\Db; class DbFactory implements FactoryInterface diff --git a/src/ZfcUser/Factory/AuthenticationService.php b/src/ZfcUser/Factory/AuthenticationService.php index 131ba7a8c2e269d2011569a6de7ee3fbe887791c..2fbb2ddd59663360106208499e3532287076c428 100644 --- a/src/ZfcUser/Factory/AuthenticationService.php +++ b/src/ZfcUser/Factory/AuthenticationService.php @@ -3,14 +3,14 @@ namespace ZfcUser\Factory; use Interop\Container\ContainerInterface; -use Zend\ServiceManager\Factory\FactoryInterface; -use Zend\ServiceManager\ServiceLocatorInterface; +use Laminas\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\ServiceLocatorInterface; class AuthenticationService implements FactoryInterface { public function __invoke(ContainerInterface $serviceLocator, $requestedName, array $options = null) { - return new \Zend\Authentication\AuthenticationService( + return new \Laminas\Authentication\AuthenticationService( $serviceLocator->get('ZfcUser\Authentication\Storage\Db'), $serviceLocator->get('ZfcUser\Authentication\Adapter\AdapterChain') ); diff --git a/src/ZfcUser/Factory/Controller/Plugin/ZfcUserAuthentication.php b/src/ZfcUser/Factory/Controller/Plugin/ZfcUserAuthentication.php index c11a45ce831b931ec8cc88a9b11f51214e61a58d..f8e76d23b8111535155b7582ad5a7225ecefd995 100644 --- a/src/ZfcUser/Factory/Controller/Plugin/ZfcUserAuthentication.php +++ b/src/ZfcUser/Factory/Controller/Plugin/ZfcUserAuthentication.php @@ -3,8 +3,8 @@ namespace ZfcUser\Factory\Controller\Plugin; use Interop\Container\ContainerInterface; -use Zend\ServiceManager\Factory\FactoryInterface; -use Zend\ServiceManager\ServiceLocatorInterface; +use Laminas\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\ServiceLocatorInterface; use ZfcUser\Controller; class ZfcUserAuthentication implements FactoryInterface diff --git a/src/ZfcUser/Factory/Controller/RedirectCallbackFactory.php b/src/ZfcUser/Factory/Controller/RedirectCallbackFactory.php index cf0c7fef09d58083513959468758580555d4eade..ea7da040d97572eed09a2b457d68cb7179388363 100644 --- a/src/ZfcUser/Factory/Controller/RedirectCallbackFactory.php +++ b/src/ZfcUser/Factory/Controller/RedirectCallbackFactory.php @@ -3,10 +3,10 @@ namespace ZfcUser\Factory\Controller; use Interop\Container\ContainerInterface; -use Zend\Mvc\Application; -use Zend\Router\RouteInterface; -use Zend\ServiceManager\Factory\FactoryInterface; -use Zend\ServiceManager\ServiceLocatorInterface; +use Laminas\Mvc\Application; +use Laminas\Router\RouteInterface; +use Laminas\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\ServiceLocatorInterface; use ZfcUser\Controller\RedirectCallback; use ZfcUser\Options\ModuleOptions; diff --git a/src/ZfcUser/Factory/Controller/UserControllerFactory.php b/src/ZfcUser/Factory/Controller/UserControllerFactory.php index 760d98874f49dd1b900512cdc8a017bc47808e86..522633ec99fab13790b26fc97bb5273c76f70add 100644 --- a/src/ZfcUser/Factory/Controller/UserControllerFactory.php +++ b/src/ZfcUser/Factory/Controller/UserControllerFactory.php @@ -3,9 +3,9 @@ namespace ZfcUser\Factory\Controller; use Interop\Container\ContainerInterface; -use Zend\Mvc\Controller\ControllerManager; -use Zend\ServiceManager\Factory\FactoryInterface; -use Zend\ServiceManager\ServiceLocatorInterface; +use Laminas\Mvc\Controller\ControllerManager; +use Laminas\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\ServiceLocatorInterface; use ZfcUser\Controller\RedirectCallback; use ZfcUser\Controller\UserController; diff --git a/src/ZfcUser/Factory/Form/ChangeEmail.php b/src/ZfcUser/Factory/Form/ChangeEmail.php index cb7cef7716c8fc96e703914e2263ae699d5433eb..b3b930d7005d4cdec9a3fe8e4166fc90009c5603 100644 --- a/src/ZfcUser/Factory/Form/ChangeEmail.php +++ b/src/ZfcUser/Factory/Form/ChangeEmail.php @@ -3,7 +3,7 @@ namespace ZfcUser\Factory\Form; use Interop\Container\ContainerInterface; -use Zend\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\Factory\FactoryInterface; use ZfcUser\Form; use ZfcUser\Validator; diff --git a/src/ZfcUser/Factory/Form/ChangePassword.php b/src/ZfcUser/Factory/Form/ChangePassword.php index be498df151f62260f68f917a1dfc20b920718a7c..ce3ac514ea6c002ce21e8c410899245886051721 100644 --- a/src/ZfcUser/Factory/Form/ChangePassword.php +++ b/src/ZfcUser/Factory/Form/ChangePassword.php @@ -3,7 +3,7 @@ namespace ZfcUser\Factory\Form; use Interop\Container\ContainerInterface; -use Zend\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\Factory\FactoryInterface; use ZfcUser\Form; class ChangePassword implements FactoryInterface diff --git a/src/ZfcUser/Factory/Form/Login.php b/src/ZfcUser/Factory/Form/Login.php index 9cf93c2b941a240853f4a82eb3ea6e1dd67ea850..3c5ac0f9ffe2a727273f4420d773d4baba3941f1 100644 --- a/src/ZfcUser/Factory/Form/Login.php +++ b/src/ZfcUser/Factory/Form/Login.php @@ -3,7 +3,7 @@ namespace ZfcUser\Factory\Form; use Interop\Container\ContainerInterface; -use Zend\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\Factory\FactoryInterface; use ZfcUser\Form; class Login implements FactoryInterface diff --git a/src/ZfcUser/Factory/Form/Register.php b/src/ZfcUser/Factory/Form/Register.php index 56872f82cccf82c62d60b8e6d78c309ca68805e8..5b4d9e815f411958b33f1f445ca76859a1ea1cea 100644 --- a/src/ZfcUser/Factory/Form/Register.php +++ b/src/ZfcUser/Factory/Form/Register.php @@ -3,7 +3,7 @@ namespace ZfcUser\Factory\Form; use Interop\Container\ContainerInterface; -use Zend\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\Factory\FactoryInterface; use ZfcUser\Form; use ZfcUser\Validator; diff --git a/src/ZfcUser/Factory/Mapper/User.php b/src/ZfcUser/Factory/Mapper/User.php index 707dadba608a8cf39b569117cf3e212d0eab2f3c..b9b57f79b17df4db8318e1cdfc32010a4282d575 100644 --- a/src/ZfcUser/Factory/Mapper/User.php +++ b/src/ZfcUser/Factory/Mapper/User.php @@ -3,8 +3,8 @@ namespace ZfcUser\Factory\Mapper; use Interop\Container\ContainerInterface; -use Zend\ServiceManager\Factory\FactoryInterface; -use Zend\ServiceManager\ServiceLocatorInterface; +use Laminas\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\ServiceLocatorInterface; use ZfcUser\Mapper; use ZfcUser\Options\ModuleOptions; diff --git a/src/ZfcUser/Factory/Options/ModuleOptions.php b/src/ZfcUser/Factory/Options/ModuleOptions.php index 31e3f04bcf810de81cfd70c5a91056f60ef7070b..5a9e9067ed72f128ab31699e92b1a4e41085af69 100644 --- a/src/ZfcUser/Factory/Options/ModuleOptions.php +++ b/src/ZfcUser/Factory/Options/ModuleOptions.php @@ -3,8 +3,8 @@ namespace ZfcUser\Factory\Options; use Interop\Container\ContainerInterface; -use Zend\ServiceManager\Factory\FactoryInterface; -use Zend\ServiceManager\ServiceLocatorInterface; +use Laminas\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\ServiceLocatorInterface; use ZfcUser\Options; class ModuleOptions implements FactoryInterface diff --git a/src/ZfcUser/Factory/Service/UserFactory.php b/src/ZfcUser/Factory/Service/UserFactory.php index ccee78040fa5299b7cfc89fa7d6b8ef9927dfa46..5ce326bc4f60289b0866a3da5414f9cd51e85c76 100644 --- a/src/ZfcUser/Factory/Service/UserFactory.php +++ b/src/ZfcUser/Factory/Service/UserFactory.php @@ -3,8 +3,8 @@ namespace ZfcUser\Factory\Service; use Interop\Container\ContainerInterface; -use Zend\ServiceManager\Factory\FactoryInterface; -use Zend\ServiceManager\ServiceLocatorInterface; +use Laminas\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\ServiceLocatorInterface; use ZfcUser\Service\User; class UserFactory implements FactoryInterface diff --git a/src/ZfcUser/Factory/UserHydrator.php b/src/ZfcUser/Factory/UserHydrator.php index 33a5f14856ca2acdacd1efab46a16ea912d57261..2510637df8d1818887d694f45f475c28c6f64913 100644 --- a/src/ZfcUser/Factory/UserHydrator.php +++ b/src/ZfcUser/Factory/UserHydrator.php @@ -3,14 +3,14 @@ namespace ZfcUser\Factory; use Interop\Container\ContainerInterface; -use Zend\ServiceManager\Factory\FactoryInterface; -use Zend\ServiceManager\ServiceLocatorInterface; +use Laminas\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\ServiceLocatorInterface; class UserHydrator implements FactoryInterface { public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { - return new \Zend\Hydrator\ClassMethods(); + return new \Laminas\Hydrator\ClassMethods(); } diff --git a/src/ZfcUser/Factory/View/Helper/ZfcUserDisplayName.php b/src/ZfcUser/Factory/View/Helper/ZfcUserDisplayName.php index 802fead413e61397644ca6ab08f73e886cff0e56..3eb0590860bb941c975f9343cbca5f95be74dcba 100644 --- a/src/ZfcUser/Factory/View/Helper/ZfcUserDisplayName.php +++ b/src/ZfcUser/Factory/View/Helper/ZfcUserDisplayName.php @@ -3,7 +3,7 @@ namespace ZfcUser\Factory\View\Helper; use Interop\Container\ContainerInterface; -use Zend\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\Factory\FactoryInterface; use ZfcUser\View; class ZfcUserDisplayName implements FactoryInterface diff --git a/src/ZfcUser/Factory/View/Helper/ZfcUserIdentity.php b/src/ZfcUser/Factory/View/Helper/ZfcUserIdentity.php index 07483b9af3df7ec2f5efb7f60bedaa8c58f804bc..d551d898e33db7bbb7c5f136406614b78a2944e5 100644 --- a/src/ZfcUser/Factory/View/Helper/ZfcUserIdentity.php +++ b/src/ZfcUser/Factory/View/Helper/ZfcUserIdentity.php @@ -3,7 +3,7 @@ namespace ZfcUser\Factory\View\Helper; use Interop\Container\ContainerInterface; -use Zend\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\Factory\FactoryInterface; use ZfcUser\View; class ZfcUserIdentity implements FactoryInterface diff --git a/src/ZfcUser/Factory/View/Helper/ZfcUserLoginWidget.php b/src/ZfcUser/Factory/View/Helper/ZfcUserLoginWidget.php index 8d39d6e8c0b9a338a8493c9f1e3aad61b73e12c1..eeec79eebdcb67b28c01fd87366624175ecb52ff 100644 --- a/src/ZfcUser/Factory/View/Helper/ZfcUserLoginWidget.php +++ b/src/ZfcUser/Factory/View/Helper/ZfcUserLoginWidget.php @@ -3,7 +3,7 @@ namespace ZfcUser\Factory\View\Helper; use Interop\Container\ContainerInterface; -use Zend\ServiceManager\Factory\FactoryInterface; +use Laminas\ServiceManager\Factory\FactoryInterface; use ZfcUser\View; class ZfcUserLoginWidget implements FactoryInterface diff --git a/src/ZfcUser/Form/Base.php b/src/ZfcUser/Form/Base.php index 5972eae068d06bec87ff4ce8425c21578f72bc01..f21d80912bc1e4781b34527c8f54d643ae74663d 100644 --- a/src/ZfcUser/Form/Base.php +++ b/src/ZfcUser/Form/Base.php @@ -2,7 +2,7 @@ namespace ZfcUser\Form; -use Zend\Form\Element; +use Laminas\Form\Element; class Base extends ProvidesEventsForm { @@ -75,7 +75,7 @@ class Base extends ProvidesEventsForm $this->add(array( 'name' => 'userId', - 'type' => 'Zend\Form\Element\Hidden', + 'type' => 'Laminas\Form\Element\Hidden', 'attributes' => array( 'type' => 'hidden' ), diff --git a/src/ZfcUser/Form/ChangeEmailFilter.php b/src/ZfcUser/Form/ChangeEmailFilter.php index b8a73d352ad8c247a07d580a108d2202a1d95549..02434924eec05dba4d912912bc2c43bc232c8817 100644 --- a/src/ZfcUser/Form/ChangeEmailFilter.php +++ b/src/ZfcUser/Form/ChangeEmailFilter.php @@ -2,7 +2,7 @@ namespace ZfcUser\Form; -use Zend\InputFilter\InputFilter; +use Laminas\InputFilter\InputFilter; use ZfcUser\Options\AuthenticationOptionsInterface; class ChangeEmailFilter extends InputFilter diff --git a/src/ZfcUser/Form/ChangePasswordFilter.php b/src/ZfcUser/Form/ChangePasswordFilter.php index be6eb42cd67d83099dfb7dd64526e125582108f6..9a61e7c6db7d3bb53652241131b24753a872a3ce 100644 --- a/src/ZfcUser/Form/ChangePasswordFilter.php +++ b/src/ZfcUser/Form/ChangePasswordFilter.php @@ -2,7 +2,7 @@ namespace ZfcUser\Form; -use Zend\InputFilter\InputFilter; +use Laminas\InputFilter\InputFilter; use ZfcUser\Options\AuthenticationOptionsInterface; class ChangePasswordFilter extends InputFilter diff --git a/src/ZfcUser/Form/Login.php b/src/ZfcUser/Form/Login.php index 46966778c708c5e93bf0b8537fe7edff3800eed7..3c24e14aae898d37a31556b49a7f6fd02eeb562c 100644 --- a/src/ZfcUser/Form/Login.php +++ b/src/ZfcUser/Form/Login.php @@ -2,7 +2,7 @@ namespace ZfcUser\Form; -use Zend\Form\Element; +use Laminas\Form\Element; use ZfcUser\Options\AuthenticationOptionsInterface; class Login extends ProvidesEventsForm diff --git a/src/ZfcUser/Form/ProvidesEventsForm.php b/src/ZfcUser/Form/ProvidesEventsForm.php index 44134957f693834afe5653ca7cd4a5768c7b151c..62b563156fe333a3cc2a2661ba9a509f2b10fccd 100644 --- a/src/ZfcUser/Form/ProvidesEventsForm.php +++ b/src/ZfcUser/Form/ProvidesEventsForm.php @@ -1,8 +1,8 @@ <?php namespace ZfcUser\Form; -use Zend\EventManager\EventManagerAwareTrait; -use Zend\Form\Form; +use Laminas\EventManager\EventManagerAwareTrait; +use Laminas\Form\Form; class ProvidesEventsForm extends Form { diff --git a/src/ZfcUser/Form/Register.php b/src/ZfcUser/Form/Register.php index 9da9e4e691bb9de6264b9a25f3342d80821531b4..e32656e9700983bc62e72857d5aa2386adb1009c 100644 --- a/src/ZfcUser/Form/Register.php +++ b/src/ZfcUser/Form/Register.php @@ -2,7 +2,7 @@ namespace ZfcUser\Form; -use Zend\Form\Element\Captcha as Captcha; +use Laminas\Form\Element\Captcha as Captcha; use ZfcUser\Options\RegistrationOptionsInterface; class Register extends Base @@ -27,7 +27,7 @@ class Register extends Base if ($this->getRegistrationOptions()->getUseRegistrationFormCaptcha()) { $this->add(array( 'name' => 'captcha', - 'type' => 'Zend\Form\Element\Captcha', + 'type' => 'Laminas\Form\Element\Captcha', 'options' => array( 'label' => 'Please type the following text', 'captcha' => $this->getRegistrationOptions()->getFormCaptchaOptions(), diff --git a/src/ZfcUser/InputFilter/ProvidesEventsInputFilter.php b/src/ZfcUser/InputFilter/ProvidesEventsInputFilter.php index a3f006667fd66947226b5357b220844a4ae40198..452ad906d8c252decb95a6b7db812b1320ebaa4c 100644 --- a/src/ZfcUser/InputFilter/ProvidesEventsInputFilter.php +++ b/src/ZfcUser/InputFilter/ProvidesEventsInputFilter.php @@ -1,8 +1,8 @@ <?php namespace ZfcUser\InputFilter; -use Zend\EventManager\EventManagerAwareTrait; -use Zend\InputFilter\InputFilter; +use Laminas\EventManager\EventManagerAwareTrait; +use Laminas\InputFilter\InputFilter; class ProvidesEventsInputFilter extends InputFilter { diff --git a/src/ZfcUser/Mapper/AbstractDbMapper.php b/src/ZfcUser/Mapper/AbstractDbMapper.php index 7ffd4158c0384c0a0e9b8830f74a407c0464f631..93ae72ccbaf8d95fc4db99d771eb476be810da2a 100644 --- a/src/ZfcUser/Mapper/AbstractDbMapper.php +++ b/src/ZfcUser/Mapper/AbstractDbMapper.php @@ -1,14 +1,14 @@ <?php namespace ZfcUser\Mapper; -use Zend\Db\Adapter\Adapter; -use Zend\Db\Adapter\Driver\ResultInterface; -use Zend\Db\ResultSet\HydratingResultSet; -use Zend\Db\Sql\Select; -use Zend\Db\Sql\Sql; -use Zend\Db\Sql\TableIdentifier; -use Zend\Hydrator\HydratorInterface; -use Zend\Hydrator\ClassMethods; +use Laminas\Db\Adapter\Adapter; +use Laminas\Db\Adapter\Driver\ResultInterface; +use Laminas\Db\ResultSet\HydratingResultSet; +use Laminas\Db\Sql\Select; +use Laminas\Db\Sql\Sql; +use Laminas\Db\Sql\TableIdentifier; +use Laminas\Hydrator\HydratorInterface; +use Laminas\Hydrator\ClassMethods; use ZfcUser\Entity\UserInterface as UserEntityInterface; use ZfcUser\EventManager\EventProvider; use ZfcUser\Db\Adapter\MasterSlaveAdapterInterface; diff --git a/src/ZfcUser/Mapper/User.php b/src/ZfcUser/Mapper/User.php index 8837a617fd747bb53347135fbe3d12de72b51a8d..9988f7d14c71a40d8153c95270161473b545151d 100644 --- a/src/ZfcUser/Mapper/User.php +++ b/src/ZfcUser/Mapper/User.php @@ -3,7 +3,7 @@ namespace ZfcUser\Mapper; use ZfcUser\Entity\UserInterface as UserEntityInterface; -use Zend\Hydrator\HydratorInterface; +use Laminas\Hydrator\HydratorInterface; class User extends AbstractDbMapper implements UserInterface { diff --git a/src/ZfcUser/Mapper/UserHydrator.php b/src/ZfcUser/Mapper/UserHydrator.php index d7e458128f015299cc899d13e5f30604cbb84134..6087e3acfb6819be1f35a4514725be352f02b0ae 100644 --- a/src/ZfcUser/Mapper/UserHydrator.php +++ b/src/ZfcUser/Mapper/UserHydrator.php @@ -2,7 +2,7 @@ namespace ZfcUser\Mapper; -use Zend\Hydrator\ClassMethods; +use Laminas\Hydrator\ClassMethods; use ZfcUser\Entity\UserInterface as UserEntityInterface; class UserHydrator extends ClassMethods diff --git a/src/ZfcUser/Options/ModuleOptions.php b/src/ZfcUser/Options/ModuleOptions.php index 698b6a77068f5ed0c626d1caa6559154216382b7..2ab81e09aeefa62c43c6354ef5eebb1df5af7057 100644 --- a/src/ZfcUser/Options/ModuleOptions.php +++ b/src/ZfcUser/Options/ModuleOptions.php @@ -2,7 +2,7 @@ namespace ZfcUser\Options; -use Zend\Stdlib\AbstractOptions; +use Laminas\Stdlib\AbstractOptions; class ModuleOptions extends AbstractOptions implements UserControllerOptionsInterface, diff --git a/src/ZfcUser/Service/User.php b/src/ZfcUser/Service/User.php index 649c4732f3a129f6c8316e752995a443660f4f1e..9759a7826d13b07effb13caf78982ec1f92c4255 100644 --- a/src/ZfcUser/Service/User.php +++ b/src/ZfcUser/Service/User.php @@ -3,11 +3,11 @@ namespace ZfcUser\Service; use Interop\Container\ContainerInterface; -use Zend\Authentication\AuthenticationService; -use Zend\Form\Form; -use Zend\ServiceManager\ServiceManager; -use Zend\Crypt\Password\Bcrypt; -use Zend\Hydrator; +use Laminas\Authentication\AuthenticationService; +use Laminas\Form\Form; +use Laminas\ServiceManager\ServiceManager; +use Laminas\Crypt\Password\Bcrypt; +use Laminas\Hydrator; use ZfcUser\EventManager\EventProvider; use ZfcUser\Mapper\UserInterface as UserMapperInterface; use ZfcUser\Options\UserServiceOptionsInterface; @@ -288,7 +288,7 @@ class User extends EventProvider /** * Return the Form Hydrator * - * @return \Zend\Hydrator\ClassMethods + * @return \Laminas\Hydrator\ClassMethods */ public function getFormHydrator() { diff --git a/src/ZfcUser/Validator/AbstractRecord.php b/src/ZfcUser/Validator/AbstractRecord.php index dfaa87082a86d6d784ddb6c443bc68692b88fb87..9c4f94e72edfa7ab1245dceff1a4d5b35d7fc44e 100644 --- a/src/ZfcUser/Validator/AbstractRecord.php +++ b/src/ZfcUser/Validator/AbstractRecord.php @@ -2,7 +2,7 @@ namespace ZfcUser\Validator; -use Zend\Validator\AbstractValidator; +use Laminas\Validator\AbstractValidator; use ZfcUser\Mapper\UserInterface; abstract class AbstractRecord extends AbstractValidator diff --git a/src/ZfcUser/View/Helper/ZfcUserDisplayName.php b/src/ZfcUser/View/Helper/ZfcUserDisplayName.php index 2757339781a9372bf285f6f9c41f3f5e1c4d6104..48fe157416279355c86765080c553930c2a34d81 100644 --- a/src/ZfcUser/View/Helper/ZfcUserDisplayName.php +++ b/src/ZfcUser/View/Helper/ZfcUserDisplayName.php @@ -2,8 +2,8 @@ namespace ZfcUser\View\Helper; -use Zend\View\Helper\AbstractHelper; -use Zend\Authentication\AuthenticationService; +use Laminas\View\Helper\AbstractHelper; +use Laminas\Authentication\AuthenticationService; use ZfcUser\Entity\UserInterface as User; class ZfcUserDisplayName extends AbstractHelper diff --git a/src/ZfcUser/View/Helper/ZfcUserIdentity.php b/src/ZfcUser/View/Helper/ZfcUserIdentity.php index c7a6164263306ca9853398272557dfba02bed91c..987356c33762be7f381b495886bd7b25c190589c 100644 --- a/src/ZfcUser/View/Helper/ZfcUserIdentity.php +++ b/src/ZfcUser/View/Helper/ZfcUserIdentity.php @@ -2,8 +2,8 @@ namespace ZfcUser\View\Helper; -use Zend\View\Helper\AbstractHelper; -use Zend\Authentication\AuthenticationService; +use Laminas\View\Helper\AbstractHelper; +use Laminas\Authentication\AuthenticationService; class ZfcUserIdentity extends AbstractHelper { diff --git a/src/ZfcUser/View/Helper/ZfcUserLoginWidget.php b/src/ZfcUser/View/Helper/ZfcUserLoginWidget.php index f191afd4f0279c97503d6666c8d83dffa0b36ac0..f2d1c1f0bbae404ce60f77500def80c0913ed31c 100644 --- a/src/ZfcUser/View/Helper/ZfcUserLoginWidget.php +++ b/src/ZfcUser/View/Helper/ZfcUserLoginWidget.php @@ -2,9 +2,9 @@ namespace ZfcUser\View\Helper; -use Zend\View\Helper\AbstractHelper; +use Laminas\View\Helper\AbstractHelper; use ZfcUser\Form\Login as LoginForm; -use Zend\View\Model\ViewModel; +use Laminas\View\Model\ViewModel; class ZfcUserLoginWidget extends AbstractHelper { diff --git a/tests/ZfcUserTest/Authentication/Adapter/AbstractAdapterTest.php b/tests/ZfcUserTest/Authentication/Adapter/AbstractAdapterTest.php index 4252e2e9b73efb8353e1285eb667f8c490b71c0c..47dddd7cd77bca951d1d2c45a157895a2ea19edb 100644 --- a/tests/ZfcUserTest/Authentication/Adapter/AbstractAdapterTest.php +++ b/tests/ZfcUserTest/Authentication/Adapter/AbstractAdapterTest.php @@ -23,7 +23,7 @@ class AbstractAdapterTest extends \PHPUnit_Framework_TestCase */ public function testGetStorageWithoutStorageSet() { - $this->assertInstanceOf('Zend\Authentication\Storage\Session', $this->adapter->getStorage()); + $this->assertInstanceOf('Laminas\Authentication\Storage\Session', $this->adapter->getStorage()); } /** @@ -32,11 +32,11 @@ class AbstractAdapterTest extends \PHPUnit_Framework_TestCase */ public function testSetGetStorage() { - $storage = new \Zend\Authentication\Storage\Session('ZfcUser'); + $storage = new \Laminas\Authentication\Storage\Session('ZfcUser'); $storage->write('zfcUser'); $this->adapter->setStorage($storage); - $this->assertInstanceOf('Zend\Authentication\Storage\Session', $this->adapter->getStorage()); + $this->assertInstanceOf('Laminas\Authentication\Storage\Session', $this->adapter->getStorage()); $this->assertSame('zfcUser', $this->adapter->getStorage()->read()); } diff --git a/tests/ZfcUserTest/Authentication/Adapter/AdapterChainEventTest.php b/tests/ZfcUserTest/Authentication/Adapter/AdapterChainEventTest.php index 95153032f45e6fd9180fd81defdd5c34464826a3..73c54e62d7f0f671afa21d5a0d736b9218e3dcf7 100644 --- a/tests/ZfcUserTest/Authentication/Adapter/AdapterChainEventTest.php +++ b/tests/ZfcUserTest/Authentication/Adapter/AdapterChainEventTest.php @@ -68,9 +68,9 @@ class AdapterChainEventTest extends \PHPUnit_Framework_TestCase public function testRequest() { - $request = $this->getMock('Zend\Stdlib\RequestInterface'); + $request = $this->getMock('Laminas\Stdlib\RequestInterface'); $this->event->setRequest($request); - $this->assertInstanceOf('Zend\Stdlib\RequestInterface', $this->event->getRequest()); + $this->assertInstanceOf('Laminas\Stdlib\RequestInterface', $this->event->getRequest()); } } diff --git a/tests/ZfcUserTest/Authentication/Adapter/AdapterChainServiceFactoryTest.php b/tests/ZfcUserTest/Authentication/Adapter/AdapterChainServiceFactoryTest.php index ec9d18546b00231dd6eb8d332cd93cd449a1d8e9..a7616cd3c2e7a1bb7c7335fe70e0a18059d59339 100644 --- a/tests/ZfcUserTest/Authentication/Adapter/AdapterChainServiceFactoryTest.php +++ b/tests/ZfcUserTest/Authentication/Adapter/AdapterChainServiceFactoryTest.php @@ -14,7 +14,7 @@ class AdapterChainServiceFactoryTest extends \PHPUnit_Framework_TestCase protected $factory; /** - * @var \Zend\ServiceManager\ServiceLocatorInterface + * @var \Laminas\ServiceManager\ServiceLocatorInterface */ protected $serviceLocator; @@ -24,7 +24,7 @@ class AdapterChainServiceFactoryTest extends \PHPUnit_Framework_TestCase protected $options; /** - * @var \Zend\EventManager\EventManagerInterface + * @var \Laminas\EventManager\EventManagerInterface */ protected $eventManager; @@ -41,7 +41,7 @@ class AdapterChainServiceFactoryTest extends \PHPUnit_Framework_TestCase */ protected function setUp() { - $this->serviceLocator = $this->getMock('Zend\ServiceManager\ServiceLocatorInterface'); + $this->serviceLocator = $this->getMock('Laminas\ServiceManager\ServiceLocatorInterface'); $this->options = $this->getMockBuilder('ZfcUser\Options\ModuleOptions') ->disableOriginalConstructor() @@ -55,7 +55,7 @@ class AdapterChainServiceFactoryTest extends \PHPUnit_Framework_TestCase ->method('get') ->will($this->returnCallback(array($this,'helperServiceLocator'))); - $this->eventManager = $this->getMock('Zend\EventManager\EventManager'); + $this->eventManager = $this->getMock('Laminas\EventManager\EventManager'); $this->factory = new AdapterChainServiceFactory(); } diff --git a/tests/ZfcUserTest/Authentication/Adapter/AdapterChainTest.php b/tests/ZfcUserTest/Authentication/Adapter/AdapterChainTest.php index 2530f6f91912c1f2ed7ac6727530b4a2fc9d7547..66bacbf87bcd928d3d16788f094705e8e1e226c2 100644 --- a/tests/ZfcUserTest/Authentication/Adapter/AdapterChainTest.php +++ b/tests/ZfcUserTest/Authentication/Adapter/AdapterChainTest.php @@ -2,12 +2,12 @@ namespace ZfcUserTest\Authentication\Adapter; -use Zend\EventManager\EventInterface; -use Zend\EventManager\EventManagerInterface; -use Zend\EventManager\SharedEventManagerInterface; +use Laminas\EventManager\EventInterface; +use Laminas\EventManager\EventManagerInterface; +use Laminas\EventManager\SharedEventManagerInterface; use ZfcUser\Authentication\Adapter\AdapterChain; use ZfcUser\Authentication\Adapter\AdapterChainEvent; -use Zend\Stdlib\RequestInterface; +use Laminas\Stdlib\RequestInterface; class AdapterChainTest extends \PHPUnit_Framework_TestCase { @@ -56,10 +56,10 @@ class AdapterChainTest extends \PHPUnit_Framework_TestCase $this->adapterChain = new AdapterChain(); - $this->sharedEventManager = $this->getMock('Zend\EventManager\SharedEventManagerInterface'); + $this->sharedEventManager = $this->getMock('Laminas\EventManager\SharedEventManagerInterface'); //$this->sharedEventManager->expects($this->any())->method('getListeners')->will($this->returnValue([])); - $this->eventManager = $this->getMock('Zend\EventManager\EventManagerInterface'); + $this->eventManager = $this->getMock('Laminas\EventManager\EventManagerInterface'); $this->eventManager->expects($this->any())->method('getSharedManager')->will($this->returnValue($this->sharedEventManager)); $this->eventManager->expects($this->any())->method('setIdentifiers'); @@ -90,7 +90,7 @@ class AdapterChainTest extends \PHPUnit_Framework_TestCase $this->adapterChain->setEvent($event); $result = $this->adapterChain->authenticate(); - $this->assertInstanceOf('Zend\Authentication\Result', $result); + $this->assertInstanceOf('Laminas\Authentication\Result', $result); $this->assertEquals($result->getIdentity(), 'identity'); $this->assertEquals($result->getMessages(), array()); } @@ -131,7 +131,7 @@ class AdapterChainTest extends \PHPUnit_Framework_TestCase */ protected function setUpPrepareForAuthentication() { - $this->request = $this->getMock('Zend\Stdlib\RequestInterface'); + $this->request = $this->getMock('Laminas\Stdlib\RequestInterface'); $this->event = $this->getMock('ZfcUser\Authentication\Adapter\AdapterChainEvent'); $this->event->expects($this->once())->method('setRequest')->with($this->request); @@ -139,9 +139,9 @@ class AdapterChainTest extends \PHPUnit_Framework_TestCase $this->eventManager->expects($this->at(0))->method('trigger')->with('authenticate.pre'); /** - * @var $response \Zend\EventManager\ResponseCollection + * @var $response \Laminas\EventManager\ResponseCollection */ - $responses = $this->getMock('Zend\EventManager\ResponseCollection'); + $responses = $this->getMock('Laminas\EventManager\ResponseCollection'); $this->eventManager->expects($this->at(1)) ->method('trigger') @@ -206,7 +206,7 @@ class AdapterChainTest extends \PHPUnit_Framework_TestCase $result->expects($this->once())->method('stopped')->will($this->returnValue(true)); - $lastResponse = $this->getMock('Zend\Stdlib\ResponseInterface'); + $lastResponse = $this->getMock('Laminas\Stdlib\ResponseInterface'); $result->expects($this->atLeastOnce())->method('last')->will($this->returnValue($lastResponse)); $this->assertEquals( @@ -283,7 +283,7 @@ class AdapterChainTest extends \PHPUnit_Framework_TestCase { $testParams = array('testParam' => 'testValue'); - $event = new \Zend\EventManager\Event; + $event = new \Laminas\EventManager\Event; $event->setParams($testParams); $this->adapterChain->setEvent($event); diff --git a/tests/ZfcUserTest/Authentication/Adapter/DbTest.php b/tests/ZfcUserTest/Authentication/Adapter/DbTest.php index 832bfea532d711da614d2345f4e6ee166a2640d2..345105c90f3708fbd118183182935ac7af8f33a0 100644 --- a/tests/ZfcUserTest/Authentication/Adapter/DbTest.php +++ b/tests/ZfcUserTest/Authentication/Adapter/DbTest.php @@ -2,7 +2,7 @@ namespace ZfcUserTest\Authentication\Adapter; -use Zend\EventManager\Event; +use Laminas\EventManager\Event; use ZfcUser\Authentication\Adapter\Db; class DbTest extends \PHPUnit_Framework_TestCase @@ -24,7 +24,7 @@ class DbTest extends \PHPUnit_Framework_TestCase /** * Mock of Storage. * - * @var \Zend\Authentication\Storage\Session|\PHPUnit_Framework_MockObject_MockObject + * @var \Laminas\Authentication\Storage\Session|\PHPUnit_Framework_MockObject_MockObject */ protected $storage; @@ -51,7 +51,7 @@ class DbTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $storage = $this->getMock('Zend\Authentication\Storage\Session'); + $storage = $this->getMock('Laminas\Authentication\Storage\Session'); $this->storage = $storage; $authEvent = $this->getMock('ZfcUser\Authentication\Adapter\AdapterChainEvent'); @@ -69,8 +69,8 @@ class DbTest extends \PHPUnit_Framework_TestCase $this->db = new Db; $this->db->setStorage($this->storage); - $sessionManager = $this->getMock('Zend\Session\SessionManager'); - \Zend\Session\AbstractContainer::setDefaultManager($sessionManager); + $sessionManager = $this->getMock('Laminas\Session\SessionManager'); + \Laminas\Session\AbstractContainer::setDefaultManager($sessionManager); } /** @@ -95,7 +95,7 @@ class DbTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($this->authEvent)); $this->authEvent->expects($this->once()) ->method('setCode') - ->with(\Zend\Authentication\Result::SUCCESS) + ->with(\Laminas\Authentication\Result::SUCCESS) ->will($this->returnValue($this->authEvent)); $this->authEvent->expects($this->once()) ->method('setMessages') @@ -128,7 +128,7 @@ class DbTest extends \PHPUnit_Framework_TestCase $this->authEvent->expects($this->once()) ->method('setCode') - ->with(\Zend\Authentication\Result::FAILURE_IDENTITY_NOT_FOUND) + ->with(\Laminas\Authentication\Result::FAILURE_IDENTITY_NOT_FOUND) ->will($this->returnValue($this->authEvent)); $this->authEvent->expects($this->once()) ->method('setMessages') @@ -161,7 +161,7 @@ class DbTest extends \PHPUnit_Framework_TestCase $this->authEvent->expects($this->once()) ->method('setCode') - ->with(\Zend\Authentication\Result::FAILURE_UNCATEGORIZED) + ->with(\Laminas\Authentication\Result::FAILURE_UNCATEGORIZED) ->will($this->returnValue($this->authEvent)); $this->authEvent->expects($this->once()) ->method('setMessages') @@ -201,7 +201,7 @@ class DbTest extends \PHPUnit_Framework_TestCase $this->authEvent->expects($this->once()) ->method('setCode') - ->with(\Zend\Authentication\Result::FAILURE_CREDENTIAL_INVALID) + ->with(\Laminas\Authentication\Result::FAILURE_CREDENTIAL_INVALID) ->will($this->returnValue($this->authEvent)); $this->authEvent->expects($this->once(1)) ->method('setMessages') @@ -250,7 +250,7 @@ class DbTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($this->authEvent)); $this->authEvent->expects($this->once()) ->method('setCode') - ->with(\Zend\Authentication\Result::SUCCESS) + ->with(\Laminas\Authentication\Result::SUCCESS) ->will($this->returnValue($this->authEvent)); $this->authEvent->expects($this->once()) ->method('setMessages') @@ -304,7 +304,7 @@ class DbTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($this->authEvent)); $this->authEvent->expects($this->once()) ->method('setCode') - ->with(\Zend\Authentication\Result::SUCCESS) + ->with(\Laminas\Authentication\Result::SUCCESS) ->will($this->returnValue($this->authEvent)); $this->authEvent->expects($this->once()) ->method('setMessages') @@ -328,7 +328,7 @@ class DbTest extends \PHPUnit_Framework_TestCase ->method('getPassword') ->will($this->returnValue('$2a$10$x05G2P803MrB3jaORBXBn.QHtiYzGQOBjQ7unpEIge.Mrz6c3KiVm')); - $bcrypt = $this->getMock('Zend\Crypt\Password\Bcrypt'); + $bcrypt = $this->getMock('Laminas\Crypt\Password\Bcrypt'); $bcrypt->expects($this->once()) ->method('getCost') ->will($this->returnValue('10')); @@ -356,7 +356,7 @@ class DbTest extends \PHPUnit_Framework_TestCase ->method('setPassword') ->with('$2a$10$D41KPuDCn6iGoESjnLee/uE/2Xo985sotVySo2HKDz6gAO4hO/Gh6'); - $bcrypt = $this->getMock('Zend\Crypt\Password\Bcrypt'); + $bcrypt = $this->getMock('Laminas\Crypt\Password\Bcrypt'); $bcrypt->expects($this->once()) ->method('getCost') ->will($this->returnValue('5')); @@ -419,13 +419,13 @@ class DbTest extends \PHPUnit_Framework_TestCase */ public function testSetGetServicemanager() { - $sm = $this->getMock('Zend\ServiceManager\ServiceManager'); + $sm = $this->getMock('Laminas\ServiceManager\ServiceManager'); $this->db->setServiceManager($sm); $serviceManager = $this->db->getServiceManager(); - $this->assertInstanceOf('Zend\ServiceManager\ServiceLocatorInterface', $serviceManager); + $this->assertInstanceOf('Laminas\ServiceManager\ServiceLocatorInterface', $serviceManager); $this->assertSame($sm, $serviceManager); } @@ -434,7 +434,7 @@ class DbTest extends \PHPUnit_Framework_TestCase */ public function testGetOptionsWithNoOptionsSet() { - $serviceMapper = $this->getMock('Zend\ServiceManager\ServiceManager'); + $serviceMapper = $this->getMock('Laminas\ServiceManager\ServiceManager'); $serviceMapper->expects($this->once()) ->method('get') ->with('zfcuser_module_options') @@ -468,7 +468,7 @@ class DbTest extends \PHPUnit_Framework_TestCase */ public function testGetMapperWithNoMapperSet() { - $serviceMapper = $this->getMock('Zend\ServiceManager\ServiceManager'); + $serviceMapper = $this->getMock('Laminas\ServiceManager\ServiceManager'); $serviceMapper->expects($this->once()) ->method('get') ->with('zfcuser_user_mapper') @@ -526,7 +526,7 @@ class DbTest extends \PHPUnit_Framework_TestCase ->method('read') ->will($this->returnValue(array('is_satisfied' => false))); - $post = $this->getMock('Zend\Stdlib\Parameters'); + $post = $this->getMock('Laminas\Stdlib\Parameters'); $post->expects($this->at(0)) ->method('get') ->with('identity') @@ -536,7 +536,7 @@ class DbTest extends \PHPUnit_Framework_TestCase ->with('credential') ->will($this->returnValue($credential)); - $request = $this->getMock('Zend\Http\Request'); + $request = $this->getMock('Laminas\Http\Request'); $request->expects($this->exactly(2)) ->method('getPost') ->will($this->returnValue($post)); diff --git a/tests/ZfcUserTest/Authentication/Adapter/TestAsset/AbstractAdapterExtension.php b/tests/ZfcUserTest/Authentication/Adapter/TestAsset/AbstractAdapterExtension.php index f7981cba7477c3ed4dbd13b69df1ad562531a36f..775e855f02dc861a0ff59fb35990aa4f8644c4a6 100644 --- a/tests/ZfcUserTest/Authentication/Adapter/TestAsset/AbstractAdapterExtension.php +++ b/tests/ZfcUserTest/Authentication/Adapter/TestAsset/AbstractAdapterExtension.php @@ -2,7 +2,7 @@ namespace ZfcUserTest\Authentication\Adapter\TestAsset; -use Zend\EventManager\EventInterface; +use Laminas\EventManager\EventInterface; use ZfcUser\Authentication\Adapter\AbstractAdapter; class AbstractAdapterExtension extends AbstractAdapter diff --git a/tests/ZfcUserTest/Authentication/Storage/DbTest.php b/tests/ZfcUserTest/Authentication/Storage/DbTest.php index f7a0ae8446929da871a6ada7834430c8fa1bc0f8..84c05a6c0ad5036fdfe95494e2e707e057abd264 100644 --- a/tests/ZfcUserTest/Authentication/Storage/DbTest.php +++ b/tests/ZfcUserTest/Authentication/Storage/DbTest.php @@ -32,7 +32,7 @@ class DbTest extends \PHPUnit_Framework_TestCase $db = new Db; $this->db = $db; - $this->storage = $this->getMock('Zend\Authentication\Storage\Session'); + $this->storage = $this->getMock('Laminas\Authentication\Storage\Session'); $this->mapper = $this->getMock('ZfcUser\Mapper\User'); } @@ -175,7 +175,7 @@ class DbTest extends \PHPUnit_Framework_TestCase */ public function testGetMapperWithNoMapperSet() { - $sm = $this->getMock('Zend\ServiceManager\ServiceManager'); + $sm = $this->getMock('Laminas\ServiceManager\ServiceManager'); $sm->expects($this->once()) ->method('get') ->with('zfcuser_user_mapper') @@ -207,11 +207,11 @@ class DbTest extends \PHPUnit_Framework_TestCase */ public function testSetGetServicemanager() { - $sm = $this->getMock('Zend\ServiceManager\ServiceManager'); + $sm = $this->getMock('Laminas\ServiceManager\ServiceManager'); $this->db->setServiceManager($sm); - $this->assertInstanceOf('Zend\ServiceManager\ServiceLocatorInterface', $this->db->getServiceManager()); + $this->assertInstanceOf('Laminas\ServiceManager\ServiceLocatorInterface', $this->db->getServiceManager()); $this->assertSame($sm, $this->db->getServiceManager()); } @@ -221,7 +221,7 @@ class DbTest extends \PHPUnit_Framework_TestCase */ public function testGetStorageWithoutStorageSet() { - $this->assertInstanceOf('Zend\Authentication\Storage\Session', $this->db->getStorage()); + $this->assertInstanceOf('Laminas\Authentication\Storage\Session', $this->db->getStorage()); } /** @@ -230,9 +230,9 @@ class DbTest extends \PHPUnit_Framework_TestCase */ public function testSetGetStorage() { - $storage = new \Zend\Authentication\Storage\Session('ZfcUserStorage'); + $storage = new \Laminas\Authentication\Storage\Session('ZfcUserStorage'); $this->db->setStorage($storage); - $this->assertInstanceOf('Zend\Authentication\Storage\Session', $this->db->getStorage()); + $this->assertInstanceOf('Laminas\Authentication\Storage\Session', $this->db->getStorage()); } } diff --git a/tests/ZfcUserTest/Controller/Plugin/ZfcUserAuthenticationTest.php b/tests/ZfcUserTest/Controller/Plugin/ZfcUserAuthenticationTest.php index e48ed4e0835c94338030e08503bc93becc20d72f..389e237cb11f923ef411cf7bfc63491f2f273160 100644 --- a/tests/ZfcUserTest/Controller/Plugin/ZfcUserAuthenticationTest.php +++ b/tests/ZfcUserTest/Controller/Plugin/ZfcUserAuthenticationTest.php @@ -3,8 +3,8 @@ namespace ZfcUserTest\Controller\Plugin; use ZfcUser\Controller\Plugin\ZfcUserAuthentication as Plugin; -use Zend\Authentication\AuthenticationService; -use Zend\Authentication\Adapter\AdapterInterface; +use Laminas\Authentication\AuthenticationService; +use Laminas\Authentication\Adapter\AdapterInterface; use ZfcUser\Authentication\Adapter\AdapterChain; class ZfcUserAuthenticationTest extends \PHPUnit_Framework_TestCase @@ -30,7 +30,7 @@ class ZfcUserAuthenticationTest extends \PHPUnit_Framework_TestCase public function setUp() { $this->SUT = new Plugin(); - $this->mockedAuthenticationService = $this->getMock('Zend\Authentication\AuthenticationService'); + $this->mockedAuthenticationService = $this->getMock('Laminas\Authentication\AuthenticationService'); $this->mockedAuthenticationAdapter = $this->getMockForAbstractClass('\ZfcUser\Authentication\Adapter\AdapterChain'); } @@ -78,12 +78,12 @@ class ZfcUserAuthenticationTest extends \PHPUnit_Framework_TestCase $adapter2 = new AdapterChain(); $this->SUT->setAuthAdapter($adapter1); - $this->assertInstanceOf('\Zend\Authentication\Adapter\AdapterInterface', $this->SUT->getAuthAdapter()); + $this->assertInstanceOf('\Laminas\Authentication\Adapter\AdapterInterface', $this->SUT->getAuthAdapter()); $this->assertSame($adapter1, $this->SUT->getAuthAdapter()); $this->SUT->setAuthAdapter($adapter2); - $this->assertInstanceOf('\Zend\Authentication\Adapter\AdapterInterface', $this->SUT->getAuthAdapter()); + $this->assertInstanceOf('\Laminas\Authentication\Adapter\AdapterInterface', $this->SUT->getAuthAdapter()); $this->assertNotSame($adapter1, $this->SUT->getAuthAdapter()); $this->assertSame($adapter2, $this->SUT->getAuthAdapter()); } @@ -98,12 +98,12 @@ class ZfcUserAuthenticationTest extends \PHPUnit_Framework_TestCase $service2 = new AuthenticationService(); $this->SUT->setAuthService($service1); - $this->assertInstanceOf('\Zend\Authentication\AuthenticationService', $this->SUT->getAuthService()); + $this->assertInstanceOf('\Laminas\Authentication\AuthenticationService', $this->SUT->getAuthService()); $this->assertSame($service1, $this->SUT->getAuthService()); $this->SUT->setAuthService($service2); - $this->assertInstanceOf('\Zend\Authentication\AuthenticationService', $this->SUT->getAuthService()); + $this->assertInstanceOf('\Laminas\Authentication\AuthenticationService', $this->SUT->getAuthService()); $this->assertNotSame($service1, $this->SUT->getAuthService()); $this->assertSame($service2, $this->SUT->getAuthService()); } diff --git a/tests/ZfcUserTest/Controller/RedirectCallbackTest.php b/tests/ZfcUserTest/Controller/RedirectCallbackTest.php index cf96ae88e21ca88ee2903acb71cd2df7dee9f27f..831e47895cc152d7d6509c9905e4098c6663a8ab 100644 --- a/tests/ZfcUserTest/Controller/RedirectCallbackTest.php +++ b/tests/ZfcUserTest/Controller/RedirectCallbackTest.php @@ -2,12 +2,12 @@ namespace ZfcUserTest\Controller; -use Zend\Http\PhpEnvironment\Request; -use Zend\Http\PhpEnvironment\Response; -use Zend\Mvc\Application; -use Zend\Mvc\MvcEvent; -use Zend\Router\RouteInterface; -use Zend\Router\RouteMatch; +use Laminas\Http\PhpEnvironment\Request; +use Laminas\Http\PhpEnvironment\Response; +use Laminas\Mvc\Application; +use Laminas\Mvc\MvcEvent; +use Laminas\Router\RouteInterface; +use Laminas\Router\RouteMatch; use ZfcUser\Controller\RedirectCallback; use ZfcUser\Options\ModuleOptions; @@ -40,7 +40,7 @@ class RedirectCallbackTest extends \PHPUnit_Framework_TestCase public function setUp() { - $this->router = $this->getMockBuilder('Zend\Router\RouteInterface') + $this->router = $this->getMockBuilder('Laminas\Router\RouteInterface') ->disableOriginalConstructor() ->getMock(); @@ -48,7 +48,7 @@ class RedirectCallbackTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); - $this->application = $this->getMockBuilder('Zend\Mvc\Application') + $this->application = $this->getMockBuilder('Laminas\Mvc\Application') ->disableOriginalConstructor() ->getMock(); $this->setUpApplication(); @@ -68,7 +68,7 @@ class RedirectCallbackTest extends \PHPUnit_Framework_TestCase ->method('getMatchedRouteName') ->will($this->returnValue('someRoute')); - $headers = $this->getMock('Zend\Http\Headers'); + $headers = $this->getMock('Laminas\Http\Headers'); $headers->expects($this->once()) ->method('addHeaderLine') ->with('Location', $url); @@ -146,11 +146,11 @@ class RedirectCallbackTest extends \PHPUnit_Framework_TestCase array('user', false, $this->returnValue('route'), false), array('user', false, $this->returnValue('route'), $this->returnValue(true)), array('user', 'user', $this->returnValue('route'), $this->returnValue(true)), - array('user', 'user', $this->throwException(new \Zend\Router\Exception\RuntimeException), $this->returnValue(true)), - array('user', 'user', $this->throwException(new \Zend\Router\Exception\RuntimeException), $this->throwException(new \Zend\Router\Exception\RuntimeException)), + array('user', 'user', $this->throwException(new \Laminas\Router\Exception\RuntimeException), $this->returnValue(true)), + array('user', 'user', $this->throwException(new \Laminas\Router\Exception\RuntimeException), $this->throwException(new \Laminas\Router\Exception\RuntimeException)), array(false, 'user', false, $this->returnValue(true)), - array(false, 'user', false, $this->throwException(new \Zend\Router\Exception\RuntimeException)), - array(false, 'user', false, $this->throwException(new \Zend\Router\Exception\RuntimeException)), + array(false, 'user', false, $this->throwException(new \Laminas\Router\Exception\RuntimeException)), + array(false, 'user', false, $this->throwException(new \Laminas\Router\Exception\RuntimeException)), ); } @@ -179,7 +179,7 @@ class RedirectCallbackTest extends \PHPUnit_Framework_TestCase $this->router->expects($this->once()) ->method('assemble') ->with(array(), array('name' => $route)) - ->will($this->throwException(new \Zend\Router\Exception\RuntimeException)); + ->will($this->throwException(new \Laminas\Router\Exception\RuntimeException)); $method = new \ReflectionMethod( 'ZfcUser\Controller\RedirectCallback', @@ -274,7 +274,7 @@ class RedirectCallbackTest extends \PHPUnit_Framework_TestCase $this->router->expects($this->at(0)) ->method('assemble') ->with(array(), array('name' => $redirect)) - ->will($this->throwException(new \Zend\Router\Exception\RuntimeException)); + ->will($this->throwException(new \Laminas\Router\Exception\RuntimeException)); $this->router->expects($this->at(1)) ->method('assemble') @@ -297,19 +297,19 @@ class RedirectCallbackTest extends \PHPUnit_Framework_TestCase private function setUpApplication() { - $this->request = $this->getMockBuilder('Zend\Http\PhpEnvironment\Request') + $this->request = $this->getMockBuilder('Laminas\Http\PhpEnvironment\Request') ->disableOriginalConstructor() ->getMock(); - $this->response = $this->getMockBuilder('Zend\Http\PhpEnvironment\Response') + $this->response = $this->getMockBuilder('Laminas\Http\PhpEnvironment\Response') ->disableOriginalConstructor() ->getMock(); - $this->routeMatch = $this->getMockBuilder('Zend\Router\RouteMatch') + $this->routeMatch = $this->getMockBuilder('Laminas\Router\RouteMatch') ->disableOriginalConstructor() ->getMock(); - $this->mvcEvent = $this->getMockBuilder('Zend\Mvc\MvcEvent') + $this->mvcEvent = $this->getMockBuilder('Laminas\Mvc\MvcEvent') ->disableOriginalConstructor() ->getMock(); $this->mvcEvent->expects($this->any()) diff --git a/tests/ZfcUserTest/Controller/UserControllerTest.php b/tests/ZfcUserTest/Controller/UserControllerTest.php index 57e66a45ff5dc0f7aaf3ca908589f33b4c183d23..6957ec4469714e047787ed549fa9e41739e0de54 100644 --- a/tests/ZfcUserTest/Controller/UserControllerTest.php +++ b/tests/ZfcUserTest/Controller/UserControllerTest.php @@ -2,14 +2,14 @@ namespace ZfcUserTest\Controller; -use Zend\Form\FormElementManager; +use Laminas\Form\FormElementManager; use ZfcUser\Controller\RedirectCallback; use ZfcUser\Controller\UserController as Controller; -use Zend\Http\Response; -use Zend\Stdlib\Parameters; -use Zend\ServiceManager\ServiceLocatorInterface; +use Laminas\Http\Response; +use Laminas\Stdlib\Parameters; +use Laminas\ServiceManager\ServiceLocatorInterface; use ZfcUser\Service\User as UserService; -use Zend\Form\Form; +use Laminas\Form\Form; use ZfcUser\Options\ModuleOptions; use ZfcUser\Entity\User as UserIdentity; @@ -44,7 +44,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $this->zfcUserAuthenticationPlugin = $this->getMock('ZfcUser\Controller\Plugin\ZfcUserAuthentication'); - $pluginManager = $this->getMockBuilder('Zend\Mvc\Controller\PluginManager') + $pluginManager = $this->getMockBuilder('Laminas\Mvc\Controller\PluginManager') ->disableOriginalConstructor() ->getMock(); @@ -117,7 +117,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($redirectRoute)); } - $redirect = $this->getMock('Zend\Mvc\Controller\Plugin\Redirect'); + $redirect = $this->getMock('Laminas\Mvc\Controller\Plugin\Redirect'); $redirect->expects($this->once()) ->method('toRoute') ->with($redirectRoute) @@ -127,7 +127,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $result = call_user_func(array($controller, $methodeName)); - $this->assertInstanceOf('Zend\Http\Response', $result); + $this->assertInstanceOf('Laminas\Http\Response', $result); $this->assertSame($response, $result); } @@ -143,7 +143,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $result = $controller->indexAction(); - $this->assertInstanceOf('Zend\View\Model\ViewModel', $result); + $this->assertInstanceOf('Laminas\View\Model\ViewModel', $result); } @@ -161,7 +161,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase )); $flashMessenger = $this->getMock( - 'Zend\Mvc\Plugin\FlashMessenger\FlashMessenger' + 'Laminas\Mvc\Plugin\FlashMessenger\FlashMessenger' ); $this->pluginManagerPlugins['flashMessenger']= $flashMessenger; @@ -175,7 +175,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase ->will($this->returnSelf()); $postArray = array('some', 'data'); - $request = $this->getMock('Zend\Http\Request'); + $request = $this->getMock('Laminas\Http\Request'); $request->expects($this->any()) ->method('isPost') ->will($this->returnValue(true)); @@ -211,7 +211,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $adapter->expects($this->once()) ->method('resetAdapters'); - $service = $this->getMock('Zend\Authentication\AuthenticationService'); + $service = $this->getMock('Laminas\Authentication\AuthenticationService'); $service->expects($this->once()) ->method('clearIdentity'); @@ -226,7 +226,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $expectedResult = new \stdClass(); - $forwardPlugin = $this->getMockBuilder('Zend\Mvc\Controller\Plugin\Forward') + $forwardPlugin = $this->getMockBuilder('Laminas\Mvc\Controller\Plugin\Forward') ->disableOriginalConstructor() ->getMock(); $forwardPlugin->expects($this->once()) @@ -242,7 +242,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $route_url = "/user/login"; - $redirect = $this->getMock('Zend\Mvc\Controller\Plugin\Redirect', array('toUrl')); + $redirect = $this->getMock('Laminas\Mvc\Controller\Plugin\Redirect', array('toUrl')); $redirect->expects($this->any()) ->method('toUrl') ->with($route_url . $redirectQuery) @@ -257,7 +257,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $response = new Response(); - $url = $this->getMock('Zend\Mvc\Controller\Plugin\Url', array('fromRoute')); + $url = $this->getMock('Laminas\Mvc\Controller\Plugin\Url', array('fromRoute')); $url->expects($this->once()) ->method('fromRoute') ->with($controller::ROUTE_LOGIN) @@ -274,7 +274,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase if ($isValid) { $this->assertSame($expectedResult, $result); } else { - $this->assertInstanceOf('Zend\Http\Response', $result); + $this->assertInstanceOf('Laminas\Http\Response', $result); $this->assertEquals($response, $result); $this->assertEquals($route_url . $redirectQuery, $result->getHeaders()->get('Location')->getFieldValue()); } @@ -290,11 +290,11 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase 'hasIdentity'=>false )); - $flashMessenger = $this->getMock('Zend\Mvc\Plugin\FlashMessenger\FlashMessenger'); + $flashMessenger = $this->getMock('Laminas\Mvc\Plugin\FlashMessenger\FlashMessenger'); $this->pluginManagerPlugins['flashMessenger'] = $flashMessenger; - $request = $this->getMock('Zend\Http\Request'); + $request = $this->getMock('Laminas\Http\Request'); $request->expects($this->once()) ->method('isPost') ->will($this->returnValue(false)); @@ -354,7 +354,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $adapter->expects($this->once()) ->method('logoutAdapters'); - $service = $this->getMock('Zend\Authentication\AuthenticationService'); + $service = $this->getMock('Laminas\Authentication\AuthenticationService'); $service->expects($this->once()) ->method('clearIdentity'); @@ -372,7 +372,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $result = $controller->logoutAction(); - $this->assertInstanceOf('Zend\Http\Response', $result); + $this->assertInstanceOf('Laminas\Http\Response', $result); $this->assertSame($response, $result); } @@ -391,7 +391,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $response = new Response(); $hasRedirect = !(is_null($query) && is_null($post)); - $params = $this->getMock('Zend\Mvc\Controller\Plugin\Params'); + $params = $this->getMock('Laminas\Mvc\Controller\Plugin\Params'); $params->expects($this->any()) ->method('__invoke') ->will($this->returnSelf()); @@ -408,7 +408,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $this->pluginManagerPlugins['params'] = $params; - $request = $this->getMock('Zend\Http\Request'); + $request = $this->getMock('Laminas\Http\Request'); $this->helperMakePropertyAccessable($controller, 'request', $request); @@ -418,7 +418,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase ->with($request) ->will($this->returnValue($prepareResult)); - $service = $this->getMock('Zend\Authentication\AuthenticationService'); + $service = $this->getMock('Laminas\Authentication\AuthenticationService'); $this->setUpZfcUserAuthenticationPlugin(array( @@ -428,7 +428,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase )); if (is_bool($prepareResult)) { - $authResult = $this->getMockBuilder('Zend\Authentication\Result') + $authResult = $this->getMockBuilder('Laminas\Authentication\Result') ->disableOriginalConstructor() ->getMock(); $authResult->expects($this->once()) @@ -440,12 +440,12 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase ->with($adapter) ->will($this->returnValue($authResult)); - $redirect = $this->getMock('Zend\Mvc\Controller\Plugin\Redirect'); + $redirect = $this->getMock('Laminas\Mvc\Controller\Plugin\Redirect'); $this->pluginManagerPlugins['redirect'] = $redirect; if (!$authValid) { $flashMessenger = $this->getMock( - 'Zend\Mvc\Plugin\FlashMessenger\FlashMessenger' + 'Laminas\Mvc\Plugin\FlashMessenger\FlashMessenger' ); $this->pluginManagerPlugins['flashMessenger']= $flashMessenger; @@ -468,7 +468,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase ->with('user/login' . $redirectQuery) ->will($this->returnValue($response)); - $url = $this->getMock('Zend\Mvc\Controller\Plugin\Url'); + $url = $this->getMock('Laminas\Mvc\Controller\Plugin\Url'); $url->expects($this->once()) ->method('fromRoute') ->with($controller::ROUTE_LOGIN) @@ -533,13 +533,13 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase ->method('getEnableRegistration') ->will($this->returnValue(true)); - $request = $this->getMock('Zend\Http\Request'); + $request = $this->getMock('Laminas\Http\Request'); $this->helperMakePropertyAccessable($controller, 'request', $request); $userService = $this->getMock('ZfcUser\Service\User'); $controller->setUserService($userService); - $form = $this->getMockBuilder('Zend\Form\Form') + $form = $this->getMockBuilder('Laminas\Form\Form') ->disableOriginalConstructor() ->getMock(); @@ -559,7 +559,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase } - $url = $this->getMock('Zend\Mvc\Controller\Plugin\Url'); + $url = $this->getMock('Laminas\Mvc\Controller\Plugin\Url'); $url->expects($this->at(0)) ->method('fromRoute') ->with($controller::ROUTE_REGISTER) @@ -567,7 +567,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $this->pluginManagerPlugins['url']= $url; - $prg = $this->getMock('Zend\Mvc\Plugin\Prg\PostRedirectGet'); + $prg = $this->getMock('Laminas\Mvc\Plugin\Prg\PostRedirectGet'); $this->pluginManagerPlugins['prg'] = $prg; $redirectQuery = $wantRedirect ? '?redirect=' . rawurlencode($redirectUrl) : ''; @@ -601,7 +601,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $expectedResult = new \stdClass(); - $forwardPlugin = $this->getMockBuilder('Zend\Mvc\Controller\Plugin\Forward') + $forwardPlugin = $this->getMockBuilder('Laminas\Mvc\Controller\Plugin\Forward') ->disableOriginalConstructor() ->getMock(); $forwardPlugin->expects($this->once()) @@ -620,7 +620,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $redirectQuery = $redirectUrl ? '?redirect='. rawurlencode($redirectUrl) : ''; - $redirect = $this->getMock('Zend\Mvc\Controller\Plugin\Redirect'); + $redirect = $this->getMock('Laminas\Mvc\Controller\Plugin\Redirect'); $redirect->expects($this->once()) ->method('toUrl') ->with($route_url . $redirectQuery) @@ -673,7 +673,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $this->assertArrayHasKey('redirect', $result); $this->assertEquals($expectedResult, $result); } else { - $this->assertInstanceOf('Zend\Http\Response', $result); + $this->assertInstanceOf('Laminas\Http\Response', $result); $this->assertSame($response, $result); } } @@ -692,7 +692,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase 'hasIdentity'=>true )); - $form = $this->getMockBuilder('Zend\Form\Form') + $form = $this->getMockBuilder('Laminas\Form\Form') ->disableOriginalConstructor() ->getMock(); @@ -701,7 +701,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $flashMessenger = $this->getMock( - 'Zend\Mvc\Plugin\FlashMessenger\FlashMessenger' + 'Laminas\Mvc\Plugin\FlashMessenger\FlashMessenger' ); $this->pluginManagerPlugins['flashMessenger']= $flashMessenger; @@ -715,7 +715,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($status ? array('test') : array())); - $prg = $this->getMock('Zend\Mvc\Plugin\Prg\PostRedirectGet'); + $prg = $this->getMock('Laminas\Mvc\Plugin\Prg\PostRedirectGet'); $this->pluginManagerPlugins['prg'] = $prg; @@ -754,7 +754,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase ->with(true); - $redirect = $this->getMock('Zend\Mvc\Controller\Plugin\Redirect'); + $redirect = $this->getMock('Laminas\Mvc\Controller\Plugin\Redirect'); $redirect->expects($this->once()) ->method('toRoute') ->with($controller::ROUTE_CHANGEPASSWD) @@ -770,7 +770,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $exceptedReturn = null; if ($postRedirectGetReturn instanceof Response) { - $this->assertInstanceOf('Zend\Http\Response', $result); + $this->assertInstanceOf('Laminas\Http\Response', $result); $this->assertSame($postRedirectGetReturn, $result); } else { if ($postRedirectGetReturn === false) { @@ -790,7 +790,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $this->assertArrayHasKey('changePasswordForm', $result); $this->assertEquals($exceptedReturn, $result); } else { - $this->assertInstanceOf('Zend\Http\Response', $result); + $this->assertInstanceOf('Laminas\Http\Response', $result); $this->assertSame($response, $result); } } @@ -806,7 +806,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $controller = $this->controller; $response = new Response(); $userService = $this->getMock('ZfcUser\Service\User'); - $authService = $this->getMock('Zend\Authentication\AuthenticationService'); + $authService = $this->getMock('Laminas\Authentication\AuthenticationService'); $identity = new UserIdentity(); $controller->setUserService($userService); @@ -815,7 +815,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase 'hasIdentity'=>true )); - $form = $this->getMockBuilder('Zend\Form\Form') + $form = $this->getMockBuilder('Laminas\Form\Form') ->disableOriginalConstructor() ->getMock(); @@ -831,12 +831,12 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $identity->setEmail('user@example.com'); - $requestParams = $this->getMock('Zend\Stdlib\Parameters'); + $requestParams = $this->getMock('Laminas\Stdlib\Parameters'); $requestParams->expects($this->once()) ->method('set') ->with('identity', $identity->getEmail()); - $request = $this->getMock('Zend\Http\Request'); + $request = $this->getMock('Laminas\Http\Request'); $request->expects($this->once()) ->method('getPost') ->will($this->returnValue($requestParams)); @@ -845,7 +845,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $flashMessenger = $this->getMock( - 'Zend\Mvc\Plugin\FlashMessenger\FlashMessenger' + 'Laminas\Mvc\Plugin\FlashMessenger\FlashMessenger' ); $this->pluginManagerPlugins['flashMessenger']= $flashMessenger; @@ -859,7 +859,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($status ? array('test') : array())); - $prg = $this->getMock('Zend\Mvc\Plugin\Prg\PostRedirectGet'); + $prg = $this->getMock('Laminas\Mvc\Plugin\Prg\PostRedirectGet'); $this->pluginManagerPlugins['prg'] = $prg; @@ -890,7 +890,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase ->with(true); - $redirect = $this->getMock('Zend\Mvc\Controller\Plugin\Redirect'); + $redirect = $this->getMock('Laminas\Mvc\Controller\Plugin\Redirect'); $redirect->expects($this->once()) ->method('toRoute') ->with($controller::ROUTE_CHANGEEMAIL) @@ -910,7 +910,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $exceptedReturn = null; if ($postRedirectGetReturn instanceof Response) { - $this->assertInstanceOf('Zend\Http\Response', $result); + $this->assertInstanceOf('Laminas\Http\Response', $result); $this->assertSame($postRedirectGetReturn, $result); } else { if ($postRedirectGetReturn === false) { @@ -931,7 +931,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $this->assertArrayHasKey('changeEmailForm', $result); $this->assertEquals($exceptedReturn, $result); } else { - $this->assertInstanceOf('Zend\Http\Response', $result); + $this->assertInstanceOf('Laminas\Http\Response', $result); $this->assertSame($response, $result); } } @@ -956,7 +956,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase } if ($useServiceLocator) { - $serviceLocator = $this->getMock('Zend\ServiceManager\ServiceLocatorInterface'); + $serviceLocator = $this->getMock('Laminas\ServiceManager\ServiceLocatorInterface'); $serviceLocator->expects($this->once()) ->method('get') ->with($serviceName) @@ -1035,7 +1035,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase $that = $this; $loginFormCallback[] = function ($that, $controller) { $flashMessenger = $that->getMock( - 'Zend\Mvc\Plugin\FlashMessenger\FlashMessenger' + 'Laminas\Mvc\Plugin\FlashMessenger\FlashMessenger' ); $that->pluginManagerPlugins['flashMessenger']= $flashMessenger; @@ -1046,7 +1046,7 @@ class UserControllerTest extends \PHPUnit_Framework_TestCase }; $loginFormCallback[] = function ($that, $controller) { $flashMessenger = $that->getMock( - 'Zend\Mvc\Plugin\FlashMessenger\FlashMessenger' + 'Laminas\Mvc\Plugin\FlashMessenger\FlashMessenger' ); $that->pluginManagerPlugins['flashMessenger']= $flashMessenger; diff --git a/tests/ZfcUserTest/Factory/Form/ChangeEmailFormFactoryTest.php b/tests/ZfcUserTest/Factory/Form/ChangeEmailFormFactoryTest.php index e76b8f40cddf669b2a3d7913f8a90b30c096f479..b7f4ca3f6b20157a84f782bf84f47143b34a3783 100644 --- a/tests/ZfcUserTest/Factory/Form/ChangeEmailFormFactoryTest.php +++ b/tests/ZfcUserTest/Factory/Form/ChangeEmailFormFactoryTest.php @@ -1,8 +1,8 @@ <?php namespace ZfcUserTest\Factory\Form; -use Zend\Form\FormElementManager; -use Zend\ServiceManager\ServiceManager; +use Laminas\Form\FormElementManager; +use Laminas\ServiceManager\ServiceManager; use ZfcUser\Factory\Form\ChangeEmail as ChangeEmailFactory; use ZfcUser\Options\ModuleOptions; use ZfcUser\Mapper\User as UserMapper; diff --git a/tests/ZfcUserTest/Factory/Form/ChangePasswordFormFactoryTest.php b/tests/ZfcUserTest/Factory/Form/ChangePasswordFormFactoryTest.php index f5fac59b461c99a75ac8496f5274e2f8dc070951..3329fd56ce29c3ea5b78e7d4417178666b356b71 100644 --- a/tests/ZfcUserTest/Factory/Form/ChangePasswordFormFactoryTest.php +++ b/tests/ZfcUserTest/Factory/Form/ChangePasswordFormFactoryTest.php @@ -1,8 +1,8 @@ <?php namespace ZfcUserTest\Factory\Form; -use Zend\Form\FormElementManager; -use Zend\ServiceManager\ServiceManager; +use Laminas\Form\FormElementManager; +use Laminas\ServiceManager\ServiceManager; use ZfcUser\Factory\Form\ChangePassword as ChangePasswordFactory; use ZfcUser\Options\ModuleOptions; use ZfcUser\Mapper\User as UserMapper; diff --git a/tests/ZfcUserTest/Factory/Form/LoginFormFactoryTest.php b/tests/ZfcUserTest/Factory/Form/LoginFormFactoryTest.php index 4617e5c5887c0a167116d3a31f689621803554a4..6755b0320d3d5c6aef097edf778cd1773af296f1 100644 --- a/tests/ZfcUserTest/Factory/Form/LoginFormFactoryTest.php +++ b/tests/ZfcUserTest/Factory/Form/LoginFormFactoryTest.php @@ -1,8 +1,8 @@ <?php namespace ZfcUserTest\Factory\Form; -use Zend\Form\FormElementManager; -use Zend\ServiceManager\ServiceManager; +use Laminas\Form\FormElementManager; +use Laminas\ServiceManager\ServiceManager; use ZfcUser\Factory\Form\Login as LoginFactory; use ZfcUser\Options\ModuleOptions; diff --git a/tests/ZfcUserTest/Factory/Form/RegisterFormFactoryTest.php b/tests/ZfcUserTest/Factory/Form/RegisterFormFactoryTest.php index 1dc67c3d5470c45069bbd98f3577ea1b1accd238..5a71b1439779ea47cb777b3d0501504c31d48f09 100644 --- a/tests/ZfcUserTest/Factory/Form/RegisterFormFactoryTest.php +++ b/tests/ZfcUserTest/Factory/Form/RegisterFormFactoryTest.php @@ -1,9 +1,9 @@ <?php namespace ZfcUserTest\Factory\Form; -use Zend\Form\FormElementManager; -use Zend\ServiceManager\ServiceManager; -use Zend\Hydrator\ClassMethods; +use Laminas\Form\FormElementManager; +use Laminas\ServiceManager\ServiceManager; +use Laminas\Hydrator\ClassMethods; use ZfcUser\Factory\Form\Register as RegisterFactory; use ZfcUser\Options\ModuleOptions; use ZfcUser\Mapper\User as UserMapper; diff --git a/tests/ZfcUserTest/Form/ChangeEmailFilterTest.php b/tests/ZfcUserTest/Form/ChangeEmailFilterTest.php index 3527c49087904e3428f1960ff79051a1aef541d7..259a50dc3b0aaa39d8e9f72743302b74d93511e2 100644 --- a/tests/ZfcUserTest/Form/ChangeEmailFilterTest.php +++ b/tests/ZfcUserTest/Form/ChangeEmailFilterTest.php @@ -23,7 +23,7 @@ class ChangeEmailFilterTest extends \PHPUnit_Framework_TestCase $validators = $inputs['identity']->getValidatorChain()->getValidators(); $this->assertArrayHasKey('instance', $validators[0]); - $this->assertInstanceOf('\Zend\Validator\EmailAddress', $validators[0]['instance']); + $this->assertInstanceOf('\Laminas\Validator\EmailAddress', $validators[0]['instance']); } /** @@ -52,7 +52,7 @@ class ChangeEmailFilterTest extends \PHPUnit_Framework_TestCase // test email as identity $validators = $identity->getValidatorChain()->getValidators(); $this->assertArrayHasKey('instance', $validators[0]); - $this->assertInstanceOf('\Zend\Validator\EmailAddress', $validators[0]['instance']); + $this->assertInstanceOf('\Laminas\Validator\EmailAddress', $validators[0]['instance']); } } diff --git a/tests/ZfcUserTest/Form/ChangePasswordFilterTest.php b/tests/ZfcUserTest/Form/ChangePasswordFilterTest.php index 5e4a1636012a7f0b8564efac0fd3b27e19771955..48f79887d34c12332dc684001c3e8315a6658c75 100644 --- a/tests/ZfcUserTest/Form/ChangePasswordFilterTest.php +++ b/tests/ZfcUserTest/Form/ChangePasswordFilterTest.php @@ -23,7 +23,7 @@ class ChangePasswordFilterTest extends \PHPUnit_Framework_TestCase $validators = $inputs['identity']->getValidatorChain()->getValidators(); $this->assertArrayHasKey('instance', $validators[0]); - $this->assertInstanceOf('\Zend\Validator\EmailAddress', $validators[0]['instance']); + $this->assertInstanceOf('\Laminas\Validator\EmailAddress', $validators[0]['instance']); } /** @@ -52,7 +52,7 @@ class ChangePasswordFilterTest extends \PHPUnit_Framework_TestCase // test email as identity $validators = $identity->getValidatorChain()->getValidators(); $this->assertArrayHasKey('instance', $validators[0]); - $this->assertInstanceOf('\Zend\Validator\EmailAddress', $validators[0]['instance']); + $this->assertInstanceOf('\Laminas\Validator\EmailAddress', $validators[0]['instance']); } } diff --git a/tests/ZfcUserTest/Form/LoginFilterTest.php b/tests/ZfcUserTest/Form/LoginFilterTest.php index afaf93044379687b26c8b12e56b174eaa05d0eba..2bce2e7cd362ec16cb1a7117af1f02544652f3e0 100644 --- a/tests/ZfcUserTest/Form/LoginFilterTest.php +++ b/tests/ZfcUserTest/Form/LoginFilterTest.php @@ -46,6 +46,6 @@ class LoginFilterTest extends \PHPUnit_Framework_TestCase // test email as identity $validators = $identity->getValidatorChain()->getValidators(); $this->assertArrayHasKey('instance', $validators[0]); - $this->assertInstanceOf('\Zend\Validator\EmailAddress', $validators[0]['instance']); + $this->assertInstanceOf('\Laminas\Validator\EmailAddress', $validators[0]['instance']); } } diff --git a/tests/ZfcUserTest/Form/RegisterTest.php b/tests/ZfcUserTest/Form/RegisterTest.php index 005920f8137de79bb7062b4e10fead5623a71c31..498282a8e291cc021f44d96734fe7539f4d723de 100644 --- a/tests/ZfcUserTest/Form/RegisterTest.php +++ b/tests/ZfcUserTest/Form/RegisterTest.php @@ -21,8 +21,8 @@ class RegisterTest extends \PHPUnit_Framework_TestCase $options->expects($this->any()) ->method('getUseRegistrationFormCaptcha') ->will($this->returnValue($useCaptcha)); - if ($useCaptcha && class_exists('\Zend\Captcha\AbstractAdapter')) { - $captcha = $this->getMockForAbstractClass('\Zend\Captcha\AbstractAdapter'); + if ($useCaptcha && class_exists('\Laminas\Captcha\AbstractAdapter')) { + $captcha = $this->getMockForAbstractClass('\Laminas\Captcha\AbstractAdapter'); $options->expects($this->once()) ->method('getFormCaptchaOptions') @@ -83,7 +83,7 @@ class RegisterTest extends \PHPUnit_Framework_TestCase ->method('getUseRegistrationFormCaptcha') ->will($this->returnValue(false)); - $captcha = $this->getMock('\Zend\Form\Element\Captcha'); + $captcha = $this->getMock('\Laminas\Form\Element\Captcha'); $form = new Form(null, $options); $form->setCaptchaElement($captcha); diff --git a/tests/ZfcUserTest/Mapper/UserTest.php b/tests/ZfcUserTest/Mapper/UserTest.php index 6b66c8546ce0a0375a8221b0e4ec97e646cb4df6..7ca4e37cc2131dc9896f151c5c317ae82584af07 100644 --- a/tests/ZfcUserTest/Mapper/UserTest.php +++ b/tests/ZfcUserTest/Mapper/UserTest.php @@ -4,8 +4,8 @@ namespace ZfcUserTest\Mapper; use ZfcUser\Mapper\User as Mapper; use ZfcUser\Entity\User as Entity; -use Zend\Db\ResultSet\HydratingResultSet; -use Zend\Db\Adapter\Adapter; +use Laminas\Db\ResultSet\HydratingResultSet; +use Laminas\Db\Adapter\Adapter; use ZfcUser\Mapper\UserHydrator; class UserTest extends \PHPUnit_Framework_TestCase @@ -13,25 +13,25 @@ class UserTest extends \PHPUnit_Framework_TestCase /** @var \ZfcUser\Mapper\User */ protected $mapper; - /** @var \Zend\Db\Adapter\Adapter */ + /** @var \Laminas\Db\Adapter\Adapter */ protected $mockedDbAdapter; - /** @var \Zend\Db\Adapter\Adapter */ + /** @var \Laminas\Db\Adapter\Adapter */ protected $realAdapter = array(); - /** @var \Zend\Db\Sql\Select */ + /** @var \Laminas\Db\Sql\Select */ protected $mockedSelect; - /** @var \Zend\Db\ResultSet\HydratingResultSet */ + /** @var \Laminas\Db\ResultSet\HydratingResultSet */ protected $mockedResultSet; - /** @var \Zend\Db\Sql\Sql */ + /** @var \Laminas\Db\Sql\Sql */ protected $mockedDbSql; - /** @var \Zend\Db\Adapter\Driver\DriverInterface */ + /** @var \Laminas\Db\Adapter\Driver\DriverInterface */ protected $mockedDbAdapterDriver; - /** @var \Zend\Db\Adapter\Platform\PlatformInterface */ + /** @var \Laminas\Db\Adapter\Platform\PlatformInterface */ protected $mockedDbAdapterPlatform; public function setUp() @@ -44,9 +44,9 @@ class UserTest extends \PHPUnit_Framework_TestCase $this->setUpMockedAdapter(); - $this->mockedSelect = $this->getMock('\Zend\Db\Sql\Select', array('where')); + $this->mockedSelect = $this->getMock('\Laminas\Db\Sql\Select', array('where')); - $this->mockedResultSet = $this->getMock('\Zend\Db\ResultSet\HydratingResultSet'); + $this->mockedResultSet = $this->getMock('\Laminas\Db\ResultSet\HydratingResultSet'); $this->setUpAdapter('mysql'); // $this->setUpAdapter('pgsql'); @@ -105,15 +105,15 @@ class UserTest extends \PHPUnit_Framework_TestCase */ public function setUpMockedAdapter() { - $this->mockedDbAdapterDriver = $this->getMock('Zend\Db\Adapter\Driver\DriverInterface'); - $this->mockedDbAdapterPlatform = $this->getMock('Zend\Db\Adapter\Platform\PlatformInterface', array()); - $this->mockedDbAdapterStatement= $this->getMock('Zend\Db\Adapter\Driver\StatementInterface', array()); + $this->mockedDbAdapterDriver = $this->getMock('Laminas\Db\Adapter\Driver\DriverInterface'); + $this->mockedDbAdapterPlatform = $this->getMock('Laminas\Db\Adapter\Platform\PlatformInterface', array()); + $this->mockedDbAdapterStatement= $this->getMock('Laminas\Db\Adapter\Driver\StatementInterface', array()); $this->mockedDbAdapterPlatform->expects($this->any()) ->method('getName') ->will($this->returnValue('null')); - $this->mockedDbAdapter = $this->getMockBuilder('Zend\Db\Adapter\Adapter') + $this->mockedDbAdapter = $this->getMockBuilder('Laminas\Db\Adapter\Adapter') ->setConstructorArgs(array( $this->mockedDbAdapterDriver, $this->mockedDbAdapterPlatform @@ -124,7 +124,7 @@ class UserTest extends \PHPUnit_Framework_TestCase ->method('getPlatform') ->will($this->returnValue($this->mockedDbAdapterPlatform)); - $this->mockedDbSql = $this->getMockBuilder('Zend\Db\Sql\Sql') + $this->mockedDbSql = $this->getMockBuilder('Laminas\Db\Sql\Sql') ->setConstructorArgs(array($this->mockedDbAdapter)) ->setMethods(array('prepareStatementForSqlObject')) ->getMock(); @@ -132,7 +132,7 @@ class UserTest extends \PHPUnit_Framework_TestCase ->method('prepareStatementForSqlObject') ->will($this->returnValue($this->mockedDbAdapterStatement)); - $this->mockedDbSqlPlatform = $this->getMockBuilder('\Zend\Db\Sql\Platform\Platform') + $this->mockedDbSqlPlatform = $this->getMockBuilder('\Laminas\Db\Sql\Platform\Platform') ->setConstructorArgs(array($this->mockedDbAdapter)) ->getMock(); } diff --git a/tests/ZfcUserTest/Service/UserTest.php b/tests/ZfcUserTest/Service/UserTest.php index f671542dcec5b7a18cd9d599f1caef7c6e4b7bdb..1a0326644a0f5a76add18dc10d7d52e0380cc6ab 100644 --- a/tests/ZfcUserTest/Service/UserTest.php +++ b/tests/ZfcUserTest/Service/UserTest.php @@ -3,7 +3,7 @@ namespace ZfcUserTest\Service; use ZfcUser\Service\User as Service; -use Zend\Crypt\Password\Bcrypt; +use Laminas\Crypt\Password\Bcrypt; class UserTest extends \PHPUnit_Framework_TestCase { @@ -29,19 +29,19 @@ class UserTest extends \PHPUnit_Framework_TestCase $options = $this->getMock('ZfcUser\Options\ModuleOptions'); $this->options = $options; - $serviceManager = $this->getMock('Zend\ServiceManager\ServiceManager'); + $serviceManager = $this->getMock('Laminas\ServiceManager\ServiceManager'); $this->serviceManager = $serviceManager; - $eventManager = $this->getMock('Zend\EventManager\EventManager'); + $eventManager = $this->getMock('Laminas\EventManager\EventManager'); $this->eventManager = $eventManager; - $formHydrator = $this->getMock('Zend\Hydrator\HydratorInterface'); + $formHydrator = $this->getMock('Laminas\Hydrator\HydratorInterface'); $this->formHydrator = $formHydrator; $mapper = $this->getMock('ZfcUser\Mapper\UserInterface'); $this->mapper = $mapper; - $authService = $this->getMockBuilder('Zend\Authentication\AuthenticationService')->disableOriginalConstructor()->getMock(); + $authService = $this->getMockBuilder('Laminas\Authentication\AuthenticationService')->disableOriginalConstructor()->getMock(); $this->authService = $authService; $service->setOptions($options); @@ -458,7 +458,7 @@ class UserTest extends \PHPUnit_Framework_TestCase $service = new Service; $service->setServiceManager($this->serviceManager); - $this->assertInstanceOf('Zend\Authentication\AuthenticationService', $service->getAuthService()); + $this->assertInstanceOf('Laminas\Authentication\AuthenticationService', $service->getAuthService()); } /** @@ -576,7 +576,7 @@ class UserTest extends \PHPUnit_Framework_TestCase $service = new Service; $service->setServiceManager($this->serviceManager); - $this->assertInstanceOf('Zend\Hydrator\HydratorInterface', $service->getFormHydrator()); + $this->assertInstanceOf('Laminas\Hydrator\HydratorInterface', $service->getFormHydrator()); } /** diff --git a/tests/ZfcUserTest/View/Helper/ZfcUserDisplayNameTest.php b/tests/ZfcUserTest/View/Helper/ZfcUserDisplayNameTest.php index 5027ac0e8b7867e214b15488efffcc194f181f80..d4a590a0aa573110be5779e9f829313c9414dc06 100644 --- a/tests/ZfcUserTest/View/Helper/ZfcUserDisplayNameTest.php +++ b/tests/ZfcUserTest/View/Helper/ZfcUserDisplayNameTest.php @@ -17,7 +17,7 @@ class ZfcUserDisplayNameTest extends \PHPUnit_Framework_TestCase $helper = new ViewHelper; $this->helper = $helper; - $authService = $this->getMock('Zend\Authentication\AuthenticationService'); + $authService = $this->getMock('Laminas\Authentication\AuthenticationService'); $this->authService = $authService; $user = $this->getMock('ZfcUser\Entity\User'); diff --git a/tests/ZfcUserTest/View/Helper/ZfcUserIdentityTest.php b/tests/ZfcUserTest/View/Helper/ZfcUserIdentityTest.php index d8d95d307bb5303c957186ef18c8c9b8bb8fdaa8..59b5aaf88df9afb0ce3b48fd5614936bb1d59cd5 100644 --- a/tests/ZfcUserTest/View/Helper/ZfcUserIdentityTest.php +++ b/tests/ZfcUserTest/View/Helper/ZfcUserIdentityTest.php @@ -15,7 +15,7 @@ class ZfcUserIdentityTest extends \PHPUnit_Framework_TestCase $helper = new ViewHelper; $this->helper = $helper; - $authService = $this->getMock('Zend\Authentication\AuthenticationService'); + $authService = $this->getMock('Laminas\Authentication\AuthenticationService'); $this->authService = $authService; $helper->setAuthService($authService); diff --git a/tests/ZfcUserTest/View/Helper/ZfcUserLoginWidgetTest.php b/tests/ZfcUserTest/View/Helper/ZfcUserLoginWidgetTest.php index 58df9fda96ba7e6e092efed8619d43c4488ddafe..9bdafb889131103befd1735f11f6364f333958dd 100644 --- a/tests/ZfcUserTest/View/Helper/ZfcUserLoginWidgetTest.php +++ b/tests/ZfcUserTest/View/Helper/ZfcUserLoginWidgetTest.php @@ -3,7 +3,7 @@ namespace ZfcUserTest\View\Helper; use ZfcUser\View\Helper\ZfcUserLoginWidget as ViewHelper; -use Zend\View\Model\ViewModel; +use Laminas\View\Model\ViewModel; class ZfcUserLoginWidgetTest extends \PHPUnit_Framework_TestCase { @@ -15,7 +15,7 @@ class ZfcUserLoginWidgetTest extends \PHPUnit_Framework_TestCase { $this->helper = new ViewHelper; - $view = $this->getMock('Zend\View\Renderer\RendererInterface'); + $view = $this->getMock('Laminas\View\Renderer\RendererInterface'); $this->view = $view; $this->helper->setView($view); @@ -63,7 +63,7 @@ class ZfcUserLoginWidgetTest extends \PHPUnit_Framework_TestCase public function testInvokeWithRender($option, $expect) { /** - * @var $viewModel \Zend\View\Model\ViewModels + * @var $viewModel \Laminas\View\Model\ViewModels */ $viewModel = null; @@ -76,11 +76,11 @@ class ZfcUserLoginWidgetTest extends \PHPUnit_Framework_TestCase $result = $this->helper->__invoke($option); - $this->assertNotInstanceOf('Zend\View\Model\ViewModel', $result); + $this->assertNotInstanceOf('Laminas\View\Model\ViewModel', $result); $this->assertInternalType('string', $result); - $this->assertInstanceOf('Zend\View\Model\ViewModel', $viewModel); + $this->assertInstanceOf('Laminas\View\Model\ViewModel', $viewModel); foreach ($expect as $name => $value) { $this->assertEquals($value, $viewModel->getVariable($name, "testDefault")); } @@ -96,7 +96,7 @@ class ZfcUserLoginWidgetTest extends \PHPUnit_Framework_TestCase 'redirect' => 'zfcUser' )); - $this->assertInstanceOf('Zend\View\Model\ViewModel', $result); + $this->assertInstanceOf('Laminas\View\Model\ViewModel', $result); $this->assertEquals('zfcUser', $result->redirect); } diff --git a/view/zfc-user/user/_form.phtml b/view/zfc-user/user/_form.phtml index 2a33fbb5b6e775254de2c1775c358867274e9d47..5e0a882d54d18148766d6fa0f3ce897cbe957a28 100644 --- a/view/zfc-user/user/_form.phtml +++ b/view/zfc-user/user/_form.phtml @@ -1,7 +1,7 @@ <?php echo $this->form()->openTag($form) ?> <dl class="zend_form"> <?php foreach ($form as $element) : ?> - <?php if ($element->getLabel() != null && !$element instanceof Zend\Form\Element\Button) : ?> + <?php if ($element->getLabel() != null && !$element instanceof Laminas\Form\Element\Button) : ?> <dt><?php echo $this->formLabel($element) ?></dt> <?php endif ?> <dd><?php echo $this->formElement($element) . $this->formElementErrors($element) ?></dd>