-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GH-8265] Prototype for Attribute Metadata Driver #8266
Conversation
There is related PR in Symfony annotations class reader. I share it here, because it might bring some inspiration or path to find united way with parsing and working with attributes for both Symfony and Dotrine.
The file https://github.com/symfony/symfony/pull/37474/files#diff-90cbecfd4505e6e8af5842db11add3b5 |
@TomasVotruba i don't believe it makes sense to integrate AnnotationClassLoader with attributes for more than a few simple cases, because attributes will not be 100% compatible with annotations. Tieing them together makes everything complicated instead. |
@beberlei Thanks for sharing. I haven't really digged into it, as the migration path is my only focus here. It would be better to comment to the author there, if you find it useful. |
b8a6a19
to
22f0353
Compare
…th test entities.
Good luck guys ! You rock ! |
Great work on getting native attribute support into doctrine! @beberlei we (neos/flow framework) however now suffer from a slight change in expectations for some annotation classes - namely the
which now breaks, because the ManyToMany is attempted to be constructed with See neos/flow-development-collection#2487 (comment) While we can "solve" this by restricting doctrine/orm to <2.9, we would also like to move towards PHP8 support and attributes. For us the best solution would be if those three constructors would allow |
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:
@JoinTable
holding join columns and inverse join columns as a property, you use#[ORM\JoinColumn]
and#[ORM\InverseJoinColumn]
on the top level.@Table
holding indexes and unique constraints, these are also attributes on the top level of a declaration.Todos:
Fixes #8265