Review main Abandoned

94211[PoC] cache compiled failsafe container

Christian Kuhn CR 0 V 0 Expert +177 −1343 updated 06/18/26, 22:57

Commit message

TODO / discuss if we align on the strategy:
* compiling the failsafe container makes a writable cache directory
  a prerequisite for booting the install tool - if it is not
  writable, a cache backend exception (#1203965200, naming the directory)
  is raised during early boot instead of the install tool's own
  folder-permission step, which the previous non-caching FailsafeContainer
  could still render. we may want to finetune this to render
  some dedicated custom message.
* this is all internal, which would make the patch a potential
  target for v14 as well - a bit risky, but it would free us
  from maintaining this gap between main<->v14

Service registration in the core is split between Symfony autowiring
in Services.yaml and explicit factory closures in the per-extension
ServiceProvider.php files. The reason for that split is the "failsafe"
container used during early boot and by ext:install: it is a hand-rolled
PSR-11 container that only reads ServiceProvider.php from some core
extensions.
Every service needed at this early stage therefore has to be wired by hand,
as a factory in a ServiceProvider. This piles up and is a burden to maintain.

The patch tries out a different approach: the failsafe container is no
longer hand-rolled, but compiled like the regular one. It is restricted
to the packages that are part of the minimal usable system, skips
project-level service configuration, and is cached under its own
identifier. As a consequence Services.yaml autowiring becomes available
during early boot and in ext:install as well.

A few entry points relied on services being absent from the failsafe
container (the entry script selecting the install tool, the CLI
full-boot heuristic, and a build-time lookup in ext:lowlevel). We keep
that behaviour, now expressed explicitly rather than as a side effect
of the poorer container.

With autowiring available, the ServiceProvider shrinks significantly.
What stays are the genuinely structural registrations: the aggregation
collectors (icons, middlewares, ...), boot-state guarded services
(CacheManager, IconRegistry), the boot orchestration (BootService,
LateBootService), the application and command entry points, the lazy
command registrations, services reading $GLOBALS or computed paths, and
vendor Symfony classes.

The affected service classes move to plain autowiring. Where a service
is fetched by id or through GeneralUtility::makeInstance() it is marked
with #[Autoconfigure(public: true)]; named caches and forced
implementations are injected via #[Autowire(service: ...)]; singletons
and tagged services (middlewares, request handlers, view helpers) keep
their public visibility through the existing compiler passes.

Review

  • Code review CR 0
  • Verified V 0
    • core-ci +1 CI

Files 51

Show 31 more files

Review log 2246

Show 1121 earlier messages
  1. Christian Kuhn uploaded patch set 1 05/29/26, 23:38

  2. core-ci voted on patch set 1 V -1 05/29/26, 23:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102635

  3. Christian Kuhn uploaded patch set 2 V -1 05/30/26, 00:00

  4. core-ci voted on patch set 2 V -1 05/30/26, 00:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102636

  5. Christian Kuhn uploaded patch set 3 V -1 05/30/26, 00:27

  6. core-ci voted on patch set 3 V +1 05/30/26, 00:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102640

  7. Christian Kuhn uploaded patch set 4 V +1 05/30/26, 01:07

  8. core-ci voted on patch set 4 V -1 05/30/26, 01:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102644

  9. Christian Kuhn uploaded patch set 5 V -1 05/30/26, 01:35

  10. core-ci voted on patch set 5 V -1 05/30/26, 01:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102646

  11. Christian Kuhn uploaded patch set 6 V -1 05/30/26, 02:01

  12. core-ci voted on patch set 6 V +1 05/30/26, 02:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102648

  13. Christian Kuhn uploaded patch set 7 V +1 05/30/26, 02:33

  14. core-ci voted on patch set 7 V +1 05/30/26, 02:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102650

  15. Christian Kuhn uploaded patch set 8 V +1 05/30/26, 02:55

  16. core-ci voted on patch set 8 V -1 05/30/26, 03:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102651

  17. Christian Kuhn uploaded patch set 9 V -1 05/30/26, 03:22

  18. core-ci voted on patch set 9 V -1 05/30/26, 03:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102653

  19. Christian Kuhn uploaded patch set 10 V -1 05/30/26, 09:16

  20. core-ci voted on patch set 10 V +1 05/30/26, 09:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102667

  21. Christian Kuhn uploaded patch set 11 V +1 05/30/26, 09:34

  1. Christian Kuhn uploaded patch set 12 05/30/26, 09:48

  2. core-ci voted on patch set 11 V +1 05/30/26, 09:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102668

  3. core-ci voted on patch set 12 V -1 05/30/26, 09:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102670

  4. core-ci commented on patch set 12 05/30/26, 10:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102670

  5. core-ci voted on patch set 12 V +1 05/30/26, 10:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102670

  6. Christian Kuhn uploaded patch set 13 V +1 05/30/26, 10:30

  7. core-ci voted on patch set 13 V -1 05/30/26, 10:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102671

  8. Christian Kuhn uploaded patch set 14 V -1 05/30/26, 11:26

  9. core-ci voted on patch set 13 V +1 05/30/26, 11:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102671

  10. core-ci voted on patch set 14 V +1 05/30/26, 11:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102672

  11. Christian Kuhn uploaded patch set 15 V +1 05/30/26, 12:30

  12. core-ci voted on patch set 15 V +1 05/30/26, 12:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102674

  13. Christian Kuhn uploaded patch set 16 V +1 05/30/26, 13:00

  14. core-ci voted on patch set 16 V +1 05/30/26, 13:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102676

  15. Christian Kuhn uploaded patch set 17 V +1 05/30/26, 13:12

  16. core-ci voted on patch set 17 V +1 05/30/26, 13:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102677

  17. Christian Kuhn uploaded patch set 18 V +1 05/30/26, 13:26

  18. core-ci voted on patch set 18 V -1 05/30/26, 13:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102679

  19. Christian Kuhn uploaded patch set 19 V -1 05/30/26, 13:47

  20. core-ci voted on patch set 19 V +1 05/30/26, 13:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102681

  21. Christian Kuhn uploaded patch set 20 V +1 05/30/26, 15:12

  22. core-ci voted on patch set 20 V +1 05/30/26, 15:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102684

  23. Christian Kuhn uploaded patch set 21 V +1 06/02/26, 09:29

  24. core-ci voted on patch set 21 V +1 06/02/26, 09:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102817

  25. Christian Kuhn abandoned the change 06/18/26, 22:57