lib/ExternalUriGenerator/Uri.php
private function setQuery($query)
    {
        $query = ltrim($query, '?');
        $parameters = [];
        try {
            parse_str($query, $parameters);
            $this->query = $query;
        } catch (\Exception $e) {
            throw new \InvalidArgumentException('Invalid query', 0, $e);
        }
    }
private function setQuery($query)
    {
        $query = ltrim($query, '?');
        $parameters = [];
        try {
            parse_str($query, $parameters);
            $this->query = $query;
        } catch (\Exception $e) {
            throw new \InvalidArgumentException('Invalid query', 0, $e);
        }
    }
@param string $query

@throws \InvalidArgumentException