Review main Merged

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

Benjamin Franzke CR +2 V +2 Easy +43 −1 updated 10/11/25, 06:21

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
    • Garvin Hicking +1
    • Christian Kuhn +1
    • Nikita Hovratov +1
    • Oliver Hader +1
    • Benni Mack +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Garvin Hicking +1
    • Christian Kuhn +1
    • Nikita Hovratov +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1823

  1. Benjamin Franzke uploaded patch set 1 10/10/25, 08:14

  2. Benjamin Franzke updated the commit message in patch set 2 10/10/25, 08:20

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

  4. Garvin Hicking commented on patch set 2 10/10/25, 08:29

    I like this route; we could ship an Important.rst with it to raise awareness of mismatching PHP versions and the effect it can have on deploying warmed cachefiles.
  5. core-ci voted on patch set 2 V +1 10/10/25, 08:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86367

  6. Benjamin Franzke uploaded patch set 3 V +1 10/10/25, 10:18

  7. Benjamin Franzke commented on patch set 3 10/10/25, 10:18

    Reply

    not easy to explain, but done (feel free to improve)
  8. Garvin Hicking commented on patch set 3 CR +1 V +1 10/10/25, 10:21

    Reply

    Great, no notes. Thanks! :)
  9. Benjamin Franzke uploaded patch set 4 CR +1 V +1 10/10/25, 10:23

  10. Nikita Hovratov voted on patch set 4 CR +1 10/10/25, 10:25

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

  12. Nikita Hovratov voted on patch set 4 V +1 10/10/25, 10:33

  13. core-ci voted on patch set 4 V +1 10/10/25, 10:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86383

  14. Garvin Hicking commented on patch set 5 CR +1 V +1 10/10/25, 11:23

    Published edit on patch set 4.
  15. Garvin Hicking voted on patch set 5 CR +1 V +1 10/10/25, 11:24

  16. Nikita Hovratov voted on patch set 5 CR +1 V +1 10/10/25, 11:25

  17. core-ci voted on patch set 5 V +1 10/10/25, 11:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86396

  18. Benni Mack voted on patch set 5 CR +1 V +1 10/10/25, 13:39

  19. Oliver Hader voted on patch set 5 CR +1 10/10/25, 14:19

  20. Christian Kuhn voted on patch set 5 CR +1 V +1 10/10/25, 15:20

  21. Benjamin Franzke voted on patch set 5 CR +2 V +2 10/10/25, 15:34

  22. Benjamin Franzke merged patch set 6 10/10/25, 15:48

  23. Lina Wolf commented on patch set 6 10/11/25, 06:21

    Unresolved

    This should also be mentioned in the commands helptext to not go unnoticed: https://review.typo3.org/c/Packages/TYPO3.CMS/+/91009