86378[BUGFIX] Mitigate invalid `count` query in `PageInformationController`
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Benjamin Franzke +1
- Garvin Hicking +1
-
Verified V +2 Done
- Stefan Bürk +2
- Benjamin Franzke +1
- Garvin Hicking +1
- core-ci +1 CI
Issues 1
Files 5
- typo3/sysext/info/Classes/Controller/PageInformationController.php+3 −1
- typo3/sysext/info/Tests/Functional/Controller/PageInformationControllerTest.php5new+323 −0
- typo3/sysext/info/Tests/Functional/Fixtures/DataSets/be_users.csvnew+3 −0
- typo3/sysext/info/Tests/Functional/Fixtures/DataSets/pages.csvnew+6 −0
- composer.json+1 −0
Review log 1518
-
Stefan Bürk uploaded patch set 1 09/29/24, 21:07
-
core-ci voted on patch set 1 V +1 09/29/24, 21:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66816
-
Garvin Hicking voted on patch set 1 CR +1 09/30/24, 05:05
-
Thomas Hohn voted on patch set 1 CR +1 09/30/24, 05:06
-
Nikita Hovratov commented on patch set 1 V +1 09/30/24, 06:52
-
Stefan Bürk commented on patch set 1 09/30/24, 09:22
PageInformationControllerTest.php:325ReplyReflection is not needed here, like the exten more. In the end it should be extracted into a dedicated service to avoid extending/reflection at all. My reasoning for this approach was to have everything in place for changes, and changes in constructor DI needs to be adjusted in that test for example. -
Benjamin Franzke commented on patch set 1 09/30/24, 09:27
PageInformationControllerTest.php:325ReplyI'd suggest following alternative via Closure::bind, so no need to fake an object at all, just fake the scope: ``` $pageInformationController = $this->get(PageInformationController::class); $getPageRecordsRecursive = \Closure::bind( static fn () => $pageInformationController->getPageRecordsRecursive(...func_get_args()), null, PageInformationController::class ); self::assertSame($expectedRows, $getPageRecordsRecursive($pid, $depth)); ``` -
Benjamin Franzke uploaded patch set 2
CR +1V +109/30/24, 09:41 -
Benjamin Franzke commented on patch set 2 09/30/24, 09:41
PageInformationControllerTest.php:325ReplyDone -
core-ci voted on patch set 2 V +1 09/30/24, 09:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66847
-
Benjamin Franzke voted on patch set 2 V +1 09/30/24, 12:47
-
Benjamin Franzke uploaded patch set 3
CR +1V +109/30/24, 14:33 -
Benjamin Franzke commented on patch set 3 09/30/24, 14:33
PageInformationControllerTest.php:325Replytalked to lolli and aligned to `\ReflectionMethod`, since we already use that in other tests. -
Benjamin Franzke voted on patch set 3 CR +1 V +1 09/30/24, 14:33
-
core-ci voted on patch set 3 V +1 09/30/24, 14:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66857
-
Garvin Hicking voted on patch set 3 CR +1 V +1 10/10/24, 17:39
-
Stefan Bürk voted on patch set 3 CR +2 V +2 10/10/24, 18:58
-
Stefan Bürk merged patch set 4 10/10/24, 18:58
PageInformationControllerTest.php:325