public function setName(string $name): string
    {
        if ($this->isStarted()) {
            throw new LogicException('Cannot change the name of an active session');
        }

        if (! preg_match('/^[a-zA-Z0-9]+$/', $name)) {
            throw new InvalidArgumentException('Session name provided contains invalid characters; must be alphanumeric only and cannot be empty');
        }

        if (! preg_match('/.*[a-zA-Z]+.*/', $name)) {
            throw new InvalidArgumentException('Session name cannot be a numeric');
        }

        return session_name($name);
    }