Review main Merged

88159[TASK] Reduce DH->getRecordProperties() usages

Christian Kuhn CR +2 V +2 Hard +120 −173 updated 02/11/25, 17:08

Commit message

With getRecordPropertiesFromRow() being gone since #106147, the
next upper - mostly logging related - method to look at is
getRecordProperties().

The patch follows the same decisions taken with #106147. It gets
rid of half of getRecordProperties() usages and streamlines the
code within callers.

DataHandler methods moveRecord() and moveRecord_raw() are left
out: Those treat getRecordProperties() as API for hooks and need
special treatment with a dedicated patch.

The patch improves DataHandler performance slightly by skipping
two or three DB calls from getRecordProperties() and introducing
a couple of single BU::getRecord() calls instead. Most of the new
calls can be refactored away with further patches when DataHandler
hands the record in question around more often, which is one of
the major targets of all these preparation changes.

Review

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

Issues 2

Files 3

Review log 1626

Show 1 earlier messages
  1. Christian Kuhn uploaded patch set 1 02/10/25, 21:54

  1. core-ci voted on patch set 1 V +1 02/10/25, 22:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73943

  2. Christian Kuhn uploaded patch set 2 V +1 02/10/25, 22:19

  3. core-ci voted on patch set 2 V +1 02/10/25, 22:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73944

  4. Christian Kuhn uploaded patch set 3 V +1 02/11/25, 08:52

  5. core-ci voted on patch set 3 V +1 02/11/25, 09:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73972

  6. Christian Kuhn uploaded patch set 4 V +1 02/11/25, 12:04

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

  8. Christian Kuhn uploaded patch set 5 V +1 02/11/25, 12:58

  9. Christian Kuhn uploaded patch set 6 02/11/25, 13:01

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

  11. core-ci voted on patch set 6 V +1 02/11/25, 13:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73978

  12. Christian Kuhn uploaded patch set 7 V +1 02/11/25, 13:36

  13. core-ci voted on patch set 7 V +1 02/11/25, 13:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73980

  14. Christian Kuhn uploaded patch set 8 V +1 02/11/25, 13:58

  15. core-ci voted on patch set 8 V +1 02/11/25, 14:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73982

  16. Christian Kuhn uploaded patch set 9 V +1 02/11/25, 14:42

  17. core-ci voted on patch set 9 V +1 02/11/25, 14:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73992

  18. Christian Kuhn updated the commit message in patch set 10 V +1 02/11/25, 14:59

  19. core-ci voted on patch set 10 V +1 02/11/25, 15:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73994

  20. Stefan Bürk commented on patch set 10 02/11/25, 15:46

    DataHandler.php:1295

    `$currentRecord` may not be an array here - do we need a fallback ?

    DataHandler.php:1297

    `$currentRecord` may not be an array here - do we need a fallback ?

    DataHandler.php:1300

    `$currentRecord` may not be an array here - do we need a fallback ?

    DataHandler.php:5254

    Use `?? []` fallback here ?
  21. Christian Kuhn commented on patch set 10 02/11/25, 16:35

    DataHandler.php:1295 Reply

    this is "if ($table === 'be_users' && ($field === 'admin' || $field === 'password' && $status === 'update'): that's an update case: we could potentially sanitize better, but that's not scope of the patch and "previous" calls have already checked for record existance.

    DataHandler.php:1297 Reply

    same as above.

    DataHandler.php:1300 Reply

    same as above.

    DataHandler.php:5254 Reply

    no benefit.
  22. Stefan Bürk voted on patch set 10 CR +1 V +1 02/11/25, 16:37

  23. Benni Mack voted on patch set 10 CR +1 V +1 02/11/25, 16:44

  24. Christian Kuhn voted on patch set 10 CR +2 V +2 02/11/25, 17:08

  25. Christian Kuhn merged patch set 11 02/11/25, 17:08