From c8b626364a63950945b9991c19efca84fe07e268 Mon Sep 17 00:00:00 2001 From: Alessandro Podo <47177650+alessandro-podo@users.noreply.github.com> Date: Sun, 8 Jun 2025 03:05:30 +0200 Subject: [PATCH 1/2] fix: use correct function and parameter name --- security/voters.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/voters.rst b/security/voters.rst index e6d1084603c..83b0f2d4b0c 100644 --- a/security/voters.rst +++ b/security/voters.rst @@ -331,7 +331,7 @@ Then, override one or both of the following methods:: // this method returns true if the voter applies to the given object class/type; // if it returns false, Symfony won't call it again for that type of object - public function supportsAttribute(string $attribute): bool + public function supportsType(string subjectType): bool { // you can't use a simple Post::class === $subjectType comparison // because the subject type might be a Doctrine proxy class From 2ee75784aa1c16273dddb9cfcafadc91145b088e Mon Sep 17 00:00:00 2001 From: Alessandro Podo Date: Sun, 8 Jun 2025 18:19:05 +0200 Subject: [PATCH 2/2] fix missing $ --- security/voters.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/voters.rst b/security/voters.rst index 83b0f2d4b0c..8959e0bf3cd 100644 --- a/security/voters.rst +++ b/security/voters.rst @@ -331,7 +331,7 @@ Then, override one or both of the following methods:: // this method returns true if the voter applies to the given object class/type; // if it returns false, Symfony won't call it again for that type of object - public function supportsType(string subjectType): bool + public function supportsType(string $subjectType): bool { // you can't use a simple Post::class === $subjectType comparison // because the subject type might be a Doctrine proxy class