我拼命尝试将Doctrine灯具加载到我的数据库中。 当我所说的全球CLI加载功能,没有什么很糟糕的开头:无法加载Symfony2中的灯具“找不到任何灯具加载”
> purging database
> loading [1] namespace_of_my_first_fixture_file
> loading [2] namespace_of_my_second_fixture_file
...
但在这个过程中间,当它试图从以前装夹具重新使用的对象失败(错误指数):
[ErrorException]
Notice: Undefined index: my_object_index in /Users/Swop/project/vendor/doctrine/data-fixtures/lib/Doctrine/Common/DataFixtures/ReferenceRepository.php line 145
我看着数据库,没有插入任何表格。如果我尝试加载只有第一夹具(这似乎是根据上述糊被加载),我得到了一个错误:
[InvalidArgumentException]
Could not find any fixtures to load in:
- src/MyOrg/MyBundleBundle/DataFixtures/ORM/MyFirstFixtureFileData.php
顺便说一句,我只是运行在我的MacOS X(山Lion)与一个自编译的PHP 5.4实例。
Fixtures数据加载在我的Linux机器上工作得很好。