From 47f1322d6783aa4555fc0e889be1571b3b01a24e Mon Sep 17 00:00:00 2001 From: Herberts Cruz Date: Mon, 26 Sep 2016 19:07:42 -0300 Subject: [PATCH 1/4] I changed the key name compatible with documentation --- .gitignore | 3 ++- composer.json | 6 ++++- .../Service/FixtureFactory.php | 25 +++++++++++-------- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 0ee1ad3..48e2d13 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /build /vendor composer.lock -composer.phar \ No newline at end of file +composer.phar +.idea/ \ No newline at end of file diff --git a/composer.json b/composer.json index dc2e8d5..c39028f 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "hounddog/doctrine-data-fixture-module", + "name": "herbertscruz/doctrine-data-fixture-module", "description": "Zend Framework 2 Module that provides Doctrine Data-Fixture functionality", "type": "library", "license": "MIT", @@ -14,6 +14,10 @@ { "name": "Martin Shwalbe", "email": "martin.shwalbe@gmail.com" + }, + { + "name": "Herberts Cruz", + "email": "herbertscruz@gmail.com" } ], "require": { diff --git a/src/DoctrineDataFixtureModule/Service/FixtureFactory.php b/src/DoctrineDataFixtureModule/Service/FixtureFactory.php index 223ec56..edd3c85 100644 --- a/src/DoctrineDataFixtureModule/Service/FixtureFactory.php +++ b/src/DoctrineDataFixtureModule/Service/FixtureFactory.php @@ -35,27 +35,32 @@ class FixtureFactory implements FactoryInterface public function createService(ServiceLocatorInterface $sl) { /** @var $options \DoctrineORMModule\Options\DBALConnection */ - $options = $this->getOptions($sl, 'fixtures'); - + $options = $this->getOptions($sl, 'fixture'); + return $options; } /** * Gets options from configuration based on name. * - * @param ServiceLocatorInterface $sl - * @param string $key - * @param null|string $name + * @param ServiceLocatorInterface $sl + * @param string $key * @return \Zend\Stdlib\AbstractOptions - * @throws \RuntimeException + * @internal param null|string $name */ public function getOptions(ServiceLocatorInterface $sl, $key) { - $options = $sl->get('config'); - if (!isset($options['doctrine']['fixture'])) { + $options = $sl->get('Configuration'); + + if (!isset($options['doctrine'][$key])) { return array(); } - - return $options['doctrine']['fixture']; + + return $options['doctrine'][$key]; + } + + public function getOptionsClass() + { + return 'DoctrineDataFixtureModule\Options\Fixture'; } } From 12a6fb4027768cb9d9a14184a8593c5995a99850 Mon Sep 17 00:00:00 2001 From: Herberts Cruz Date: Mon, 26 Sep 2016 19:49:12 -0300 Subject: [PATCH 2/4] Set the file composer.json --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c39028f..9aaad50 100644 --- a/composer.json +++ b/composer.json @@ -37,5 +37,6 @@ "psr-0": { "DoctrineDataFixtureModule": "src/" } - } + }, + "minimum-stability": "dev" } From 3446fd63e8e7aae479b18cae6b710926d4751eb2 Mon Sep 17 00:00:00 2001 From: Herberts Cruz Date: Mon, 26 Sep 2016 20:05:07 -0300 Subject: [PATCH 3/4] Set the file composer.json and ajusts README.md --- README.md | 2 +- composer.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0657de7..485546e 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Installation of this module uses composer. For composer documentation, please re [getcomposer.org](http://getcomposer.org/). ```sh -$ php composer.phar require hounddog/doctrine-data-fixture-module:0.0.* +$ php composer.phar require herbertscruz/doctrine-data-fixture-module:0.0.* ``` Then open `config/application.config.php` and add `DoctrineModule`, `DoctrineORMModule` and diff --git a/composer.json b/composer.json index 9aaad50..c39028f 100644 --- a/composer.json +++ b/composer.json @@ -37,6 +37,5 @@ "psr-0": { "DoctrineDataFixtureModule": "src/" } - }, - "minimum-stability": "dev" + } } From fedd43b1e177e8dd8a5ad47c93d367b6d7eb94eb Mon Sep 17 00:00:00 2001 From: Herberts Cruz Date: Mon, 26 Sep 2016 20:33:18 -0300 Subject: [PATCH 4/4] Ajusts in composer.json --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c39028f..9aaad50 100644 --- a/composer.json +++ b/composer.json @@ -37,5 +37,6 @@ "psr-0": { "DoctrineDataFixtureModule": "src/" } - } + }, + "minimum-stability": "dev" }