Skip to content

Conversation

tito10047
Copy link

Fixed documentation for transfomrer inicialization. Need to be new instance creation instance of class path

Fixed documentation for transfomrer inicialization.
Need to be new instance creation instance of class path
@carsonbot carsonbot changed the title fixed doxumentation object_mapper.rst fixed doxumentation object_mapper.rst Aug 11, 2025
{
// this property's value will be generated by the transformer
#[Map(target: 'fullName', transform: FullNameTransformer::class)]
#[Map(target: 'fullName', transform: new FullNameTransformer())]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while this works I would keep the previous form as in that case the class name is interpreted as a service id and thus the code will still work when our transformer requires dependencies and so has to be built by the service container

Copy link
Author

@tito10047 tito10047 Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But its not work on v7.3.2. Im figure this just now.
Maybe is because I do some manipulation with Mapper Service?

@tito10047
Copy link
Author

Yes, this is because I decorade Object mapper and lost transform callbable locator.

@tito10047 tito10047 closed this Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants