Я использую drupal 8 и создаю пользовательский модуль при вызове API GET-запроса, с которым я сталкиваюсь нижеуказанная ошибка.
$client = \Drupal::httpClient();
$query_str = UrlHelper::buildQuery($query);
$request = $client->get($url);
try {
$response = json_decode($request->getBody(), true);
}
catch (RequestException $e) {
watchdog_exception('settings', $e);
}
PHP message: Error: Call to undefined function GuzzleHttp\Psr7\uri_for()
PHP 7.1
Drupal 8