Fosuserbundle: Namescpace FOS\UserBundle\Entity not found!

Created on 2 Apr 2018  路  3Comments  路  Source: FriendsOfSymfony/FOSUserBundle

Symfony FOSUserBundle versions: 2.1.2

Description of the problem including expected versus actual behavior:
As stated in 2.x documentation, one should extend:

use FOS\UserBundle\Entity\User as BaseUser;

class User extends BaseUser
{
}

But, there is no such a namespace FOS\UserBundle\Entity. I think it should be FOS\UserBundle\Model.

Most helpful comment

Thanks for your answer. As I stated, I have the FOSUser 2.1.2 (on Symfony 3.4.6).
Documentation wrongly says you should extend:

FOS\UserBundle\Entity\User

but I think, that should be changed to:

FOS\UserBundle\Model\User

All 3 comments

Hello @peyman-mohamadpour,

First of all are you sur that you have applied this command :

composer require friendsofsymfony/user-bundle "~1.3"
and enable the bunde in the kernel ?

Can you see the FOSUserbundle in your vendor ?

Thanks for your answer. As I stated, I have the FOSUser 2.1.2 (on Symfony 3.4.6).
Documentation wrongly says you should extend:

FOS\UserBundle\Entity\User

but I think, that should be changed to:

FOS\UserBundle\Model\User

^^

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sinner picture sinner  路  3Comments

mirbahar picture mirbahar  路  6Comments

DeveloperSlope3 picture DeveloperSlope3  路  5Comments

tinntsea picture tinntsea  路  5Comments

antoinemineau picture antoinemineau  路  5Comments