Undocumented breaking change due to type hints
garygreen opened this issue · comments
We're updating to latest version and have noticed a breaking change when using:
Hash::fromInt($num);
This use to allow strings, nulls and even super large integers - but now it seems restricted to int
type due to this commit:
PHP int
value is limited in size, so when we try to use it from values using BIGINT
from mysql it no longer works - mysql will return BIGINT
values as strings in PHP because they cannot be used as native ints. That's the whole purpose of the BIGINT library, right?
E.g. this is a BIGINT of a difference hash for one of our pictures in our database and it doesn't fit as an int.
echo (int)'10957988095268482955'
fromInt
shouldn't typehint int
because it's whole purpose is to support big ints.
@jenssegers Any news on this breaking change?