Review main Merged

94632[TASK] Identify remote packages by key, version and remote

Benni Mack CR +2 V +2 Hard +313 −32 updated 07/08/26, 09:32

Commit message

Whenever the extension manager wanted to download or install a
package from TER, it addressed it by the uid of its row in
tx_extensionmanager_domain_model_extension. This made the whole
download and install flow depend on a package being stored in the
local database first, which stands in the way of browsing a remote
in real-time and installing from it without importing everything
into the database beforehand.

A package is now addressed by what actually identifies it: its
package key, a concrete version and the remote it comes from. A
small PackageIdentifier value object carries this triple, and
ExtensionRepository::findOneByPackageIdentifier() resolves it. The
download and distribution controllers, the download ViewHelper and
the related Fluid templates hand over packageKey, version and remote
instead of the uid, and the download guard in
ExtensionManagementService now looks at the remote a package is
bound to rather than at the presence of a uid.

Nothing changes for the user: resolving still happens against the
database, so the existing behaviour stays the same. The difference
is that a package no longer needs a uid to be downloaded or
installed, which is the groundwork for a real-time remote that does
not populate the database.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 16

Review log 1123

  1. Benni Mack uploaded patch set 1 06/30/26, 12:11

  2. core-ci voted on patch set 1 V +1 06/30/26, 12:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104082

  3. Oli Bartsch commented on patch set 1 06/30/26, 14:16

    DownloadController.php:59

    I think it is really error-prone to require all actions to define all those parameters. However adding an explicit type converter etc. might be a bit overengeeniered. What about at least construct PackageIdentifier at the top of each action body instead of passing the three parameters deeper into the service layer? This would keep Extbase routing "flat", centralizes construction, and makes the VO actually useful inside the logic.

    PackageIdentifier.php:32

    version should be required. No install/download action legitimately omits a version, so the default is superfluous and might lead to errors in the future.

    ExtensionRepository.php:130

    I would like to clarify the remote optionality here. IMO either make remote required and always apply the constraint, or rename the method to signal it's a best-effort lookup and add a docblock explaining the ambiguity when two remotes share the same key and version. If the caller genuinely doesn't know the remote, that's a separate use case that deserves its own method (e.g. findAllByPackageKeyAndVersion) returning a collection, not silently picking one.

    ExtensionRepository.php:164

    Do we still need this method?
  4. Oli Bartsch uploaded patch set 2 V +1 06/30/26, 16:11

  5. core-ci voted on patch set 2 V +1 06/30/26, 16:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104090

  6. Oli Bartsch uploaded patch set 3 V +1 07/02/26, 12:26

  7. Oli Bartsch commented on patch set 3 07/02/26, 12:27

    This change is ready for review.

    DownloadController.php:59 Reply

    Done

    PackageIdentifier.php:32 Reply

    Done

    ExtensionRepository.php:130 Reply

    Done

    ExtensionRepository.php:164 Reply

    Done
  8. core-ci voted on patch set 3 V -1 07/02/26, 12:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104234

  9. core-ci commented on patch set 3 07/02/26, 13:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104234

  10. core-ci commented on patch set 3 07/02/26, 13:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104234

  11. core-ci commented on patch set 3 07/02/26, 14:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104234

  12. core-ci commented on patch set 3 07/02/26, 14:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104234

  13. core-ci commented on patch set 3 07/02/26, 14:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104234

  14. core-ci commented on patch set 3 07/02/26, 14:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104234

  15. core-ci commented on patch set 3 07/02/26, 14:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104234

  16. core-ci commented on patch set 3 07/02/26, 14:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104234

  17. core-ci voted on patch set 3 V +1 07/02/26, 14:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104234

  18. Oli Bartsch voted on patch set 3 CR +1 V +1 07/02/26, 19:13

  19. Stefan Bürk voted on patch set 3 CR +1 V +1 07/02/26, 19:35

  20. Benni Mack voted on patch set 3 CR +2 V +2 07/02/26, 19:40

  21. Benni Mack merged patch set 4 07/02/26, 19:42

  22. Benjamin Franzke commented on patch set 4 07/08/26, 09:11

    ExtensionManagementService.php:287

  23. Benjamin Franzke wrote 07/08/26, 09:32

    Created a revert of this change as I251fa9167c26d24c97141c570ce06b5917f50eeb