Verified Commit 3eb086bb authored by Dave Long's avatar Dave Long
Browse files

Issue #3442763 by smustgrave: Remove deprecated code in RandomGeneratorTrait.php

parent bfaae1b1
Loading
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
@@ -33,28 +33,6 @@ public function randomString($length = 8) {
    return Random::string($length);
  }

  /**
   * Callback for random string validation.
   *
   * @see \Drupal\Component\Utility\Random::string()
   *
   * @param string $string
   *   The random string to validate.
   *
   * @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);
  }

  /**
   * Generates a unique random string containing letters and numbers.
   *