Review main Merged

85802[BUGFIX] Add missing itemsProcFunc record context

Garvin Hicking CR +2 V +2 Normal +102 −19 updated 09/20/24, 06:27

Commit message

Since #100855, itemsProcFunc's are resolved on
processing field values by corresponding BackendUtility
methods. Due to negative performance impact did
call BU::getRecordWSOL() on every field, but
just pass the uid and pid.

However, for properly evaluating itemsProcFunc's, the
full record is usually required for context.

To provide the full record without the negative
performance impact are the `BU::getProcessedValue()`
and `BU:getProcessedValueExtra()` methods extended.
Calling code can now pass an already fetched full
row to the methods, which will then be forwarded
to the corresponding itemsProcFunc's.

All places in core are adjusted accordingly to
support itemsProcFunc resolving in as many
places as possible.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Oli Bartsch +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Oli Bartsch +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 3

Files 10

Review log 2733

Show 78 earlier messages
  1. Garvin Hicking uploaded patch set 1 08/28/24, 07:43

  2. core-ci voted on patch set 1 V +1 08/28/24, 07:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64387

  3. Garvin Hicking commented on patch set 1 08/28/24, 07:58

    (Note: Contacted Oli. I think we should add a regression-verification test for this new behavior)
  4. Daniel Dorndorf voted on patch set 1 CR +1 V +1 08/30/24, 06:07

  5. Benni Mack voted on patch set 1 CR +1 09/05/24, 17:29

  6. Georg Ringer commented on patch set 1 CR -1 09/06/24, 17:49

    BackendUtility.php:1521

    a description of the new property is missing and I suggest using `array $fullRow = []`, so adding type, different name and a default value
  7. Garvin Hicking uploaded patch set 2 CR +1 V +1 09/11/24, 10:21

    Rebase and rename
  8. Garvin Hicking commented on patch set 2 09/11/24, 10:22

    BackendUtility.php:1521 Reply

    Done
  1. core-ci voted on patch set 2 V +1 09/11/24, 10:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65417

  2. Stefan Bürk voted on patch set 2 CR +1 V +1 09/13/24, 21:00

  3. Anja Leichsenring uploaded patch set 3 CR +1 V +1 09/14/24, 07:31

  4. core-ci voted on patch set 3 V +1 09/14/24, 07:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65741

  5. Anja Leichsenring voted on patch set 3 CR +1 09/14/24, 07:54

  6. Oli Bartsch commented on patch set 3 09/17/24, 17:18

    Patch looks good. Thanks! Just two remarks: 1. Since this is marked as regression, we might want to add a regression test 2. Should we adjust also other places where we can forward the full $row to getProcessedValue() - had a short look and it seems e.g. ElementInformationController or StandardContentPreviewRenderer would qualify here.
  7. Garvin Hicking commented on patch set 3 09/17/24, 19:03

    Reply

    1. Yes, for sure - I just wasn't sure how to test for this due to a lot of protected methods. Do you maybe have an idea? 2. Yes, I didn't check for this yet, good to get this in IMO
  8. Oli Bartsch uploaded patch set 4 CR +1 V +1 09/17/24, 20:08

  9. Garvin Hicking commented on patch set 4 09/17/24, 20:20

    BackendUtility.php:1521 Reply

    I just recognized the roe -> fullRow rename got lost somehow, also phpdoc is (still) missing. Probably due to rebasing. Can check tomorrow.
  10. core-ci voted on patch set 4 V +1 09/17/24, 20:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66073

  11. Oli Bartsch uploaded patch set 5 V +1 09/18/24, 09:41

  12. Oli Bartsch updated the commit message in patch set 6 09/18/24, 09:45

  13. core-ci voted on patch set 6 V +1 09/18/24, 10:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66117

  14. Oli Bartsch commented on patch set 6 CR +1 V +1 09/18/24, 10:08

    Reply

    Done

    BackendUtility.php:1521 Reply

    Done
  15. Garvin Hicking commented on patch set 6 09/18/24, 10:26

    Thanks a lot for improving this so much :-)

    FileList.php:786

    Is the named argument here "allowed" in core, due to the API arguments and so on?
  16. Oli Bartsch commented on patch set 6 09/18/24, 11:31

    FileList.php:786 Reply

    I think those places are a good example where named arguments make sense. Especially because those are used for calls to this method already at other places in core, due to the huge parameter signature.
  17. Stefan Bürk commented on patch set 6 CR -1 09/18/24, 12:08

    FileList.php:786 Reply

    It may make sense, but we compose a document how to deal with named arguments in the core and where not. And also documented that core should be living what we define and recommend to extension authors. We cannot tell them not to use named arguments on method calls for TYPO3 API because arguments are not considered API. I'd we should not make a excemption just because it is `easy`. Otherwise we should first revise the named argument document and ack on new rules. https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/CodingGuidelines/CodingBestPractices/NamedArguments.html#invoking-core-api > Within the TYPO3 Core, named arguments are not used when invoking its own methods. > Setting a good example for extension authors and this is not a exception we defined.
  18. Oli Bartsch uploaded patch set 7 CR +1 V +1 09/18/24, 12:42

  19. Oli Bartsch commented on patch set 7 09/18/24, 12:50

    FileList.php:786 Reply

    Done
  20. core-ci voted on patch set 7 V +1 09/18/24, 12:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66136

  21. Oli Bartsch voted on patch set 7 CR +1 V +1 09/18/24, 13:38

  22. Garvin Hicking commented on patch set 7 09/18/24, 13:42

    Thanks! All good+fine by me, not voting because of owning the patch, but implied +1/+1.
  23. Christian Kuhn voted on patch set 7 CR +1 V +1 09/19/24, 22:11

  24. Garvin Hicking voted on patch set 7 CR +2 V +2 09/20/24, 05:34

  25. Garvin Hicking merged patch set 8 09/20/24, 06:27