Skip to content
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

Add support for PHP 8.3 #694

Closed
2 tasks done
localheinz opened this issue Sep 2, 2023 · 4 comments
Closed
2 tasks done

Add support for PHP 8.3 #694

localheinz opened this issue Sep 2, 2023 · 4 comments
Labels
enhancement New feature or request pinned
Milestone

Comments

@localheinz
Copy link
Member

localheinz commented Sep 2, 2023

In all likelihood, PHP 8.3 will be released on November 23, 2023, and it would be great if we could support PHP 8.3 soon after the official release.

@stale
Copy link

stale bot commented Oct 15, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 1 week if no further activity occurs. Thank you for your contributions.

@ejunker
Copy link

ejunker commented Nov 27, 2023

PHP 8.3 was released. What is remaining? The main issue I notice is with the deprecated MT_RAND_PHP constant.

Could it be solved by doing something like this?

$mode = PHP_VERSION_ID >= 80300 ? MT_RAND_MT19937 : MT_RAND_PHP;
mt_srand((int) $seed, $mode);

@localheinz
Copy link
Member Author

Fixed with #844.

@cs278
Copy link

cs278 commented Mar 1, 2024

This bug fix is arguably a BC break, it means Faker's output between differs when switching PHP version when using the same seed.

If we're happy changing the seeding in a patch release why not just use MT_RAND_MT19937 all the time? That mode is available on all supported PHP versions and means Faker doesn't change behaviour between PHP versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pinned
Projects
None yet
Development

No branches or pull requests

4 participants