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

feat: better private properties handling #1

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

nikophil
Copy link
Collaborator

@nikophil nikophil commented Sep 20, 2023

What this PR does:

  • fixes the case where source object have private parameters in their constructor
  • add a way to call private mutators with extractCallbacks, the same way it's already done for private property access
  • add a parameter mapPrivateProperties and use it to decide whether to force private properties/mutators

fixes #2

tests/AutoMapperBaseTest.php Outdated Show resolved Hide resolved
@nikophil nikophil force-pushed the feat/handle-private-properties branch 6 times, most recently from ec36238 to 74648e7 Compare September 22, 2023 13:25
@nikophil nikophil force-pushed the feat/handle-private-properties branch from 74648e7 to c883cbd Compare September 22, 2023 14:13
@Korbeil
Copy link
Member

Korbeil commented Sep 26, 2023

Thanks for your contribution @nikophil ! 🙏

@Korbeil Korbeil merged commit ad6a5d6 into jolicode:main Sep 26, 2023
2 checks passed
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.

Private properties in constructor are not mapped
2 participants