Review 13.4 Abandoned

93689[BUGFIX] Introduce `PackageSetup` to unify extension setup

Helmut Hummel CR -2 V -1 Normal +155 −53 updated 11/09/26, 09:26

Commit message

Package setup logic was spread across several places, which led to
inconsistencies and hard-to-follow responsibilities.

This change introduces a dedicated PackageSetup that centralizes the
common steps required when extensions are set up:

* updating the database schema
* synchronizing extension configuration
* dispatching PackageInitializationEvent
* collecting warnings from initialization listeners

This unifies the behavior of extension:setup,
classic-mode package activation, and extension manager actions.

As part of this refactoring, SetupExtensionsCommand now delegates to
`PackageSetup` instead of partially duplicating setup logic.

PackageActivationService is reduced to its actual responsibility:
handling package activation in classic mode, including the required
container rebuild and TCA reinitialization. The setup work that happens
after activation is now delegated to `PackageSetup`.

The former public method `PackageActivationService::updateDatabase()`
is removed. Its implementation depended on a specific container/global
state and was used from different contexts with different runtime
assumptions. Moving this logic into `PackageSetup` makes the
flow explicit and keeps it in the place where extension setup is
actually performed.

The extension manager action for reloading extension data is adjusted
accordingly. Since it only needed a small, specific part of the old
behavior, the registry cleanup is now handled directly there before
delegating to `PackageSetup`.

This results in cleaner responsibilities, less duplicated setup logic,
and more consistent extension initialization behavior across the codebase.

Although public methods have been removed from
`PackageActivationService`, this change is not considered breaking, as
the class is marked internal.

Commands executed:

```
Build/Scripts/runTests.sh -s phpstanGenerateBaseline
```

Review

  • Code review CR -2
    • Helmut Hummel -2
  • Verified V -1
    • core-ci -1 CI

Issues 1

Files 7

Review log 45

  1. Helmut Hummel commented on patch set 1 04/16/26, 11:33

    Cherry Picked from branch main. The following files contain Git conflicts: * Build/phpstan/phpstan-baseline.neon * typo3/sysext/core/Classes/Package/PackageActivationService.php
  2. Helmut Hummel voted on patch set 1 CR -2 04/16/26, 11:33

  3. Helmut Hummel commented on patch set 1 04/16/26, 11:34

    https://review.typo3.org/c/Packages/TYPO3.CMS/+/93688 needs to be considered here already
  4. core-ci voted on patch set 1 V -1 04/16/26, 11:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100312

  5. Benni Mack abandoned the change 11/09/26, 09:26

    I'm abandoning this one for v13, due to lack of activity.