Review main Merged

73383[BUGFIX] Ignore empty values for table and uid in FilesContentObject

Nikita Hovratov CR +2 V +2 Normal +154 −7 updated 02/21/22, 23:07

Commit message

When using the option "references" as an array, it
is possible to provide table and uid with stdWrap
functionality. The return type can be mixed so
proper casting is necessary.

Also, empty values like an empty string for table or
"0" for uid should not trigger
$pageRepository->getRawRecord and the fallback
values should be used instead.

Another potential bug was found while adding test
cases, where an empty table would result in nothing.
In such a case, the current table should be used for
relation fetching.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Georg Ringer +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Georg Ringer +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 1216

  1. Nikita Hovratov uploaded patch set 1 02/10/22, 09:06

  2. Georg Ringer voted on patch set 1 V +1 CR +1 02/10/22, 09:13

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

  4. Oli Bartsch commented on patch set 1 02/10/22, 09:33

    Since this is a regression, could we get some tests to make sure this does not break again?
  5. Nikita Hovratov commented on patch set 1 02/10/22, 09:59

    Reply

    Hey, yes I just wanted to comment. I tried adding a quick test, but the FilesContentObjectTest is a unit test and mocking is hell for this case. My strategy would be to first convert the Test to a functional test and then add a new test case.
  6. Nikita Hovratov uploaded patch set 2 02/11/22, 10:14

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

  8. Nikita Hovratov uploaded patch set 3 02/11/22, 10:30

  9. Nikita Hovratov rebased onto patch set 4 02/11/22, 11:45

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

  11. Nikita Hovratov rebased onto patch set 5 02/18/22, 18:43

  12. core-ci voted on patch set 5 V +1 02/18/22, 18:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23890

  13. Georg Ringer voted on patch set 5 V +1 CR +1 02/21/22, 13:44

  14. Oli Bartsch commented on patch set 5 V +1 CR +1 02/21/22, 22:53

    Reply

    Thanks for the work!
  15. Oli Bartsch voted on patch set 5 V +2 CR +2 02/21/22, 23:07

  16. Oli Bartsch merged patch set 6 02/21/22, 23:07