symfony2 call is_granted in voter : how to avoid an infinite loop?
问题 I have built a voter where I need to invoke is_granted on a user. When injecting the security.authorization_checker service in my voter I get the following error ServiceCircularReferenceException in CheckCircularReferencesPass.php line 69: Circular reference detected for service "manager_voter", path: "manager_voter -> security.authorization_checker -> security.access.decision_manager -> manager_voter". Is there no alternative to injecting the whole container? Is this normal? EDIT: I am