65580[BUGFIX] Don't call ResourceFactory::getStorageObject twice
Commit message
Review
-
Code review CR +2 Done
- Helmut Hummel +2
- Benni Mack +2
- Oli Bartsch +1
- Oliver Klee +1
- Andreas Kienast +1
- Nicole Hummel +1
-
Verified V +2 Done
- Helmut Hummel +2
- Oli Bartsch +1
- Nicole Hummel +1
- Benni Mack +1
- TYPO3com +1 CI
Issues 1
Files 2
Review log 1620
-
Helmut Hummel uploaded patch set 1 09/04/20, 16:28
-
TYPO3com voted on patch set 1 V -1 09/04/20, 16:39 Completed build in 10m 28s on Fri, 4 Sep, 04:39 PM Test Summary: 73206 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5246
-
Benni Mack commented on patch set 1 09/04/20, 16:41
let's get it in, but also see my WIP patch pending, where I get rid of a lot of this coupling. -
Oli Bartsch commented on patch set 1 09/04/20, 17:05
ResourceFactory.php:171Would suggest using strict type check here: $recordData !== []ResourceFactory.php:174See comment in StorageRepository.ResourceFactory.php:175Also strict type checking here.StorageRepository.php:83Could we just return empty array here? Especially because you then use null coalescing again in ResourceFactory. -
Helmut Hummel commented on patch set 1 09/04/20, 18:11
ResourceFactory.php:171Replyfine with meResourceFactory.php:175ReplyfineStorageRepository.php:83Replyif you look at the above method, it returns null as well. It does not make sense to me that a method that should return a db row returns an empty array. it should rather throw an exception, or return null. I opted for null here as otherwise I would have needed to try and catch in caller code -
Helmut Hummel uploaded patch set 2 09/04/20, 18:27
-
Helmut Hummel commented on patch set 2 09/04/20, 18:28
ResourceFactory.php:171ReplyDoneResourceFactory.php:174ReplyDoneResourceFactory.php:175ReplyDoneStorageRepository.php:83Replyfound that an exception can indeed be thrown here, which resolves the optional array return type -
TYPO3com commented on patch set 1 09/04/20, 18:31 Completed build in 10m 51s on Fri, 4 Sep, 06:31 PM Test Summary: 73206 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5247
-
Helmut Hummel commented on patch set 2 09/04/20, 18:33
> Patch Set 1: > > let's get it in, but also see my WIP patch pending, where I get rid of a lot of this coupling. https://review.typo3.org/c/Packages/TYPO3.CMS/+/65184 is indeed nice. I absolutely agree that the coupling needs to be removed and your effort there is highly appreciated. I almost started with refactoring the code (and am happy I didn't now knowing that you are on it already), but decided to do a low impact change first to get rid of the most annoying effect of this coupling. As you already agreed, I think as well that this low impact change is still worth getting in beforehand. -
Helmut Hummel uploaded patch set 3 09/04/20, 18:38
-
TYPO3com voted on patch set 2 V +1 09/04/20, 18:39 Completed build in 12m 43s on Fri, 4 Sep, 06:39 PM Test Summary: 73205 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5248
-
Oli Bartsch commented on patch set 3 CR +1 09/04/20, 18:41
StorageRepository.php:83ReplyGreat! -
TYPO3com voted on patch set 3 V +1 09/04/20, 18:50 Completed build in 11m 43s on Fri, 4 Sep, 06:50 PM Test Summary: 73206 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5249
-
Benni Mack voted on patch set 3 V +1 CR +2 09/04/20, 20:19
-
Oli Bartsch voted on patch set 3 V +1 09/05/20, 07:20
-
Andreas Kienast voted on patch set 3 CR +1 09/05/20, 09:51
-
Oliver Klee voted on patch set 3 CR +1 09/05/20, 10:52
-
Nicole Hummel voted on patch set 3 V +1 CR +1 09/06/20, 12:31
-
Helmut Hummel voted on patch set 3 V +2 CR +2 09/06/20, 13:08
-
Helmut Hummel merged patch set 4 09/06/20, 13:08