Skip to content

Prefix SQLite-specific constructor options - #481

Open
JanJakes wants to merge 1 commit into
versionsfrom
driver-options
Open

Prefix SQLite-specific constructor options#481
JanJakes wants to merge 1 commit into
versionsfrom
driver-options

Conversation

@JanJakes

@JanJakes JanJakes commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

Rename the SQLite-specific WP_MySQL_On_SQLite constructor options so their ownership is explicit:

  • pdosqlite_pdo
  • journal_modesqlite_journal_mode
  • synchronoussqlite_synchronous

The documentation, internal callers, and tests now use the prefixed names.

Rationale

WP_MySQL_On_SQLite accepts standard numeric PDO constructor options alongside its own string-keyed options. The generic names did not clearly distinguish SQLite connection configuration from PDO attributes or other driver configuration. The sqlite_ prefix makes that boundary explicit.

Rename the WP_MySQL_On_SQLite options to sqlite_pdo, sqlite_journal_mode, and sqlite_synchronous without compatibility aliases. Keep the legacy WP_SQLite_Connection option names unchanged.
* @type int $mysql_version Optional. MySQL version to emulate. Default 80038.
* @type PDO|null $sqlite_pdo Optional. Existing PDO SQLite connection.
* @type string|null $sqlite_journal_mode Optional. SQLite journal mode. Default 'WAL'.
* @type string|int|null $sqlite_synchronous Optional. SQLite synchronous setting.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Searches: Veloria, GitHub.

The only non-vendored external consumer that passes these options is Automattic/markdown-database-integration, which uses pdo and journal_mode and can be updated alongside this change. The other GitHub matches are vendored copies of this repository; Veloria finds no WordPress.org plugin consumers.

@JanJakes
JanJakes requested a review from adamziel August 7, 2026 16:17
@JanJakes
JanJakes marked this pull request as ready for review August 7, 2026 16:23
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.

2 participants