Skip to content

Conversation

@joelwurtz
Copy link
Member

@joelwurtz joelwurtz commented Dec 2, 2025

This allow to do :

class Pet {
    #[MapTo(target: 'array', targetPropertyType: 'int')]
    public string $legsNumber;
}

Which will then choose the right transformer that will cast this value into a string when mapping to an array;

@joelwurtz joelwurtz changed the title feat(type): allow to define source / target property type in attribut… feat(type): allow to define source / target property type in attribute with a string Dec 2, 2025
@joelwurtz joelwurtz force-pushed the feat/type-in-attribute branch from 31a1e01 to f8b073f Compare December 2, 2025 15:11
@joelwurtz joelwurtz force-pushed the feat/type-in-attribute branch from f8b073f to 6de41c7 Compare December 2, 2025 16:28
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.

2 participants