Skip to content

Commit b920cfd

Browse files
committed
Tweak
1 parent 5545733 commit b920cfd

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

reference/constraints/Compound.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff 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-
8784
You can now use it anywhere you need it:
8885

8986
.. configuration-block::

0 commit comments

Comments
 (0)