Skip to content

feat(discriminator): add discriminator def, support class to class discriminator#319

Merged
joelwurtz merged 1 commit intomainfrom
feat/discriminator
Jan 28, 2026
Merged

feat(discriminator): add discriminator def, support class to class discriminator#319
joelwurtz merged 1 commit intomainfrom
feat/discriminator

Conversation

@joelwurtz
Copy link
Member

This PR does 2 things :

  • First it add fields to the Mapper attribute, allowing someone to declare discrimnator without relying on symfony attribute
  • Second it allow skipping the property field of a discriminator, when doing that, it will consider the type of the discriminator as a class and use it to determine what to do in mappers.

Fix #196
Replace #295

Korbeil

This comment was marked as outdated.

Copy link
Member

@Korbeil Korbeil left a comment

Choose a reason for hiding this comment

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

Really nice 👌

@joelwurtz joelwurtz merged commit eadca46 into main Jan 28, 2026
5 checks passed
@joelwurtz joelwurtz deleted the feat/discriminator branch January 28, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make better discriminator

2 participants