diff --git a/docs/configuration.rst b/docs/configuration.rst index b15950da..bea0a0bf 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -738,7 +738,7 @@ configuration for the ORM and there are several configuration options that you can control. The following configuration options exist for a mapping: ``type`` - One of ``annotation``, ``xml``, ``yml``, ``php`` or ``staticphp``. + One of ``attribute``, ``xml``, ``yml``, ``php`` or ``staticphp``. This specifies which type of metadata type your mapping uses. ``dir`` diff --git a/docs/custom-id-generators.rst b/docs/custom-id-generators.rst index 4c6141ef..11de3d76 100644 --- a/docs/custom-id-generators.rst +++ b/docs/custom-id-generators.rst @@ -7,7 +7,7 @@ and implement the custom logic in the ``generate(EntityManager $em, $entity)`` method. Before Doctrine bundle 2.3, custom ID generators were always created without any constructor arguments. -Starting with Doctrine bundle 2.3, the ``CustomIdGenerator`` annotation can be +Starting with Doctrine bundle 2.3, the ``CustomIdGenerator`` attribute can be used to reference any services tagged with the ``doctrine.id_generator`` tag. If you enable autoconfiguration (which is the default most of the time), Symfony 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 */ class User { - /** - * @Id - * @Column(type="uuid") - * @ORM\GeneratedValue(strategy="CUSTOM") - * @ORM\CustomIdGenerator("doctrine.uuid_generator") - */ + #[ORM\Id] + #[ORM\Column(type: 'uuid')] + #[ORM\GeneratedValue(strategy: 'CUSTOM')] + #[ORM\CustomIdGenerator('doctrine.uuid_generator')] private $id; // .... diff --git a/docs/entity-listeners.rst b/docs/entity-listeners.rst index e08c7b34..35c4483e 100644 --- a/docs/entity-listeners.rst +++ b/docs/entity-listeners.rst @@ -2,7 +2,7 @@ Entity Listeners ================ Entity listeners that are services must be registered with the entity listener -resolver. On top of the annotation in the entity class, you have to tag the +resolver. On top of the annotation/attribute in the entity class, you have to tag the service with ``doctrine.orm.entity_listener`` for it to be automatically added to the resolver. Use the (optional) ``entity_manager`` attribute to specify which entity manager it should be registered with.