Sep 7, 2023
- Bump arokettu/unsigned to 1.2.1, previous versions may cause invalid results in Mersenne Twister on 32-bit systems.
Nov 12, 2022
- Rely on symfony/polyfill-php82 for interface implementations and Random\Engine\Secure (#6), thanks to Nicolas Grekas
- Added compatibility with PHP regression fix: PHP#9839 (#5)
Oct 26, 2022
Since RC1/RC2 are compatible with last 4 release candidates of PHP 8.2 (RC2-RC5), RC2 is re-released as stable.
- No user facing changes since RC2
Oct 1, 2022
- Speed up 32 bit calculations in 64 bit envs
Sep 14, 2022
Secure
engine throwsRandomException
instead ofException
- Added verification of the number of elements in serialized data
- Generated data is truncated to 64 bits in
Randomizer::getBytes()
- Fixed integer overflow in the upstream math lib
Sep 2, 2022
- Fix incompatibility with PHP 8.2.0 RC1
Sep 1, 2022
Hopefully the last alpha
- Exceptions are now compatible in most known cases
- Full coverage
- GMP is now an optional dependency (but highly recommended)
Aug 19, 2022
- Verified compatibility with PHP 8.2.0 beta 3
- Tests ported from the PHP engine
- Various compatibility fixes
- Exceptions compatibility (mostly)
Aug 5, 2022
- Verified compatibility with PHP 8.2.0 beta 2
PcgOneseq128XslRr64
Xoshiro256StarStar
- Split
nextInt()
andgetInt($min, $max)
like in beta 2
Jul 31, 2022
- Verified compatibility of custom engines with the current PHP 8.2 master
getInt()
now has proper signaturegetInt(int $min, int $max)
arrayPickKeys()
throws a warning because full compatibility is not achievable. Thanks to Tim Düsterhus for the explanation- No warning if the engine is
CryptoSafeEngine
- No warning if the engine is
- Fixed incorrect range function selection (#1), thanks to Tim Düsterhus
- Fixed byte selection in range64
Jul 27, 2022
NOTE: 0.2.0 currently is not fully compatible when using custom engines. This will be fixed in 0.3.0 after PHP 8.2.0 beta 2 is released with some critical fixes.
Randomizer
$engine
getBytes($length)
shuffleArray($array)
shuffleBytes($bytes)
arrayPickKeys($array, $num)
- Serialization and unserialization are now compatible with PHP 8.2 if performed in PHP 7.4+
Mt19937
- Serialization and unserialization are now compatible with PHP 8.2 if performed in PHP 7.4+
Jul 23, 2022
- Fixed Mt not generating enough data sometimes
Jul 23, 2022
- First release
- Compatible with PHP 8.2.0 beta 1
- Engines:
- Secure Random
- Mersenne Twister
- Randomizer features:
getInt()
getInt($min, $max)