Skip to content

Commit 81a39d8

Browse files
adpaulyjaviereguiluz
authored andcommitted
Update PHP doc about annotations IsGranted
1 parent f1ee7c6 commit 81a39d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Controller/Admin/BlogController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function new(Request $request, EntityManagerInterface $entityManager): Re
112112
public function show(Post $post): Response
113113
{
114114
// This security check can also be performed
115-
// using an annotation: @IsGranted("show", subject="post", message="Posts can only be shown to their authors.")
115+
// using a PHP attribute: #[IsGranted('show', subject: 'post', message: 'Posts can only be shown to their authors.')]
116116
$this->denyAccessUnlessGranted(PostVoter::SHOW, $post, 'Posts can only be shown to their authors.');
117117

118118
return $this->render('admin/blog/show.html.twig', [

0 commit comments

Comments
 (0)