Review 13.4 Merged

92855[BUGFIX] Do not flush current runtime caches when activating a package

Benjamin Franzke CR +2 V +2 Easy +1 −2 updated 02/16/26, 09:20

Commit message

Since #99019 all caches are flushed when installing an extension.
Previously only system caches were flushed by default.

The behavior to flush the caches for "new" requests is correct,
since we want a clean environment after installing an extension,
but we need to ensure that the state of *the* request that is
*currently* enabling the package, is not altered.

That means we *must not* flush the runtime cache of the "old"
container environment, only of the new, otherwise the runtime
cache will be rebuild when finalizing the response
(e.g. in extbase `Bootstrap::handleBackendRequest`).

Please note that prior to #105337 there were two runtime caches,
one initialized by the dependency injection container and one by
the CacheManager. With #105337 these were consolidated to share
one instance, which unfortunately revealed the described problem
in `PackageActivationService` and therefore introduced a regression
when installing an extension that ships TypoScript expression
language providers. (expression language providers are
called because backend extbase request handling clears some
frontend caches in teardown)

That means: Prior to #105337 the invalid call to `flushCaches()`
on the old `CacheManager` instance did not flush the old runtime cache
of the old dependency injection container instance and state therefore
kept working (with a lot of luck…).

To fix this situation we do now flush the cache on the new
`CacheManager` instance. This is safe to do after the container
initialization, since we force to load the container instance without
using caches.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
  • Verified V +2 Done
    • Benjamin Franzke +2
    • core-ci +1 CI

Issues 3

Files 1

Review log 46

  1. Benjamin Franzke uploaded patch set 1 02/16/26, 07:18

  2. core-ci voted on patch set 1 V +1 02/16/26, 07:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95950

  3. Benjamin Franzke commented on patch set 2 V +1 02/16/26, 09:10

    Cherry Picked from branch main.
  4. Benjamin Franzke voted on patch set 2 CR +2 V +2 02/16/26, 09:11

  5. core-ci voted on patch set 2 V +1 02/16/26, 09:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95960

  6. Benjamin Franzke merged patch set 3 02/16/26, 09:20