|
| 1 | +.. index:: |
| 2 | + single: Attributes |
| 3 | + |
| 4 | +Symfony Attributes Overview |
| 5 | +=========================== |
| 6 | + |
| 7 | +Attributes are the successor of annotation since PHP 8. Attributes are native |
| 8 | +to the language and Symfony takes full advantage of them across the framework |
| 9 | +ans its different components. |
| 10 | + |
| 11 | +Doctrine Bridge |
| 12 | +~~~~~~~~~~~~~~~ |
| 13 | + |
| 14 | +* :doc:`UniqueEntity </reference/constraints/UniqueEntity>` |
| 15 | + |
| 16 | +Command |
| 17 | +~~~~~~~ |
| 18 | + |
| 19 | +* :ref:`AsCommand <console_registering-the-command>` |
| 20 | + |
| 21 | +Contracts |
| 22 | +~~~~~~~~~ |
| 23 | + |
| 24 | +* :ref:`Required <autowiring-calls>` |
| 25 | +* :ref:`SubscribedService <service-subscribers-service-subscriber-trait>` |
| 26 | + |
| 27 | +Dependency Injection |
| 28 | +~~~~~~~~~~~~~~~~~~~~ |
| 29 | + |
| 30 | +* :ref:`AsTaggedItem <tags_as-tagged-item>` |
| 31 | +* :ref:`Autoconfigure <lazy-services_configuration>` |
| 32 | +* :ref:`AutoconfigureTag <di-instanceof>` |
| 33 | +* :ref:`TaggedIterator <tags_reference-tagged-services>` |
| 34 | +* :ref:`TaggedLocator <service-subscribers-locators_defining-service-locator>` |
| 35 | +* :ref:`Target <autowiring-multiple-implementations-same-type>` |
| 36 | +* :ref:`When <service-container_limiting-to-env>` |
| 37 | + |
| 38 | +EventDispatcher |
| 39 | +~~~~~~~~~~~~~~~ |
| 40 | + |
| 41 | +* :ref:`AsEventListener <event-dispatcher_event-listener-attributes>` |
| 42 | + |
| 43 | +HttpKernel |
| 44 | +~~~~~~~~~~ |
| 45 | + |
| 46 | +* :doc:`AsController </controller/service>` |
| 47 | + |
| 48 | +Messenger |
| 49 | +~~~~~~~~~ |
| 50 | + |
| 51 | +* :ref:`AsMessageHandler <messenger-handler>` |
| 52 | + |
| 53 | +Routing |
| 54 | +~~~~~~~ |
| 55 | + |
| 56 | +* :doc:`Route </routing>` |
| 57 | + |
| 58 | +Security |
| 59 | +~~~~~~~~ |
| 60 | + |
| 61 | +* :ref:`CurrentUser <security-json-login>` |
| 62 | + |
| 63 | +Serializer |
| 64 | +~~~~~~~~~~ |
| 65 | + |
| 66 | +* :ref:`Context <serializer_serializer-context>` |
| 67 | +* :ref:`DiscriminatorMap <serializer_interfaces-and-abstract-classes>` |
| 68 | +* :ref:`Groups <component-serializer-attributes-groups-annotations>` |
| 69 | +* :ref:`Ignore <serializer_ignoring-attributes>` |
| 70 | +* :ref:`MaxDepth <serializer_handling-serialization-depth>` |
| 71 | +* :ref:`SerializedName <serializer_name-conversion>` |
| 72 | + |
| 73 | +Validator |
| 74 | +~~~~~~~~~ |
| 75 | + |
| 76 | +Each validation constraint comes with a PHP attribute. See |
| 77 | +:doc:`/reference/constraints` for a full list of validation constraints. |
0 commit comments