public function set(string $key, $value): void
    {
        $key = explode('.', $key);
        $last = array_pop($key);
        $result = &$this->config;

        foreach ($key as $part) {
            if (!isset($result[$part]) || !is_array($result[$part])) {
                $result[$part] = [];
            }
            $result = &$result[$part];
        }
        $result[$last] = $value;
    }