Review main Merged

75951[TASK] Improve type annotations for ExpressionBuilder::literal()

Oliver Klee CR +2 V +2 Easy +1 −1 updated 10/19/22, 11:58

Commit message

PHPStan will (correctly) unify the previous type
`\PDO::PARAM_*|Connection::PARAM_*|int` to `int` (because
`\PDO::PARAM_*` as well as `Connection::PARAM_*` are all
ints).

So we're using the stricter `Connection::PARAM_*` now, which is a
superset of `\PDO::PARAM_*`.

This allows PHPStan to catch calls to this method with
incorrect values.

Review

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

Issues 2

Files 1

Review log 1214

  1. Oliver Klee uploaded patch set 1 10/03/22, 16:27

  2. core-ci voted on patch set 1 V +1 10/03/22, 16:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31949

  3. Stefan Bürk voted on patch set 1 V +1 CR +1 10/03/22, 16:52

  4. Nikita Hovratov commented on patch set 1 10/03/22, 17:12

    Does this also work for Connection::PARAM_INT_ARRAY ?
  5. Christian Kuhn commented on patch set 1 CR -1 10/03/22, 19:21

    Reply

    I think Nikita is correct: Connection adds PARAM_INT_ARRAY and a couple of others that don't exist in PDO.
  6. Stefan Bürk wrote 10/03/22, 19:23

    Removed Code-Review+1 by Stefan Bürk
  7. Stefan Bürk wrote 10/03/22, 19:23

    Removed Verified+1 by Stefan Bürk
  8. Oliver Klee commented on patch set 1 CR -1 10/03/22, 21:06

    Going to check this.
  9. Oliver Klee uploaded patch set 2 10/19/22, 11:32

  10. Oliver Klee commented on patch set 2 10/19/22, 11:32

    Reply

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

  12. Nikita Hovratov voted on patch set 2 V +1 CR +1 10/19/22, 11:53

  13. Stefan Bürk voted on patch set 2 V +2 CR +2 10/19/22, 11:58

  14. Stefan Bürk merged patch set 3 10/19/22, 11:58