From 7397e2f4311bf9e7171cf8f23401e12f79cb3285 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Sat, 11 Aug 2018 21:23:49 -0500 Subject: [PATCH] Mark MtRandGenerator and OpenSslGenerator as deprecated --- src/Generator/MtRandGenerator.php | 4 ++++ src/Generator/OpenSslGenerator.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/Generator/MtRandGenerator.php b/src/Generator/MtRandGenerator.php index f58b783..d38ea5f 100644 --- a/src/Generator/MtRandGenerator.php +++ b/src/Generator/MtRandGenerator.php @@ -18,6 +18,10 @@ namespace Ramsey\Uuid\Generator; * MtRandRandomGenerator provides functionality to generate strings of random * binary data using the `mt_rand()` PHP function * + * @deprecated 4.0.0 The mt_rand() function is not a reliable source of + * randomness. The default RandomBytesGenerator, which uses the + * random_bytes() function, is recommended as the safest and most reliable + * source of randomness. * @link http://php.net/mt_rand */ class MtRandGenerator implements RandomGeneratorInterface diff --git a/src/Generator/OpenSslGenerator.php b/src/Generator/OpenSslGenerator.php index e8ec6a4..2661c1f 100644 --- a/src/Generator/OpenSslGenerator.php +++ b/src/Generator/OpenSslGenerator.php @@ -21,6 +21,10 @@ namespace Ramsey\Uuid\Generator; * The use of this generator requires PHP to be compiled using the * `--with-openssl` option. * + * @deprecated 4.0.0 The openssl_random_pseudo_bytes() function is not a reliable + * source of randomness. The default RandomBytesGenerator, which uses the + * random_bytes() function, is recommended as the safest and most reliable + * source of randomness. * @link http://php.net/openssl_random_pseudo_bytes */ class OpenSslGenerator implements RandomGeneratorInterface