Skip to content

Commit f633ea3

Browse files
[docs] Change annotation to attribute (#1803)
Co-authored-by: Gabriel Ostrolucký <[email protected]>
1 parent 16e1329 commit f633ea3

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

docs/configuration.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ configuration for the ORM and there are several configuration options that you
738738
can control. The following configuration options exist for a mapping:
739739

740740
``type``
741-
One of ``annotation``, ``xml``, ``yml``, ``php`` or ``staticphp``.
741+
One of ``attribute``, ``xml``, ``yml``, ``php`` or ``staticphp``.
742742
This specifies which type of metadata type your mapping uses.
743743

744744
``dir``

docs/custom-id-generators.rst

+5-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ and implement the custom logic in the ``generate(EntityManager $em, $entity)``
77
method. Before Doctrine bundle 2.3, custom ID generators were always created
88
without any constructor arguments.
99

10-
Starting with Doctrine bundle 2.3, the ``CustomIdGenerator`` annotation can be
10+
Starting with Doctrine bundle 2.3, the ``CustomIdGenerator`` attribute can be
1111
used to reference any services tagged with the ``doctrine.id_generator`` tag.
1212
If you enable autoconfiguration (which is the default most of the time), Symfony
1313
will add this tag for you automatically if you implement your own id-generators.
@@ -28,12 +28,10 @@ are provided: ``doctrine.ulid_generator`` to generate ULIDs, and
2828
*/
2929
class User
3030
{
31-
/**
32-
* @Id
33-
* @Column(type="uuid")
34-
* @ORM\GeneratedValue(strategy="CUSTOM")
35-
* @ORM\CustomIdGenerator("doctrine.uuid_generator")
36-
*/
31+
#[ORM\Id]
32+
#[ORM\Column(type: 'uuid')]
33+
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
34+
#[ORM\CustomIdGenerator('doctrine.uuid_generator')]
3735
private $id;
3836
3937
// ....

docs/entity-listeners.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Entity Listeners
22
================
33

44
Entity listeners that are services must be registered with the entity listener
5-
resolver. On top of the annotation in the entity class, you have to tag the
5+
resolver. On top of the annotation/attribute in the entity class, you have to tag the
66
service with ``doctrine.orm.entity_listener`` for it to be automatically added
77
to the resolver. Use the (optional) ``entity_manager`` attribute to specify
88
which entity manager it should be registered with.

0 commit comments

Comments
 (0)