Revert "merged branch stof/serializable_role (PR #4925)"
This reverts commitb0750f6dcd
, reversing changes made tod09bfe7552
.
This commit is contained in:
parent
2644f1c2f5
commit
93cbdfdd62
@ -4,7 +4,6 @@ CHANGELOG
|
||||
2.1.0
|
||||
-----
|
||||
|
||||
* Added the Serializable interface on the Role class
|
||||
* [BC BREAK] The signature of ExceptionListener has changed
|
||||
* changed the HttpUtils constructor signature to take a UrlGenerator and a UrlMatcher instead of a Router
|
||||
* EncoderFactoryInterface::getEncoder() can now also take a class name as an argument
|
||||
|
@ -17,7 +17,7 @@ namespace Symfony\Component\Security\Core\Role;
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class Role implements RoleInterface, \Serializable
|
||||
class Role implements RoleInterface
|
||||
{
|
||||
private $role;
|
||||
|
||||
@ -38,20 +38,4 @@ class Role implements RoleInterface, \Serializable
|
||||
{
|
||||
return $this->role;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function serialize()
|
||||
{
|
||||
return serialize($this->role);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function unserialize($serialized)
|
||||
{
|
||||
$this->role = unserialize($serialized);
|
||||
}
|
||||
}
|
||||
|
@ -45,22 +45,4 @@ class SwitchUserRole extends Role
|
||||
{
|
||||
return $this->source;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function serialize()
|
||||
{
|
||||
return serialize(array(parent::serialize(), $this->source));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function unserialize($serialized)
|
||||
{
|
||||
list($parent, $this->source) = unserialize($serialized);
|
||||
|
||||
parent::unserialize($parent);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user