it-blaster/fixtures-bundle
最新稳定版本:v1.0.0
Composer 安装命令:
composer require it-blaster/fixtures-bundle
包简介
Symfony2 bundle for propel fixtures
关键字:
README 文档
README
Symfony2 bundle for propel fixtures.
Т.к. обычный таск propel:fixtures:load выдаёт ошибку Attempted to call method "getPeerClassname" on class "Propel\Runtime\Map\TableMap"., чтобы его поправить пришлось переопределить таск и файлы папки DataFixtures/Loader.
Всё это вынесено в отдельный бандл FixturesBundle.
Installation
Добавьте ItBlasterFixturesBundle в composer.json:
{ "require": { "it-blaster/fixtures-bundle": "dev-master" }, }
Теперь запустите композер, чтобы скачать бандл командой:
$ php composer.phar update it-blaster/fixtures-bundle
Композер установит бандл в папку проекта vendor/it-blaster/fixtures-bundle.
Далее подключите бандл в ядре AppKernel.php:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new ItBlaster\FixturesBundle\ItBlasterFixturesBundle(), ); }
Dump - Создание фикстур
Таск создания fixtures запускается командой php app/console it-blaster:fixtures:dump. Файл с фикстурами будет создан в app/propel/fixtures.
Load - Загрузка из фикстур в базу
Таск загрузки fixtures запускается командой php app/console it-blaster:fixtures:load @AppMainBundle, где @AppMainBundle имя бандла, где у вас лежат файлы-fixtures. По умолчанию файлы-fixtures будут браться из папки app/propel/fixtures.
Credits
It-Blaster it-blaster@yandex.ru
统计信息
- 总下载量: 180
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-03-10