2017 © Pedro Peláez
 

library doctrine-data-fixture-module

Zend Framework 2 Module that provides Doctrine Data-Fixture functionality

image

diegograssato/doctrine-data-fixture-module

Zend Framework 2 Module that provides Doctrine Data-Fixture functionality

  • Saturday, November 4, 2017
  • by diego.grassato
  • Repository
  • 1 Watchers
  • 0 Stars
  • 33 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 68 Forks
  • 0 Open issues
  • 13 Versions
  • 14 % Grown

The README.md

DoctrineDataFixture Module for Zend Framework 3

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:, (*1)

  • Doctrine ORM support
  • Multiple ORM entity managers
  • Multiple DBAL connections
  • Support reuse existing PDO connections in DBAL

Requirements

This module is designed to work with a typical ZF2 MVC application., (*2)

Installation

Installation of this module uses composer. For composer documentation, please refer to getcomposer.org., (*3)

$ php composer.phar require --dev "diegograssato/doctrine-odm-datafixture": "2.0"

Then open config/development.config.php and DoctrineDataFixtureModule to your modules, (*4)

Registering Fixtures

To register fixtures with Doctrine module add the fixtures in your configuration., (*5)


'orm_fixtures' => [ __DIR__.'/../MyModule/src/MyModule/Fixtures', ]

or group configurator, (*6)

'orm_fixtures' => [
    'groups' => [
        'default' => [
            __DIR__.'/../MyModule/src/MyModule/Fixtures/default',
        ],
        'production' => [
             __DIR__.'/../MyModule/src/MyModule/Fixtures/production',
        ]
    ]
]

To rotate the fixture use the terminal command:, (*7)

  vendor/bin/doctrine-odm-datafixture odm:fixtures:load

The odm:fixture:load command loads data fixtures from your bundles:, (*8)

  vendor/bin/doctrine-module orm:fixtures:load

You can also optionally specify the path to fixtures with the --fixtures option:, (*9)

  vendor/bin/doctrine-module orm:fixtures:load --fixture=/path/to/fixtures1 --fixture=/path/to/fixtures2

If you want to append the fixtures instead of flushing the database first you can use the --append option:, (*10)

  vendor/bin/doctrine-module orm:fixtures:load --fixture=/path/to/fixtures1 --fixture=/path/to/fixtures2 --append

You can also optionally specify the group configuration:, (*11)

  vendor/bin/doctrine-module orm:fixtures:load --group production

You can also optionally list the fixtures:, (*12)

  vendor/bin/doctrine-module orm:fixtures:list --group production

The Versions

13/09 2013
28/05 2013
16/01 2013

dev-zf2_release

dev-zf2_release http://www.doctrine-project.org/

Zend Framework 2 Module that provides Doctrine Data-Fixture functionality

  Sources   Download

MIT

The Requires

 

zf2 doctrine module data-fixture

15/01 2013

0.0.1

0.0.1.0 http://www.doctrine-project.org/

Zend Framework 2 Module that provides Doctrine Data-Fixture functionality

  Sources   Download

MIT

The Requires

 

zf2 doctrine module data-fixture

09/10 2012

dev-add_purge_option

dev-add_purge_option http://www.doctrine-project.org/

Zend Framework 2 Module that provides Doctrine Data-Fixture functionality

  Sources   Download

MIT

The Requires

 

zf2 doctrine module data-fixture

09/10 2012

dev-issue_1

dev-issue_1 http://www.doctrine-project.org/

Zend Framework 2 Module that provides Doctrine Data-Fixture functionality

  Sources   Download

MIT

The Requires

 

zf2 doctrine module data-fixture