You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During a recent update I started getting this error. If I revert back to "friendsofsymfony/user-bundle": "dev-master#2c3b05b52c96b91255afc6d0d03dd97b03d17c4d" things work as before.
Here is a quick outline of what I am doing.
I have my UserClass that looks like this
<?php
namespace UserBundle\Entity;
use FOS\UserBundle\Model\User as BaseUser;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use UserBundle\Entity\Role;
/**
* @ORM\Table(name="users")
* @ORM\Entity()
*/
class User extends BaseUser
{
/**
* @ORM\ManyToMany(targetEntity="UserBundle\Entity\Role")
* @ORM\JoinTable(name="users_roles_rel")
*/
protected $roles;
public function __construct()
{
parent::__construct();
$this->roles = new ArrayCollection();
}
}
So I am re-declaring the roles property, but I am extending it to be a many to many relationship. Should I be doing this in a new way to adhere to the recent changes to the bundle?