X-Git-Url: https://git.rapsys.eu/userbundle/blobdiff_plain/171c75768bcff78173c75d37b8a335ec687654b3..55beb067dbd20e192fb31ca0a5027d678bc4b233:/Entity/Group.php diff --git a/Entity/Group.php b/Entity/Group.php index c7000ea..dad79b0 100644 --- a/Entity/Group.php +++ b/Entity/Group.php @@ -3,7 +3,7 @@ // src/Rapsys/UserBundle/Entity/Group.php namespace Rapsys\UserBundle\Entity; -class Group extends \Symfony\Component\Security\Core\Role\Role { +class Group { /** * @var integer */ @@ -33,7 +33,7 @@ class Group extends \Symfony\Component\Security\Core\Role\Role { * Constructor * @param string $role The role name */ - public function __construct($role) { + public function __construct(string $role) { $this->role = (string) $role; $this->users = new \Doctrine\Common\Collections\ArrayCollection(); } @@ -60,6 +60,17 @@ class Group extends \Symfony\Component\Security\Core\Role\Role { return $this->role; } + /** + * Returns a string representation of the role. + * + * @xxx Replace the deprecated "extends \Symfony\Component\Security\Core\Role\Role" + * + * @return string + */ + public function __toString(): string { + return $this->role; + } + /** * Set created *