# Issue TableSchema

**URL:** <https://discourse.cakephp.org/t/issue-tableschema/12808>\
**Category:** Uncategorized\
**Created:** [February 21, 2026, 9:48am UTC](https://discourse.cakephp.org/t/issue-tableschema/12808 "2026-02-21T09:48:50Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ed3](https://avatars.discourse-cdn.com/v4/letter/e/4af34b/32.png) [@ed3](https://discourse.cakephp.org/u/ed3)\
**Post date:** [February 21, 2026, 9:48am UTC](https://discourse.cakephp.org/t/issue-tableschema/12808/1 "2026-02-21T09:48:50Z")

</div>

Hi,

I used for this test:  
OS: windows  
CakePhp: 5.3.1 (with debugkit activated)  
Php: 8.4 (x86)  
When open default page I have following message:  
`Cake\Database\Schema\Column::__construct(): Argument #5 ($length) must be of type ?int, float given, called in \vendor\cakephp\cakephp\src\Database\Schema\TableSchema.php on line 381`

---

<div class="post-metadata">

**Author:** ![KevinPfeifer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/kevinpfeifer/32/3365_2.png) [@KevinPfeifer](https://discourse.cakephp.org/u/KevinPfeifer)\
**Post date:** [February 21, 2026, 9:23pm UTC](https://discourse.cakephp.org/t/issue-tableschema/12808/2 "2026-02-21T21:23:26Z")

</div>

How can we reproduce this? What database schema/structure do you have? Can you provide a SQL dump without data?

---

<div class="post-metadata">

**Author:** ![dereuromark](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/dereuromark/32/37_2.png) [@dereuromark](https://discourse.cakephp.org/u/dereuromark)\
**Post date:** [February 22, 2026, 12:10am UTC](https://discourse.cakephp.org/t/issue-tableschema/12808/3 "2026-02-22T00:10:40Z")

</div>

Likely a strict type issue

In TableSchema.php around line 381, there’s likely code like:  
new Column($name, $type, $nullable, $default, $length, …)

Where $length comes from database metadata and isn’t being cast to int.

Check out [Cast float column attributes to int for PHP 8.4 compatibility by dereuromark · Pull Request #19295 · cakephp/cakephp · GitHub](https://github.com/cakephp/cakephp/pull/19295)

---

<div class="post-metadata">

**Author:** ![KevinPfeifer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/kevinpfeifer/32/3365_2.png) [@KevinPfeifer](https://discourse.cakephp.org/u/KevinPfeifer)\
**Post date:** [February 22, 2026, 12:28am UTC](https://discourse.cakephp.org/t/issue-tableschema/12808/4 "2026-02-22T00:28:56Z")

</div>

I am just wondering where a float length definition would make sense.

---

<div class="post-metadata">

**Author:** ![ed3](https://avatars.discourse-cdn.com/v4/letter/e/4af34b/32.png) [@ed3](https://discourse.cakephp.org/u/ed3)\
**Post date:** [February 22, 2026, 10:55am UTC](https://discourse.cakephp.org/t/issue-tableschema/12808/5 "2026-02-22T10:55:43Z")

</div>

I used default settings, the message appear to create sqlite database for debugkit.

The most interesting thing is that on php 8.4(x64) it works and on php8.4(x86) it doesn’t work.

---

<div class="post-metadata">

**Author:** ![KevinPfeifer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/kevinpfeifer/32/3365_2.png) [@KevinPfeifer](https://discourse.cakephp.org/u/KevinPfeifer)\
**Post date:** [February 22, 2026, 11:43am UTC](https://discourse.cakephp.org/t/issue-tableschema/12808/6 "2026-02-22T11:43:09Z")

</div>

so you are saying you just created a fresh cakephp 5 project, started it and it threw this error when you opened the browser?

---

<div class="post-metadata">

**Author:** ![ed3](https://avatars.discourse-cdn.com/v4/letter/e/4af34b/32.png) [@ed3](https://discourse.cakephp.org/u/ed3)\
**Post date:** [February 22, 2026, 2:03pm UTC](https://discourse.cakephp.org/t/issue-tableschema/12808/7 "2026-02-22T14:03:48Z")

</div>

That’s exactly how it is!

---

<div class="post-metadata">

**Author:** ![KevinPfeifer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/kevinpfeifer/32/3365_2.png) [@KevinPfeifer](https://discourse.cakephp.org/u/KevinPfeifer)\
**Post date:** [February 22, 2026, 2:05pm UTC](https://discourse.cakephp.org/t/issue-tableschema/12808/8 "2026-02-22T14:05:28Z")

</div>

so its a x86/32-bit PHP specific problem… weird

---

<div class="post-metadata">

**Author:** ![dereuromark](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/dereuromark/32/37_2.png) [@dereuromark](https://discourse.cakephp.org/u/dereuromark)\
**Post date:** [February 22, 2026, 5:30pm UTC](https://discourse.cakephp.org/t/issue-tableschema/12808/9 "2026-02-22T17:30:09Z")

</div>

I added the details into the PR, on why is this happening. Quite weird behavior of PHP here indeed.

---

<div class="post-metadata">

**Author:** ![ed3](https://avatars.discourse-cdn.com/v4/letter/e/4af34b/32.png) [@ed3](https://discourse.cakephp.org/u/ed3)\
**Post date:** [February 27, 2026, 8:14am UTC](https://discourse.cakephp.org/t/issue-tableschema/12808/10 "2026-02-27T08:14:36Z")

</div>

@dereuromark  
I tested more and all versions of php 8 (8.2, 8.3, 8.4, 8.5) have the same behavior on x86/32-bit.
