92578[FEATURE] Add PSR-14 event to modify indexed_search result sets
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Garvin Hicking +1
- Sven Liebert +1
-
Verified V +2 Done
- Benni Mack +2
- Garvin Hicking +1
- Sven Liebert +1
- core-ci +1 CI
Issues 1
Files 6
- typo3/sysext/core/Documentation/Changelog/14.2/Feature-109018-PSR-14EventToModifyIndexedSearchResultSets.rstnew+78 −0
- typo3/sysext/indexed_search/Classes/Controller/SearchController.php1+18 −2
- typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php+10 −10
- typo3/sysext/indexed_search/Classes/Event/AfterSearchResultSetsAreGeneratedEvent.phpnew+69 −0
- typo3/sysext/indexed_search/Documentation/TechnicalDetails/Events/Index.rst+6 −0
- typo3/sysext/indexed_search/Tests/Functional/Controller/SearchControllerTest.phpnew+139 −0
Review log 2534
Show 69 earlier messages
-
Eric Harrer uploaded patch set 1 01/29/26, 20:10
-
Guido Schmechel commented on patch set 1 01/29/26, 20:19
Quick question: Wouldn't it make more sense to incorporate a setting for this? EXT:indexed_search already has many settings, and that would be more integrator-friendly than building an event listener? -
Eric Harrer commented on patch set 1 01/29/26, 20:31
Reply
A setting would work for selecting between predefined options. The PSR-14 event is intended to allow fully custom pagination implementations, which would not be feasible with a simple setting. From my experience, PSR-14 events are also increasingly used by integrators today, making this a familiar and flexible extension point. -
core-ci voted on patch set 1 V -1 01/29/26, 20:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94597
-
Eric Harrer uploaded patch set 2
V -101/29/26, 20:52 -
core-ci voted on patch set 2 V +1 01/29/26, 21:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94602
-
Eric Harrer uploaded patch set 3
V +101/29/26, 21:55 -
core-ci voted on patch set 3 V +1 01/29/26, 22:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94606
-
Garvin Hicking commented on patch set 3 01/30/26, 10:53
Reply
Personally, I think I would opt for a setting. If we introduce a PSR-14 event we might make it more broadly available and dispatch it to work on the whole `$resultsets` within `SearchController->searchAction()`. That would allow to not only influence the paginatior, but other aspects of results too. A benefit would also be that the PSR event would only be called once for the search, and not X times. And the event listener can then decide whether to iterate all resultssets or only portions of it. That said, I think having PSR-14 events is helpful. We could even implement the setting then with a PSR-14 eventlistener.
-
Guido Schmechel commented on patch set 3 02/07/26, 12:57
Reply
I think that's a good approach. Think a little bigger with this patch to influence the complete search. And for pagination, a setting in a separate patch. -
Eric Harrer uploaded patch set 4
V +102/19/26, 11:26 -
Eric Harrer commented on patch set 4 02/19/26, 11:31
Thank you for the valuable feedback so far. This patchset has been updated accordingly: the event now targets complete indexed_search result sets, and tests/changelog were aligned with that broader scope. A new Forge issue has been created for this foundational extension point (#109018). The original issue (#105084) will be resolved by a dedicated follow-up patch introducing the integrator-facing setting on top of this API. -
core-ci voted on patch set 4 V +1 02/19/26, 11:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96237
-
Eric Harrer rebased onto patch set 5
V +102/19/26, 13:22 -
Eric Harrer commented on patch set 5 02/19/26, 13:24
The setting patch based on this patch can be found here: https://review.typo3.org/c/Packages/TYPO3.CMS/+/92896 -
core-ci voted on patch set 5 V +1 02/19/26, 13:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96245
-
Garvin Hicking commented on patch set 5 02/19/26, 19:30
Feature-109018-AddPSR-14EventToModifyIndexedSearchResultSets.rst:26In an ideal world we would have a ResultSet be a DTO that we could replace, and not a generic array. In this case for indexed_search this would be a larger task not needed for the context here so I guess we can live with this global "setArray" approach.SearchController.php:234Just a note: We normaly do not create such intermediate methods, but in this context to provide testability I find it acceptable to have it "wrapped". -
Garvin Hicking voted on patch set 5 CR +1 V +1 02/19/26, 19:31
-
Eric Harrer rebased onto patch set 6
CR +1V +102/20/26, 13:30 -
core-ci voted on patch set 6 V +1 02/20/26, 14:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96352
-
Eric Harrer rebased onto patch set 7
V +102/20/26, 15:04 -
core-ci voted on patch set 7 V +1 02/20/26, 15:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96366
-
Garvin Hicking voted on patch set 7 CR +1 V +1 02/20/26, 15:45
-
Sven Liebert voted on patch set 7 CR +1 V +1 02/23/26, 18:01
-
Benni Mack voted on patch set 7 CR -2 02/23/26, 18:01
-
Benni Mack uploaded patch set 8
CR +1V +102/23/26, 18:29Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
Benni Mack commented on patch set 8 CR 0 02/23/26, 18:30
sorry, I couldn't resist and did some "minor" adjustments (if you ever going to use this new Event, you won't regret it) -
core-ci voted on patch set 8 V +1 02/23/26, 18:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96611
-
Garvin Hicking uploaded patch set 9
V +102/23/26, 19:05rename all the things -
core-ci voted on patch set 9 V +1 02/23/26, 19:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96612
-
Garvin Hicking commented on patch set 9 CR +1 V +1 02/23/26, 19:28
Reply
... but we have $GLOBALS[TYPO3_REQUEST]! J/k. Thanks for this addition and the better name. -
Sven Liebert voted on patch set 9 CR +1 V +1 02/23/26, 19:39
-
Benni Mack voted on patch set 9 CR +2 V +2 02/23/26, 19:54
-
Benni Mack merged patch set 10 02/23/26, 19:54