Commit 25104ec6 authored by Laurent Lécluse's avatar Laurent Lécluse
Browse files

ClassMathods Deprecated : remplacé par ClassMethodsHydrator

parent eab39735
Pipeline #11610 passed with stage
in 20 seconds
......@@ -55,7 +55,7 @@ class Module implements
'zfcuser_zend_db_adapter' => \Laminas\Db\Adapter\Adapter::class,
),
'invokables' => array(
'zfcuser_register_form_hydrator' => \Laminas\Hydrator\ClassMethods::class,
'zfcuser_register_form_hydrator' => \Laminas\Hydrator\ClassMethodsHydrator::class,
),
'factories' => array(
'zfcuser_redirect_callback' => \ZfcUser\Factory\Controller\RedirectCallbackFactory::class,
......
......@@ -10,7 +10,7 @@ class UserHydrator implements FactoryInterface
{
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
return new \Laminas\Hydrator\ClassMethods();
return new \Laminas\Hydrator\ClassMethodsHydrator();
}
......
......@@ -8,7 +8,7 @@ use Laminas\Db\Sql\Select;
use Laminas\Db\Sql\Sql;
use Laminas\Db\Sql\TableIdentifier;
use Laminas\Hydrator\HydratorInterface;
use Laminas\Hydrator\ClassMethods;
use Laminas\Hydrator\ClassMethodsHydrator;
use ZfcUser\Entity\UserInterface as UserEntityInterface;
use ZfcUser\EventManager\EventProvider;
use ZfcUser\Db\Adapter\MasterSlaveAdapterInterface;
......@@ -79,7 +79,7 @@ abstract class AbstractDbMapper extends EventProvider
throw new \Exception('No db adapter present');
}
if (!$this->hydrator instanceof HydratorInterface) {
$this->hydrator = new ClassMethods;
$this->hydrator = new ClassMethodsHydrator;
}
if (!is_object($this->entityPrototype)) {
throw new \Exception('No entity prototype set');
......@@ -242,7 +242,7 @@ abstract class AbstractDbMapper extends EventProvider
public function getHydrator()
{
if (!$this->hydrator) {
$this->hydrator = new ClassMethods(false);
$this->hydrator = new ClassMethodsHydrator(false);
}
return $this->hydrator;
}
......
......@@ -2,10 +2,10 @@
namespace ZfcUser\Mapper;
use Laminas\Hydrator\ClassMethods;
use Laminas\Hydrator\ClassMethodsHydrator;
use ZfcUser\Entity\UserInterface as UserEntityInterface;
class UserHydrator extends ClassMethods
class UserHydrator extends ClassMethodsHydrator
{
/**
* Extract values from an object
......
......@@ -51,7 +51,7 @@ class User extends EventProvider
protected $options;
/**
* @var Hydrator\ClassMethods
* @var Hydrator\ClassMethodsHydrator
*/
protected $formHydrator;
......@@ -288,7 +288,7 @@ class User extends EventProvider
/**
* Return the Form Hydrator
*
* @return \Laminas\Hydrator\ClassMethods
* @return \Laminas\Hydrator\ClassMethodsHydrator
*/
public function getFormHydrator()
{
......
......@@ -3,7 +3,7 @@ namespace ZfcUserTest\Factory\Form;
use Laminas\Form\FormElementManager;
use Laminas\ServiceManager\ServiceManager;
use Laminas\Hydrator\ClassMethods;
use Laminas\Hydrator\ClassMethodsHydrator;
use ZfcUser\Factory\Form\Register as RegisterFactory;
use ZfcUser\Options\ModuleOptions;
use ZfcUser\Mapper\User as UserMapper;
......@@ -15,7 +15,7 @@ class RegisterFormFactoryTest extends \PHPUnit_Framework_TestCase
$serviceManager = new ServiceManager;
$serviceManager->setService('zfcuser_module_options', new ModuleOptions);
$serviceManager->setService('zfcuser_user_mapper', new UserMapper);
$serviceManager->setService('zfcuser_register_form_hydrator', new ClassMethods());
$serviceManager->setService('zfcuser_register_form_hydrator', new ClassMethodsHydrator());
$formElementManager = new FormElementManager($serviceManager);
$serviceManager->setService('FormElementManager', $formElementManager);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment