Skip to content

Commit

Permalink
Document deprecation of supports{Attribute,Class}() methods
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj committed Nov 28, 2015
1 parent 22026ee commit 0526ca0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions components/security/authorization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ of :class:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterf
which means they have to implement a few methods which allows the decision
manager to use them:

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

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

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

.. note::

The ``supportsAttribute()`` and ``supportsClass()`` methods are deprecated
as of Symfony 2.8 and no longer required in 3.0. These methods should not
be called outside the voter class.

The Security component contains some standard voters which cover many use
cases:

Expand Down

0 comments on commit 0526ca0

Please sign in to comment.