Skip to content

Commit

Permalink
minor #6105 Removed deprecated methods from VoterInterface (edefimov)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.0 branch.

Discussion
----------

Removed deprecated methods from VoterInterface

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 3.0
| Fixed tickets |

This PR removes methods _supportsAttribute_, _supportsClass_ from _VoterInterface_ documentation

Commits
-------

874c840 Removed deprecated methods from VoterInterface
  • Loading branch information
xabbuh committed Jan 6, 2016
2 parents 6eeb61e + 874c840 commit 3f7191f
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions components/security/authorization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,25 +85,12 @@ 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)`` (deprecated as of 2.8)
will be used to check if the voter knows how to handle the given attribute;

``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;

``vote(TokenInterface $token, $object, array $attributes)``
this method will do the actual voting and return a value equal to one
of the class constants of :class:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface`,
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 3f7191f

Please sign in to comment.