From 4df80c610ac38a6a70a67bcb816ff55f42e0a736 Mon Sep 17 00:00:00 2001 From: catch <catch@35733.no-reply.drupal.org> Date: Mon, 10 Jul 2023 16:57:05 +0100 Subject: [PATCH] Issue #3358384 by Spokje, mondrake: Deprecate \Drupal\Tests\RandomGeneratorTrait::randomStringValidate --- core/tests/Drupal/Tests/RandomGeneratorTrait.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/tests/Drupal/Tests/RandomGeneratorTrait.php b/core/tests/Drupal/Tests/RandomGeneratorTrait.php index b39bd7f29b7b..eccac674f1b4 100644 --- a/core/tests/Drupal/Tests/RandomGeneratorTrait.php +++ b/core/tests/Drupal/Tests/RandomGeneratorTrait.php @@ -41,8 +41,15 @@ public function randomString($length = 8) { * * @return bool * TRUE if the random string is valid, FALSE if not. + * + * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. + * Use \Drupal\TestTools\Random::stringValidate() instead. + * + * @see https://www.drupal.org/node/3358389 */ public function randomStringValidate($string) { + @trigger_error(__METHOD__ . "() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use \Drupal\TestTools\Random::stringValidate() instead. See https://www.drupal.org/node/3358389", E_USER_DEPRECATED); + return Random::stringValidate($string); } -- GitLab