79718[BUGFIX] Avoid SQL errors in PageRepository->versionOL
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Oli Bartsch +1
- Oliver Klee +1
-
Verified V +2 Done
- Benni Mack +2
- Oli Bartsch +1
- Oliver Klee +1
- core-ci +1 CI
Issues 1
Files 2
Review log 1216
-
Benni Mack uploaded patch set 1 07/05/23, 11:16
-
core-ci voted on patch set 1 V -1 07/05/23, 11:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43492
-
Oliver Klee commented on patch set 1 07/05/23, 11:31
Should I make the changes I've proposed, or would you prefer to do them?PageRepositoryTest.php:657I propose we state what the method does here (instead of what it does not do): ``` versionOLForAnInvalidRowReturnsEmptyArray ```PageRepositoryTest.php:664For comparing with arrays, we can use the type-safe `assertSame` (in both places) so the test is as strict as possible: ```php self::assertEquals([], $input); ```PageRepositoryTest.php:665I recommend moving this to a second test (or, in this case, a two-item data provider for this test). The benefit of this is that if some part of the test fails, it's easier to see which part of the behavior is broken and which isn't. (With a test that checks multiple behaviors, this is harder as the test exits at the first failed assertion.) -
Benni Mack commented on patch set 1 07/05/23, 11:47
Reply
go ahead -
Oliver Klee uploaded patch set 2
V -107/05/23, 12:03 -
Oliver Klee commented on patch set 1 07/05/23, 12:05
I have done the changes to the tests. The tests still are failing, though, because the UID always gets set. I don't know if this is the expected behavior (and we should adapt the tests accordingly), or if the tests are correct, and we need to adapt the `versionOL` method. Do you know more?Reply
DonePageRepositoryTest.php:657ReplyDonePageRepositoryTest.php:664ReplyDonePageRepositoryTest.php:665ReplyDone -
core-ci voted on patch set 2 V -1 07/05/23, 12:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43500
-
Benni Mack uploaded patch set 3
V -107/05/23, 12:55 -
core-ci voted on patch set 3 V +1 07/05/23, 13:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43513
-
Oliver Klee commented on patch set 4
V +107/05/23, 13:39Published edit on patch set 3. -
Oliver Klee commented on patch set 4 V +1 07/05/23, 13:40
I've re added the empty lines in the test that separate the setup, execute and verify steps in order to reduce the cognitive load required for understanding the structure of the test. -
Oli Bartsch voted on patch set 4 V +1 CR +1 07/05/23, 13:40
-
core-ci voted on patch set 4 V +1 07/05/23, 13:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43522
-
Oliver Klee voted on patch set 4 CR +1 07/05/23, 13:52
-
Benni Mack voted on patch set 4 V +2 CR +2 07/05/23, 14:00
-
Benni Mack merged patch set 5 07/05/23, 14:00