From 9b3e86219506699bfefaee6e58a1a4ae4f58b483 Mon Sep 17 00:00:00 2001 From: Stijn Haulotte Date: Sun, 7 Dec 2014 14:57:16 +0100 Subject: [PATCH 1/5] Fix fatal error getEnableDefaultEntities #87 --- Module.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Module.php b/Module.php index e482640..2ea146f 100644 --- a/Module.php +++ b/Module.php @@ -12,8 +12,8 @@ public function onBootstrap($e) $sm = $app->getServiceManager(); $options = $sm->get('zfcuser_module_options'); - // Add the default entity driver only if specified in configuration - if ($options->getEnableDefaultEntities()) { + // Add the default entity driver only if function is available(zfcUser1) && specified in configuration + if (method_exists($options, "getEnableDefaultEntities") && $options->getEnableDefaultEntities()) { $chain = $sm->get('doctrine.driver.orm_default'); $chain->addDriver(new XmlDriver(__DIR__ . '/config/xml/zfcuserdoctrineorm'), 'ZfcUserDoctrineORM\Entity'); } From 2734267edcebe01834ce708611abcd14e690b8ab Mon Sep 17 00:00:00 2001 From: Stijn Haulotte Date: Sat, 24 Jan 2015 13:14:51 +0100 Subject: [PATCH 2/5] Undo invalid change --- Module.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Module.php b/Module.php index 2ea146f..e482640 100644 --- a/Module.php +++ b/Module.php @@ -12,8 +12,8 @@ public function onBootstrap($e) $sm = $app->getServiceManager(); $options = $sm->get('zfcuser_module_options'); - // Add the default entity driver only if function is available(zfcUser1) && specified in configuration - if (method_exists($options, "getEnableDefaultEntities") && $options->getEnableDefaultEntities()) { + // Add the default entity driver only if specified in configuration + if ($options->getEnableDefaultEntities()) { $chain = $sm->get('doctrine.driver.orm_default'); $chain->addDriver(new XmlDriver(__DIR__ . '/config/xml/zfcuserdoctrineorm'), 'ZfcUserDoctrineORM\Entity'); } From 2d2eea131b1272cc68ca37b438f6f78743dbdacc Mon Sep 17 00:00:00 2001 From: Stijn Haulotte Date: Sat, 24 Jan 2015 16:26:17 +0100 Subject: [PATCH 3/5] Fixed eroor on getEnableDefaultEntities --- Module.php | 2 +- config/module.config.php | 7 +++++++ .../Factory/ModuleOptionsFactory.php | 19 +++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 src/ZfcUserDoctrineORM/Factory/ModuleOptionsFactory.php diff --git a/Module.php b/Module.php index e482640..de4b3e6 100644 --- a/Module.php +++ b/Module.php @@ -10,7 +10,7 @@ public function onBootstrap($e) { $app = $e->getParam('application'); $sm = $app->getServiceManager(); - $options = $sm->get('zfcuser_module_options'); + $options = $sm->get('zfcuserdoctrine_module_options'); // Add the default entity driver only if specified in configuration if ($options->getEnableDefaultEntities()) { diff --git a/config/module.config.php b/config/module.config.php index d401bba..2737762 100644 --- a/config/module.config.php +++ b/config/module.config.php @@ -14,4 +14,11 @@ ) ) ), + + 'service_manager' => array( + 'invokables' => array(), + 'factories' => array( + 'zfcuserdoctrine_module_options' => 'ZfcUserDoctrineORM\Factory\ModuleOptionsFactory', + ), + ), ); diff --git a/src/ZfcUserDoctrineORM/Factory/ModuleOptionsFactory.php b/src/ZfcUserDoctrineORM/Factory/ModuleOptionsFactory.php new file mode 100644 index 0000000..34c2b56 --- /dev/null +++ b/src/ZfcUserDoctrineORM/Factory/ModuleOptionsFactory.php @@ -0,0 +1,19 @@ +get('Config'); + + return new ModuleOptions(isset($config['zfcuser']) ? $config['zfcuser'] : array()); + } +} From d7c86d0c71e204ed67001653f3df9bbeb17243de Mon Sep 17 00:00:00 2001 From: Stijn Haulotte Date: Tue, 9 Jun 2015 12:45:00 +0200 Subject: [PATCH 4/5] User_id to id --- config/xml/zfcuser/ZfcUser.Entity.User.dcm.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/xml/zfcuser/ZfcUser.Entity.User.dcm.xml b/config/xml/zfcuser/ZfcUser.Entity.User.dcm.xml index 197db37..1f2fd48 100644 --- a/config/xml/zfcuser/ZfcUser.Entity.User.dcm.xml +++ b/config/xml/zfcuser/ZfcUser.Entity.User.dcm.xml @@ -6,7 +6,7 @@ - + From 7c88985ececd25eacd5fba06b259feb6719b1ead Mon Sep 17 00:00:00 2001 From: Stijn Haulotte Date: Tue, 9 Jun 2015 21:45:01 +0200 Subject: [PATCH 5/5] resync --- Module.php | 2 +- config/module.config.php | 7 ------- .../Factory/ModuleOptionsFactory.php | 19 ------------------- 3 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 src/ZfcUserDoctrineORM/Factory/ModuleOptionsFactory.php diff --git a/Module.php b/Module.php index de4b3e6..e482640 100644 --- a/Module.php +++ b/Module.php @@ -10,7 +10,7 @@ public function onBootstrap($e) { $app = $e->getParam('application'); $sm = $app->getServiceManager(); - $options = $sm->get('zfcuserdoctrine_module_options'); + $options = $sm->get('zfcuser_module_options'); // Add the default entity driver only if specified in configuration if ($options->getEnableDefaultEntities()) { diff --git a/config/module.config.php b/config/module.config.php index 2737762..d401bba 100644 --- a/config/module.config.php +++ b/config/module.config.php @@ -14,11 +14,4 @@ ) ) ), - - 'service_manager' => array( - 'invokables' => array(), - 'factories' => array( - 'zfcuserdoctrine_module_options' => 'ZfcUserDoctrineORM\Factory\ModuleOptionsFactory', - ), - ), ); diff --git a/src/ZfcUserDoctrineORM/Factory/ModuleOptionsFactory.php b/src/ZfcUserDoctrineORM/Factory/ModuleOptionsFactory.php deleted file mode 100644 index 34c2b56..0000000 --- a/src/ZfcUserDoctrineORM/Factory/ModuleOptionsFactory.php +++ /dev/null @@ -1,19 +0,0 @@ -get('Config'); - - return new ModuleOptions(isset($config['zfcuser']) ? $config['zfcuser'] : array()); - } -}