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!
diegograssato/doctrine-odm-datafixture 适用场景与选型建议
diegograssato/doctrine-odm-datafixture 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 63 次下载、GitHub Stars 达 3, 最近一次更新时间为 2016 年 11 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「zf2」 「module」 「Fixture」 「doctrine」 「zf3」 「zdeveloper」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 diegograssato/doctrine-odm-datafixture 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 diegograssato/doctrine-odm-datafixture 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 diegograssato/doctrine-odm-datafixture 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Behat redis context for testing
LosLog provides some log utility
Fixtures replacement with a straightforward definition syntax
Fixtures documentation generator
EdpModuleLayouts is very simple Laminas module for making module-specific layouts insanely easy.
Yii2 library to run fixtures the ActiveRecord Dao
统计信息
- 总下载量: 63
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-17