Skip to content

Commit 1dbb721

Browse files
authored
docs: Doctrine ORM & attributes: mention their use (#1413)
Not sure about linking to "latest" (a moving target) but it seems to be common practice. Resolves #1411
1 parent e30d1e6 commit 1dbb721

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

distribution/index.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,12 +514,9 @@ docker-compose exec php \
514514
bin/console make:entity --api-resource
515515
```
516516

517-
Doctrine's annotations map these entities to tables in the database. Annotations are convenient as they allow grouping
518-
the code and the configuration but, if you want to decouple classes from their metadata, you can switch to XML or YAML mappings.
517+
Doctrine's [annotations](https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/annotations-reference.html) map these entities to tables in the database. Mapping through [attributes](https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/attributes-reference.html) is also supported, if you prefer those. Both methods are convenient as they allow grouping the code and the configuration but, if you want to decouple classes from their metadata, you can switch to XML or YAML mappings.
519518
They are supported as well.
520519

521-
**Note:** Doctrine ORM doesn't support PHP 8 attributes at this time, but support should be added soon ([a Pull Request already exists](https://github.com/doctrine/orm/pull/8266)).
522-
523520
Learn more about how to map entities with the Doctrine ORM in [the project's official documentation](https://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/association-mapping.html)
524521
or in Kévin's book "[Persistence in PHP with the Doctrine ORM](https://www.amazon.fr/gp/product/B00HEGSKYQ/ref=as_li_tl?ie=UTF8&camp=1642&creative=6746&creativeASIN=B00HEGSKYQ&linkCode=as2&tag=kevidung-21)".
525522

0 commit comments

Comments
 (0)