Review 14.3 Merged

94218[BUGFIX] Avoid PageRepository->__construct()->init() DB call

Christian Kuhn CR +2 V +2 Normal +79 −93 updated 05/30/26, 13:37

Commit message

PageRepository is a rather important yet still rather messy class.
The patch fixes a long standing todo: __construct() calls init(),
which assembles the pages enable-field and fe_group access
constraints and, for the online case, issues a database query via
getDefaultConstraints(). Constructing the object thus requires a
fully configured framework and a working database connection.

This makes PageRepository unusable as a dependency injection
constructor argument in not-yet-configured projects: DI composition
of any consuming class fails with "The requested database connection
named "Default" has not been configured."

The patch moves the constraint computation out of the constructor.
The enable-field constraint and fe_group constraint are built on
demand, and both keep using the runtime cache as before.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
  • Verified V +2 Done
    • Christian Kuhn +2
    • core-ci +1 CI

Issues 1

Files 3

Review log 34

  1. Christian Kuhn uploaded patch set 1 05/30/26, 13:14

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

  3. Christian Kuhn voted on patch set 1 CR +2 V +2 05/30/26, 13:37

  4. Christian Kuhn merged patch set 2 05/30/26, 13:37