From 3fd1265ccc6b69cf6be560be63058688e6e756bf Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 3 Jun 2025 17:57:54 +0200 Subject: [PATCH] [Security] Update the main voters article --- security/voters.rst | 123 ++++++++++++++++++++++++++++++-------------- 1 file changed, 83 insertions(+), 40 deletions(-) diff --git a/security/voters.rst b/security/voters.rst index 21e2c8de33b..e6d1084603c 100644 --- a/security/voters.rst +++ b/security/voters.rst @@ -50,14 +50,6 @@ which makes creating a voter even easier:: .. _how-to-use-the-voter-in-a-controller: -.. tip:: - - Checking each voter several times can be time consuming for applications - that perform a lot of permission checks. To improve performance in those cases, - you can make your voters implement the :class:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\CacheableVoterInterface`. - This allows the access decision manager to remember the attribute and type - of subject supported by the voter, to only call the needed voters each time. - Setup: Checking for Access in a Controller ------------------------------------------ @@ -296,6 +288,89 @@ If you're using the :ref:`default services.yaml configuration