定制 diegograssato/doctrine-odm-datafixture 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

diegograssato/doctrine-odm-datafixture

Composer 安装命令:

composer require diegograssato/doctrine-odm-datafixture

包简介

Module to generate fixture with Doctrine ODM

README 文档

README

Module to generate fixture with Doctrine ODM

Instalation

To install is quite simple, add the composer.json:

    "diegograssato/doctrine-odm-datafixture": "2.0"

Next step is to update the composer

  composer self-update
  composer install

Then add DoctrineMongoODMDatafixture to your config/application.config.php.

In module.config.php you should inform the folder where your fixtures, for example:

  'odm_fixtures' => [
     __DIR__.'/../src/Fixtures',
  ]

or group configurator

    'odm_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 odm:fixtures:load

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

  vendor/bin/doctrine-module odm: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 odm:fixture:load --fixture=/path/to/fixtures1 --fixture=/path/to/fixtures2 --append

You can also optionally specify the group configuration:

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

You can also optionally list the fixtures:

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

Finish!

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 4
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-11-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固