Review main Merged

95776[TASK] Browse the extension catalogue through the TER REST API

Benni Mack CR +2 V +2 Expert +1970 −28 updated 10/31/26, 16:54

Commit message

The "Get Extensions" module answered every listing, search and detail
view from a local mirror of the TER catalogue: the extensions.xml.gz
dump, imported into a database table whenever an editor pressed "Update
from TER". What the module showed was therefore as old as the last
import, and a freshly released extension could not be found at all
until someone refreshed the list.

TerApiClient talks to https://extensions.typo3.org/api/v1 and
TerExtensionCatalogue maps its answers onto the ExtensionCatalogue
contract the list views were put behind in #110668. Listings are
fetched one page at a time, and searches are answered by TER through
filter[search], which matches key, title, description, author, owner
and composer name and lists an exact key match first, as the database
search did. Responses are cached for an hour in the new
extensionmanager_ter_api cache, so paging back and forth does not cost
a request per click.

FallbackExtensionCatalogue is what makes this safe to switch on: when
TER cannot answer, the imported list answers instead. Browsing is then
exactly what it was before, only with older data. Requests time out
after ten seconds, and a failure is remembered for five minutes, so an
offline installation does not wait for a timeout on every page. Nothing
has to be deprecated for this - the imported list,
ListableRemoteInterface and TerExtensionRemote all keep their jobs, and
importing stays worthwhile because it is also what the download path
resolves against.

Telling the two apart matters, so the client distinguishes them: a
remote that reports "no such extension" or "no results" has answered
and is passed through, while a request that could not be made or was
refused raises ApiRequestFailedException and is the only thing that
falls back. An outage must not look like an empty catalogue, and an
empty search result must not silently mix in the imported list.

Two things the REST API does that the mirror could not are used right
away: filter[typo3_version] hides extensions that do not fit the
installation - or, as long as nothing is published for the running
major version yet, those for the previous one - and filter[username]
separates the official distributions from the community ones by their
owner, which is the same predicate the database query used. Versions
TER flags as insecure are left out, as the database queries did.

Every request to TER, including the extension list and the archive
downloads of TerExtensionRemote, now names the exact TYPO3 version in
its "TYPO3/<version>" user agent.

The package to download is still resolved against the imported list,
so a version the catalogue shows but the import does not have cannot
be installed before the list is updated. The JSON actions of
DownloadController answer that case with the message of
ExtensionNotFoundException, which says so, instead of letting the
exception escape and leaving the user without any feedback.

The title of that error notification, downloadExtension.dependencies
.errorTitle, had been marked unused and removed with #109903 although
DownloadController and InstallFromTer.fluid.json read it. It is back,
and a test drives the dependency check into its error branch.

Review

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

Issues 1

Files 23

Show 3 more files

Review log 2838

Show 913 earlier messages
  1. Benni Mack uploaded patch set 1 09/11/26, 20:47

  2. core-ci voted on patch set 1 V +1 09/11/26, 20:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108316

  3. Benni Mack uploaded patch set 2 V +1 09/11/26, 22:37

  4. Benni Mack marked it ready for review 09/11/26, 22:37

  5. core-ci voted on patch set 2 V +1 09/11/26, 22:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108357

  6. Garvin Hicking commented on patch set 2 09/12/26, 00:41

    This last sentence has no
  7. Benni Mack updated the commit message in patch set 3 V +1 09/12/26, 08:12

  8. core-ci voted on patch set 3 V +1 09/12/26, 08:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108386

  9. Benni Mack commented on patch set 3 09/12/26, 08:32

    Reply

    Done
  10. Simon Schaufelberger commented on patch set 3 09/12/26, 23:03

    TerExtension.php:31

    i thought there are no more verified extensions as the program got shut down recently?
  11. Benni Mack commented on patch set 3 09/15/26, 06:41

    TerExtension.php:31 Reply

  12. Benni Mack rebased onto patch set 4 V +1 10/01/26, 21:27

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

  1. Benni Mack marked it work in progress 10/08/26, 09:54

  2. Benni Mack uploaded patch set 5 V +1 10/10/26, 18:15

  3. core-ci voted on patch set 5 V +1 10/10/26, 18:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110807

  4. Benni Mack commented on patch set 5 10/11/26, 06:38

    This change is ready for review.

    TerExtension.php:31 Reply

    removed the uneeded parts
  5. Wouter Wolters voted on patch set 5 CR +1 V +1 10/14/26, 20:02

  6. Simon Schaufelberger voted on patch set 5 CR +1 V +1 10/14/26, 22:30

  7. Josua Vogel commented on patch set 5 CR -1 10/15/26, 05:53

    I need to check something
  8. Josua Vogel commented on patch set 5 10/15/26, 06:23

    Reply

    If I download an extension in a version that isn't in the local database, the error handling doesn't work properly. In `checkDependenciesAction`, the ExtensionNotFoundException thrown by `getByPackageIdentifier` isn't caught. The user receives no visual feedback.
  9. Benni Mack uploaded patch set 6 CR +1 V +1 10/23/26, 07:51

  10. Benni Mack commented on patch set 6 10/23/26, 07:56

    Reply

    please re-check
  11. Benni Mack updated the commit message in patch set 7 10/23/26, 08:10

  12. Benni Mack rebased onto patch set 8 10/23/26, 08:30

  13. core-ci voted on patch set 6 V -1 10/23/26, 09:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112237

  14. core-ci voted on patch set 7 V -1 10/23/26, 09:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112243

  15. core-ci voted on patch set 8 V -1 10/23/26, 09:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112246

  16. Benni Mack rebased onto patch set 9 V -1 10/23/26, 10:25

  17. core-ci voted on patch set 9 V +1 10/23/26, 10:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112265

  18. Josua Vogel commented on patch set 9 10/25/26, 19:22

    Reply

    Done
  19. Josua Vogel uploaded patch set 10 V +1 10/25/26, 19:37

  20. Josua Vogel voted on patch set 10 CR +1 V +1 10/25/26, 19:44

  21. core-ci voted on patch set 10 V +1 10/25/26, 19:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112536

  22. Georg Ringer voted on patch set 10 CR +1 V +1 10/31/26, 14:50

  23. Benni Mack voted on patch set 10 CR +2 V +2 10/31/26, 15:27

  24. Benni Mack merged patch set 11 10/31/26, 15:27

  25. Oli Bartsch commented on patch set 11 10/31/26, 16:54

    🧡