Review main Merged

95482[BUGFIX] Always exclude app package from active packages

Helmut Hummel CR +2 V +2 Normal +125 −6 updated 09/10/26, 12:13

Commit message

The VirtualAppPackage represents the project root package and must not
be treated like an active TYPO3 package. In particular, configuration
resources such as TCA or database schema definitions must not be
evaluated for it.

Previously, the app package could explicitly be included in
PackageManager::getActivePackages(). This was only used during the
initial setup and web-based setup, while other code paths such as
extension:setup already ignored it. As a result, configuration
resources from the project root package were handled inconsistently.

Remove the option to include the VirtualAppPackage in the list of
active packages and always exclude it.

Public resources of the project root package are still published
explicitly during setup, which is currently the only intended
resource to be handled by the VirtualAppPackage.

This may technically be breaking for installations relying on
configuration resources from the project root package during setup.
Such resources were never handled consistently, however, and were for
example not evaluated during regular deployment, so relying on this
behavior was not supported.

Review

  • Code review CR +2 Done
    • Helmut Hummel +2
    • Benjamin Franzke +1
    • Benjamin Kott +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Helmut Hummel +2
    • Benjamin Franzke +1
    • Benjamin Kott +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 2832

Show 67 earlier messages
  1. Helmut Hummel uploaded patch set 1 08/31/26, 07:42

  2. Helmut Hummel marked it work in progress 08/31/26, 07:44

  3. Mathias Brodala commented on patch set 1 08/31/26, 07:46

    PackageManager.php:717

    Hm, this means once this change is relased a toplevel Configuration/TCA directory is ignored again? That'd be rather sad IMO since it vastly limits the "app" package and brings back the hard requirement of at least one "site" package for all features.
  4. core-ci voted on patch set 1 V +1 08/31/26, 07:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107384

  5. Helmut Hummel commented on patch set 1 09/02/26, 08:36

    PackageManager.php:717 Reply

    No. It removes the evaluation of things like Configuration/TCA, when the root is an extension anyway, which lead to evaluating those resources twice
  6. Mathias Brodala commented on patch set 1 09/02/26, 08:37

    PackageManager.php:717 Reply

    Ah, now that makes a lot more sense, thanks for clarification!
  7. Benjamin Kott commented on patch set 1 09/02/26, 14:09

    This change is ready for review.
    the patch seems to resolve by reading, still it misses any tests to validate the behavior
  1. Benjamin Kott marked it work in progress 09/02/26, 14:09

  2. Benjamin Franzke commented on patch set 1 09/07/26, 11:31

    SetupService.php:412

    Thanks, I like that this change removes the bool flag from `getActivePackages()` 👍 I would suggest to use `isPackageActive()` instead of guarding via the type qualifier, since that makes the code cleaner and more robust. Ihe intent to avoid double registration becomes more easier to understand based on the code alone, and we do not rely on the `type` alone, which may technically even be different) ```suggestion if (!$this->packageManager->isPackageActive(InstalledVersions::getRootPackage()['name'])) { ```
  3. Helmut Hummel commented on patch set 1 09/09/26, 12:26

    SetupService.php:412 Reply

    > since that makes the code cleaner and more robust. Not sure, because all packages defining anything in extra.typo3/cms are considered active typo3 extensions since TYPO3 v11 https://github.com/TYPO3/typo3/blob/16596e3927d4bf9fafbac89befb27475f6727ed1/typo3/sysext/core/Classes/Composer/PackageArtifactBuilder.php#L41 I'd rather make the intent even more clear, since exposing configuration resource for the VirtualAppPackage was never intended and also does not happen for extension:setup command, but only during setup command or web based setup. The intention was only to publish potentially defined public resources of the VirtualAppPackage (project package) during (initial) setup. So the fix would be to pour that in code instead. I will change this accordingly
  4. Helmut Hummel uploaded patch set 2 V +1 09/09/26, 13:07

  5. core-ci voted on patch set 2 V -1 09/09/26, 13:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108181

  6. Helmut Hummel uploaded patch set 3 V -1 09/09/26, 13:21

  7. Helmut Hummel marked it ready for review 09/09/26, 13:21

  8. Helmut Hummel commented on patch set 3 09/09/26, 13:21

    SetupService.php:412 Reply

    Acknowledged
  9. Helmut Hummel commented on patch set 3 09/09/26, 13:22

    Reply

    Done
  10. core-ci voted on patch set 3 V +1 09/09/26, 13:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108183

  11. Benjamin Franzke voted on patch set 3 CR +1 V +1 09/09/26, 13:41

  12. Benjamin Kott commented on patch set 3 09/09/26, 14:15

    PackageSetup.php:54

    is it intentional that the possible error messages are discarded here and not exposed? $messages = $this->resourcePublisher ->publishResources($this->packageManager ->getPackage(VirtualAppPackage::APP_PACKAGE_KEY)) ->getAllMessages(ContextualFeedbackSeverity::ERROR);
  13. Oliver Klee voted on patch set 3 V +1 09/09/26, 15:10

  14. Helmut Hummel commented on patch set 3 09/09/26, 15:18

    PackageSetup.php:54 Reply

    No single message is exposed during the setup, especially because all actions are distributed in event listeners. for (error) messages individual commands can be used. in this case assets:publish
  15. Benjamin Kott voted on patch set 3 CR +1 V +1 09/09/26, 18:39

  16. Benjamin Kott commented on patch set 3 09/09/26, 18:39

    PackageSetup.php:54 Reply

    thx fine for me
  17. Simon Schaufelberger updated the commit message in patch set 4 CR +1 V +1 09/09/26, 22:31

  18. Simon Schaufelberger commented on patch set 4 09/09/26, 22:34

    PackageSetupTest.php:68

    no assertions? Should the test than also use the specific attribute (don't know the name currently)

    SetupServiceTest.php:60

    no assertions?
  19. core-ci voted on patch set 4 V +1 09/09/26, 22:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108221

  20. Helmut Hummel commented on patch set 4 09/10/26, 07:40

    x

    PackageSetupTest.php:68 Reply

    the assertions are in the expected method calls

    SetupServiceTest.php:60 Reply

    the assertions are in the to be expected method calls
  21. Benjamin Franzke voted on patch set 4 CR +1 V +1 09/10/26, 07:42

  22. Benjamin Kott voted on patch set 4 CR +1 V +1 09/10/26, 07:56

  23. Simon Schaufelberger voted on patch set 4 CR +1 V +1 09/10/26, 07:58

  24. Helmut Hummel commented on patch set 4 CR +2 V +2 09/10/26, 12:13

    Thanks!
  25. Helmut Hummel merged patch set 5 09/10/26, 12:13