@@ -98,6 +98,13 @@ class PluginState
98
98
*/
99
99
protected $ mergeExtraDeep = false ;
100
100
101
+ /**
102
+ * Whether to merge the replace section.
103
+ *
104
+ * @var bool $mergeReplace
105
+ */
106
+ protected $ mergeReplace = true ;
107
+
101
108
/**
102
109
* Whether to merge the scripts section.
103
110
*
@@ -160,6 +167,7 @@ public function loadSettings()
160
167
'merge-dev ' => true ,
161
168
'merge-extra ' => false ,
162
169
'merge-extra-deep ' => false ,
170
+ 'merge-replace ' => true ,
163
171
'merge-scripts ' => false ,
164
172
],
165
173
$ extra ['merge-plugin ' ] ?? []
@@ -175,6 +183,7 @@ public function loadSettings()
175
183
$ this ->mergeDev = (bool )$ config ['merge-dev ' ];
176
184
$ this ->mergeExtra = (bool )$ config ['merge-extra ' ];
177
185
$ this ->mergeExtraDeep = (bool )$ config ['merge-extra-deep ' ];
186
+ $ this ->mergeReplace = (bool )$ config ['merge-replace ' ];
178
187
$ this ->mergeScripts = (bool )$ config ['merge-scripts ' ];
179
188
}
180
189
@@ -386,6 +395,18 @@ public function shouldMergeExtraDeep()
386
395
return $ this ->mergeExtraDeep ;
387
396
}
388
397
398
+ /**
399
+ * Should the replace section be merged?
400
+ *
401
+ * By default, the replace section is merged.
402
+ *
403
+ * @return bool
404
+ */
405
+ public function shouldMergeReplace ()
406
+ {
407
+ return $ this ->mergeReplace ;
408
+ }
409
+
389
410
/**
390
411
* Should the scripts section be merged?
391
412
*
0 commit comments