Review 13.4 Merged

91941[BUGFIX] Account for symfony/dependency-injection:7.4 incompatibility

Benjamin Franzke CR +2 V +2 Normal +51 −0 updated 12/01/25, 10:34

Commit message

Symfony DI added [1] a non-optional `class_exists()` check in
`Symfony\Component\DependencyInjection\Compiler\ResolveClassPass`
for the versions >=7.4 (including 8.0), which is no longer guarded
by a previous `$definition instanceof ChildDefinition` condition.

This causes PHP errors when classes are (tried to be) autoloaded, that
implement interfaces which are not available (because they use them as
an optional dependency, like optional EXT:reports integration).

The change was initially implemented as a breaking change, but was
intended to be lifted to be only a deprecation later [2].

This relaxation works for classes that are not available at all, but not
for classes that are available from a autoloader perspective, but
whose static dependencies are not and are therefore not loadable.

As a solution we revert to the old class resolution algorithm from
v7.3 and enqueue this overwrite for the upstream class resolution
compiler pass, which makes the upstream compiler pass a no-op.

An upstream fix is hopefully added later on via:
https://github.com/symfony/symfony/pull/62544

[1] https://github.com/symfony/symfony/pull/61215
[2] https://github.com/symfony/symfony/pull/62544

Review

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

Issues 1

Files 2

Review log 45

  1. Benjamin Franzke commented on patch set 1 12/01/25, 09:12

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 12/01/25, 09:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91326

  3. Moritz Ngo commented on patch set 1 CR +1 V +1 12/01/25, 10:33

    works for me :)
  4. Benjamin Franzke voted on patch set 1 CR +2 V +2 12/01/25, 10:34

  5. Benjamin Franzke merged patch set 2 12/01/25, 10:34