Repository navigation
Conversation
Use sqlite_pdo and sqlite_journal_mode with the current driver while retaining the legacy PDO option. This keeps the supplied connection instead of opening a separate in-memory database. Update driver stubs and add a regression probe against real integrations.
Detect configured paths, managed storage metadata, and legacy layouts without creating or migrating a database during backend selection. Resolve configured paths before integration defaults are loaded, and initialize managed storage once in the drop-in. Mirror mode uses the resolved path for both the connection and directory protection. Keep primary index reconstruction and stock fallback configuration intact. Cover path precedence, neighboring legacy files, randomized storage, backend overrides, primary indexes, and installation fallbacks with current and older integrations. Related: WordPress/sqlite-database-integration#502 Related: WordPress/sqlite-database-integration#512
11 of 20 tasks
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.
Summary
MDI can miss an existing SQLite database when it uses
DB_PATHor randomized storage, causing automatic backend selection to choosemdi-native. Mirror mode also usesFQDBeven whenDB_PATHpoints elsewhere.This change makes SQLite path handling consistent:
DB_PATHfor mirror connections and directory protection, using SQLite Integration’s storage API when available and retaining compatibility with older versions.Explicit backend overrides and existing primary, native, and MySQL behavior are preserved.
Validation
Verified randomized storage, legacy layouts,
DB_PATHalone, conflicting paths, backend selection, primary index reconstruction, and installation fallbacks against SQLite Integration at4163f69, v3.0.2, v3.0.0, and v2.2.23 on PHP 8.2 and 8.5. The repository smoke suite, PHP syntax checks, and diff checks also passed.Related: WordPress/sqlite-database-integration#502
Related: WordPress/sqlite-database-integration#512