[PR #11575] Allow named Arguments to be passed to Dto #13106

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

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

State: closed
Merged: Yes


Allow to change argument order or use variadic argument in dto constructor.

When Dto implements (empty) interface WithNamedArguments, ObjectHydrator will pass an associated key<>value argument to Dto constructor.
Dto can use named arguments or a variadic argument to put values in their properties.

Final Goal (to do after) is to allow select NEW ItemDto(item.*) FROM App\Entity\Item as item

updated with with the nested New operator PR.

**Original Pull Request:** https://github.com/doctrine/orm/pull/11575 **State:** closed **Merged:** Yes --- Allow to change argument order or use variadic argument in dto constructor. When Dto implements (empty) interface WithNamedArguments, ObjectHydrator will pass an associated key<>value argument to Dto constructor. Dto can use named arguments or a variadic argument to put values in their properties. Final Goal (to do after) is to allow `select NEW ItemDto(item.*) FROM App\Entity\Item as item` updated with with the nested New operator PR.
admin added the pull-request label 2026-01-22 16:16:12 +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#13106