Review main Merged

87516[FEATURE] Allow extending page tree filter functionality

Oli Bartsch CR +2 V +2 Normal +213 −25 updated 12/18/24, 08:24

Commit message

The new PSR-14 BeforePageTreeIsFilteredEvent is
introduced. It allows to extend the page tree
filter with custom functionality, e.g. to support
field mappings, like proposed in #103253 or to
add further search phrase evaluations like
proposed in #105827.

A new EventListener is added to provide previous core
functionality (fetching specific UID lists, wildcard
query for matching titles). This can now be replaced/enhanced
by custom EventListener implementations.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Garvin Hicking +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Garvin Hicking +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 3

Files 5

Review log 2639

Show 714 earlier messages
  1. Oli Bartsch uploaded patch set 1 12/16/24, 16:26

  2. core-ci voted on patch set 1 V +1 12/16/24, 16:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71213

  3. Oli Bartsch uploaded patch set 2 V +1 12/17/24, 07:26

  4. core-ci voted on patch set 2 V -1 12/17/24, 07:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71238

  5. Oli Bartsch uploaded patch set 3 V -1 12/17/24, 07:49

  6. Oli Bartsch uploaded patch set 4 12/17/24, 07:53

  7. core-ci voted on patch set 3 V -1 12/17/24, 07:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71239

  8. Oli Bartsch uploaded patch set 5 12/17/24, 07:57

  9. core-ci voted on patch set 4 V +1 12/17/24, 07:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71240

  10. core-ci voted on patch set 5 V +1 12/17/24, 08:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71241

  11. Garvin Hicking updated the commit message in patch set 6 V +1 12/17/24, 08:15

  12. core-ci voted on patch set 6 V +1 12/17/24, 08:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71244

  13. Oli Bartsch uploaded patch set 7 V +1 12/17/24, 08:31

  14. core-ci voted on patch set 7 V +1 12/17/24, 08:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71247

  1. Oli Bartsch uploaded patch set 8 V +1 12/17/24, 09:20

  2. core-ci voted on patch set 8 V +1 12/17/24, 09:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71249

  3. Oli Bartsch uploaded patch set 9 V +1 12/17/24, 09:46

  4. core-ci voted on patch set 9 V +1 12/17/24, 09:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71251

  5. Oli Bartsch uploaded patch set 10 V +1 12/17/24, 10:04

  6. core-ci voted on patch set 10 V +1 12/17/24, 10:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71254

  7. Garvin Hicking updated the commit message in patch set 11 V +1 12/17/24, 10:16

  8. core-ci voted on patch set 11 V +1 12/17/24, 10:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71256

  9. Christian Kuhn commented on patch set 11 12/17/24, 11:50

    Feature-105833-ExtendedPageTreeFilterFunctionality.rst:61

    the problem with events that receive querybuilder and who's goal is to change the state of querybuilder to add or remove constraints is, that it can be considered breaking for the event in case core changes (adds or removes) any existing constraint. this makes the event brittle, or adds a hard to solve legacy burden to core. i think we should at least have some 'disclamer' or 'note' in the event class and in the .rst file, that such an event listener needs to be re-tested frequently, since it may depend on constraints set by core, which *may* change over time, or something similar. at least developers should understand that changing these low level details is risky and it may eventually fail when core does things in this area. what do you think?
  10. Garvin Hicking commented on patch set 11 12/17/24, 12:36

    Feature-105833-ExtendedPageTreeFilterFunctionality.rst:61 Reply

    That's a good point. Oli's idea (and I support this) was that large instances should have the ability to remove specific "features" that the Core may introduce with patches like the frontend-URI resolving or other performance intense operations. So I do think with a note like "Handle querybuilder manipulation like a radioactive egg" this should be good. Actually, I would even be good to declare this whole PSR event internal.
  11. Oli Bartsch commented on patch set 11 12/17/24, 12:59

    Feature-105833-ExtendedPageTreeFilterFunctionality.rst:61 Reply

    The event is not intended to change queryBuilder. We pass this object just to simplify the construction of additional `$searchParts`. Therefore any change to the queryBuilder instance from TYPO3 Core is not considered API. I however agree, we should point this out in the RST and also in the event class itself.
  12. Oli Bartsch uploaded patch set 12 V +1 12/17/24, 14:14

  13. Oli Bartsch commented on patch set 12 12/17/24, 14:14

    Feature-105833-ExtendedPageTreeFilterFunctionality.rst:61 Reply

    Done
  14. core-ci voted on patch set 12 V +1 12/17/24, 14:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71279

  15. Benni Mack commented on patch set 12 12/17/24, 16:36

    PageTreeRepository.php:561

    how about we move the true ID search into an Event Listener as well?
  16. Garvin Hicking commented on patch set 12 12/17/24, 17:29

    PageTreeRepository.php:561 Reply

    The problem is other event listeners also should/would operate on this UID list. That would create cross-dependencies of different event listeners. IMO this uid based search should be expansible and a common ground for event listeners to attach to, that's why I tried to talk Oli into this approach.... 😄
  17. Oli Bartsch commented on patch set 12 12/17/24, 19:50

    PageTreeRepository.php:561 Reply

    Actually, this is exactly what I initially did, because this would have been the cleanest solution since all search parts are generated by listeners and no additional information needs to be passed to the event. However, as outlined by Garvin, manipulating this list might be a common use case for this event. To not require each listener to build this list from scratch, next to the problem of ordering and cross dependencies,I have removed this again in https://review.typo3.org/c/Packages/TYPO3.CMS/+/87516/8..9 and let the listener just create the initial uid list.
  18. Benni Mack commented on patch set 12 CR +1 V +1 12/17/24, 20:20

    PageTreeRepository.php:561 Reply

    Done
  19. Garvin Hicking rebased onto patch set 13 CR +1 V +1 12/18/24, 07:55

  20. Garvin Hicking commented on patch set 13 CR +1 V +1 12/18/24, 07:59

    Thanks so much for working this one out, I dig it.
  21. core-ci voted on patch set 13 V +1 12/18/24, 08:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71341

  22. Oli Bartsch commented on patch set 13 12/18/24, 08:10

    Reply

    You're welcome! It was great collaborating - glad you like it!
  23. Benni Mack voted on patch set 13 CR +1 V +1 12/18/24, 08:23

  24. Oli Bartsch voted on patch set 13 CR +2 V +2 12/18/24, 08:24

  25. Oli Bartsch merged patch set 14 12/18/24, 08:24