Review 10.4 Merged

72099[BUGFIX] Streamline arguments for logicalAnd() query in Extbase

Christian Kuhn CR +2 V +2 Normal +121 −8 updated 11/09/21, 18:16

Commit message

The method signature of Query::locicalAnd() is very misleading
because it only states there is one method argument $constraint1.

Actually, the method does accept any number of arguments, evaluated
via func_get_args(). It also accepts any number of arguments if
$constraint1 is an array of constraints. This leads to multiple
issues when working with phpstan and also when simply using an IDE
which does not understand the internal magic.

The goal is to state, that logicalAnd() needs at least two
constraints but also accepts any number of further constraints.

Since that requires a breaking change, the method signature can
only be fixed partly for now. $constraint1 remains as is, a 2nd
argument $constraint2 is introduced, null by default to make it
optional and a variadic argument ...$furtherConstraints is also
introduced.

This approach keeps the bc promise but also lays the foundation
for further changes in the next version.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Alexander Schnitzler +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Alexander Schnitzler +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 79

  1. Christian Kuhn uploaded patch set 1 11/09/21, 16:36

  2. core-ci voted on patch set 1 V +1 11/09/21, 16:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19072

  3. Christian Kuhn commented on patch set 1 CR -1 11/09/21, 17:12

    Alexander will push again.
  4. Alexander Schnitzler uploaded patch set 2 11/09/21, 17:21

  5. core-ci voted on patch set 2 V +1 11/09/21, 17:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19079

  6. Alexander Schnitzler voted on patch set 2 V +1 CR +1 11/09/21, 17:34

  7. Christian Kuhn voted on patch set 2 V +2 CR +2 11/09/21, 18:15

  8. Christian Kuhn commented on patch set 2 11/09/21, 18:16

    Thx for your work, Alexander!
  9. Christian Kuhn merged patch set 3 11/09/21, 18:16