Review main Merged

96654[BUGFIX] Transform number fields to float|int in RecordFieldTransformer

Benjamin Franzke CR +2 V +2 Normal +133 −25 updated 10/13/26, 07:04

Commit message

Whenever the database engine uses a string-like type (e.g. when
using doctrine Types::DECIMAL), the database result returns a
string representation of the number.

The RecordFieldTransformer does now properly encode these to real
PHP number data types (int or float).

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Oli Bartsch +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 1013

  1. Benjamin Franzke uploaded patch set 1 10/13/26, 05:09

  2. core-ci voted on patch set 1 V +1 10/13/26, 05:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110968

  3. Daniel Windloff commented on patch set 1 10/13/26, 05:37

    RecordFieldTransformer.php:195

    This should depend on NumberFieldType's methods getScale() for main and on getFormat() for 14.3
  4. Benjamin Franzke uploaded patch set 2 V +1 10/13/26, 06:03

  5. Benjamin Franzke commented on patch set 2 10/13/26, 06:03

    RecordFieldTransformer.php:195 Reply

    thanks, done!
  6. Oli Bartsch commented on patch set 2 10/13/26, 06:10

    RecordFieldTransformerTest.php:1168

    Do you think it would make sense to explicitly check that this returns as float?
  7. core-ci voted on patch set 2 V +1 10/13/26, 06:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110971

  8. Benjamin Franzke commented on patch set 2 10/13/26, 06:15

    RecordFieldTransformerTest.php:1168 Reply

    I think it is checked, since it compares to `12.0` (changing that to `12` would let the test fail). Or do you mean something else?
  9. Benjamin Franzke updated the commit message in patch set 3 V +1 10/13/26, 06:16

  10. core-ci voted on patch set 3 V +1 10/13/26, 06:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110974

  11. Oli Bartsch commented on patch set 3 CR +1 V +1 10/13/26, 06:56

    RecordFieldTransformerTest.php:1168 Reply

    I though about `is_float` but I think that makes no sense. Just forget about it. :D
  12. Benjamin Franzke voted on patch set 3 CR +2 V +2 10/13/26, 07:04

  13. Benjamin Franzke merged patch set 4 10/13/26, 07:04