for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @Entity
* @Table(name="roles")
*/
class Role
{
* @Id
* @Column(type="integer")
* @GeneratedValue
protected $id;
* @Column(type="string", length=32)
protected $name;
* @ManyToMany(targetEntity="User", mappedBy="roles")
protected $users;
public function __construct()
$this->users = new ArrayCollection();
}
public function getName()
return $this->name;