Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot map to a class that has adder and remover AND constructor arguments #211

Open
wuchen90 opened this issue Dec 6, 2024 · 0 comments

Comments

@wuchen90
Copy link

wuchen90 commented Dec 6, 2024

When the target class has adder and remover for a property and if we have this said property as constructor arguments also, the mapper will break because the \AutoMapper\Transformer\AbstractArrayTransformer will check for adder and try to use it.

In case where the target is just a classname and not an instance, an error will be thrown.

Undefined variable $constructarg

I tried to fix it by my own but my knowledge is limited on this matter, so I just made a test to reproduce this issue: wuchen90#1

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

No branches or pull requests

1 participant