Change BIGINT native PHP type back to int#2029
Change BIGINT native PHP type back to int#2029db-mobile wants to merge 4 commits intopropelorm:masterfrom
Conversation
|
@db-mobile it's a good idea! But there is a BC-break to the current 64x systems: they currently run strings and will get inconsistent BIGINT definition. |
|
Ahoi, if I'm not mistaken, PHP_INT_MAX on 64bit is 63bit + 1bit for the sign. |
|
@hsegnitz you are right, we would also have a stability issue here for >2^63 ints. If there are no contra, I'd proceed with the change and notify about the 2^63 limit in documentation. |
Originally BIGINT was mapped to PHP native type int back in 2005. This was changed to string in revision 56f6a84.
Apparently 32-bit PHP types were incapable of storing the full range of BIGINT without running out of bounds. This should not be an issue in times of 64 bit and the minimum required version of PHP being 7.4 for Propel2.
This solution however preserves the old behavior on 32 bit systems.