[PR #1417] [WIP] Generator: Associations annotations improvement #9472

Open
opened 2026-01-22 16:04:25 +01:00 by admin · 0 comments
Owner

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

State: closed
Merged: No


  • Replace Doctrine\Common\Collections\Collection by RelatedEntity[]|\Doctrine\Common\Collections\ArrayCollection
  • Add use statement for ArrayCollection
  • Add use statement for related entities
  • Remove FQN annotation usage

This is a proposal for association mapping annotations improvement.

In a nutshell, I replaced Collection by ArrayCollection on getter annotation because ArrayCollection is used on constructor. I also add RelatedEntity[] annotation which is more IDE friendly.

I'm planning to add use statement too for FQN usage avoiding.

If you this made some regressions, we could maybe introduce it as an option.

Regards

**Original Pull Request:** https://github.com/doctrine/orm/pull/1417 **State:** closed **Merged:** No --- - [x] Replace `Doctrine\Common\Collections\Collection` by `RelatedEntity[]|\Doctrine\Common\Collections\ArrayCollection` - [x] Add `use` statement for `ArrayCollection` - [ ] Add `use` statement for related entities - [ ] Remove FQN annotation usage This is a proposal for association mapping annotations improvement. In a nutshell, I replaced `Collection` by `ArrayCollection` on getter annotation because `ArrayCollection` is used on constructor. I also add `RelatedEntity[]` annotation which is more IDE friendly. I'm planning to add `use` statement too for FQN usage avoiding. If you this made some regressions, we could maybe introduce it as an option. Regards
admin added the pull-request label 2026-01-22 16:04:25 +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#9472