From 93cbdfdd620062b746666ea636f4712ff60df660 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 15 Jul 2012 14:58:33 +0200 Subject: [PATCH] Revert "merged branch stof/serializable_role (PR #4925)" This reverts commit b0750f6dcd1e6f8b1be2c1e6604d4cbb785c9a8e, reversing changes made to d09bfe7552148d1d36b65487dfcbd378830b55a0. --- src/Symfony/Component/Security/CHANGELOG.md | 1 - .../Component/Security/Core/Role/Role.php | 18 +----------------- .../Security/Core/Role/SwitchUserRole.php | 18 ------------------ 3 files changed, 1 insertion(+), 36 deletions(-) diff --git a/src/Symfony/Component/Security/CHANGELOG.md b/src/Symfony/Component/Security/CHANGELOG.md index 4175749bf3..0093677c85 100644 --- a/src/Symfony/Component/Security/CHANGELOG.md +++ b/src/Symfony/Component/Security/CHANGELOG.md @@ -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 diff --git a/src/Symfony/Component/Security/Core/Role/Role.php b/src/Symfony/Component/Security/Core/Role/Role.php index 7f16302b64..5b50981fe1 100644 --- a/src/Symfony/Component/Security/Core/Role/Role.php +++ b/src/Symfony/Component/Security/Core/Role/Role.php @@ -17,7 +17,7 @@ namespace Symfony\Component\Security\Core\Role; * * @author Fabien Potencier */ -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); - } } diff --git a/src/Symfony/Component/Security/Core/Role/SwitchUserRole.php b/src/Symfony/Component/Security/Core/Role/SwitchUserRole.php index 3076f34e51..c6795841be 100644 --- a/src/Symfony/Component/Security/Core/Role/SwitchUserRole.php +++ b/src/Symfony/Component/Security/Core/Role/SwitchUserRole.php @@ -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); - } }