Skip to content
Snippets Groups Projects
Commit 5aa70a9f authored by catch's avatar catch
Browse files

Issue #3385095 by Spokje: Replace call to deprecated function GuzzleHttp\default_user_agent()

parent 2e5cff96
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
use Drupal\Core\Site\Settings; use Drupal\Core\Site\Settings;
use GuzzleHttp\Client; use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack; use GuzzleHttp\HandlerStack;
use GuzzleHttp\Utils;
/** /**
* Helper class to construct a HTTP client with Drupal specific config. * Helper class to construct a HTTP client with Drupal specific config.
...@@ -49,7 +50,7 @@ public function fromOptions(array $config = []) { ...@@ -49,7 +50,7 @@ public function fromOptions(array $config = []) {
'verify' => TRUE, 'verify' => TRUE,
'timeout' => 30, 'timeout' => 30,
'headers' => [ 'headers' => [
'User-Agent' => 'Drupal/' . \Drupal::VERSION . ' (+https://www.drupal.org/) ' . \GuzzleHttp\default_user_agent(), 'User-Agent' => 'Drupal/' . \Drupal::VERSION . ' (+https://www.drupal.org/) ' . Utils::defaultUserAgent(),
], ],
'handler' => $this->stack, 'handler' => $this->stack,
// Security consideration: prevent Guzzle from using environment variables // Security consideration: prevent Guzzle from using environment variables
......
...@@ -745,14 +745,6 @@ parameters: ...@@ -745,14 +745,6 @@ parameters:
count: 1 count: 1
path: lib/Drupal/Core/Form/FormValidator.php path: lib/Drupal/Core/Form/FormValidator.php
-
message: """
#^Call to deprecated function GuzzleHttp\\\\default_user_agent\\(\\)\\:
default_user_agent will be removed in guzzlehttp/guzzle\\:8\\.0\\. Use Utils\\:\\:defaultUserAgent instead\\.$#
"""
count: 1
path: lib/Drupal/Core/Http/ClientFactory.php
- -
message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:11\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#" message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:11\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
count: 4 count: 4
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment