Skip to content

Commit 004828e

Browse files
radimvaculikf3l1x
authored andcommitted
Replace lcg_value with random_bytes
As lcg_value is deprecated since PHP 8.4
1 parent ae26e38 commit 004828e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Environment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static function setupVariables(string $testerDir): void
7575

7676
// Temp, cache directories
7777
define('TMP_DIR', TESTER_DIR . '/tmp');
78-
define('TEMP_DIR', TMP_DIR . '/tests/' . getmypid() . '/' . md5(uniqid((string) microtime(true), true) . lcg_value() . mt_rand(0, 20) . microtime()));
78+
define('TEMP_DIR', TMP_DIR . '/tests/' . getmypid() . '/' . md5(uniqid((string) microtime(true), true) . bin2hex(random_bytes(8)) . mt_rand(0, 20) . microtime()));
7979
define('CACHE_DIR', TMP_DIR . '/cache');
8080
ini_set('session.save_path', TEMP_DIR);
8181

0 commit comments

Comments
 (0)