v3.0.0 removes support for float values in masks and flags.
v3.0.0 also removes Bits::BIT_64.
v2.x:int|floataccepted in mask/flag methods.v3.0.0: onlyintis accepted.v2.x:Bits::BIT_64exists but is not reliable in real bitwise usage.v3.0.0:Bits::BIT_64is removed. UseBIT_1throughBIT_63.
- Find every call that passes mask/flag values into BinaryFlags methods.
- Ensure values are cast to
intbefore passing them. - Ensure database or external sources provide integer-compatible values.
Before:
$flags->setMask($legacyValue);
$flags->addFlag($legacyFlag);After:
$flags->setMask((int) $legacyValue);
$flags->addFlag((int) $legacyFlag);Starting in v2.1.0, float inputs trigger deprecation warnings to help detect call sites before moving to v3.0.0.
BIT_64 is being removed because PHP numbers for bitwise flags are signed. The 64th bit is the sign bit, so it cannot be used reliably as a normal flag.
Staying with integer-compatible bits prevents those runtime issues.