src/Leevel/Option/Load.php
protected function mergeComposerOption(array $options, IApp $app, array $optionFiles): array
    {
        $data = [];

        $path = $app->path();

        foreach ($optionFiles as $key => $files) {
            if (!is_array($files)) {
                $files = [$files];
            }

            $optionData = [];

            foreach ($files as $item) {
                if (!is_file($item)) {
                    $item = $path.'/'.$item;
                }

                if (!is_file($item)) {
                    $e = sprintf('Option file %s is not exist.', $item);

                    throw new RuntimeException($e);
                }

                $optionData = array_merge($optionData, include $item);
            }

            if (array_key_exists($key, $options)) {
                $options[$key] = array_merge($options[$key], $optionData);
            } else {
                $options[$key] = $optionData;
            }
        }

        return $options;
    }
protected function mergeComposerOption(array $options, IApp $app, array $optionFiles): array
    {
        $data = [];

        $path = $app->path();

        foreach ($optionFiles as $key => $files) {
            if (!is_array($files)) {
                $files = [$files];
            }

            $optionData = [];

            foreach ($files as $item) {
                if (!is_file($item)) {
                    $item = $path.'/'.$item;
                }

                if (!is_file($item)) {
                    $e = sprintf('Option file %s is not exist.', $item);

                    throw new RuntimeException($e);
                }

                $optionData = array_merge($optionData, include $item);
            }

            if (array_key_exists($key, $options)) {
                $options[$key] = array_merge($options[$key], $optionData);
            } else {
                $options[$key] = $optionData;
            }
        }

        return $options;
    }
合并 composer 配置数据.

@param array               $options
@param \Leevel\Kernel\IApp $app
@param array               $optionFiles

@return array