summaryrefslogtreecommitdiffstats
path: root/Core/SecurityContext.php
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2015-01-05 21:51:33 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2015-01-05 21:51:33 +0100
commit52f9447541af006926aa4e687410ba3403e80c16 (patch)
treebd74d1fe1f81dd252d60e9eca5f2ab61f82d751b /Core/SecurityContext.php
parentd965ec7a3c921382741120027a4a0f7b5b05c09a (diff)
parent033a767f88205c45a6c621802d5581a7bfbc039c (diff)
downloadsymfony-security-52f9447541af006926aa4e687410ba3403e80c16.zip
symfony-security-52f9447541af006926aa4e687410ba3403e80c16.tar.gz
symfony-security-52f9447541af006926aa4e687410ba3403e80c16.tar.bz2
minor #13060 [2.7] adds deprecation notices. (hhamon)
This PR was merged into the 2.7 branch. Discussion ---------- [2.7] adds deprecation notices. | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #12608, #12672, #12675 #12684, #12686 | License | MIT | Doc PR | ~ Commits ------- f9fbb4f Fixes more deprecation notices as per @stof review. fd47c07 Fixed some deprecations according to @stof feedbacks. 2a3e7d2 Normalizes deprecation notice messages. 738b9be [Validator] fixes UuidValidator deprecated class namespace. e608ba6 [Form] adds more deprecation notices. cd9617a [Validator] adds more deprecation notices. a7f841e [Form] Adds a way to trigger deprecation notice on demand for VirtualFormAwareIterator class. 97efd2c Fixes more deprecation notices. fd9c7bb Normalized @deprecated annotations. 39cfd47 Removed deprecation notices from test files. 2a9749d Fixes deprecation notices. 6f57b7b Reverted trigger_error() function calls on deprecated interfaces to prevent breaking third party projects implementing them. 86b9f6b Adds deprecation notices for structures to be removed in 3.0.
Diffstat (limited to 'Core/SecurityContext.php')
-rw-r--r--Core/SecurityContext.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/Core/SecurityContext.php b/Core/SecurityContext.php
index 165c22a..7695959 100644
--- a/Core/SecurityContext.php
+++ b/Core/SecurityContext.php
@@ -26,7 +26,7 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
- * @deprecated Deprecated since version 2.6, to be removed in 3.0.
+ * @deprecated since version 2.6, to be removed in 3.0.
*/
class SecurityContext implements SecurityContextInterface
{
@@ -70,26 +70,38 @@ class SecurityContext implements SecurityContextInterface
}
/**
+ * @deprecated since version 2.6, to be removed in 3.0. Use TokenStorageInterface::getToken() instead.
+ *
* {@inheritdoc}
*/
public function getToken()
{
+ trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage::getToken() method instead.', E_USER_DEPRECATED);
+
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)
{
+ trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage::setToken() method instead.', E_USER_DEPRECATED);
+
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)
{
+ trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface::isGranted() method instead.', E_USER_DEPRECATED);
+
return $this->authorizationChecker->isGranted($attributes, $object);
}
}