-
Notifications
You must be signed in to change notification settings - Fork 31
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 guessing of property names #1
Comments
I am currently reading through the source to wrap my head around the architecture of this package. I'd really like to be a major contributor to this down the line. There are clearly some arguments for and against this feature so I definitely think it should be something that must be explicitly set in the $config
->registerMapping(CrazySource::class, SomeOtherCrazyDestination::class)
->withoutNamingConventions(); The method |
That's definitely a step in the right direction. Using a That being said, I'm open for other ideas. I think the hardest part will be the actual guessing of source properties. If you wanna take a shot at this, then go ahead. I'll be more than happy to merge a good solution for this. Thanks for your interest! |
update local fork with latest changes from master
As it is now, the classes need to follow strict naming conventions in order to be mapped. A nice feature would be to be able to change this behaviour via the
Options
, making the mapper instead guess the source property name.For example, when looking for the property
firstName
, the mapper would match the first occurrence of either [firstName, first_name, FirstName, ...].Credit
The text was updated successfully, but these errors were encountered: