Skip to content

Removed deprecated methods from VoterInterface #6105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 6, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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