Review main Merged

83077[TASK] Test MathUtility::canBeInterpretedAsInteger() with bool

Christian Kuhn CR +2 V +2 Normal +2 −54 updated 02/22/24, 11:56

Commit message

Add test cases to see how canBeInterpretedAsInteger()
returns with bool input.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
    • Stefan Bürk +1
    • Mathias Brodala +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
    • Stefan Bürk +1
    • Mathias Brodala +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1213

  1. Christian Kuhn uploaded patch set 1 02/22/24, 11:34

  2. core-ci voted on patch set 1 V +1 02/22/24, 11:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53446

  3. Mathias Brodala commented on patch set 1 02/22/24, 11:41

    MathUtilityTest.php:118

    This is rather unexpected given that boolean "true" is valid. Both can be coerced into integers (1/0), am I wrong?
  4. Oliver Klee voted on patch set 1 CR +1 V +1 02/22/24, 11:43

  5. Christian Kuhn commented on patch set 1 02/22/24, 11:44

    MathUtilityTest.php:118 Reply

    yes. that's why i added the tests to show this.
  6. Stefan Bürk voted on patch set 1 CR +1 V +1 02/22/24, 11:44

  7. Mathias Brodala commented on patch set 1 02/22/24, 11:45

    MathUtilityTest.php:118 Reply

    Is there already an intention to fix this IMO wrong behavior in a following change? Either bool should be rejected altogether or both values should be accepted as number.
  8. Christian Kuhn commented on patch set 1 02/22/24, 11:46

    MathUtilityTest.php:118 Reply

    note the impact when changing this is kinda problematic, which is why i don't tend to change that behavior currently.
  9. Mathias Brodala commented on patch set 1 02/22/24, 11:49

    MathUtilityTest.php:118 Reply

    Understandable. I'll create a ticket for reference in any case.
  10. Christian Kuhn commented on patch set 1 02/22/24, 11:50

    MathUtilityTest.php:118 Reply

    agreed.
  11. Mathias Brodala commented on patch set 1 CR +1 V +1 02/22/24, 11:52

    Verified by CI
  12. Christian Kuhn voted on patch set 1 CR +2 V +2 02/22/24, 11:56

  13. Christian Kuhn merged patch set 2 02/22/24, 11:56