Replace Type::NUMBER with various int sizes #18

Open
opened 2025-01-30 09:48:16 +01:00 by vlw · 0 comments
vlw commented 2025-01-30 09:48:16 +01:00 (Migrated from codeberg.org)

Right now we only have Type::NUMBER, which accepts any PHP number of any length. Even floats, just like PHP. I don't like this, especially when working with databases.

I propose that we replace Type::NUMBER with int sizes:

Name Value
UINT8 255
INT8 127
UINT16 65535
INT16 32767
UINT24 16777215
INT24 8388607
UINT32 4294967295
INT32 2147483647
UINT64 2^64-1
INT64 2^63-1
Right now we only have `Type::NUMBER`, which accepts any PHP number of any length. Even floats, just like PHP. I don't like this, especially when working with databases. I propose that we replace `Type::NUMBER` with int sizes: Name|Value --|-- `UINT8`|255 `INT8`|127 `UINT16`|65535 `INT16`|32767 `UINT24`|16777215 `INT24`|8388607 `UINT32`|4294967295 `INT32`|2147483647 `UINT64`|2^64-1 `INT64`|2^63-1
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
reflect/rules-plugin#18
No description provided.