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 ...@@ -55,7 +55,7 @@ class Module implements
'zfcuser_zend_db_adapter' => \Laminas\Db\Adapter\Adapter::class, 'zfcuser_zend_db_adapter' => \Laminas\Db\Adapter\Adapter::class,
), ),
'invokables' => array( 'invokables' => array(
'zfcuser_register_form_hydrator' => \Laminas\Hydrator\ClassMethods::class, 'zfcuser_register_form_hydrator' => \Laminas\Hydrator\ClassMethodsHydrator::class,
), ),
'factories' => array( 'factories' => array(
'zfcuser_redirect_callback' => \ZfcUser\Factory\Controller\RedirectCallbackFactory::class, 'zfcuser_redirect_callback' => \ZfcUser\Factory\Controller\RedirectCallbackFactory::class,
......
...@@ -10,7 +10,7 @@ class UserHydrator implements FactoryInterface ...@@ -10,7 +10,7 @@ class UserHydrator implements FactoryInterface
{ {
public function __invoke(ContainerInterface $container, $requestedName, array $options = null) 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; ...@@ -8,7 +8,7 @@ use Laminas\Db\Sql\Select;
use Laminas\Db\Sql\Sql; use Laminas\Db\Sql\Sql;
use Laminas\Db\Sql\TableIdentifier; use Laminas\Db\Sql\TableIdentifier;
use Laminas\Hydrator\HydratorInterface; use Laminas\Hydrator\HydratorInterface;
use Laminas\Hydrator\ClassMethods; use Laminas\Hydrator\ClassMethodsHydrator;
use ZfcUser\Entity\UserInterface as UserEntityInterface; use ZfcUser\Entity\UserInterface as UserEntityInterface;
use ZfcUser\EventManager\EventProvider; use ZfcUser\EventManager\EventProvider;
use ZfcUser\Db\Adapter\MasterSlaveAdapterInterface; use ZfcUser\Db\Adapter\MasterSlaveAdapterInterface;
...@@ -79,7 +79,7 @@ abstract class AbstractDbMapper extends EventProvider ...@@ -79,7 +79,7 @@ abstract class AbstractDbMapper extends EventProvider
throw new \Exception('No db adapter present'); throw new \Exception('No db adapter present');
} }
if (!$this->hydrator instanceof HydratorInterface) { if (!$this->hydrator instanceof HydratorInterface) {
$this->hydrator = new ClassMethods; $this->hydrator = new ClassMethodsHydrator;
} }
if (!is_object($this->entityPrototype)) { if (!is_object($this->entityPrototype)) {
throw new \Exception('No entity prototype set'); throw new \Exception('No entity prototype set');
...@@ -242,7 +242,7 @@ abstract class AbstractDbMapper extends EventProvider ...@@ -242,7 +242,7 @@ abstract class AbstractDbMapper extends EventProvider
public function getHydrator() public function getHydrator()
{ {
if (!$this->hydrator) { if (!$this->hydrator) {
$this->hydrator = new ClassMethods(false); $this->hydrator = new ClassMethodsHydrator(false);
} }
return $this->hydrator; return $this->hydrator;
} }
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
namespace ZfcUser\Mapper; namespace ZfcUser\Mapper;
use Laminas\Hydrator\ClassMethods; use Laminas\Hydrator\ClassMethodsHydrator;
use ZfcUser\Entity\UserInterface as UserEntityInterface; use ZfcUser\Entity\UserInterface as UserEntityInterface;
class UserHydrator extends ClassMethods class UserHydrator extends ClassMethodsHydrator
{ {
/** /**
* Extract values from an object * Extract values from an object
......
...@@ -51,7 +51,7 @@ class User extends EventProvider ...@@ -51,7 +51,7 @@ class User extends EventProvider
protected $options; protected $options;
/** /**
* @var Hydrator\ClassMethods * @var Hydrator\ClassMethodsHydrator
*/ */
protected $formHydrator; protected $formHydrator;
...@@ -288,7 +288,7 @@ class User extends EventProvider ...@@ -288,7 +288,7 @@ class User extends EventProvider
/** /**
* Return the Form Hydrator * Return the Form Hydrator
* *
* @return \Laminas\Hydrator\ClassMethods * @return \Laminas\Hydrator\ClassMethodsHydrator
*/ */
public function getFormHydrator() public function getFormHydrator()
{ {
......
...@@ -3,7 +3,7 @@ namespace ZfcUserTest\Factory\Form; ...@@ -3,7 +3,7 @@ namespace ZfcUserTest\Factory\Form;
use Laminas\Form\FormElementManager; use Laminas\Form\FormElementManager;
use Laminas\ServiceManager\ServiceManager; use Laminas\ServiceManager\ServiceManager;
use Laminas\Hydrator\ClassMethods; use Laminas\Hydrator\ClassMethodsHydrator;
use ZfcUser\Factory\Form\Register as RegisterFactory; use ZfcUser\Factory\Form\Register as RegisterFactory;
use ZfcUser\Options\ModuleOptions; use ZfcUser\Options\ModuleOptions;
use ZfcUser\Mapper\User as UserMapper; use ZfcUser\Mapper\User as UserMapper;
...@@ -15,7 +15,7 @@ class RegisterFormFactoryTest extends \PHPUnit_Framework_TestCase ...@@ -15,7 +15,7 @@ class RegisterFormFactoryTest extends \PHPUnit_Framework_TestCase
$serviceManager = new ServiceManager; $serviceManager = new ServiceManager;
$serviceManager->setService('zfcuser_module_options', new ModuleOptions); $serviceManager->setService('zfcuser_module_options', new ModuleOptions);
$serviceManager->setService('zfcuser_user_mapper', new UserMapper); $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); $formElementManager = new FormElementManager($serviceManager);
$serviceManager->setService('FormElementManager', $formElementManager); $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