Review main Merged

75836[TASK] Improve usability of logicalAnd and logicalOr

Markus Klein CR +2 V +2 Normal +54 −108 updated 10/01/22, 12:41

Commit message

Due to the improved strictness of the API the query
methods logicalAnd and logicalOr required at least
two parameters.

This is very inconvenient for developers and force
the same boilerplate code to be present in almost
all extensions using array decomposition like:
->logicalAnd(...$constraints)

Prevent this situation by adding dummy-conditions
inside the methods to fulfill the interface's contracts.

As it is impossible to add straight conditions like
"1=1" directly from within the Query object, the
solution is to use conditions based on the "uid" field.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 8

Review log 1317

  1. Markus Klein uploaded patch set 1 09/22/22, 03:33

  2. Markus Klein uploaded patch set 2 09/22/22, 03:39

  3. core-ci voted on patch set 1 V -1 09/22/22, 03:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31407

  4. core-ci voted on patch set 2 V -1 09/22/22, 03:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31408

  5. Stephan Großberndt commented on patch set 2 09/22/22, 09:14

    This change is ready for review.
  6. Stephan Großberndt commented on patch set 2 09/22/22, 09:15

    Failure for PHP >= 8.1: Line beuser/Classes/Domain/Repository/BackendUserRepository.php ------ ----------------------------------------------------------------------- Ignored error pattern #^Method TYPO3\\CMS\\Extbase\\Persistence\\QueryInterface\:\:logicalAnd\(\) invoked with 1 parameter, at least 2 required\.$# in path /builds/typo3/CI/cms/typo3/sysext/beuser/Classes/Domain/Repository/Ba ckendUserRepository.php was not matched in reported errors.
  7. Markus Klein commented on patch set 2 CR -1 09/22/22, 10:04

    Thanks Stephan, I had it on WIP since I did not create a ticket yet and I did not make CI happy yet.
  8. Markus Klein uploaded patch set 3 09/22/22, 11:43

  9. core-ci voted on patch set 3 V -1 09/22/22, 11:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31430

  10. Markus Klein uploaded patch set 4 09/22/22, 12:17

  11. core-ci voted on patch set 4 V +1 09/22/22, 12:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31435

  12. Stephan Großberndt commented on patch set 4 09/22/22, 13:06

    Thanks for taking care, Markus. Setting the patch from WIP to "Ready for review" was not intentional. Although you advertised it in #typo3-coredev already ;) I think this is an important change making developers life on upgrade and for supporting older versions easier.
  13. Stephan Großberndt commented on patch set 4 09/22/22, 13:06

    Reply

    Done
  14. Benni Mack voted on patch set 4 V +1 CR +1 10/01/22, 10:15

  15. Christian Kuhn voted on patch set 4 V +1 CR +1 10/01/22, 12:40

  16. Stefan Bürk voted on patch set 4 V +2 CR +2 10/01/22, 12:41

  17. Stefan Bürk merged patch set 5 10/01/22, 12:41