Skip to content

fix: map MapCollection items and other object mapper aware transforms with the AutoMapper - #374

Merged
joelwurtz merged 2 commits into
mainfrom
fix/object-mapper-aware-transform
Dec 3, 2026
Merged

joelwurtz merged 2 commits into
mainfrom
fix/object-mapper-aware-transform

Conversation

@joelwurtz

@joelwurtz joelwurtz commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Transforms implementing ObjectMapperAwareInterface, like MapCollection, were never given the object mapper, so MapCollection items were mapped by a plain Symfony ObjectMapper instead of the AutoMapper. They now receive the AutoMapper object mapper, for property and class level transforms, and the objects already mapped are shared with them, so circular references are kept. The targetClass option of MapCollection (Symfony 8.1) is covered too.

Depends on #359.

Base automatically changed from build/symfony-8.2 to main December 3, 2026 15:26
@joelwurtz
joelwurtz deleted the branch build/symfony-8.2 December 3, 2026 15:26
@joelwurtz joelwurtz closed this Dec 3, 2026
@joelwurtz joelwurtz reopened this Dec 3, 2026
@joelwurtz
joelwurtz force-pushed the fix/object-mapper-aware-transform branch from 2a85123 to d5352f7 Compare December 3, 2026 15:43
@joelwurtz
joelwurtz merged commit 447eb1d into main Dec 3, 2026
6 checks passed
@joelwurtz
joelwurtz deleted the fix/object-mapper-aware-transform branch December 3, 2026 15:43
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.

1 participant