How to override SyliusCoreBundle Model User

会有一股神秘感。 提交于 2019-12-05 23:36:52
  1. It should be User.orm.xml, not user.orm.xml.
  2. You have to configure the class under sylius_core -> classes -> user -> model node.
  3. You should not inspire your bundle by Sylius bundles, and definitely not put in under "Sylius" namespace. Just create a very basic Symfony bundle and put your User entity under Entity namespace, Symfony won't see it under Model.

I would add that in order to use Sylius fixtures you have to configure the user resource too:

sylius_resource:
  resources:
    sylius.user:
      classes:
        model: MyBundle\UserBundle\Entity\User
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!