symfony2:尝试使用hautelook / alicebundle加载灯具

时间:2013-12-16 18:41:33

标签: symfony doctrine-orm doctrine fixtures

我已经安装了这些软件包:

    "doctrine/doctrine-fixtures-bundle": "dev-master",
    "hautelook/alice-bundle": "dev-master"

我有这个装置:

// src/Sermovi/Bundle/ManagementBundle/DataFixtures/ORM/test.yml
Customer:
    user0:
        name: bob
    user1:
        name: alice

当我运行doctrine:fixtures:load时,我明白了:

  > purging database
  > loading Sermovi\Bundle\ManagementBundle\DataFixtures\ORM\TestLoader
PHP Fatal error:  Class 'Customer' not found in /home/tirengarfio/workspace/sermovi/vendor/nelmio/alice/src/Nelmio/Alice/Loader/Base.php on line 404

1 个答案:

答案 0 :(得分:3)

您应该使用Customer类的FQCN,例如

Sermovi\Bundle\ManagementBundle\Entity\Customer:
    user0:
        name: bob
    user1:
        name: alice