2016-06-15 45 views
1

我在項目中使用Symfony3以及Doctrine ORM。 現在我想和Hautelook/AliceBundle有一些不錯的裝置。Symfony3 Doctrine Hautelook /愛麗絲無法加載燈具

所以我安裝了捆綁包,註冊到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 

我得到的ErrorMessage:

[Symfony\Component\Debug\Exception\UndefinedMethodException]              
Attempted to call an undefined method named "addClass" of class "Doctrine\ORM\Internal\CommitOrderCalculator". 

我的作曲家。 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", 

我真的不知道這裏的問題是什麼,我希望任何人都可以幫助我找出或知道解決方案。 如果缺少任何信息,我會在後面添加。提前

+0

你在哪裏使用「CommitOrderCalculator」?你可以顯示該代碼嗎?這就是錯誤所說的;你正在調用「addClass」。 –

回答

1

THX我可以解決這個問題有以下改動我composer.json:

"doctrine/data-fixtures": "dev-topological-sorter as 1.1.x-dev" 

問題已鏈接在GitHub上,但它並沒有合併到呢。 你可以閱讀更多關於它在這裏:

https://github.com/doctrine/data-fixtures/pull/222/commits/987e5f35142ac4ac5dc60a16d1eb18293964bc25

我希望這將有助於具有相同問題的其他脂肪酶。

和thx阿爾文試圖幫助我。

+0

我認爲這應該被標記爲正確的答案 – BigPun86

相關問題