summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Grekas <nicolas.grekas@gmail.com>2015-09-03 21:29:24 +0200
committerNicolas Grekas <nicolas.grekas@gmail.com>2015-09-03 21:48:11 +0200
commit12610e011217e0913724983d5c5297624577d4d1 (patch)
treefef452b9f6ebb2ad054d08527d36be6a78a96c4f
parentcbeb4cecfc7efa6aae465a83b02e943545140fbf (diff)
downloadsymfony-security-12610e011217e0913724983d5c5297624577d4d1.zip
symfony-security-12610e011217e0913724983d5c5297624577d4d1.tar.gz
symfony-security-12610e011217e0913724983d5c5297624577d4d1.tar.bz2
[Security] Remove deprecated interfaces
-rw-r--r--CHANGELOG.md5
-rw-r--r--Core/Authentication/SimpleFormAuthenticatorInterface.php24
-rw-r--r--Core/Authentication/SimplePreAuthenticatorInterface.php24
-rw-r--r--Core/Authentication/Token/AnonymousToken.php10
-rw-r--r--Core/Authentication/Token/RememberMeToken.php10
-rw-r--r--Core/SecurityContext.php104
-rw-r--r--Core/SecurityContextInterface.php29
-rw-r--r--Core/Tests/LegacySecurityContextTest.php122
-rw-r--r--Core/Tests/Util/ClassUtilsTest.php53
-rw-r--r--Core/Tests/Validator/Constraints/LegacyUserPasswordValidatorTest.php28
-rw-r--r--Core/Util/ClassUtils.php72
-rw-r--r--Http/Authentication/SimpleFormAuthenticatorInterface.php6
-rw-r--r--Http/Authentication/SimplePreAuthenticatorInterface.php6
-rw-r--r--Http/Firewall/SimpleFormAuthenticationListener.php2
-rw-r--r--Http/Firewall/SimplePreAuthenticationListener.php2
-rw-r--r--Http/RememberMe/AbstractRememberMeServices.php10
-rw-r--r--Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php4
-rw-r--r--Tests/Core/LegacySecurityContextInterfaceTest.php31
18 files changed, 17 insertions, 525 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0728da9..b444d4d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,11 @@
CHANGELOG
=========
+3.0.0
+-----
+
+ * removed all deprecated codes from 2.x versions
+
2.8.0
-----
diff --git a/Core/Authentication/SimpleFormAuthenticatorInterface.php b/Core/Authentication/SimpleFormAuthenticatorInterface.php
deleted file mode 100644
index ae2b58b..0000000
--- a/Core/Authentication/SimpleFormAuthenticatorInterface.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Security\Core\Authentication;
-
-use Symfony\Component\HttpFoundation\Request;
-
-/**
- * @deprecated Deprecated since version 2.8, to be removed in 3.0. Use the same interface from Security\Http\Authentication instead.
- *
- * @author Jordi Boggiano <j.boggiano@seld.be>
- */
-interface SimpleFormAuthenticatorInterface extends SimpleAuthenticatorInterface
-{
- public function createToken(Request $request, $username, $password, $providerKey);
-}
diff --git a/Core/Authentication/SimplePreAuthenticatorInterface.php b/Core/Authentication/SimplePreAuthenticatorInterface.php
deleted file mode 100644
index c01f064..0000000
--- a/Core/Authentication/SimplePreAuthenticatorInterface.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Security\Core\Authentication;
-
-use Symfony\Component\HttpFoundation\Request;
-
-/**
- * @deprecated Since version 2.8, to be removed in 3.0. Use the same interface from Security\Http\Authentication instead.
- *
- * @author Jordi Boggiano <j.boggiano@seld.be>
- */
-interface SimplePreAuthenticatorInterface extends SimpleAuthenticatorInterface
-{
- public function createToken(Request $request, $providerKey);
-}
diff --git a/Core/Authentication/Token/AnonymousToken.php b/Core/Authentication/Token/AnonymousToken.php
index 22fc611..e1dfef4 100644
--- a/Core/Authentication/Token/AnonymousToken.php
+++ b/Core/Authentication/Token/AnonymousToken.php
@@ -47,16 +47,6 @@ class AnonymousToken extends AbstractToken
}
/**
- * @deprecated Since version 2.8, to be removed in 3.0. Use getSecret() instead.
- */
- public function getKey()
- {
- @trigger_error(__method__.'() is deprecated since version 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED);
-
- return $this->getSecret();
- }
-
- /**
* Returns the secret.
*
* @return string
diff --git a/Core/Authentication/Token/RememberMeToken.php b/Core/Authentication/Token/RememberMeToken.php
index 60e36f2..edd77ab 100644
--- a/Core/Authentication/Token/RememberMeToken.php
+++ b/Core/Authentication/Token/RememberMeToken.php
@@ -74,16 +74,6 @@ class RememberMeToken extends AbstractToken
}
/**
- * @deprecated Since version 2.8, to be removed in 3.0. Use getSecret() instead.
- */
- public function getKey()
- {
- @trigger_error(__method__.'() is deprecated since version 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED);
-
- return $this->getSecret();
- }
-
- /**
* Returns the secret.
*
* @return string
diff --git a/Core/SecurityContext.php b/Core/SecurityContext.php
deleted file mode 100644
index 027ff49..0000000
--- a/Core/SecurityContext.php
+++ /dev/null
@@ -1,104 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Security\Core;
-
-@trigger_error('The '.__NAMESPACE__.'\SecurityContext class is deprecated since version 2.6 and will be removed in 3.0. Use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage or Symfony\Component\Security\Core\Authorization\AuthorizationChecker instead.', E_USER_DEPRECATED);
-
-use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
-use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
-use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
-use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
-use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface;
-use Symfony\Component\Security\Core\Authorization\AuthorizationChecker;
-use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
-
-/**
- * SecurityContext is the main entry point of the Security component.
- *
- * It gives access to the token representing the current user authentication.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- *
- * @deprecated since version 2.6, to be removed in 3.0.
- */
-class SecurityContext implements SecurityContextInterface
-{
- /**
- * @var TokenStorageInterface
- */
- private $tokenStorage;
-
- /**
- * @var AuthorizationCheckerInterface
- */
- private $authorizationChecker;
-
- /**
- * For backwards compatibility, the signature of sf <2.6 still works.
- *
- * @param TokenStorageInterface|AuthenticationManagerInterface $tokenStorage
- * @param AuthorizationCheckerInterface|AccessDecisionManagerInterface $authorizationChecker
- * @param bool $alwaysAuthenticate only applicable with old signature
- */
- public function __construct($tokenStorage, $authorizationChecker, $alwaysAuthenticate = false)
- {
- $oldSignature = $tokenStorage instanceof AuthenticationManagerInterface && $authorizationChecker instanceof AccessDecisionManagerInterface;
- $newSignature = $tokenStorage instanceof TokenStorageInterface && $authorizationChecker instanceof AuthorizationCheckerInterface;
-
- // confirm possible signatures
- if (!$oldSignature && !$newSignature) {
- throw new \BadMethodCallException('Unable to construct SecurityContext, please provide the correct arguments');
- }
-
- if ($oldSignature) {
- // renamed for clarity
- $authenticationManager = $tokenStorage;
- $accessDecisionManager = $authorizationChecker;
- $tokenStorage = new TokenStorage();
- $authorizationChecker = new AuthorizationChecker($tokenStorage, $authenticationManager, $accessDecisionManager, $alwaysAuthenticate);
- }
-
- $this->tokenStorage = $tokenStorage;
- $this->authorizationChecker = $authorizationChecker;
- }
-
- /**
- * @deprecated since version 2.6, to be removed in 3.0. Use TokenStorageInterface::getToken() instead.
- *
- * {@inheritdoc}
- */
- public function getToken()
- {
- return $this->tokenStorage->getToken();
- }
-
- /**
- * @deprecated since version 2.6, to be removed in 3.0. Use TokenStorageInterface::setToken() instead.
- *
- * {@inheritdoc}
- */
- public function setToken(TokenInterface $token = null)
- {
- return $this->tokenStorage->setToken($token);
- }
-
- /**
- * @deprecated since version 2.6, to be removed in 3.0. Use AuthorizationCheckerInterface::isGranted() instead.
- *
- * {@inheritdoc}
- */
- public function isGranted($attributes, $object = null)
- {
- return $this->authorizationChecker->isGranted($attributes, $object);
- }
-}
diff --git a/Core/SecurityContextInterface.php b/Core/SecurityContextInterface.php
deleted file mode 100644
index 2a06ca4..0000000
--- a/Core/SecurityContextInterface.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Security\Core;
-
-use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
-use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
-
-/**
- * The SecurityContextInterface.
- *
- * @author Johannes M. Schmitt <schmittjoh@gmail.com>
- *
- * @deprecated since version 2.6, to be removed in 3.0.
- */
-interface SecurityContextInterface extends TokenStorageInterface, AuthorizationCheckerInterface
-{
- const ACCESS_DENIED_ERROR = Security::ACCESS_DENIED_ERROR;
- const AUTHENTICATION_ERROR = Security::AUTHENTICATION_ERROR;
- const LAST_USERNAME = Security::LAST_USERNAME;
-}
diff --git a/Core/Tests/LegacySecurityContextTest.php b/Core/Tests/LegacySecurityContextTest.php
deleted file mode 100644
index 92d7c16..0000000
--- a/Core/Tests/LegacySecurityContextTest.php
+++ /dev/null
@@ -1,122 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Security\Core\Tests;
-
-use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
-use Symfony\Component\Security\Core\Authorization\AuthorizationChecker;
-use Symfony\Component\Security\Core\SecurityContext;
-
-/**
- * @group legacy
- */
-class LegacySecurityContextTest extends \PHPUnit_Framework_TestCase
-{
- private $tokenStorage;
- private $authorizationChecker;
- private $securityContext;
-
- protected function setUp()
- {
- $this->tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface');
- $this->authorizationChecker = $this->getMock('Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface');
- $this->securityContext = new SecurityContext($this->tokenStorage, $this->authorizationChecker);
- }
-
- public function testGetTokenDelegation()
- {
- $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface');
-
- $this->tokenStorage
- ->expects($this->once())
- ->method('getToken')
- ->will($this->returnValue($token));
-
- $this->assertTrue($token === $this->securityContext->getToken());
- }
-
- public function testSetTokenDelegation()
- {
- $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface');
-
- $this->tokenStorage
- ->expects($this->once())
- ->method('setToken')
- ->with($token);
-
- $this->securityContext->setToken($token);
- }
-
- /**
- * @dataProvider isGrantedDelegationProvider
- */
- public function testIsGrantedDelegation($attributes, $object, $return)
- {
- $this->authorizationChecker
- ->expects($this->once())
- ->method('isGranted')
- ->with($attributes, $object)
- ->will($this->returnValue($return));
-
- $this->assertEquals($return, $this->securityContext->isGranted($attributes, $object));
- }
-
- public function isGrantedDelegationProvider()
- {
- return array(
- array(array(), new \stdClass(), true),
- array(array('henk'), new \stdClass(), false),
- array(null, new \stdClass(), false),
- array('henk', null, true),
- array(array(1), 'henk', true),
- );
- }
-
- /**
- * Test dedicated to check if the backwards compatibility is still working.
- */
- public function testOldConstructorSignature()
- {
- $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface');
- $accessDecisionManager = $this->getMock('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface');
- new SecurityContext($authenticationManager, $accessDecisionManager);
- }
-
- /**
- * @dataProvider oldConstructorSignatureFailuresProvider
- * @expectedException \BadMethodCallException
- */
- public function testOldConstructorSignatureFailures($first, $second)
- {
- new SecurityContext($first, $second);
- }
-
- public function oldConstructorSignatureFailuresProvider()
- {
- $tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface');
- $authorizationChecker = $this->getMock('Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface');
- $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface');
- $accessDecisionManager = $this->getMock('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface');
-
- return array(
- array(new \stdClass(), new \stdClass()),
- array($tokenStorage, $accessDecisionManager),
- array($accessDecisionManager, $tokenStorage),
- array($authorizationChecker, $accessDecisionManager),
- array($accessDecisionManager, $authorizationChecker),
- array($tokenStorage, $accessDecisionManager),
- array($authenticationManager, $authorizationChecker),
- array('henk', 'hans'),
- array(null, false),
- array(true, null),
- );
- }
-}
diff --git a/Core/Tests/Util/ClassUtilsTest.php b/Core/Tests/Util/ClassUtilsTest.php
deleted file mode 100644
index b048206..0000000
--- a/Core/Tests/Util/ClassUtilsTest.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-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()
- {
- return array(
- array('stdClass', 'stdClass'),
- array('Symfony\Component\Security\Core\Util\ClassUtils', 'Symfony\Component\Security\Core\Util\ClassUtils'),
- array('MyProject\Proxies\__CG__\stdClass', 'stdClass'),
- array('MyProject\Proxies\__CG__\OtherProject\Proxies\__CG__\stdClass', 'stdClass'),
- array('MyProject\Proxies\__CG__\Symfony\Component\Security\Core\Tests\Util\ChildObject', 'Symfony\Component\Security\Core\Tests\Util\ChildObject'),
- array(new TestObject(), 'Symfony\Component\Security\Core\Tests\Util\TestObject'),
- array(new \Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Core\Tests\Util\TestObject(), 'Symfony\Component\Security\Core\Tests\Util\TestObject'),
- );
- }
-
- /**
- * @dataProvider dataGetClass
- */
- public function testGetRealClass($object, $expectedClassName)
- {
- $this->assertEquals($expectedClassName, ClassUtils::getRealClass($object));
- }
- }
-
- class TestObject
- {
- }
-}
-
-namespace Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Core\Tests\Util
-{
- class TestObject extends \Symfony\Component\Security\Core\Tests\Util\TestObject
- {
- }
-}
diff --git a/Core/Tests/Validator/Constraints/LegacyUserPasswordValidatorTest.php b/Core/Tests/Validator/Constraints/LegacyUserPasswordValidatorTest.php
deleted file mode 100644
index 8053732..0000000
--- a/Core/Tests/Validator/Constraints/LegacyUserPasswordValidatorTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Security\Core\Tests\Validator\Constraints;
-
-use Symfony\Component\Validator\Validation;
-
-/**
- * @since 2.5.4
- *
- * @author Bernhard Schussek <bschussek@gmail.com>
- * @group legacy
- */
-class LegacyUserPasswordValidatorTest extends UserPasswordValidatorTest
-{
- protected function getApiVersion()
- {
- return Validation::API_VERSION_2_5_BC;
- }
-}
diff --git a/Core/Util/ClassUtils.php b/Core/Util/ClassUtils.php
deleted file mode 100644
index 06186ef..0000000
--- a/Core/Util/ClassUtils.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Security\Core\Util;
-
-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.
- *
- * @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>
- */
-class ClassUtils
-{
- /**
- * Marker for Proxy class names.
- *
- * @var string
- */
- const MARKER = '__CG__';
-
- /**
- * Length of the proxy marker.
- *
- * @var int
- */
- const MARKER_LENGTH = 6;
-
- /**
- * This class should not be instantiated.
- */
- private function __construct()
- {
- }
-
- /**
- * Gets the real class name of a class name that could be a proxy.
- *
- * @param string|object $object
- *
- * @return string
- */
- 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.'\\')) {
- return $class;
- }
-
- return substr($class, $pos + self::MARKER_LENGTH + 2);
- }
-}
diff --git a/Http/Authentication/SimpleFormAuthenticatorInterface.php b/Http/Authentication/SimpleFormAuthenticatorInterface.php
index 112688c..39c3133 100644
--- a/Http/Authentication/SimpleFormAuthenticatorInterface.php
+++ b/Http/Authentication/SimpleFormAuthenticatorInterface.php
@@ -11,11 +11,13 @@
namespace Symfony\Component\Security\Http\Authentication;
-use Symfony\Component\Security\Core\Authentication\SimpleFormAuthenticatorInterface as BaseSimpleFormAuthenticatorInterface;
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface;
/**
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
-interface SimpleFormAuthenticatorInterface extends BaseSimpleFormAuthenticatorInterface
+interface SimpleFormAuthenticatorInterface extends SimpleAuthenticatorInterface
{
+ public function createToken(Request $request, $username, $password, $providerKey);
}
diff --git a/Http/Authentication/SimplePreAuthenticatorInterface.php b/Http/Authentication/SimplePreAuthenticatorInterface.php
index afa8049..63abb15 100644
--- a/Http/Authentication/SimplePreAuthenticatorInterface.php
+++ b/Http/Authentication/SimplePreAuthenticatorInterface.php
@@ -11,11 +11,13 @@
namespace Symfony\Component\Security\Http\Authentication;
-use Symfony\Component\Security\Core\Authentication\SimplePreAuthenticatorInterface as BaseSimplePreAuthenticatorInterface;
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface;
/**
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
-interface SimplePreAuthenticatorInterface extends BaseSimplePreAuthenticatorInterface
+interface SimplePreAuthenticatorInterface extends SimpleAuthenticatorInterface
{
+ public function createToken(Request $request, $providerKey);
}
diff --git a/Http/Firewall/SimpleFormAuthenticationListener.php b/Http/Firewall/SimpleFormAuthenticationListener.php
index 4733b6a..2729553 100644
--- a/Http/Firewall/SimpleFormAuthenticationListener.php
+++ b/Http/Firewall/SimpleFormAuthenticationListener.php
@@ -22,7 +22,7 @@ use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface;
use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface;
use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
-use Symfony\Component\Security\Core\Authentication\SimpleFormAuthenticatorInterface;
+use Symfony\Component\Security\Http\Authentication\SimpleFormAuthenticatorInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\Security\Http\HttpUtils;
diff --git a/Http/Firewall/SimplePreAuthenticationListener.php b/Http/Firewall/SimplePreAuthenticationListener.php
index 8f1f6fd..2b4b593 100644
--- a/Http/Firewall/SimplePreAuthenticationListener.php
+++ b/Http/Firewall/SimplePreAuthenticationListener.php
@@ -15,7 +15,7 @@ use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterfac
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpFoundation\Response;
-use Symfony\Component\Security\Core\Authentication\SimplePreAuthenticatorInterface;
+use Symfony\Component\Security\Http\Authentication\SimplePreAuthenticatorInterface;
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
diff --git a/Http/RememberMe/AbstractRememberMeServices.php b/Http/RememberMe/AbstractRememberMeServices.php
index 16810bd..765fee9 100644
--- a/Http/RememberMe/AbstractRememberMeServices.php
+++ b/Http/RememberMe/AbstractRememberMeServices.php
@@ -81,16 +81,6 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
}
/**
- * @deprecated Since version 2.8, to be removed in 3.0. Use getSecret() instead.
- */
- public function getKey()
- {
- @trigger_error(__method__.'() is deprecated since version 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED);
-
- return $this->getSecret();
- }
-
- /**
* @return string
*/
public function getSecret()
diff --git a/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php b/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php
index 0a1286c..adf91b1 100644
--- a/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php
+++ b/Http/Tests/Firewall/SimplePreAuthenticationListenerTest.php
@@ -42,7 +42,7 @@ class SimplePreAuthenticationListenerTest extends \PHPUnit_Framework_TestCase
->will($this->returnValue($this->token))
;
- $simpleAuthenticator = $this->getMock('Symfony\Component\Security\Core\Authentication\SimplePreAuthenticatorInterface');
+ $simpleAuthenticator = $this->getMock('Symfony\Component\Security\Http\Authentication\SimplePreAuthenticatorInterface');
$simpleAuthenticator
->expects($this->once())
->method('createToken')
@@ -79,7 +79,7 @@ class SimplePreAuthenticationListenerTest extends \PHPUnit_Framework_TestCase
->with($this->equalTo(null))
;
- $simpleAuthenticator = $this->getMock('Symfony\Component\Security\Core\Authentication\SimplePreAuthenticatorInterface');
+ $simpleAuthenticator = $this->getMock('Symfony\Component\Security\Http\Authentication\SimplePreAuthenticatorInterface');
$simpleAuthenticator
->expects($this->once())
->method('createToken')
diff --git a/Tests/Core/LegacySecurityContextInterfaceTest.php b/Tests/Core/LegacySecurityContextInterfaceTest.php
deleted file mode 100644
index 5225eb5..0000000
--- a/Tests/Core/LegacySecurityContextInterfaceTest.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Security\Tests\Core;
-
-use Symfony\Component\Security\Core\SecurityContextInterface;
-use Symfony\Component\Security\Core\Security;
-
-/**
- * @group legacy
- */
-class LegacySecurityContextInterfaceTest extends \PHPUnit_Framework_TestCase
-{
- /**
- * Test if the BC Layer is working as intended.
- */
- public function testConstantSync()
- {
- $this->assertSame(Security::ACCESS_DENIED_ERROR, SecurityContextInterface::ACCESS_DENIED_ERROR);
- $this->assertSame(Security::AUTHENTICATION_ERROR, SecurityContextInterface::AUTHENTICATION_ERROR);
- $this->assertSame(Security::LAST_USERNAME, SecurityContextInterface::LAST_USERNAME);
- }
-}