From 6e288752dac34bd3096f335ab8ea11a10993b58e Mon Sep 17 00:00:00 2001 From: Alexander Zamponi Date: Thu, 21 Jan 2021 13:25:08 +0100 Subject: [PATCH 1/2] Using the doctrine object hydrator instead of the class methods hydrator of LmcUser. --- composer.json | 2 +- src/Module.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b77ee0f..0914956 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ ], "require": { "php": ">=7.3", - "lm-commons/lmc-user": "~3.3", + "lm-commons/lmc-user": ">=3.3.3", "doctrine/doctrine-orm-module": "~3.0" }, "require-dev": { diff --git a/src/Module.php b/src/Module.php index 7ee03c2..7290e87 100644 --- a/src/Module.php +++ b/src/Module.php @@ -4,8 +4,10 @@ namespace LmcUserDoctrineORM; +use Doctrine\Laminas\Hydrator\DoctrineObject; use Doctrine\ORM\Mapping\Driver\XmlDriver; use Doctrine\ORM\EntityManager; +use DoctrineORMModule\Service\DoctrineObjectHydratorFactory; use LmcUserDoctrineORM\Mapper\User; /** @@ -37,12 +39,14 @@ public function getServiceConfig(): array return [ 'aliases' => [ 'lmcuser_doctrine_em' => EntityManager::class, + 'lmcuser_base_hydrator' => DoctrineObject::class ], 'factories' => [ 'lmcuser_module_options' => function ($sm) { $config = $sm->get('Configuration'); return new Options\ModuleOptions($config['lmcuser'] ?? []); }, + DoctrineObject::class => DoctrineObjectHydratorFactory::class, 'lmcuser_user_mapper' => function ($sm) { return new User( $sm->get('lmcuser_doctrine_em'), From b6572599ab5e2d8bbfc4ff1a6e9cc7b2439abba4 Mon Sep 17 00:00:00 2001 From: Alexander Zamponi Date: Thu, 21 Jan 2021 13:57:47 +0100 Subject: [PATCH 2/2] added changelog --- CHANGELOG.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0c081a..43943f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,24 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. +## 3.0.1 - 2021-01-21 + +### Added + +- Using DoctrineObject hydrator instead of ClassMethods hydrator. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Nothing. + ## 3.0.0 - 2020-11-19 ### Added