“Class XXX is not a valid entity or mapped super class” after moving the class in the filesystem

前端 未结 12 1149
悲哀的现实
悲哀的现实 2020-12-01 08:51

I had an entity class in Aib\\PlatformBundle\\Entity\\User.php

I had no problems trying to create its form class through

php app/ console doc

12条回答
  •  一生所求
    2020-12-01 09:20

    I resolved the same exception by deleting a conflicting autogenerated orm.php file in the bundle's Resources/config/doctrine folder; according to the documentation: "A bundle can accept only one metadata definition format. For example, it's not possible to mix YAML metadata definitions with annotated PHP entity class definitions."

提交回复
热议问题