Review 13.4 Merged

90999[TASK] Hash `major.minor` PHP version into DI cache identifier

Benjamin Franzke CR +2 V +2 Easy +43 −1 updated 10/10/25, 15:48

Commit message

Symfony >7.3 generates optimized DI caches for PHP >=8.4 by
using `ReflectionClass::newLazyProxy` (and friends) if available [1].

That means a cache that is generated with PHP 8.4 (e.g. CLI context)
can not be used in a PHP 8.2 process (e.g. Web Context) and therefore
we ensure that the major and minor versions match when reusing
a cached DI container.

This has a drawback that DI caches can not be warmed using
`bin/typo3 cache:warmup` on CLI, when CLI and WEB PHP versions
do not share the same major and minor version, but it's better
than a broken instance.

[1] https://github.com/symfony/symfony/pull/59913

Review

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

Issues 1

Files 2

Review log 34

  1. Benjamin Franzke commented on patch set 1 10/10/25, 15:34

    Cherry Picked from branch main.
  2. Benjamin Franzke voted on patch set 1 CR +2 V +2 10/10/25, 15:35

  3. core-ci voted on patch set 1 V +1 10/10/25, 15:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86417

  4. Benjamin Franzke merged patch set 2 10/10/25, 15:48