Skip to content

Commit 2001174

Browse files
alex88weaverryan
authored andcommitted
Remove serialisation from the Group entity
1 parent bf7257a commit 2001174

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

cookbook/security/entity_provider.rst

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ that forces it to have a ``getRole()`` method::
481481
* @ORM\Table(name="acme_groups")
482482
* @ORM\Entity()
483483
*/
484-
class Group implements RoleInterface, \Serializable
484+
class Group implements RoleInterface
485485
{
486486
/**
487487
* @ORM\Column(name="id", type="integer")
@@ -519,30 +519,6 @@ that forces it to have a ``getRole()`` method::
519519
{
520520
return $this->role;
521521
}
522-
523-
/**
524-
* @see \Serializable::serialize()
525-
*/
526-
public function serialize()
527-
{
528-
return serialize(array(
529-
$this->id,
530-
$this->name,
531-
$this->role,
532-
));
533-
}
534-
535-
/**
536-
* @see \Serializable::unserialize()
537-
*/
538-
public function unserialize($serialized)
539-
{
540-
list(
541-
$this->id,
542-
$this->name,
543-
$this->role,
544-
) = unserialize($serialized);
545-
}
546522
}
547523

548524
To improve performances and avoid lazy loading of groups when retrieving a user

0 commit comments

Comments
 (0)