From ee7a4ce5eba289113eb8aecb88d5f0f14d9ce431 Mon Sep 17 00:00:00 2001 From: MacBoldr <86348216+MacBoldr@users.noreply.github.com> Date: Thu, 5 Jan 2023 15:24:35 +0100 Subject: [PATCH] Add missing use statement in #[IsGranted] example The page [Using Expressions in Security Access Controls](https://symfony.com/doc/current/security/expressions.html) shows an example of how to use the `#[IsGranted]` attribute (example added in #17148). However, the example code is lacking the use statement for the IsGranted attribute. --- security/expressions.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/security/expressions.rst b/security/expressions.rst index 9e26717afb4..29779e37b84 100644 --- a/security/expressions.rst +++ b/security/expressions.rst @@ -21,6 +21,7 @@ and ``#[IsGranted()]`` attribute also accept an namespace App\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; + use Symfony\Component\Security\Http\Attribute\IsGranted; use Symfony\Component\ExpressionLanguage\Expression; use Symfony\Component\HttpFoundation\Response;