From 3a84396b81511fb36fe4651a1da379d6bf907758 Mon Sep 17 00:00:00 2001 From: gondo Date: Sun, 17 Aug 2014 00:52:36 +0200 Subject: [PATCH] fixed wrongly linked dependency --- cookbook/security/voters_data_permission.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cookbook/security/voters_data_permission.rst b/cookbook/security/voters_data_permission.rst index 82bea0fe9fe..7b9e67ee7cd 100644 --- a/cookbook/security/voters_data_permission.rst +++ b/cookbook/security/voters_data_permission.rst @@ -61,7 +61,6 @@ edit a particular object. Here's an example implementation: // src/Acme/DemoBundle/Security/Authorization/Voter/PostVoter.php namespace Acme\DemoBundle\Security\Authorization\Voter; - use Symfony\Component\Security\Core\Exception\InvalidArgumentException; use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\User\UserInterface; @@ -100,7 +99,7 @@ edit a particular object. Here's an example implementation: // this isn't a requirement, it's just one easy way for you to // design your voter if(1 !== count($attributes)) { - throw new InvalidArgumentException( + throw new \InvalidArgumentException( 'Only one attribute is allowed for VIEW or EDIT' ); }