laravel-websockets/tests/Server
Fabian @ Blax Software d61150b126 fix(fork): reseed mt_rand in every message child
A forked child inherits the server's Mersenne Twister state. Once the
server has drawn one mt_rand() (react/dns does for DNS query ids), every
message child continued from the same state, so array_rand(), rand() and
shuffle() returned the same values in each one. In learn-atc,
question.random kept serving the same two questions in turn (#3088).

prepareChild() now calls mt_srand(), with a fork test for both the fix
and the failure mode.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 09:22:50 +02:00
..
Fixtures fix(fork): children never outlive the server or hold its port (#2465) 2026-10-14 10:38:11 +02:00
ChildFatalErrorGuardTest.php fix(fork): children never outlive the server or hold its port (#2465) 2026-10-14 10:38:11 +02:00
ChildProcessesTest.php fix(fork): reseed mt_rand in every message child 2026-10-20 09:22:50 +02:00