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
Allow context for map() with CustomMapper #83
Comments
Hi @pysarenkoa, this seems like a very reasonable thing to add. Do you want to open up a PR for this? Otherwise I'll look into adding this myself, let me know. |
Hi @mark-gerarts, thanks for your quick response. It will great if you do this yourself. |
This has been added in release 1.4.0. Keep in mind that the minimum PHP version has been bumped to 7.4 for this release, since 7.3 and below are EOL. |
@mark-gerarts does ther any chance to add the feature to 1.3 ? Since my app are using 7.3 php version. |
Hi @ahmed-bhs, I'm not really a fan of maintaining several branches. Is it an option that you depend on a specific commit of the library? If so I suggest you depend on
Then, once you're ready to upgrade to 7.4+, you can swap back to the regular branch. |
Allow context as third argument CustomMapper->mapToObject($source, $destination, array $context = []).
As result it works for mapToObject(), but not for map().
Propose:
line https://github.com/mark-gerarts/automapper-plus/blob/master/src/AutoMapper.php#L92
replace to
The text was updated successfully, but these errors were encountered: