Repository navigation
[TASK] Run the functional tests on SQLite - #1663
Merged
Merged
Conversation
benjaminkott
force-pushed
the
task/functional-tests-on-sqlite-in-ci
branch
from
September 9, 2026 08:51
231b698 to
8a174cf
Compare
8 of 14 tasks
The functional suite declares `pdo_sqlite` itself, so a checkout and the CI agree without either of them carrying database settings. The MySQL service was started in all eight matrix jobs while only two of them run the functional tests; SQLite needs no service at all and the suite is faster on it, because the testing framework copies an empty database file per test case instead of truncating tables. Nothing but the testing framework ever read the `typo3Database*` variables the DDEV container exported — the development instance takes its connection from the DDEV generated `additional.php` — so they go with it. Signed-off-by: Benjamin Kott <benjamin.kott@outlook.com>
benjaminkott
force-pushed
the
task/functional-tests-on-sqlite-in-ci
branch
from
September 9, 2026 09:01
8a174cf to
8417309
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The functional tests run on SQLite. The
mysql:8.0service is gonefrom the CI and the
typo3Database*variables are gone from the DDEVcontainer.
The driver is declared in
Build/phpunit-functional.xml, not in the CIjob, so a local checkout and the CI run the suite the same way and
neither carries database settings.
The service was started in all eight matrix jobs while only the two
8.5ones actually run the functional tests — every other job paid fora database it never touched. SQLite needs no service at all.
Nothing but the testing framework ever read the four
typo3Database*variables: the development instance takes its connection from the DDEV
generated
config/system/additional.php, which points atdb/db,not at the
t3func/rootthose variables described. Running the suiteagainst MySQL is still possible, it just means setting
typo3DatabaseDriverand the connection variables yourself;AGENTS.mdsays so.
It is also faster. Measured locally on the full suite (72 tests, PHP
8.5, MySQL 8.0 in a neighbouring container):
pdo_sqliteSame 72 tests, same 378 assertions on both. The gain is setup, not
queries: with SQLite the testing framework builds the schema once per
test case and copies the empty database file for every following test
instead of truncating tables. In the CI the functional jobs went from
5m12s and 6m05s to 3m32s and 4m25s, and the six jobs that run no
functional tests from around a minute to half of that.
The trade off is that the CI no longer exercises MySQL. The package
reaches the database through TCA, QueryBuilder and DataHandler; after
#1661 there is no hand written SQL left in the tests.
Type of change
Related issues
Builds on #1661, which removed the last MySQL specific SQL from the
test suite.
How to validate
without a database service.
out of reach:
ddev exec bash -c 'typo3DatabaseHost=doesnotexist .build/bin/phpunit -c Build/phpunit-functional.xml'— 72 tests, 378 assertions, green.
ddev exec bash -c 'unset typo3DatabaseHost typo3DatabaseName typo3DatabaseUsername typo3DatabasePassword; .build/bin/phpunit -c Build/phpunit-functional.xml'— same result.
typo3DatabaseDriver=mysqliprepended fails on the unreachable host.
A
ddev restartis needed for the container to drop the variables.AI assistance
effort
review pending
Checklist
mastergit commit -s)[BUGFIX|TASK|FEATURE] Subjectcomposer cglleaves the code unchanged — no PHP touchedcomposer phpstanpasses — no PHP touchedcomposer testpassesapplicable
composer.json— the CI matrix itself is unchanged
AGENTS.md;Documentation/saysnothing about the test database