ORM and bigintegers on 32-bit PHP (Windows)

Is Cake 3.x supported on 32-bit Windows PHP? I can’t find anywhere that says it isn’t.

However, when I run a query in a controller which looks something like this:
TableRegistry::get("Things")->find('all')->where(['Things.id IN' => [7243768973, 3, 5738210084]]);

(Our postgres column is defined as a bigint on this table’s id field.)

The large integers aren’t preserved and are converted in the SQL to bogus 32-bit integers. I suspect this is because there are some lines in Cake\Database\Type\IntegerType in the “toDatabase” and “toPHP” methods which cast the number into (int), and we’re running on a 32-bit PHP.

If this is a bug (and 32-bit PHP is supported under Cake), what’s the proper way for me to report it?

Thanks.

I think its windows and 32-bits specific bug.
It has been reported: Issue 10.295

Thanks for your reply, Raul. That issue looks to be closed, but I don’t understand why. Has this bug been fixed for an upcoming release of Cake? If not, why was the issue closed?

In the methods that I mentioned in the source, I’ve patched the code on our environment by using this logic at the end of both the methods toDatabase() as well as toPHP():

if ($value > PHP_INT_MAX) { return $value; } return (int) $value;

This change works in our 32-bit Windows PHP version. It seems like it should work correctly on a 64-bit version of PHP, but since we’re not running that, I’m not sure.

I think it was closed due to inactivity. And the author did not post a reply.

I don’t know if the workaround will work on windows

Thanks, Raul. Is it proper for me to open a new issue on cakephp github concerning this?