Closed InvisibleSmiley closed 3 days ago
The order of option keys determines whether the given algorithm is used.
If the algorithm key is passed after the hash key, the algorithm is silently set to crc32 (default).
// works new Hash(['algorithm' => 'sha1', 'hash' => 'foo']); // fails new Hash(['hash' => 'foo', 'algorithm' => 'sha1']);
Order of keys in options array is irrelevant.
FWIW, it's gonna be a while before adoption of validator 3.0 gets any traction, so a fix for this in 2.x will get merged and released if you can provide it 👍
Fixed in #399
Bug Report
Summary
The order of option keys determines whether the given algorithm is used.
Current behavior
If the algorithm key is passed after the hash key, the algorithm is silently set to crc32 (default).
How to reproduce
Expected behavior
Order of keys in options array is irrelevant.