|
26 | 26 | *
|
27 | 27 | * @author Fabien Potencier <[email protected]>
|
28 | 28 | * @author Johannes M. Schmitt <[email protected]>
|
29 |
| - * @deprecated Deprecated since version 2.6, to be removed in 3.0. |
| 29 | + * @deprecated since version 2.6, to be removed in 3.0. |
30 | 30 | */
|
31 | 31 | class SecurityContext implements SecurityContextInterface
|
32 | 32 | {
|
@@ -70,26 +70,38 @@ public function __construct($tokenStorage, $authorizationChecker, $alwaysAuthent
|
70 | 70 | }
|
71 | 71 |
|
72 | 72 | /**
|
| 73 | + * @deprecated since version 2.6, to be removed in 3.0. Use TokenStorageInterface::getToken() instead. |
| 74 | + * |
73 | 75 | * {@inheritdoc}
|
74 | 76 | */
|
75 | 77 | public function getToken()
|
76 | 78 | {
|
| 79 | + 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); |
| 80 | + |
77 | 81 | return $this->tokenStorage->getToken();
|
78 | 82 | }
|
79 | 83 |
|
80 | 84 | /**
|
| 85 | + * @deprecated since version 2.6, to be removed in 3.0. Use TokenStorageInterface::setToken() instead. |
| 86 | + * |
81 | 87 | * {@inheritdoc}
|
82 | 88 | */
|
83 | 89 | public function setToken(TokenInterface $token = null)
|
84 | 90 | {
|
| 91 | + 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); |
| 92 | + |
85 | 93 | return $this->tokenStorage->setToken($token);
|
86 | 94 | }
|
87 | 95 |
|
88 | 96 | /**
|
| 97 | + * @deprecated since version 2.6, to be removed in 3.0. Use AuthorizationCheckerInterface::isGranted() instead. |
| 98 | + * |
89 | 99 | * {@inheritdoc}
|
90 | 100 | */
|
91 | 101 | public function isGranted($attributes, $object = null)
|
92 | 102 | {
|
| 103 | + 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); |
| 104 | + |
93 | 105 | return $this->authorizationChecker->isGranted($attributes, $object);
|
94 | 106 | }
|
95 | 107 | }
|
0 commit comments