diff --git a/src/Generator/DefaultTimeGenerator.php b/src/Generator/DefaultTimeGenerator.php index 9733ed6..f05d818 100644 --- a/src/Generator/DefaultTimeGenerator.php +++ b/src/Generator/DefaultTimeGenerator.php @@ -79,7 +79,7 @@ class DefaultTimeGenerator implements TimeGeneratorInterface if ($clockSeq === null) { // Not using "stable storage"; see RFC 4122, Section 4.2.1.1 - $clockSeq = mt_rand(0, 0x3fff); + $clockSeq = random_int(0, 0x3fff); } // Create a 60-bit time value as a count of 100-nanosecond intervals diff --git a/tests/Generator/DefaultTimeGeneratorTest.php b/tests/Generator/DefaultTimeGeneratorTest.php index 132c785..b12f6b5 100644 --- a/tests/Generator/DefaultTimeGeneratorTest.php +++ b/tests/Generator/DefaultTimeGeneratorTest.php @@ -166,7 +166,7 @@ class DefaultTimeGeneratorTest extends TestCase public function testGenerateUsesRandomSequenceWhenClockSeqNull() { $this->skipIfHhvm(); - $mt_rand = AspectMock::func('Ramsey\Uuid\Generator', 'mt_rand', 9622); + $mt_rand = AspectMock::func('Ramsey\Uuid\Generator', 'random_int', 9622); $defaultTimeGenerator = new DefaultTimeGenerator( $this->nodeProvider, $this->timeConverter,