1. 11 Dec, 2020 1 commit
  2. 09 Oct, 2020 1 commit
    • Benni Mack's avatar
      [!!!][FEATURE] Refactor TER-download handling · 3f980fbb
      Benni Mack authored and Georg Ringer's avatar Georg Ringer committed
      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.
      
      Resolves: #92457
      Relates: #91665
      Releases: master
      Change-Id: I243d731dae9f39dfa7919c9fd69341c8c7b98c75
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65922
      
      
      Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      Tested-by: default avatarTYPO3com <noreply@typo3.com>
      Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
      Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
      Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
      Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
      3f980fbb