-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: use default mode for mt_srand (MT_RAND_MT19937) #828
Fix: use default mode for mt_srand (MT_RAND_MT19937) #828
Conversation
Let's rebase after the potential merge of #829 to see on which versions of PHP tests are failing. Also see #15 (comment). |
Need it too since we upgrade to 8.3, why don't consider that easy solution #694 (comment) which make supports on each php versions ? |
I let @localheinz decide this part as there are a few discussion about PHP versions supported and the global design of this part of Faker. As I understand the failing tests, the change of the mode from If you take the "easy solution", you would have to keep the tests for older PHP versions, and adapt the tests for PHP 8.3 with |
We currently have the following testing strategy:
As we can see in this and other pull requests, generating and asserting that generated values assume specific values is bound to fail. As far as I can see, we have the following options:
Do you see any other options? |
@ip512 @NicolasDievart @stephpy How do you feel about #844? We just need someone else from @FakerPHP/maintainers to approve, then we can move forward and get at least a version of |
Closing in favour of #844. |
Thank you @localheinz for fixing this issue |
What is the reason for this PR?
Hello 👋
PHP 8.3 is release since November 23
This PR is a following of #691 and the first step described by Tim Wolla here
#528 (comment)
Author's checklist
Summary of changes
The method mt_srand has a default mode since PHP 7.1, which is
MT_RAND_MT19937
, and Faker requires at least PHP 7.4.As of PHP 8.3,
MT_RAND_PHP
is deprecated, this PR remove the deprecated mode used, to use the default one.As PHP 8.3 is released, the CI file has been modified to test against PHP 8.3, not as experimental
Review checklist
CHANGELOG.md