diff --git a/composer.lock b/composer.lock index 6905d4bf24755daf424f22ed4653fbe7b69569f1..1b80e7accae6826e4dbe0fa7654692cf656d9ee6 100644 --- a/composer.lock +++ b/composer.lock @@ -535,7 +535,7 @@ "dist": { "type": "path", "url": "core", - "reference": "833c40df380059ecff9e327223e066ac3a41c328" + "reference": "f3d27c6d13a1d3b6b5e3f2bf2074f63d24c17603" }, "require": { "asm89/stack-cors": "^1.1", @@ -765,7 +765,8 @@ "lib/Drupal/Core/Site/Settings.php" ], "files": [ - "includes/bootstrap.inc" + "includes/bootstrap.inc", + "includes/guzzle_php81_shim.php" ] }, "scripts": { diff --git a/core/composer.json b/core/composer.json index aa852411ecf25466168b6d9ee12b090a30c942ed..0121aca5c95a1db6bdd4239a29cc0cfe49bb719b 100644 --- a/core/composer.json +++ b/core/composer.json @@ -203,7 +203,8 @@ "lib/Drupal/Core/Site/Settings.php" ], "files": [ - "includes/bootstrap.inc" + "includes/bootstrap.inc", + "includes/guzzle_php81_shim.php" ] }, "config": { diff --git a/core/includes/guzzle_php81_shim.php b/core/includes/guzzle_php81_shim.php new file mode 100644 index 0000000000000000000000000000000000000000..6b967ee0af88b888ec75c7ce2bbd71db76092b76 --- /dev/null +++ b/core/includes/guzzle_php81_shim.php @@ -0,0 +1,31 @@ +<?php + +// phpcs:ignoreFile + +namespace GuzzleHttp; + +/** + * Generates URL-encoded query string. + * + * This shim exists to make Guzzle 6 PHP 8.1 compatible. + * + * @link https://php.net/manual/en/function.http-build-query.php + * + * @param object|array $data + * May be an array or object containing properties. + * @param string|null $numeric_prefix + * (optional) If numeric indices are used in the base array and this parameter + * is provided, it will be prepended to the numeric index for elements in + * the base array only. + * @param string|null $arg_separator [optional] <p> + * (optional) arg_separator.output is used to separate arguments, unless this + * parameter is specified, and is then used. + * @param int $encoding_type + * (optional) By default, PHP_QUERY_RFC1738. + * + * @return string + * A URL-encoded string. + */ +function http_build_query($data, $numeric_prefix = '', $arg_separator = '&', $encoding_type = \PHP_QUERY_RFC1738) { + return \http_build_query($data, is_null($numeric_prefix) ? '' : $numeric_prefix, $arg_separator, $encoding_type); +}