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

lcg_value() is deprecated in PHP 8.4 #6521

Open
AkmalFairuz opened this issue Nov 17, 2024 · 1 comment · Fixed by #6532
Open

lcg_value() is deprecated in PHP 8.4 #6521

AkmalFairuz opened this issue Nov 17, 2024 · 1 comment · Fixed by #6532
Labels
Category: Core Related to internal functionality Category: PHP Easy task Probably really easy to do, good task for first-time contributors Status: Debugged Cause of the bug has been found, but not fixed

Comments

@AkmalFairuz
Copy link
Contributor

AkmalFairuz commented Nov 17, 2024

Description

lcg_value() is deprecated in PHP 8.4. I wanted to make a PR about this, but I see that the replacement is (new Randomizer())->getFloat(...), so maybe we need another replacement (maybe create a Utils::getRandomFloat()?).

Deprecated: Function lcg_value() is deprecated since 8.4, use \Random\Randomizer::getFloat() instead in phar:///tmp/PocketMine-MP-phar-cache.0/PMMPiq4ekripkj4b26HJHGV.tar/src/world/World.php on line 2004

@dktapps
Copy link
Member

dktapps commented Nov 18, 2024

mt_rand() / mt_getrandmax() should be fine

@dktapps dktapps added Category: Core Related to internal functionality Status: Debugged Cause of the bug has been found, but not fixed Category: PHP Easy task Probably really easy to do, good task for first-time contributors labels Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core Related to internal functionality Category: PHP Easy task Probably really easy to do, good task for first-time contributors Status: Debugged Cause of the bug has been found, but not fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants