zendmaniacs / zf3-module-doctrinedatafixture
Zend Framework 3 Module that provides Doctrine Data-Fixture functionality
Requires
- doctrine/data-fixtures: ^1.0
- doctrine/doctrine-orm-module: ^1.0
- zendframework/zend-eventmanager: ^2.5 || ^3.0
- zendframework/zend-modulemanager: ^2.5
- zendframework/zend-servicemanager: ^2.5 || ^3.0
Requires (Dev)
This package is not auto-updated.
Last update: 2020-03-12 21:25:31 UTC
README
Introduction
The DoctrineDataFixtureModule module intends to integrate Doctrine 2 data-fixtures 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
Requirements
This module is designed to work with a typical ZF2 MVC application.
Installation
Installation of this module uses composer. For composer documentation, please refer to getcomposer.org.
$ php composer.phar require ise/zf2-module-doctrinedatafixture:*
Then open config/application.config.php
and add DoctrineModule
,
DoctrineORMModule
and DoctrineDataFixtureModule
to your modules
Registering Fixtures
To register fixtures with Doctrine module add the fixtures in your configuration.
<?php return array( 'doctrine' => array( 'fixtures' => array( 'ModuleName_fixture' => __DIR__ . '/../src/ModuleName/Fixture', ) ) );
Usage
Command Line
Access the Doctrine command line as following
##Import
./vendor/bin/doctrine-module data-fixture:import