@@ -58,6 +58,8 @@ public function __construct(
58
58
private string $ sourceClass ,
59
59
private string $ targetClass ,
60
60
private string $ providedTargetClass ,
61
+ private bool $ sourceAllowsDynamicProperties ,
62
+ private bool $ targetAllowsDynamicProperties ,
61
63
array $ allPropertyMappings ,
62
64
private bool $ instantiable ,
63
65
private bool $ cloneable ,
@@ -104,18 +106,20 @@ public function withTargetProxy(
104
106
bool $ constructorIsEager ,
105
107
): self {
106
108
return new self (
107
- $ this ->sourceClass ,
108
- $ this ->targetClass ,
109
- $ this ->providedTargetClass ,
110
- $ this ->allPropertyMappings ,
111
- $ this ->instantiable ,
112
- $ this ->cloneable ,
113
- $ this ->initializableTargetPropertiesNotInSource ,
114
- $ this ->sourceModifiedTime ,
115
- $ this ->targetModifiedTime ,
116
- $ this ->targetReadOnly ,
117
- $ constructorIsEager ,
118
- $ targetProxySkippedProperties ,
109
+ sourceClass: $ this ->sourceClass ,
110
+ targetClass: $ this ->targetClass ,
111
+ providedTargetClass: $ this ->providedTargetClass ,
112
+ sourceAllowsDynamicProperties: $ this ->sourceAllowsDynamicProperties ,
113
+ targetAllowsDynamicProperties: $ this ->targetAllowsDynamicProperties ,
114
+ allPropertyMappings: $ this ->allPropertyMappings ,
115
+ instantiable: $ this ->instantiable ,
116
+ cloneable: $ this ->cloneable ,
117
+ initializableTargetPropertiesNotInSource: $ this ->initializableTargetPropertiesNotInSource ,
118
+ sourceModifiedTime: $ this ->sourceModifiedTime ,
119
+ targetModifiedTime: $ this ->targetModifiedTime ,
120
+ targetReadOnly: $ this ->targetReadOnly ,
121
+ constructorIsEager: $ constructorIsEager ,
122
+ targetProxySkippedProperties: $ targetProxySkippedProperties ,
119
123
cannotUseProxyReason: null
120
124
);
121
125
}
@@ -124,18 +128,20 @@ public function withReasonCannotUseProxy(
124
128
string $ reason
125
129
): self {
126
130
return new self (
127
- $ this ->sourceClass ,
128
- $ this ->targetClass ,
129
- $ this ->providedTargetClass ,
130
- $ this ->allPropertyMappings ,
131
- $ this ->instantiable ,
132
- $ this ->cloneable ,
133
- $ this ->initializableTargetPropertiesNotInSource ,
134
- $ this ->sourceModifiedTime ,
135
- $ this ->targetModifiedTime ,
136
- $ this ->targetReadOnly ,
137
- $ this ->constructorIsEager ,
138
- [],
131
+ sourceClass: $ this ->sourceClass ,
132
+ targetClass: $ this ->targetClass ,
133
+ providedTargetClass: $ this ->providedTargetClass ,
134
+ sourceAllowsDynamicProperties: $ this ->sourceAllowsDynamicProperties ,
135
+ targetAllowsDynamicProperties: $ this ->targetAllowsDynamicProperties ,
136
+ allPropertyMappings: $ this ->allPropertyMappings ,
137
+ instantiable: $ this ->instantiable ,
138
+ cloneable: $ this ->cloneable ,
139
+ initializableTargetPropertiesNotInSource: $ this ->initializableTargetPropertiesNotInSource ,
140
+ sourceModifiedTime: $ this ->sourceModifiedTime ,
141
+ targetModifiedTime: $ this ->targetModifiedTime ,
142
+ targetReadOnly: $ this ->targetReadOnly ,
143
+ constructorIsEager: $ this ->constructorIsEager ,
144
+ targetProxySkippedProperties: [],
139
145
cannotUseProxyReason: $ reason ,
140
146
);
141
147
}
@@ -277,4 +283,14 @@ public function constructorIsEager(): bool
277
283
{
278
284
return $ this ->constructorIsEager ;
279
285
}
286
+
287
+ public function getSourceAllowsDynamicProperties (): bool
288
+ {
289
+ return $ this ->sourceAllowsDynamicProperties ;
290
+ }
291
+
292
+ public function getTargetAllowsDynamicProperties (): bool
293
+ {
294
+ return $ this ->targetAllowsDynamicProperties ;
295
+ }
280
296
}
0 commit comments