[PR #8266] [GH-8265] Prototype for Attribute Metadata Driver #10888

Closed
opened 2026-01-22 16:09:00 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/8266

State: closed
Merged: Yes


Support for Attribute Metadata Driver with PHP 8+

Note: For now the AttributeDriver does not support attribute overrides, association overrides, named queries, named native queries and sql resultset mapping, because of missing nested attributes support. This is not a big problem, because these are quite edge case features some of which we have thought about removing anyways. As for the overwrites, we should think of a solution in the near future.

A few other deviations from the Annotation based Driver:

  • Instead of @JoinTable holding join columns and inverse join columns as a property, you use #[ORM\JoinColumn] and #[ORM\InverseJoinColumn] on the top level.
  • Instead of @Table holding indexes and unique constraints, these are also attributes on the top level of a declaration.

Todos:

  • Actually run this against a php 8 build
  • Adjust tests to make this running
  • Adjust annotation / attribute classes to make use of named annotation support in doctrine/annotations v1.11
  • Add reference section in the docs
  • Integrate with https://github.com/doctrine/annotations/pull/402

Fixes #8265

**Original Pull Request:** https://github.com/doctrine/orm/pull/8266 **State:** closed **Merged:** Yes --- Support for Attribute Metadata Driver with PHP 8+ Note: For now the `AttributeDriver` does not support attribute overrides, association overrides, named queries, named native queries and sql resultset mapping, because of missing nested attributes support. This is not a big problem, because these are quite edge case features some of which we have thought about removing anyways. As for the overwrites, we should think of a solution in the near future. A few other deviations from the Annotation based Driver: - Instead of `@JoinTable` holding join columns and inverse join columns as a property, you use `#[ORM\JoinColumn]` and `#[ORM\InverseJoinColumn]` on the top level. - Instead of `@Table` holding indexes and unique constraints, these are also attributes on the top level of a declaration. Todos: - [x] Actually run this against a php 8 build - [x] Adjust tests to make this running - [x] Adjust annotation / attribute classes to make use of named annotation support in doctrine/annotations v1.11 - [x] Add reference section in the docs - [x] Integrate with https://github.com/doctrine/annotations/pull/402 Fixes #8265
admin added the pull-request label 2026-01-22 16:09:00 +01:00
admin closed this issue 2026-01-22 16:09:01 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#10888