Skip to content

Undocumented breaking change due to type hintsΒ #81

@garygreen

Description

@garygreen

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:

v0.6.0...v0.7.0

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions