Review main Ready for review Quiet

94767[FEATURE] Add SQLite performance mode to installer

Michael Staatz CR +1 V 0 Normal +201 −1 updated 10/02/26, 06:45

Commit message

Adds a new database driver option to the installer's database
connect step: "SQLite (performance mode, WAL)". When selected,
sensible SQLite PRAGMA defaults tuned for web application
workloads (WAL journal mode, incremental auto-vacuum, foreign
keys enforcement, and related settings) are applied via the
connection's initCommands at the time the database file is
created.

The existing "Manually configured SQLite connection" option
remains completely unchanged, making this a pure opt-in
addition.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 3
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/67/94767/3 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/67/94767/3 && git cherry-pick FETCH_HEAD

Review

  • Code review CR +1 Needs a vote
    • Simon Praetorius +1
    • Simon Schaufelberger +1
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Merge conflicts 1

Issues 1

Files 5

Review log 1114

  1. Michael Staatz uploaded patch set 1 07/12/26, 11:34

  2. Michael Staatz uploaded patch set 2 07/12/26, 11:43

  3. core-ci voted on patch set 1 V -1 07/12/26, 11:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104686

  4. core-ci voted on patch set 2 V -1 07/12/26, 11:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104687

  5. Michael Staatz commented on patch set 2 07/13/26, 03:19

    Related DDEV fix (required for this feature to work with DDEV's default TYPO3 project setup): https://github.com/ddev/ddev/pull/8582
  6. Benni Mack commented on patch set 2 07/13/26, 05:12

    Reply

    hey michael. cool stuff. we should definitively write a blog post about it? put it here :) https://www.staatzstreich.de/
  7. Michael Staatz commented on patch set 2 07/13/26, 13:19

    Done 😊 https://staatzstreich.de/blog/en/20260713-140301-how-a-broken-installer-reload-led-to-two-patches/ There is also a german version... be kind! I am not a Blogger 😄
  8. Stefan Bürk commented on patch set 2 07/16/26, 16:03

    Two points (thoughts): * `typo3 setup`: Not tested, but there is no way setting/selecting the new option using the setup command, or am I wrong ? * `typo3 setup` command does not behave the same as the web-installers and does not respect the `additional.php` anyway - which should be fixed and pending with https://review.typo3.org/c/Packages/TYPO3.CMS/+/86337 quite a while now. I guess that this would need additional testing / adoption. TBH not tested this change yet on myself - and despite for explicit testing of the installer for the monorepository I did not executed the web-installer since the setup command exists in any project or setting up instances, play/temp/demo instances. Would be good to have that possible selectable when using the cli setup command - or not ? I guess that this would require to enrich setup command for additional information or similar.

    Feature-110189-SqlitePerformanceModeInInstaller.rst:7

    ```suggestion ======================================================= Feature: #110189 - SQLite performance mode in installer ======================================================= ```

    Feature-110189-SqlitePerformanceModeInInstaller.rst:31

    ```suggestion .. code-block:: sql PRAGMA auto_vacuum = INCREMENTAL PRAGMA journal_mode = WAL PRAGMA synchronous = NORMAL PRAGMA busy_timeout = 5000 PRAGMA cache_size = -20000 PRAGMA foreign_keys = ON PRAGMA temp_store = MEMORY ``` Wrong intentation.

    Feature-110189-SqlitePerformanceModeInInstaller.rst:47

    ```suggestion .. note:: The order of these PRAGMA statements matters. :sql:`auto_vacuum` only takes effect on a still completely empty (0-byte) database file. Any other PRAGMA or write operation - including switching to :sql:`journal_mode = WAL` - initializes the file header and silently turns any subsequent :sql:`auto_vacuum` change into a no-op. :sql:`auto_vacuum` is therefore applied first. ``` Wrong intentation.

    SetupDatabaseService.php:166

    ```suggestion if ((bool)($values['sqlitePerformanceMode'] ?? false)) { ``` `empty()` is to magical and we should really abstain from using it and use more narrowed down checks here.

    SetupDatabaseServiceTest.php:40

    This line must be removed. Does nothung since PHP8.1 and throws deprecations with PHP8.5 and let the tests fail.
  9. Michael Staatz uploaded patch set 3 V -1 07/17/26, 04:44

  10. core-ci voted on patch set 3 V +1 07/17/26, 04:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104856

  11. Michael Staatz commented on patch set 3 07/17/26, 04:52

    Reply Unresolved

    Good catch on the setup command - you're right, there was no way to select the new option there. Fixed in patch set 3: added "sqlitePerformance" to $connectionLabels in SetupCommand.php, so it's now selectable via --driver=sqlitePerformance (or interactively), and added a regression test covering that the option array actually carries the sqlitePerformanceMode flag through. Re: additional.php / #86337 - that's a good point but orthogonal to this patch. I ran into a related but distinct issue on the DDEV side while testing this: DDEV unconditionally writes MySQL connection settings to additional.php regardless of whether the db container even exists or whether TYPO3 was already configured for SQLite. Fixed that separately in https://github.com/ddev/ddev/pull/8582 - might be useful context for #86337 as well.

    Feature-110189-SqlitePerformanceModeInInstaller.rst:7 Reply

    Fixed in patch set 3

    Feature-110189-SqlitePerformanceModeInInstaller.rst:31 Reply

    Fixed in patch set 3

    Feature-110189-SqlitePerformanceModeInInstaller.rst:47 Reply

    Fixed in patch set 3

    SetupDatabaseService.php:166 Reply Unresolved

    Good point on empty() - fixed. Went with `$values['sqlitePerformanceMode'] ?? false` without an explicit (bool) cast, since if() already coerces implicitly and the cast doesn't change control flow, just adds noise (my IDE flagged it as redundant too).

    SetupDatabaseServiceTest.php:40 Reply

    Good catch, removed. Wasn't aware setAccessible() became a no-op since 8.1 - makes sense it's on the way to full removal/deprecation now.
  12. Michael Staatz commented on patch set 3 07/20/26, 07:07

    Reply

    Done
  13. Simon Schaufelberger commented on patch set 3 CR +1 09/22/26, 11:13

    SetupDatabaseServiceTest.php:40 Reply

    Done
  14. Simon Praetorius voted on patch set 3 CR +1 10/02/26, 06:45