Review main Merged

93487[TASK] Update composer.json when downloading extensions from TER

Benni Mack CR +2 V +2 Hard +263 −4 updated 09/02/26, 17:49

Commit message

The two fields needed in composer.json to skip
ext_emconf.php entirely are:
1. "extra" > "typo3/cms" > "version"
2. "extra" > "typo3/cms" > "Package" > "providesPackages"

When downloading an extension from TER, Core can use
the information from ext_emconf.php, put it into composer.json
and remove the ext_emconf.php then, to never have a problem
when upgrading in the future.

The composer.json for TER-downloaded extension could then
look like this:

  "extra": {
      "typo3/cms": {
          "extension-key": "example_extension",
          "version": "1.2.3",
          "Package": {
              "providesPackages": {}
          }
      }
  }

This way, extension authors do not need to adapt anything
then anymore if downloaded from TER, the only leftover
group of people that need adaptions are the ones who:

 1. Run in classic mode AND
 2. manually download zip files an upload via FTP (or EM)

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 3

Files 3

Review log 2025

  1. Benni Mack uploaded patch set 1 03/31/26, 09:51

  2. Benni Mack uploaded patch set 2 03/31/26, 09:53

  3. core-ci voted on patch set 1 V -1 03/31/26, 10:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99247

  4. core-ci voted on patch set 2 V +1 03/31/26, 10:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99248

  5. Helmut Hummel commented on patch set 2 03/31/26, 10:27

    FileHandlingUtility.php:143

    I think this can not happen any more, since TYPO3 now scans for composer.json even in classic mode see: https://review.typo3.org/c/Packages/TYPO3.CMS/+/91856

    FileHandlingUtility.php:146

    add JSON_THROW_ON_ERROR

    FileHandlingUtility.php:148

    throw an exception here or assume it is an array

    FileHandlingUtility.php:165

    we might need a bit of more logic here, otherwise this will fail hard for extensions not yet compatible. we should try reading `depends` and `suggests` from ext_emconf and compare with composer.json require/ suggest and trying to make sense of the values. The most complicated case will be when the extension requires other TER extensions to find out their composer name. Goal is to find non extension packages in composer.json and put those in providesPackages then.
  6. Benni Mack uploaded patch set 3 V +1 04/01/26, 17:31

  7. Benni Mack commented on patch set 3 04/01/26, 17:31

    FileHandlingUtility.php:143 Reply

    Done

    FileHandlingUtility.php:146 Reply

    Done

    FileHandlingUtility.php:148 Reply

    Done
  8. core-ci voted on patch set 3 V -1 04/01/26, 17:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99421

  9. Helmut Hummel commented on patch set 3 04/08/26, 11:29

    FileHandlingUtility.php:165 Reply

    will take care to make a suggestion, but need to sort out other things first
  10. Benni Mack updated the commit message in patch set 4 V -1 04/22/26, 07:26

  11. Benni Mack rebased onto patch set 5 07/20/26, 11:43

  12. core-ci voted on patch set 5 V -1 07/20/26, 11:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105026

  13. Benni Mack commented on patch set 5 07/20/26, 11:52

    FileHandlingUtility.php:165 Reply

    hey, do you have an update here?
  14. Helmut Hummel commented on patch set 5 07/24/26, 11:54

    FileHandlingUtility.php:145

    also check for $composerJson['extra']['typo3/cms']['version']

    FileHandlingUtility.php:156

    better set $composerJson['extra']['typo3/cms']['version'] instead

    FileHandlingUtility.php:165 Reply

    since this is a compatibility functionality I think it will suffice to do the following: Iterate over require and suggest and add everything that is not \TYPO3\CMS\Core\Package\PackageManager::isFrameworkPackage and not \TYPO3\CMS\Core\Package\PackageManager::isComposerDependency to be 100% correct, we could only check it is not a know composer dependency and check with packagist.org API whether the package is not of type typo3-cms-extension and then add it to provides, because this means, that it must not be respected for dependency ordering
  15. Benni Mack uploaded patch set 6 V -1 07/24/26, 12:30

  16. Benni Mack commented on patch set 6 07/24/26, 12:34

    FileHandlingUtility.php:145 Reply

    Done

    FileHandlingUtility.php:156 Reply

    Done

    FileHandlingUtility.php:165 Reply

    done, but I also didn't want to introduce the packagist.org API for this change now.
  17. core-ci voted on patch set 6 V +1 07/24/26, 12:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105311

  18. Helmut Hummel commented on patch set 6 07/24/26, 12:53

    FileHandlingUtility.php:172

    looks good to me now. worst thing that can happen here, is that we add a typo3 extension here, which then will be ignored for depdendency ordering. this can and should be fixed by the extension owner though by providing this piece of information
  19. Benni Mack marked it ready for review 07/24/26, 12:56

  20. Oliver Klee voted on patch set 6 V +1 07/27/26, 07:50

  21. Stefan Bürk voted on patch set 6 CR +1 07/27/26, 13:26

  22. Stefan Bürk voted on patch set 6 V +1 07/27/26, 13:33

  23. Simon Schaufelberger voted on patch set 6 CR +1 V +1 08/02/26, 23:26

  24. Stefan Bürk commented on patch set 6 CR +2 V +2 09/02/26, 13:47

    FileHandlingUtility.php:172 Reply

    Done
  25. Stefan Bürk merged patch set 7 09/02/26, 17:49