Commit af8fbfa 1 parent 9d8e927 commit af8fbfa Copy full SHA for af8fbfa
File tree 2 files changed +6
-1
lines changed
src/Transformer/Implementation
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 19
19
* fix: mapping to object extending ` stdClass ` to property with no setter.
20
20
* feat: ` stdClass ` to ` stdClass ` mapping should work correctly.
21
21
* feat: Mapping to existing values in a dynamic property.
22
+ * perf(` ObjectToObjectTransformer ` ): Prevent delegating to ` MainTransformer ` if
23
+ the current value in a dynamic property is a scalar.
22
24
23
25
## 1.0.0
24
26
Original file line number Diff line number Diff line change @@ -587,7 +587,10 @@ private function mapDynamicProperties(
587
587
}
588
588
589
589
590
- if ($ currentTargetPropertyValue === null ) {
590
+ if (
591
+ $ currentTargetPropertyValue === null
592
+ || is_scalar ($ currentTargetPropertyValue )
593
+ ) {
591
594
/** @psalm-suppress MixedAssignment */
592
595
$ targetPropertyValue = $ sourcePropertyValue ;
593
596
} else {
You can’t perform that action at this time.
0 commit comments