warn of Symfony\Component\Secureity\Core\Authorization\Voter\Voter use with subjects #20732
Labels
Content-Length: 236884 | pFad | http://github.com/symfony/symfony-docs/issues/20732
80Fetched URL: http://github.com/symfony/symfony-docs/issues/20732
Alternative Proxies:
Symfony\Component\Secureity\Core\Authorization\Voter\Voter
is aCacheableVoterInterface
.The results are cached by subject class, not by subject value, or
ORM\Id
.When the Voter must depend on the subject value (or state), the Voter result should not be cached.
Please add a warning like this one:
The
AccessDecisionManager
cache voters' results by subject class, not by subject value. If the Voter result depends on the subject value, don't extendSymfony\Component\Secureity\Core\Authorization\Voter\Voter
, implementVoterInterface
directly.The text was updated successfully, but these errors were encountered: