Bacon / BaconQrCode

QR Code Generator for PHP
BSD 2-Clause "Simplified" License
1.85k stars 210 forks source link

Use of deprecated constant MT_RAND_PHP in tests #176

Open ryanhblack opened 6 months ago

ryanhblack commented 6 months ago

Related to Issue #23. According to the PHP documentation for mt_srand(), the MT_RAND_PHP mode uses an incorrect Mersenne Twister implementation, and it is now deprecated as of PHP 8.3.0.

The correct Mersenne Twister implementation caused the tests using it to fail, so past developers chose to use the old implementation to resolve issue #23. A better fix would be to have the tests expect the correct implementation so the deprecated constant can be removed.

The issue is mitigated by the fact that the deprecated constant is only used in tests (BaconQrCodeTest\Common\BitArrayTest and BaconQrCodeTest\Common\ReedSolomonCodecTest).

DASPRiD commented 6 months ago

Would you like to supply a PR?

ryanhblack commented 6 months ago

I can, but it won't be high priority for me, so it might take some time to update the tests.