aqilix/doctrine-data-fixture-module

Zend Framework 3 Module that provides Doctrine Data-Fixture functionality

0.05 2016-10-06 17:40 UTC

README

This is fork from Houndog/DoctrineDataFixtureModule. This repository crreated caused by the old repo still using old Doctrine version and old Zend Event Manager, Module Manager and Service Manager (Zend Framework 2).

Introduction

The DoctrineDataFixtureModule module intends to integrate Doctrine 2 data-fixture with Zend Framework 3 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

Installation of this module uses composer. For composer documentation, please refer to getcomposer.org.

$ php composer.phar require aqilix/doctrine-data-fixture-module:0.0.*

Then open config/modules.config.php and add DoctrineDataFixtureModule to your modules

Registering Fixtures

To register fixtures with Doctrine module add the fixtures in your configuration.

<?php
return [
      'data-fixture' => [
            'fixtures' => __DIR__ . '/../src/ModuleName/Fixture'
      ],
];

Usage

Command Line

Access the Doctrine command line as following

##Import

./vendor/bin/doctrine-module data-fixture:import