[PR #8439] Use typed properties for default metadata for #7939 #10990

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

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

State: closed
Merged: Yes


This is simple implementation of idea outlined in #7939. During completion step of a field mapping completion or association mapping completion it looks for typed property and, when existent, uses it to determine default for type, targetEntity and nullable (in fields and joinTable).

I have added simple tests covering all cases I found.

I am not a great fan of encapsulating code in PHP_VERSION_ID >= 70400, but at the time of writing got no better idea.

I couldn't get master branch to work locally and that's the only reason why I target '2.9.x' (Composer has problem resolving doctrine/dbal).

This is my first PR to Doctrine project, so if anything is done wrong please let me know and I will do my best to fix it :)

**Original Pull Request:** https://github.com/doctrine/orm/pull/8439 **State:** closed **Merged:** Yes --- This is simple implementation of idea outlined in #7939. During completion step of a field mapping completion or association mapping completion it looks for typed property and, when existent, uses it to determine default for `type`, `targetEntity` and `nullable` (in fields and `joinTable`). I have added simple tests covering all cases I found. I am not a great fan of encapsulating code in `PHP_VERSION_ID >= 70400`, but at the time of writing got no better idea. I couldn't get master branch to work locally and that's the only reason why I target '2.9.x' (Composer has problem resolving doctrine/dbal). This is my first PR to Doctrine project, so if anything is done wrong please let me know and I will do my best to fix it :)
admin added the pull-request label 2026-01-22 16:09:19 +01:00
admin closed this issue 2026-01-22 16:09:19 +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#10990