Skip to content

Commit

Permalink
fix reading from originObject when using custom target destination
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehyiah committed Mar 4, 2024
1 parent 231f272 commit 8eddb52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MappingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function mapFromTarget(object $sourceObject, object $mappingAwareTargetOb
if ($propertyAccessor->isReadable($sourceObject, $targetPropertyPath)) {
if (isset($targetMappingOptions['transformer'])) {
$reverseTransformer = $this->transformationLocator->returnTransformer($targetMappingOptions['transformer']);
$value = $reverseTransformer->reverseTransform($propertyAccessor->getValue($sourceObject, $sourcePropertyName), $targetMappingOptions['options'], $sourceObject, $mappingAwareTargetObject);
$value = $reverseTransformer->reverseTransform($propertyAccessor->getValue($sourceObject, $targetPropertyPath), $targetMappingOptions['options'], $sourceObject, $mappingAwareTargetObject);
} else {
$value = $propertyAccessor->getValue($sourceObject, $targetPropertyPath);
}
Expand Down

0 comments on commit 8eddb52

Please sign in to comment.