The DoctrineDataFixtureModule module intends to integrate Doctrine 2 data-fixture with Zend Framework 2 quickly and easily. The following features are intended to work out of the box:
- Doctrine ORM support
- Multiple ORM entity managers
- Multiple DBAL connections
- Support reuse existing PDO connections in DBAL
Installation of this module uses composer. For composer documentation, please refer to getcomposer.org.
-
cd my/project/directory -
create a
composer.jsonfile with following contents (minimum stability is required since the module still has frequent updates):{ "minimum-stability": "dev", "require": { "hounddog/doctrine-data-fixture-module": "dev-master" } } -
run
php composer.phar install -
open
my/project/directory/config/application.config.phpand addDoctrineModule,DoctrineORMModuleandDoctrineDataFixtureModuleto yourmodules
To register drivers with Doctrine module simply add the drivers to the doctrine.driver key in your configuration.
<?php
return array(
'data-fixture' => array(
'ModuleName_fixture' => __DIR__ . '/../src/ModuleName/Fixture',
),
);Access the Doctrine command line as following
./vendor/bin/doctrine-module