Symfony Attributes Overview
Attributes are the successor of annotations since PHP 8. Attributes are native to the language and Symfony takes full advantage of them across the framework and its different components.
6.4
Annotations across the framework are deprecated since Symfony 6.4, you must only use attributes instead.
Validator
Each validation constraint comes with a PHP attribute. See Validation Constraints Reference for a full list of validation constraints.
This work, including the code samples, is licensed under a
Creative Commons BY-SA 3.0 license.