Skip to content

fixed doxumentation object_mapper.rst #21280

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

Closed
wants to merge 1 commit into from
Closed

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
@@ -375,7 +375,7 @@ Then, use this service to format the mapped property::
class UserInput
{
// 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