Commit e699144c authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

laminas-migration migrate

parent 4c578763
Pipeline #10459 passed with stage
in 21 seconds
......@@ -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,
......
......@@ -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(
......
{
"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": {
......
......@@ -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',
),
),
);
......@@ -2,7 +2,7 @@
namespace ZfcUser\Authentication\Adapter;
use Zend\Authentication\Storage;
use Laminas\Authentication\Storage;
abstract class AbstractAdapter implements ChainableAdapter
{
......
......@@ -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
......
......@@ -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
{
......
......@@ -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;
......
......@@ -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
{
......
......@@ -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;
......
......@@ -2,7 +2,7 @@
namespace ZfcUser\Authentication\Adapter\Exception;
use Zend\Math\Exception\RuntimeException;
use Laminas\Math\Exception\RuntimeException;
class OptionsNotFoundException extends RuntimeException
{
......
......@@ -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()
......
......@@ -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
......
......@@ -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;
/**
......
......@@ -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;
......
<?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
{
......
......@@ -4,7 +4,7 @@ namespace ZfcUser\Db\Adapter;
interface MasterSlaveAdapterInterface
{
/**
* @return \Zend\Db\Adapter\Adapter
* @return \Laminas\Db\Adapter\Adapter
*/
public function getSlaveAdapter();
}
......@@ -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
{
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment