Skip to content

Commit 0526ca0

Browse files
committed
Document deprecation of supports{Attribute,Class}() methods
1 parent 22026ee commit 0526ca0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

components/security/authorization.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ of :class:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterf
9090
which means they have to implement a few methods which allows the decision
9191
manager to use them:
9292

93-
``supportsAttribute($attribute)``
93+
``supportsAttribute($attribute)`` (deprecated as of 2.8)
9494
will be used to check if the voter knows how to handle the given attribute;
9595

96-
``supportsClass($class)``
96+
``supportsClass($class)`` (deprecated as of 2.8)
9797
will be used to check if the voter is able to grant or deny access for
9898
an object of the given class;
9999

@@ -103,6 +103,12 @@ manager to use them:
103103
i.e. ``VoterInterface::ACCESS_GRANTED``, ``VoterInterface::ACCESS_DENIED``
104104
or ``VoterInterface::ACCESS_ABSTAIN``;
105105

106+
.. note::
107+
108+
The ``supportsAttribute()`` and ``supportsClass()`` methods are deprecated
109+
as of Symfony 2.8 and no longer required in 3.0. These methods should not
110+
be called outside the voter class.
111+
106112
The Security component contains some standard voters which cover many use
107113
cases:
108114

0 commit comments

Comments
 (0)