aqilix/doctrine-data-fixture-module

提供Doctrine Data-Fixture功能的Zend Framework 3模块

0.05 2016-10-06 17:40 UTC

README

这是一个从Houndog/DoctrineDataFixtureModule分支出来的版本。创建此仓库是因为旧仓库仍在使用旧的Doctrine版本和旧的Zend Event Manager、Module Manager和Service Manager(Zend Framework 2)。

简介

DoctrineDataFixtureModule模块旨在快速、轻松地将Doctrine 2数据-fixture与Zend Framework 3集成。以下特性将直接可用:

  • 支持Doctrine ORM
  • 多个ORM实体管理器
  • 多个DBAL连接
  • 支持在DBAL中重用现有的PDO连接

安装

此模块使用composer进行安装。有关composer文档,请参阅getcomposer.org

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

然后打开config/modules.config.php并将DoctrineDataFixtureModule添加到您的modules中。

注册 fixtures

要将 fixtures 注册到 Doctrine 模块中,请在您的配置中添加 fixtures。

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

用法

命令行

按照以下方式访问 Doctrine 命令行

##导入

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