@@ -241,16 +241,29 @@ public function has($name, $checkAbstractFactories = false)
241
241
*/
242
242
protected function configure (array $ config )
243
243
{
244
- $ this ->services = (isset ($ config ['services ' ]) ? $ config ['services ' ] : []) + $ this ->services ;
245
- $ this ->factories = (isset ($ config ['factories ' ]) ? $ config ['factories ' ] : []) + $ this ->factories ;
246
- $ this ->delegators = array_merge_recursive ($ this ->delegators , isset ($ config ['delegators ' ])
247
- ? $ config ['delegators ' ]
248
- : []);
249
- $ this ->shared = (isset ($ config ['shared ' ]) ? $ config ['shared ' ] : []) + $ this ->shared ;
250
- $ this ->aliases = (isset ($ config ['aliases ' ]) ? $ config ['aliases ' ] : []) + $ this ->aliases ;
251
- $ this ->sharedByDefault = isset ($ config ['shared_by_default ' ])
252
- ? $ config ['shared_by_default ' ]
253
- : $ this ->sharedByDefault ;
244
+ if (isset ($ config ['services ' ])) {
245
+ $ this ->services = $ config ['services ' ] + $ this ->services ;
246
+ }
247
+
248
+ if (isset ($ config ['factories ' ])) {
249
+ $ this ->factories = $ config ['factories ' ] + $ this ->factories ;
250
+ }
251
+
252
+ if (isset ($ config ['delegators ' ])) {
253
+ $ this ->delegators = array_merge_recursive ($ this ->delegators , $ config ['delegators ' ]);
254
+ }
255
+
256
+ if (isset ($ config ['shared ' ])) {
257
+ $ this ->shared = $ config ['shared ' ] + $ this ->shared ;
258
+ }
259
+
260
+ if (isset ($ config ['aliases ' ])) {
261
+ $ this ->aliases = $ config ['aliases ' ] + $ this ->aliases ;
262
+ }
263
+
264
+ if (isset ($ config ['shared_by_default ' ])) {
265
+ $ this ->sharedByDefault = $ config ['shared_by_default ' ];
266
+ }
254
267
255
268
// If lazy service configuration was provided, reset the lazy services
256
269
// delegator factory.
0 commit comments