我在我的项目中使用 Symfony3 和 Doctrine ORM。现在我想用 Hautelook/AliceBundle 制作一些不错的固定装置。
所以我正在安装捆绑包,将其注册到 AppKernel 以及在配置中创建一个条目。
我添加了一个这样的 DataLoader:
use Hautelook\AliceBundle\Doctrine\DataFixtures\AbstractLoader;
class DataLoader extends AbstractLoader
{
/**
* {@inheritdoc}
*/
public function getFixtures()
{
return [
__DIR__.'/../ORM/user.yml',
];
}
}
现在,如果我尝试运行以下命令:
sf hautelook_alice:doctrine:fixtures:load
我收到错误消息:
[Symfony\Component\Debug\Exception\UndefinedMethodException]
Attempted to call an undefined method named "addClass" of class "Doctrine\ORM\Internal\CommitOrderCalculator".
我的 composer.json 包含:
"doctrine/orm" : "^2.5.4",
"doctrine/doctrine-bundle" : "^1.6",
"doctrine/data-fixtures" : "^1.1",
"hautelook/alice-bundle" : "^1.2",
"doctrine/doctrine-fixtures-bundle" : "^2.3",
我真的不知道这里的问题是什么,我希望任何人都可以帮助我找出或知道解决方案。如果缺少任何信息,我将添加它。
提前谢谢