Review main Merged

88946[FEATURE] Add events for getObjectCountByQuery

Markus Klein CR +2 V +2 Normal +134 −1 updated 04/09/25, 14:35

Commit message

Similar to the existing events within
`\TYPO3\CMS\Extbase\Persistence\Generic\Backend::getObjectDataByQuery`
add events for
`\TYPO3\CMS\Extbase\Persistence\Generic\Backend::getObjectCountByQuery`
so extensions can process also the COUNT queries.

This ensures consistent data when dealing with Extbase queries.

Review

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

Issues 1

Files 4

Review log 1622

  1. Markus Klein uploaded patch set 1 04/04/25, 11:36

  2. core-ci voted on patch set 1 V +1 04/04/25, 11:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77001

  3. Johannes Kasberger voted on patch set 1 CR +1 V +1 04/04/25, 12:48

  4. Markus Klein commented on patch set 1 CR -1 04/04/25, 12:54

    Will be a feature. RST required
  5. Markus Klein uploaded patch set 2 CR +1 V +1 04/04/25, 21:01

  6. Markus Klein updated the commit message in patch set 3 04/04/25, 21:02

  7. Markus Klein updated the commit message in patch set 4 04/04/25, 21:03

  8. core-ci voted on patch set 2 V +1 04/04/25, 21:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77016

  9. core-ci voted on patch set 3 V +1 04/04/25, 21:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77017

  10. core-ci voted on patch set 4 V +1 04/04/25, 21:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77018

  11. Benni Mack voted on patch set 4 CR +1 V +1 04/05/25, 07:33

  12. Garvin Hicking commented on patch set 4 04/05/25, 08:39

    Feature-106510-AddedPSR-14EventsToExtbaseBackendgetObjectCountByQueryMethod.rst:14

    ```suggestion The class :php:`TYPO3\CMS\Extbase\Persistence\Generic\Backend` is the covering entity to retrieve data from the database within the Extbase persistence framework. ```

    Feature-106510-AddedPSR-14EventsToExtbaseBackendgetObjectCountByQueryMethod.rst:16

    ```suggestion Already in 2013 the :php:`getObjectDataByQuery` method got equipped with signals (later migrated to events) in order to modify data retrieval. ```

    Feature-106510-AddedPSR-14EventsToExtbaseBackendgetObjectCountByQueryMethod.rst:19

    ```suggestion Extensions, or any other code using the existing events for data retrieval, have not been able to consistently modify queries, such that results returned by :php:`QueryResult` were consistent. ```

    Feature-106510-AddedPSR-14EventsToExtbaseBackendgetObjectCountByQueryMethod.rst:21

    ```suggestion The :php:`getObjectCountByQuery` method is now enhanced with events as well. This finally allows extensions to modify all parts of query usage within Extbase's generic :php:`Backend` to achieve consistent results. ```

    Feature-106510-AddedPSR-14EventsToExtbaseBackendgetObjectCountByQueryMethod.rst:28

    ```suggestion :php:`ModifyQueryBeforeFetchingObjectCountEvent` may be used to modify the query before being passed on to the actual storage backend. ```

    Feature-106510-AddedPSR-14EventsToExtbaseBackendgetObjectCountByQueryMethod.rst:30

    ```suggestion :php:`ModifyResultAfterFetchingObjectCountEvent` may be used to adjust the result. ```
  13. Johannes Kasberger voted on patch set 4 CR +1 V +1 04/07/25, 07:38

  14. Garvin Hicking commented on patch set 5 CR +1 V +1 04/09/25, 11:31

    Published edit on patch set 4.
  15. Garvin Hicking commented on patch set 5 04/09/25, 11:32

    Feature-106510-AddedPSR-14EventsToExtbaseBackendgetObjectCountByQueryMethod.rst:14 Reply

    Fix applied.
  16. core-ci voted on patch set 5 V +1 04/09/25, 11:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77277

  17. Markus Klein commented on patch set 5 04/09/25, 12:19

    thx Garvin
  18. Garvin Hicking commented on patch set 6 V +1 04/09/25, 14:20

    Published edit on patch set 5.
  19. Garvin Hicking commented on patch set 6 CR +1 V +1 04/09/25, 14:21

    (Note to self: Applying more than one gerrit suggestion at once doesn't seem possible. Had to apply manually now, finished.)

    Feature-106510-AddedPSR-14EventsToExtbaseBackendgetObjectCountByQueryMethod.rst:16 Reply

    Done

    Feature-106510-AddedPSR-14EventsToExtbaseBackendgetObjectCountByQueryMethod.rst:19 Reply

    Done

    Feature-106510-AddedPSR-14EventsToExtbaseBackendgetObjectCountByQueryMethod.rst:21 Reply

    Done

    Feature-106510-AddedPSR-14EventsToExtbaseBackendgetObjectCountByQueryMethod.rst:28 Reply

    Done

    Feature-106510-AddedPSR-14EventsToExtbaseBackendgetObjectCountByQueryMethod.rst:30 Reply

    Done
  20. core-ci voted on patch set 6 V +1 04/09/25, 14:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77287

  21. Benni Mack voted on patch set 6 CR +2 V +2 04/09/25, 14:35

  22. Benni Mack merged patch set 7 04/09/25, 14:35