From cb20ab0e27b1e38714804f6d8c50a325b76d2b1f Mon Sep 17 00:00:00 2001 From: Tom H Anderson Date: Mon, 19 Mar 2018 12:35:12 -0600 Subject: [PATCH] Remainder of patchKey calls have been changed to replaceKey. --- src/Model/AuthenticationModel.php | 16 ++++++++-------- src/Model/DoctrineAdapterModel.php | 4 ++-- src/Model/InputFilterModel.php | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Model/AuthenticationModel.php b/src/Model/AuthenticationModel.php index a57d07bb..a9175268 100644 --- a/src/Model/AuthenticationModel.php +++ b/src/Model/AuthenticationModel.php @@ -440,7 +440,7 @@ public function saveAuthenticationMap($auth, $module, $version = null) 422 ); } - $this->globalConfig->patchKey($key, $auth); + $this->globalConfig->replaceKey($key, $auth); $this->localConfig->deleteKey($key); return true; } @@ -613,7 +613,7 @@ protected function patchHttpAuthConfig(AuthenticationEntity $entity, array $glob protected function patchOAuth2Config(AuthenticationEntity $entity, array $global, array $local) { if (isset($global['route_match']) && $global['route_match']) { - $this->globalConfig->patchKey('router.routes.oauth.options.route', $global['route_match']); + $this->globalConfig->replaceKey('router.routes.oauth.options.route', $global['route_match']); } switch ($entity->getDsnType()) { @@ -633,7 +633,7 @@ protected function patchOAuth2Config(AuthenticationEntity $entity, array $global } $key = 'zf-oauth2'; - $this->localConfig->patchKey($key, $toSet); + $this->localConfig->replaceKey($key, $toSet); } /** @@ -756,7 +756,7 @@ protected function saveAuthenticationAdapter(array $adapter) break; } - $this->localConfig->patchKey($key, $config); + $this->localConfig->replaceKey($key, $config); $this->globalConfig->deleteKey($key); return true; } @@ -803,8 +803,8 @@ protected function updateOAuth2Route($url) 'spec' => '%oauth%', 'regex' => '(?P(' . implode('|', $routes) . '))', ]; - $this->globalConfig->patchKey('router.routes.oauth.options', $options); - $this->globalConfig->patchKey('router.routes.oauth.type', 'regex'); + $this->globalConfig->replaceKey('router.routes.oauth.options', $options); + $this->globalConfig->replaceKey('router.routes.oauth.type', 'regex'); } /** @@ -839,8 +839,8 @@ protected function removeOAuth2Route($url) 'spec' => '%oauth%', 'regex' => '(?P(' . implode('|', $routes) . '))', ]; - $this->globalConfig->patchKey('router.routes.oauth.options', $options); - $this->globalConfig->patchKey('router.routes.oauth.type', 'regex'); + $this->globalConfig->replaceKey('router.routes.oauth.options', $options); + $this->globalConfig->replaceKey('router.routes.oauth.type', 'regex'); return true; } diff --git a/src/Model/DoctrineAdapterModel.php b/src/Model/DoctrineAdapterModel.php index 529732ec..6eb762f1 100644 --- a/src/Model/DoctrineAdapterModel.php +++ b/src/Model/DoctrineAdapterModel.php @@ -40,8 +40,8 @@ public function __construct(ConfigResource $globalConfig, ConfigResource $localC public function create($name, array $adapterConfig) { $key = "doctrine.connection.{$name}"; - $this->globalConfig->patchKey($key, []); - $this->localConfig->patchKey($key, $adapterConfig); + $this->globalConfig->replaceKey($key, []); + $this->localConfig->replaceKey($key, $adapterConfig); return new DoctrineAdapterEntity($name, $adapterConfig); } diff --git a/src/Model/InputFilterModel.php b/src/Model/InputFilterModel.php index 4c9ba371..88c494e8 100644 --- a/src/Model/InputFilterModel.php +++ b/src/Model/InputFilterModel.php @@ -132,7 +132,7 @@ protected function addInputFilter($module, $controller, $inputFilter, $validator if (! isset($config['zf-content-validation'][$controller])) { $validatorName = $validatorName ?: $this->generateValidatorName($controller); - $config = $configModule->patchKey( + $config = $configModule->replaceKey( ['zf-content-validation', $controller, 'input_filter'], $validatorName ); @@ -150,7 +150,7 @@ protected function addInputFilter($module, $controller, $inputFilter, $validator $config['input_filter_specs'][$validator] = $inputFilter; - $updated = $configModule->patchKey(['input_filter_specs', $validator], $inputFilter); + $updated = $configModule->replaceKey(['input_filter_specs', $validator], $inputFilter); if (! is_array($updated)) { return false; }