承接 diegograssato/doctrine-data-fixture-module 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

diegograssato/doctrine-data-fixture-module

Composer 安装命令:

composer require diegograssato/doctrine-data-fixture-module

包简介

Zend Framework 2 Module that provides Doctrine Data-Fixture functionality

README 文档

README

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

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 --dev "diegograssato/doctrine-odm-datafixture": "2.0"

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

Registering Fixtures

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

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

or group configurator

'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:

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

The odm:fixture:load command loads data fixtures from your bundles:

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

You can also optionally specify the path to fixtures with the --fixtures option:

  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:

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

You can also optionally specify the group configuration:

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

You can also optionally list the fixtures:

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

统计信息

  • 总下载量: 41
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 70
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固