Skip to content

[Security] [Documentation][Voter] updated documentation for CacheableVoterInterface #19531

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

Closed

Conversation

dylan-b-efficience-it
Copy link

I noticed that the Voter documentation, in particular the code illustrating the point "The Voter Interface", was not update. To explain further, in the Voter.php file on GitHub, we've also been implementing "CacheableVoterInterface" since Symfony 5.4.

So I'd like to suggest this change to the documentation.

@carsonbot carsonbot added this to the 5.4 milestone Feb 7, 2024
Comment on lines +38 to +39
:class:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface`,
:class:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\CacheableVoterInterface`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:class:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface`,
:class:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\CacheableVoterInterface`
:class:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface` or
:class:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\CacheableVoterInterface`

I'm not sure about why Voter implements both interfaces explicitly but since CacheableVoterInterface extends VoterInterface perhaps the documentation can mention that only one is needed ?

@xabbuh xabbuh modified the milestones: 5.4, 6.4 Dec 16, 2024
@carsonbot carsonbot changed the title [Documentation][Voter] updated documentation for CacheableVoterInterface [Security] [Documentation][Voter] updated documentation for CacheableVoterInterface Jun 3, 2025
@javiereguiluz
Copy link
Member

@dylan-b-efficience-it thanks for this contribution, but we recently updated this page in a different way. We created a whole new section for cached voters and reordered some other contents. See #21040.

That's why we're closing this. We're sorry but we hope you understand it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants