Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add embedded class mapping array shape#10442

Merged
greg0ire merged 1 commit into
doctrine:2.15.xfrom
greg0ire:embedded-class-array-shape
Jan 23, 2023
Merged

Add embedded class mapping array shape#10442
greg0ire merged 1 commit into
doctrine:2.15.xfrom
greg0ire:embedded-class-array-shape

Conversation

@greg0ire
Copy link
Copy Markdown
Member

This should be replaced with a DTO in the next major. To be able to have something usable, I had to move the validation of the DTO (checking that it has a "class" attribute) to mapEmbedded, which happens earlier than doLoadMetadata(). It is unclear to me why it was not put here in the first place in #1133

Cc @mpdude

Comment on lines +474 to +478
$metadata->mapEmbedded([
'fieldName' => 'embedded',
'class' => '',
'columnPrefix' => false,
]);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This technically isn't a ClassMetadataFactory test anymore and belongs to the ClassMetadata tests

This should be replaced with a DTO in the next major.
To be able to have something usable, I had to move the validation of the
DTO (checking that it has a "class" attribute) to mapEmbedded, which
happens earlier than doLoadMetadata(). It is unclear to me why it was
not put here in the first place.
@greg0ire greg0ire force-pushed the embedded-class-array-shape branch from 48ca06b to 68662f5 Compare January 22, 2023 22:50
@greg0ire greg0ire added this to the 2.15.0 milestone Jan 23, 2023
@greg0ire greg0ire merged commit 7f783b5 into doctrine:2.15.x Jan 23, 2023
@greg0ire greg0ire deleted the embedded-class-array-shape branch January 23, 2023 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants