diff --git a/object_mapper.rst b/object_mapper.rst index 625466ffefc..61bb6055c59 100644 --- a/object_mapper.rst +++ b/object_mapper.rst @@ -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())] public string $firstName = ''; public string $lastName = '';