From f91cf8f98bd621c6751a0ff2fe698e576e9d04bd Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Tue, 20 May 2014 18:15:23 +0200 Subject: [PATCH] #6266 - Using `ArrayUtils::merge()` for merging constructor parameters --- .../Zend/Mvc/Service/ServiceManagerConfig.php | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/library/Zend/Mvc/Service/ServiceManagerConfig.php b/library/Zend/Mvc/Service/ServiceManagerConfig.php index 4b621b0cc81..dc724027c7e 100644 --- a/library/Zend/Mvc/Service/ServiceManagerConfig.php +++ b/library/Zend/Mvc/Service/ServiceManagerConfig.php @@ -16,6 +16,7 @@ use Zend\ServiceManager\ServiceLocatorInterface; use Zend\ServiceManager\ServiceManager; use Zend\ServiceManager\ServiceManagerAwareInterface; +use Zend\Stdlib\ArrayUtils; class ServiceManagerConfig extends Config { @@ -119,16 +120,17 @@ public function __construct(array $configuration = array()) return $serviceLocator; }; - $configuration = array_replace_recursive(array( - 'invokables' => $this->invokables, - 'factories' => $this->factories, - 'abstract_factories' => $this->abstractFactories, - 'aliases' => $this->aliases, - 'shared' => $this->shared, - 'delegators' => $this->delegators, - 'initializers' => $this->initializers, - ), $configuration); - - parent::__construct($configuration); + parent::__construct(ArrayUtils::merge( + array( + 'invokables' => $this->invokables, + 'factories' => $this->factories, + 'abstract_factories' => $this->abstractFactories, + 'aliases' => $this->aliases, + 'shared' => $this->shared, + 'delegators' => $this->delegators, + 'initializers' => $this->initializers, + ), + $configuration + )); } }