Skip to content

Commit 5868d14

Browse files
[Attributes] Add attributes overview for 6.2
1 parent 43325d0 commit 5868d14

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed

reference/attributes.rst

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
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+
* :doc:`AsDecorator </service_container/service_decoration>`
31+
* :ref:`AsTaggedItem <tags_as-tagged-item>`
32+
* :ref:`Autoconfigure <lazy-services_configuration>`
33+
* :ref:`AutoconfigureTag <di-instanceof>`
34+
* :ref:`Autowire <autowire-attribute>`
35+
* :doc:`MapDecorated </service_container/service_decoration>`
36+
* :ref:`TaggedIterator <tags_reference-tagged-services>`
37+
* :ref:`TaggedLocator <service-subscribers-locators_defining-service-locator>`
38+
* :ref:`Target <autowiring-multiple-implementations-same-type>`
39+
* :ref:`When <service-container_limiting-to-env>`
40+
41+
EventDispatcher
42+
~~~~~~~~~~~~~~~
43+
44+
* :ref:`AsEventListener <event-dispatcher_event-listener-attributes>`
45+
46+
FrameworkBundle
47+
~~~~~~~~~~~~~~~
48+
49+
* :ref:`AsRoutingConditionService <routing-matching-expressions>`
50+
51+
HttpKernel
52+
~~~~~~~~~~
53+
54+
* :doc:`AsController </controller/service>`
55+
* :ref:`Cache <http-cache-expiration-intro>`
56+
* :class:`Symfony\\Component\\HttpKernel\\Attribute\\MapDateTime`
57+
58+
Messenger
59+
~~~~~~~~~
60+
61+
* :ref:`AsMessageHandler <messenger-handler>`
62+
63+
Routing
64+
~~~~~~~
65+
66+
* :doc:`Route </routing>`
67+
68+
Security
69+
~~~~~~~~
70+
71+
* :ref:`CurrentUser <security-json-login>`
72+
* :ref:`IsGranted <security-securing-controller-annotations>`
73+
74+
Serializer
75+
~~~~~~~~~~
76+
77+
* :ref:`Context <serializer_serializer-context>`
78+
* :ref:`DiscriminatorMap <serializer_interfaces-and-abstract-classes>`
79+
* :ref:`Groups <component-serializer-attributes-groups-annotations>`
80+
* :ref:`Ignore <serializer_ignoring-attributes>`
81+
* :ref:`MaxDepth <serializer_handling-serialization-depth>`
82+
* :ref:`SerializedName <serializer_name-conversion>`
83+
* :ref:`SerializedPath <serializer-enabling-metadata-cache>`
84+
85+
Twig
86+
~~~~
87+
88+
* :ref:`Template <templates-template-attribute>`
89+
90+
Validator
91+
~~~~~~~~~
92+
93+
Each validation constraint comes with a PHP attribute. See
94+
:doc:`/reference/constraints` for a full list of validation constraints.
95+
96+
* :doc:`HasNamedArgument </validation/custom_constraint>`

0 commit comments

Comments
 (0)