File tree 1 file changed +33
-0
lines changed
1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -1040,6 +1040,39 @@ UPGRADE FROM 2.x to 3.0
1040
1040
}
1041
1041
` ` `
1042
1042
1043
+ * The `AbstractVoter::isGranted()` method have been replaced by `Voter::voteOnAttribute()`.
1044
+
1045
+ Before :
1046
+
1047
+ ` ` ` php
1048
+ class MyVoter extends AbstractVoter
1049
+ {
1050
+ protected function isGranted($attribute, $object, $user = null)
1051
+ {
1052
+ return 'EDIT' === $attribute && $user === $object->getAuthor();
1053
+ }
1054
+
1055
+ // ...
1056
+ }
1057
+ ` ` `
1058
+
1059
+ After :
1060
+
1061
+ ` ` ` php
1062
+ class MyVoter extends Voter
1063
+ {
1064
+ protected function voteOnAttribute($attribute, $object, TokenInterface $token)
1065
+ {
1066
+ return 'EDIT' === $attribute && $token->getUser() === $object->getAuthor();
1067
+ }
1068
+
1069
+ // ...
1070
+ }
1071
+ ` ` `
1072
+
1073
+ * The `supportsAttribute()` and `supportsClass()` methods of classes `AuthenticatedVoter`, `ExpressionVoter`
1074
+ and `RoleVoter` have been removed.
1075
+
1043
1076
* The `intention` option was renamed to `csrf_token_id` for all the authentication listeners.
1044
1077
1045
1078
* The `csrf_provider` option was renamed to `csrf_token_generator` for all the authentication listeners.
You can’t perform that action at this time.
0 commit comments