-
Notifications
You must be signed in to change notification settings - Fork 17
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
DX initiative #20
Comments
hi!
MapTo(['array' => 'phrase', Bar::class => 'phrase'])
|
if I recall Ryan's message:
A) I think this could be done with a
if class UserDto
{
public function __construct(
#[MapTo(target: UserEntity::class, field; 'password', transformer: MyPasswordEncoder::class, method: 'encodePassword')]
public string $plainPassword,
) {
}
} B) This makes me think that the C) I think the I think D&E are more related to Api-Platform |
Most of comments were addressed, only remaining point is if we want an user to fully replace a Mapper for a specific source and target, i'm not sure since you can tell how to instantiate (with provider) and which property to map (with attributes and transformers) this roughly covers most use cases. We can close this if we don't want it for the moment (i think there is already enough features for a 9.0 not need to add more) |
Thanks a lot for all the work @joelwurtz <3 much appreciated, I think we can close this issue now. |
As this issue is pinned, I'm suggesting a new DX improvement here:
|
What do you consider "invalid" properties ? Any example to share ? |
For example with this attribute, no errors are thrown, the generate code is just empty. #[MapTo(target: UserEntity::class, field; 'covfefe')] But it should be possible for AutoMapper to know there are no "covfefe" on UserEntity. |
Hey,
The objective is to make AutoMapper easier to work with for developpers.
In this issue I'll try to list all stuff developpers needs to fit their needs when using AutoMapper.
All the following stuff are examples and subject to change in their implementation.
beforeInitialization
afterInitialization
afterHydratation
The text was updated successfully, but these errors were encountered: