Skip to content

Add support for the new SQLite storage - #36

Draft
JanJakes wants to merge 3 commits into
mainfrom
sqlite-storage
Draft

JanJakes wants to merge 3 commits into
mainfrom
sqlite-storage

Conversation

@JanJakes

@JanJakes JanJakes commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add support for the SQLite integration plugin's new storage layout while keeping compatibility with older plugin releases.

  • Resolve the database path at runtime from DB_PATH, db-path.php, or legacy FQDB settings.
  • Require an existing database for exports and table listing, without initializing storage.
  • Let imports create a missing database and initialize managed storage when no path is recorded.

Behat covers the storage behavior. Separate commits correct the existing import fixtures for the current driver and align PHP compatibility checks with the project's PHP 7.4 requirement.

Why

These commands run before WordPress loads its database drop-in. With the new storage layout, FQDB is no longer always defined at that point, so the commands need to resolve the configured database themselves.

Related: WordPress/sqlite-database-integration#502, WordPress/sqlite-database-integration#512

Test MySQL backslash escapes with the default SQL mode, since the current driver explicitly rejects NO_BACKSLASH_ESCAPES. Keep assertions for every escape case and expect literal backslashes in quoted identifiers.
Match the PHPCompatibility target to the existing Composer requirement. The PHP 5.6 target incorrectly rejects supported features such as Throwable and void return types.
Resolve DB_PATH or db-path.php at runtime, retaining FQDB compatibility for
older integration plugin versions. Export and table listing check that the
database exists before opening it. Import uses the configured location and
initializes managed storage only when no location has been recorded.

Keep storage initialization out of the plugin loader and cover the storage
behavior with Behat scenarios.

WordPress/sqlite-database-integration#502
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant