Review main Merged Breaking

65922[!!!][FEATURE] Refactor TER-download handling

Benni Mack CR +2 V +2 Nightmare +1470 −2701 updated 10/09/20, 17:01

Commit message

This change is cleaning up a lot of Extension-Manager-code under-the-hood
in order to solve some important topics related to t3x files, and how
to fetch extensions from TER / Repositories.

First of all, instead of having *one* API on how to retrieve extensions,
an ExtensionDownloaderRemoteInterface is added which allows for downloading
a single extension from a remote endpoint.

In conjunction ListableRemoteInterface is used to fetch all available
extensions from a remote (known as extensions.xml.gz currently).

For both functionalities, the existing functionality from TER API is kept:
* Downloading an extensions.xml.gz
* Downloading an extension as a t3x file from a remote

However, this is now placed into the TerExtensionRemote class.

Custom remote configuration can be added in Services.yaml.

This makes the previous "Repository" and its connected "Mirrors" functionality
completely obsolete.

Additional bugfixes:
* Since TER does not have mirrors anymore, fetching those is not used anymore
* The endpoints now use the correct URL from extensions.typo3.org instead of
repositories.typo3.org (mirrors) and typo3.org (extensions.xml.gz)
* Extensions do not longer depend on a "repository" but on a remote identifier
(such as "ter"). The remotes are configured in Services.yaml and are registered
through a compiler pass, based on the new `extension.remote` tag. This means
that the "tx_extensionmanager_domain_model_repository" DB table is removed,
and therefore does not need to be populated during upgrades / installation
anymore. The Upgrade Wizard is also removed.

In order to ship a new, more flexible download process of extensions,
the TerExtensionRemote can be completely replaced by a third-party
implementation (!) with its custom syntax.

Updating the extension list now directly populates the database,
and uses the BulkExtensionRepositoryWriter instead of the very complex
ExtensionListUtility. This is tightly connected to the TerExtensionRemote
and the XML Parser functionality.

The XML Parser for parsing the mirrors.xml is now removed, and the
XmlParserFactory heavily simplified.

The "Remote" objects now know by themselves when they need to update
and re-import their data. This centralizes the fetching of the remote data,
and also moves the "import into DB" into two separate logic areas.

This cleans up the EM code massively, and reduces the dependency hell of
"utility" and "helper" classes.

In addition, it is now visible how the TerExtensionRemote can be used in
the Upgrade Wizards to download extensions via a cleaner API, which will
become even easier in the future.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 52

Show 32 more files