X-Git-Url: https://git.rapsys.eu/userbundle/blobdiff_plain/bab59a4b88a081a7a27a53b4559d74e63b68db92..d5e370cc785ba90e35ad3c97896c62e863fd7b33:/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
 	 *