From ea1173607a89dd522d8d45c0fe137b1a095c05c7 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 2 Dec 2020 19:47:43 +0700 Subject: [PATCH 1/3] upgrade to zf3-mvc --- composer.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index dce9b88..962a2b3 100644 --- a/composer.json +++ b/composer.json @@ -19,14 +19,14 @@ } ], "require": { - "php": ">=5.3.3", - "zendframework/zend-db": "~2.1", - "zendframework/zend-eventmanager": "~2.1 || ~3.0", - "zendframework/zend-loader": "~2.1", - "zendframework/zend-modulemanager": "~2.1", - "zendframework/zend-mvc": "~2.1 || ~3.0", - "zendframework/zend-servicemanager": "~2.1 || ~3.0", - "zendframework/zend-stdlib": "~2.1 || ~3.0" + "php": ">=7.2", + "zendframework/zend-db": "^2.1", + "zendframework/zend-eventmanager": "^3.0", + "zendframework/zend-loader": "^2.1", + "zendframework/zend-modulemanager": "^2.1", + "zendframework/zend-mvc": "^3.0", + "zendframework/zend-servicemanager": "^3.0", + "zendframework/zend-stdlib": "^3.0" }, "autoload": { "psr-0": { From 0d77ab9499e849d9bc10609a02192e2dd3aff37f Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 23 Dec 2020 02:29:00 +0700 Subject: [PATCH 2/3] update to support zend-eventmanager v3 set identifier --- src/ZfcBase/Form/ProvidesEventsForm.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ZfcBase/Form/ProvidesEventsForm.php b/src/ZfcBase/Form/ProvidesEventsForm.php index 17514ca..e51aa81 100644 --- a/src/ZfcBase/Form/ProvidesEventsForm.php +++ b/src/ZfcBase/Form/ProvidesEventsForm.php @@ -48,7 +48,9 @@ public function getEventManager() } // silently ignore invalid eventIdentifier types } - $this->setEventManager(new EventManager($identifiers)); + $eventManager = new EventManager(); + $eventManager->setIdentifiers($identifiers); + $this->setEventManager($eventManager); } return $this->events; } From 90c969bfe78ebf292dfedab1adaaeda279dc6493 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 28 Jan 2021 01:58:34 +0700 Subject: [PATCH 3/3] use Laminas\Hydrator\ClassMethodsHydrator --- src/ZfcBase/Mapper/AbstractDbMapper.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ZfcBase/Mapper/AbstractDbMapper.php b/src/ZfcBase/Mapper/AbstractDbMapper.php index 2d50fa1..c53e08b 100644 --- a/src/ZfcBase/Mapper/AbstractDbMapper.php +++ b/src/ZfcBase/Mapper/AbstractDbMapper.php @@ -8,8 +8,8 @@ use Zend\Db\Sql\Select; use Zend\Db\Sql\Sql; use Zend\Db\Sql\TableIdentifier; -use Zend\Stdlib\Hydrator\HydratorInterface; -use Zend\Stdlib\Hydrator\ClassMethods; +use Laminas\Hydrator\HydratorInterface; +use Laminas\Hydrator\ClassMethodsHydrator; use ZfcBase\EventManager\EventProvider; use ZfcBase\Db\Adapter\MasterSlaveAdapterInterface; @@ -81,7 +81,7 @@ protected function initialize() } if (!$this->hydrator instanceof HydratorInterface) { - $this->hydrator = new ClassMethods; + $this->hydrator = new ClassMethodsHydrator; } if (!is_object($this->entityPrototype)) { @@ -257,7 +257,7 @@ public function setDbSlaveAdapter(Adapter $dbSlaveAdapter) public function getHydrator() { if (!$this->hydrator) { - $this->hydrator = new ClassMethods(false); + $this->hydrator = new ClassMethodsHydrator(false); } return $this->hydrator; }