File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -71,19 +71,16 @@ you can create your own named set or requirements to be reused consistently ever
7171 }
7272 }
7373
74+ Add ``@Annotation `` or ``#[\Attribute] `` to the constraint class if you want to
75+ use it as an annotation/attribute in other classes. If the constraint has
76+ configuration options, define them as public properties on the constraint class.
77+
7478.. versionadded :: 5.2
7579
7680 The ability to use PHP attributes to configure constraints was introduced in
7781 Symfony 5.2. Prior to this, Doctrine Annotations were the only way to
7882 annotate constraints.
7983
80- .. note ::
81-
82- The ``@Annotation `` or ``#[\Attribute] `` annotation is necessary for this new constraint in
83- order to make it available for use in classes via annotations.
84- Options for your constraint are represented as public properties on the
85- constraint class.
86-
8784You can now use it anywhere you need it:
8885
8986.. configuration-block ::
You can’t perform that action at this time.
0 commit comments