我已将FOS BUndle和Fr3d Bundle与symfony2集成在一起。这是我遇到的错误
MappingException:找不到名为'Acme.UserBundle.Entity.User.php'的类'Acme \ UserBundle \ Entity \ User'的映射文件。
这是我的config.yml
fos_user:
db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
firewall_name: main
user_class: Acme\UserBundle\Entity\User
fr3d_ldap:
client:
user:
baseDn: cn=admin, dc=test, dc=local
filter: (&(ObjectClass=Person))
attributes: # Specify ldap attributes mapping [ldap attribute, user object method]
service:
user_manager: fos_user.user_manager # Overrides default user manager
ldap_manager: acme.ldap.ldap_manager # Overrides default ldap manager
请帮帮我
答案 0 :(得分:2)
在config.yml
,您需要更新user_class
下的fos_user
设置...
fos_user:
user_class: YourVendorName\UserBundle\Entity\User
确保user_class
属性指向用户捆绑中的有效实体(显然确保您拥有UserBundle
)