Review main Merged

86661[BUGFIX] Ensure integer type for 'length' DBAL column definition

Garvin Hicking CR +2 V +2 Easy +1 −1 updated 10/23/24, 06:29

Commit message

In case TCA has been set using a string for a key like 'max'
on a type=input definition, the DefaultTcaSchema would pass
that string along to the `addColumn` DBAL call.

This patch will ensure integer type casting on the relevant
TCA value as convenience for backwards compatibility
and to prevent casual errors when having TCA like:

```
'creditpoints_gifts' => [
  'exclude' => 1,
  'label' => 'Gifts',
  'config' => [
    'type' => 'input',
    'size' => '10',
    'max' => '10',
    'default' => 0,
  ],
],,
```

Note that all other occurences of `addColumn` in current
DefaultTcaSchema have been checked as well, and do not
need type-casting.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Stefan Bürk +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 810

  1. Garvin Hicking uploaded patch set 1 10/19/24, 20:37

  2. Christian Kuhn commented on patch set 1 10/22/24, 16:01

    DefaultTcaSchema.php:771

    move cast to this line?
  3. Garvin Hicking commented on patch set 2 10/22/24, 16:24

    Published edit on patch set 1.
  4. core-ci voted on patch set 2 V +1 10/22/24, 16:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68385

  5. Garvin Hicking commented on patch set 2 10/22/24, 16:47

    DefaultTcaSchema.php:771 Reply

    Done
  6. Franz Holzinger updated the commit message in patch set 3 V +1 10/22/24, 17:04

  7. core-ci voted on patch set 3 V +1 10/22/24, 17:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68391

  8. Stefan Bürk voted on patch set 3 CR +1 V +1 10/22/24, 22:28

  9. Andreas Kienast voted on patch set 3 CR +2 V +2 10/23/24, 06:14

  10. Andreas Kienast merged patch set 4 10/23/24, 06:29