Commit 2a4c696a authored by Laurent Lécluse's avatar Laurent Lécluse
Browse files

Correction de bugs liés à la migration Laminas :

ClassMathods Deprecated : à remplacer par ClassMethodsHydrator

et DateStrategy à rendre compatobles avec sa parente
parent 3bae169c
Pipeline #11608 failed with stages
in 1 minute and 4 seconds
......@@ -34,7 +34,7 @@ class DateStrategy implements StrategyInterface
* @param object $object (optional) The original object for context.
* @return mixed Returns the value that should be extracted.
*/
public function extract($value)
public function extract($value, ?object $object = null)
{
return $value;
}
......@@ -46,7 +46,7 @@ class DateStrategy implements StrategyInterface
* @param array $data (optional) The original data for context.
* @return \DateTime Returns the value that should be hydrated.
*/
public function hydrate($value)
public function hydrate($value, ?array $data)
{
if ($value instanceof \DateTime) {
return $value;
......
......@@ -3,7 +3,7 @@
namespace UnicaenApp\Mouchard;
use UnicaenApp\ServiceManager\ServiceLocatorAwareTrait;
use Laminas\Hydrator\ClassMethods;
use Laminas\Hydrator\ClassMethodsHydrator;
/**
* Class MouchardService
......@@ -89,7 +89,7 @@ class MouchardService
public function createMouchardFromOptions($name, array $options)
{
$mouchard = $this->createMouchard($name);
$hydrator = new ClassMethods();
$hydrator = new ClassMethodsHydrator();
if (isset($options['listeners'])) {
foreach ($options['listeners'] as $lisalias => $lisconf) {
......
......@@ -3,6 +3,7 @@
namespace UnicaenApp\Mouchard;
use Interop\Container\ContainerInterface;
use Laminas\Hydrator\ClassMethodsHydrator;
use Laminas\ServiceManager\FactoryInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;
......@@ -27,7 +28,7 @@ class MouchardServiceFactory implements FactoryInterface
$config = $serviceLocator->get('config');
if (isset($config['unicaen-app']['mouchards'])) {
$hydrator = new ClassMethods();
$hydrator = new ClassMethodsHydrator();
$mouconf = $config['unicaen-app']['mouchard'];
......
......@@ -2,12 +2,12 @@
namespace UnicaenApp\View\Helper\TabAjax;
use Laminas\Hydrator\ClassMethods;
use Laminas\Hydrator\ClassMethodsHydrator;
class Tab
{
/**
* @var ClassMethods
* @var ClassMethodsHydrator
*/
private $hydrator;
......@@ -129,7 +129,7 @@ class Tab
private function getHydrator()
{
if (!$this->hydrator) {
$this->hydrator = new ClassMethods();
$this->hydrator = new ClassMethodsHydrator();
}
return $this->hydrator;
......
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