misterabdul/doctrine-data-fixture-module

Laminas Module that provides Doctrine Data-Fixture functionality

v1.0.0 2022-07-10 17:46 UTC

This package is auto-updated.

Last update: 2024-04-10 21:48:33 UTC


README

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

Introduction

The DoctrineDataFixtureModule module intends to integrate Doctrine 2 data-fixture with Laminas 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.

$ composer require misterabdul/doctrine-data-fixture-module

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