80104[BUGFIX] Harden Extbase LazyLoadingProxy
Commit message
Review
-
Code review CR +2 Done
- Nikita Hovratov +2
- Oliver Klee +1
- Alexander Schnitzler +1
-
Verified V +2 Done
- Nikita Hovratov +2
- Oliver Klee +1
- Alexander Schnitzler +1
- core-ci +1 CI
Issues 1
Files 4
Review log 2326
Show 1 earlier messages
-
Torben Hansen uploaded patch set 1 07/20/23, 18:06
-
core-ci voted on patch set 1 V +1 07/20/23, 18:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44359
-
Oliver Klee commented on patch set 1 07/20/23, 19:13
Can we cover this case with a test? -
Alexander Schnitzler commented on patch set 1 07/21/23, 06:06
LazyLoadingProxy.php:140What kind of objects are to be expected here? Usually, referenced objects are an instance of DomainObjectInterface, which is covered above. -
Torben Hansen commented on patch set 1 07/21/23, 06:40
LazyLoadingProxy.php:140ReplyThere is actually no object here, since the referenced object is deleted/hidden. `$this->_loadRealInstance()` actually return `null` in this case. -
Torben Hansen updated the commit message in patch set 2
V +107/21/23, 06:41 -
Alexander Schnitzler commented on patch set 1 07/21/23, 06:42
LazyLoadingProxy.php:140ReplyShouldn't we simply return null then? -
core-ci voted on patch set 2 V +1 07/21/23, 06:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44366
-
Torben Hansen commented on patch set 2 07/21/23, 06:55
LazyLoadingProxy.php:140ReplyYes, we actually do with the null safe operator. But I'm also fine adding an earlier check. -
Alexander Schnitzler commented on patch set 2 07/21/23, 07:05
LazyLoadingProxy.php:140ReplyThat's not what I meant but as discussed in private, we leave it as is. The risk of breaking something unintentionally is too high. -
Alexander Schnitzler voted on patch set 2 V +1 CR +1 07/21/23, 07:05
-
Torben Hansen commented on patch set 2 CR -1 07/21/23, 07:08
On it... -
Alexander Schnitzler commented on patch set 2 07/22/23, 06:09
Reply
Are you still on something or did you forget to remove the -1? -
Torben Hansen uploaded patch set 3
CR +1V +107/22/23, 10:42 -
core-ci voted on patch set 3 V +1 07/22/23, 10:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44413
-
Oliver Klee voted on patch set 3 V +1 CR +1 07/23/23, 04:51
-
Oliver Klee commented on patch set 3 V 0 CR 0 07/23/23, 04:52
LazyLoadingProxyTest.php:82I propose we also add a second test (or use a data provider) with a non-zero UID that does not exist (because the 0 makes sense to catch early). -
Torben Hansen commented on patch set 3 07/23/23, 17:37
LazyLoadingProxyTest.php:82ReplyThe test does not fetch data from persistence since dataMapper is not involved (any UID provided will not have an effect), so I think it is fine if we just ensure, that the LazyLoadingProxy does return `null` instead of throwing an exception as it did before. -
Oliver Klee commented on patch set 3 V +1 CR +1 07/23/23, 17:40
LazyLoadingProxyTest.php:82ReplyAck -
Alexander Schnitzler commented on patch set 3 V +1 CR +1 07/25/23, 05:49
Can you do me a favor and tag this patch with "extbase"? -
Torben Hansen wrote 07/25/23, 06:18
Topic set to EXT: extbase -
Torben Hansen wrote 07/25/23, 06:18
Topic EXT: extbase removed -
Torben Hansen wrote 07/25/23, 06:18
Topic set to extbase -
Nikita Hovratov voted on patch set 3 V +2 CR +2 07/25/23, 06:47
-
Nikita Hovratov merged patch set 4 07/25/23, 06:59