summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIltar van der Berg <ivanderberg@hostnet.nl>2015-08-25 12:07:24 +0200
committerIltar van der Berg <ivanderberg@hostnet.nl>2015-08-27 12:12:18 +0200
commitfe5a1139cf33c1b7fc8966b99a2ccb0358e3b09f (patch)
treebab7d3ee36415cdc3bad46c329a8bd6588b84883
parent2f0fccfadbbdbceb79e792eb47973f85face4338 (diff)
downloadsymfony-security-fe5a1139cf33c1b7fc8966b99a2ccb0358e3b09f.zip
symfony-security-fe5a1139cf33c1b7fc8966b99a2ccb0358e3b09f.tar.gz
symfony-security-fe5a1139cf33c1b7fc8966b99a2ccb0358e3b09f.tar.bz2
Deprecated Security ClassUtils in favor of Acl ClassUtils
-rw-r--r--CHANGELOG.md2
-rw-r--r--Core/Tests/Util/ClassUtilsTest.php3
-rw-r--r--Core/Util/ClassUtils.php11
3 files changed, 14 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f202692..0728da9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,8 @@ CHANGELOG
`Symfony\Component\Security\Http\Authentication\SimplePreAuthenticatorInterface` instead
* deprecated `Symfony\Component\Security\Core\Authentication\SimpleFormAuthenticatorInterface`, use
`Symfony\Component\Security\Http\Authentication\SimpleFormAuthenticatorInterface` instead
+ * deprecated `Symfony\Component\Security\Core\Util\ClassUtils`, use
+ `Symfony\Component\Security\Acl\Util\ClassUtils` instead
2.7.0
-----
diff --git a/Core/Tests/Util/ClassUtilsTest.php b/Core/Tests/Util/ClassUtilsTest.php
index e8f0143..b048206 100644
--- a/Core/Tests/Util/ClassUtilsTest.php
+++ b/Core/Tests/Util/ClassUtilsTest.php
@@ -13,6 +13,9 @@ namespace Symfony\Component\Security\Core\Tests\Util
{
use Symfony\Component\Security\Core\Util\ClassUtils;
+ /**
+ * @group legacy
+ */
class ClassUtilsTest extends \PHPUnit_Framework_TestCase
{
public static function dataGetClass()
diff --git a/Core/Util/ClassUtils.php b/Core/Util/ClassUtils.php
index 6c87096..06186ef 100644
--- a/Core/Util/ClassUtils.php
+++ b/Core/Util/ClassUtils.php
@@ -11,13 +11,15 @@
namespace Symfony\Component\Security\Core\Util;
-use Doctrine\Common\Util\ClassUtils as DoctrineClassUtils;
+use Symfony\Component\Security\Acl\Util\ClassUtils as AclClassUtils;
+
+@trigger_error('The '.__NAMESPACE__.'\ClassUtils class is deprecated since version 2.8, to be removed in 3.0. Use Symfony\Component\Security\Acl\Util\ClassUtils instead.', E_USER_DEPRECATED);
/**
* Class related functionality for objects that
* might or might not be proxy objects at the moment.
*
- * @see DoctrineClassUtils
+ * @deprecated ClassUtils is deprecated since version 2.8, to be removed in 3.0. Use Acl ClassUtils instead.
*
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Johannes Schmitt <schmittjoh@gmail.com>
@@ -54,6 +56,11 @@ class ClassUtils
*/
public static function getRealClass($object)
{
+ if (class_exists('Symfony\Component\Security\Acl\Util\ClassUtils')) {
+ return AclClassUtils::getRealClass($object);
+ }
+
+ // fallback in case security-acl is not installed
$class = is_object($object) ? get_class($object) : $object;
if (false === $pos = strrpos($class, '\\'.self::MARKER.'\\')) {