The default config merge function, instead of using the laravel mergeConfigRom it.

@param $path
@param $key
175210
protected function defaultConfigStrategy($path, $key)
    {
        $config = $this->app->make('config')->get($key, []);
        $this->app->make('config')->set($key, array_replace_recursive(require $path, $config));
    }
1298128
protected function merge($key, $result)
    {
        if (is_null($key)) {

            // key is null, so just merge with root
            $this->config = array_merge($this->config, $result);

        } elseif (strpos($key, '.') === false) {

            // non-compound key, just merge key with incoming data
            if (!isset($this->config[$key]) && !array_key_exists($key, $this->config)) {
                throw new KeyDoesNotExistException($key);
            }

            // if $this->config[$key] is not an array, we convert it one before merging
            if (!is_array($this->config[$key])) {
                $this->config[$key] = [];
            }

            $this->config[$key] = array_merge($this->config[$key], $result);

        } else {

            // compound key, so merge with parent reference
            list($parent, $child) = $this->getParentChildKeys($key);
            $config = $this->resolveKey($parent);
            $config[$child] = array_merge($config[$child], $result);

        }
    }
554200
public function copyFrom($key, $removeFields = [])
    {
        $temp = $this->config[$key];
        foreach ($removeFields as $name) {
            if (array_key_exists($name, $temp)) {
                unset($temp[$name]);
            }
        }

        $this->config[$this->pointer] = ArrayHelper::merge($this->config[$this->pointer], $temp);
    }
1011264
public function configDir(string $path): self
    {
        $this->validatePathIsRelativeToProject($path, __METHOD__);
        $this->configDir = rtrim($path, '/');

        return $this;
    }
1147359
private function config_path($path = '')
    {
        return function_exists('config_path') ? config_path($path) : app()->basePath() . DIRECTORY_SEPARATOR . 'config' . ($path ? DIRECTORY_SEPARATOR . $path : $path);
    }
873104
public function setPath($path): void
    {
        if (!is_dir($path)) {
            throw new ConfigException('Configuration directory is not exists');
        }
        $this->path = rtrim($path, '/');
    }
421590
public function loadConfig($path)
    {
        //add extension to the config file
        $path = sprintf("%s.%s", $path, $this->config_file_extension);

        //lets try loading the config file data
        return $this->loader->load($path);
    }
485427
public void addMergePath(PathImpl path)
  {
    if (! (path instanceof MergePath)) {
      // Need to normalize so directory paths ends with a "./"
      // XXX:
      //if (path.isDirectory())
      //  path = path.lookup("./");

      ArrayList<PathImpl> pathList = ((MergePath) _root)._pathList;

      if (! pathList.contains(path))
        pathList.add(path);
    }
    else if (((MergePath) path)._root == _root)
      return;
    else {
      MergePath mergePath = (MergePath) path;
      ArrayList<PathImpl> subPaths = mergePath.getMergePaths();
      String pathName = "./" + mergePath._pathname + "/";

      for (int i = 0; i < subPaths.size(); i++) {
        PathImpl subPath = subPaths.get(i);

        addMergePath(subPath.lookup(pathName));
      }
    }
  }
549157
public function addConfigVars($path = 'config.ini') {
        if ($path === 'config.php') {
            $arrayIniParams = parse_ini_file(dirname(__FILE__).'/'.$path,true);
        } else {
            $arrayIniParams = parse_ini_file($path, true);
        }
        foreach ($arrayIniParams as $key => $iniParam) {
            $this->storage[$key] = $iniParam;
        }
    }
138027
def merge_config(yaml, params)
      if params['post'].has_key? 'yaml'
        params['post']['yaml'].each do |key, value|
          if value == 'true'
            yaml[key] = true
          elsif value == 'false'
            yaml[key] = false
          else
            yaml[key] = value
          end
        end
      end

      yaml
    end
188631
public function setConfig($key,$value = ''){
		if(is_array($key)){
			$this->_config = array_merge($this->_config,$key);
		}
		else{
			$this->_config[$key] = $value;
		}
		$this->updateConfig();
		
		return $this;
	}
886723
public function setConfig($key, $value = null, $merge = true)
    {
        $this->_defaultConfig = [
            'messages' => [
                'success' => __d('core', 'Object has been moved'),
                'error'   => __d('core', 'Object could not been moved')
            ],
            'action' => 'index',
        ];

        return parent::setConfig($key, $value, $merge);
    }
259558
public static function addPath($path)
    {
        if ( ! isset(self::$_configPaths[$path]))
        {
            self::$_configPaths[$path] = $path;
        }
    }
455540
protected function mergeConfigRecursivelyFrom($path, $key)
    {
        $config = $this->app['config']->get($key, []);

        $this->app['config']->set($key, array_replace_recursive(require $path, $config));
    }
1192941
public function generateConfigFile($path, $noCache = false)
    {
        $config = ConfigCachingService::getConfigJson($noCache);
        if ($config === '{}') {
            $this->line('No config specified. Config not written to file.');
            return;
        }

        $contents = 'Config.addConfig(' . $config . ');';

        File::put($path, $contents);

        $this->line("Generated $path");
    }
1200981
public function configDefault($key, $default = null)
    {
        $value = $this->config($key);
        if ($value === null) {
            $this->config($key, $default);
        }
    }
82372
public static function mergeConfig($key, $config)
    {
        $values = Hash::merge((array) Configure::read($key), $config);
        Configure::write($key, $values);

        return $values;
    }