Review main Merged

95740[TASK] Load only the requested page of the extension list

Benni Mack CR +2 V +2 Hard +330 −18 updated 09/09/26, 10:45

Commit message

The "Get Extensions" module rendered a page of ten extensions by
loading the whole catalogue: findAll() hydrated an Extension model for
every current version known to the local TER mirror, and ArrayPaginator
then sliced ten of them off. Searching did the same with every match.

Both queries now take an offset and a limit, and the new
ExtensionListPaginator asks for a single page while taking the total
from a matching count query. countAll() already existed with the same
constraints as findAll(); countByTitleOrAuthorNameOrExtensionKey() is
added as the counterpart for the search.

Neither query had a total order. The catalogue is sorted by
"last_updated" and the search by its relevance ranking, and neither of
them is unique. Sorting a complete array in PHP does not care, but
paging by offset does: the database may return the rows sharing one
timestamp or one ranking score in any order, so an extension can appear
on two pages while another is never shown at all. Both queries now
break ties by extension key.

The paginator is fed by a callable rather than by a query, so the list
views do not depend on the catalogue being a database table.
Core\Pagination\QueryBuilderPaginator would handle the offset, but it
is bound to a QueryBuilder and hands out raw rows instead of
extensions.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Jochen Roth +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Jochen Roth +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 56

  1. Benni Mack uploaded patch set 1 09/09/26, 05:50

  2. core-ci voted on patch set 1 V +1 09/09/26, 05:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108141

  3. Georg Ringer voted on patch set 1 CR +1 V +1 09/09/26, 10:04

  4. Jochen Roth voted on patch set 1 CR +1 V +1 09/09/26, 10:26

  5. Benni Mack voted on patch set 1 CR +2 V +2 09/09/26, 10:45

  6. Benni Mack merged patch set 2 09/09/26, 10:45