useallfive/ doctrine-data-fixtures-command
Doctrine DataFixtures CLI 命令
dev-master
2013-10-30 02:08 UTC
Requires
- doctrine/data-fixtures: ~1.0
- symfony/console: ~2.3
Suggests
- dflydev/doctrine-orm-service-provider: 1.0.*@dev
This package is not auto-updated.
Last update: 2024-09-24 01:30:55 UTC
README
这是一个不需要symfony的Symfony 2 Doctrine Data Fixtures命令版本。
安装
通过composer
php composer.phar require useallfive/doctrine-data-fixtures-command dev-master
如果您还没有自己的Doctrine CLI工具版本,可以复制 doctrine 提供的版本,并将其放置在您认为合适的位置。在这个例子中,我们将它放置在项目根目录。还值得一提的是,您可以使用composer post install/update 钩子来为您处理此事。
cp vendor/bin/doctrine.php doctrine
将命令添加到 CLI 脚本中的 $commands
数组中。
// ... $commands = array( new \UseAllFive\Command\LoadDataFixturesDoctrineCommand(), );
您已设置完毕!
注意
与symfony 2版本不同,您需要指定一个 fixtures 路径。
php doctrine fixtures:load /path/to/fixtures