Review 13.4 Merged

95526[BUGFIX] Make Extbase QueryResult serializable again

Stefan Bürk CR +2 V +2 Normal +216 −2 updated 09/01/26, 20:01

Commit message

Caching an Extbase QueryResult failed with "Serialization of
'Closure' is not allowed". Typo3QuerySettings is the only class
in the chain without __sleep(), so its injected
ConfigurationManager pulled the whole compiled DI container into
the payload.

Typo3QuerySettings now serializes its own state only and restores
the injected services on wake-up.

Two follow-up defects in the wake-up path are fixed as well:
Query::__wakeup() resolved DataMapFactory through makeInstance(),
which cannot build a non-public service with constructor
arguments, and it never restored the container that execute()
needs. QueryResult::__wakeup() did not hand the query back to the
data mapper, which needs it to determine the language aspect and
the parent query of relations.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
  • Verified V +2 Done
    • Stefan Bürk +2
    • core-ci +1 CI

Issues 2

Files 5

Review log 57

  1. Stefan Bürk commented on patch set 1 09/01/26, 19:18

    Cherry Picked from branch 14.3. The following files contain Git conflicts: * typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php
  2. Stefan Bürk uploaded patch set 2 09/01/26, 19:36

  3. Stefan Bürk marked it ready for review 09/01/26, 19:37

  4. core-ci voted on patch set 2 V +1 09/01/26, 19:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107513

  5. core-ci voted on patch set 1 V -1 09/01/26, 19:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107509

  6. Stefan Bürk voted on patch set 2 CR +2 V +2 09/01/26, 20:01

  7. Stefan Bürk merged patch set 3 09/01/26, 20:01