How to adapt modules ZfcUser/ zfcuserDoctrineORM in my project with doctrine 2 using annotations?

前端 未结 2 1208
隐瞒了意图╮
隐瞒了意图╮ 2021-02-06 12:40

I’m writing from Argentina, forgive my English little. I’m having some problems with modules ZfcUser and zfcuserDoctrineORM. I need to integrate them

2条回答
  •  半阙折子戏
    2021-02-06 12:53

    The solution from Ocramius worked for me with a few modifications (big thank you!),

    First, there seems to be a bug in the latest release of doctrine-module (I got an error saying 'when requiring zfcuser_doctrine_em, the service cannot be found' ), so I had to revert to 0.7 instead. I have attached my composer.json config below,

    "doctrine/dbal": "2.3.*",
    "doctrine/common": "2.3.*",
    "doctrine/doctrine-module": "0.7.*",
    "doctrine/doctrine-orm-module": "0.7.*",
    "doctrine/orm": "2.3.*",
    "zf-commons/zfc-user": "0.1.*",
    "zf-commons/zfc-user-doctrine-orm": "0.1.*",
    

    The next thing is, I had to keep my zfcuser.global.php with the following config option, 'user_entity_class' => 'Application\Entity\User', This is required if you want to override the default entity with your own one.

    Hope this helps.

提交回复
热议问题