Skip to content

Commit

Permalink
Merge pull request #24 from Ehyiah/fix-mapFromTarget
Browse files Browse the repository at this point in the history
fix reading from originObject when using custom target destination
  • Loading branch information
Ehyiah authored Mar 4, 2024
2 parents 231f272 + 8eddb52 commit 0356a78
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 0356a78

Please sign in to comment.