Skip to content

[13.x] remove mt_srand() deprecated "mode" argument#60020

Merged
taylorotwell merged 2 commits into
laravel:13.xfrom
browner12:AB-mt-srand-mode
May 6, 2026
Merged

[13.x] remove mt_srand() deprecated "mode" argument#60020
taylorotwell merged 2 commits into
laravel:13.xfrom
browner12:AB-mt-srand-mode

Conversation

@browner12
Copy link
Copy Markdown
Contributor

The "MT_RAND_PHP" mode uses an incorrect Mersenne Twister implementation which was used as the default up till PHP 7.1.0. This mode is only available for backward compatibility. It has also been deprecated in 8.3.

This commit removes the deprecated mode, and falls back to the default mode of "MT_RAND_MT19937".

https://www.php.net/manual/en/function.mt-srand.php

browner12 added 2 commits May 6, 2026 11:07
The "MT_RAND_PHP" mode uses an incorrect Mersenne Twister implementation which was used as the default up till PHP 7.1.0. This mode is only available for backward compatibility.  It has also been deprecated in 8.3.

This commit removes the deprecated mode, and falls back to the default mode of "MT_RAND_MT19937".

https://www.php.net/manual/en/function.mt-srand.php
with the new mode, the deterministic "random" output has changed, so we need to adjust.
@taylorotwell taylorotwell merged commit 7f488df into laravel:13.x May 6, 2026
52 checks passed
@browner12 browner12 deleted the AB-mt-srand-mode branch May 6, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants