Skip to content

Add WordPress 7.0 compatibility#450

Merged
JanJakes merged 3 commits into
trunkfrom
wp-7.0
Jul 14, 2026
Merged

Add WordPress 7.0 compatibility#450
JanJakes merged 3 commits into
trunkfrom
wp-7.0

Conversation

@JanJakes

@JanJakes JanJakes commented Jul 13, 2026

Copy link
Copy Markdown
Member

Summary

Mark the SQLite plugin as tested up to WordPress 7.0, and:

  • Update the WordPress test environment from 6.7.2 to 7.0.1.
  • Normalize non-padded temporal literals used by WordPress 6.8 and later.
  • Remove WordPress test failures that now pass.
  • Add exclusions for tests that now fail. These will be fixed in a follow-up PR.

Why

Make sure the SQLite plugin is tested up to WordPress 7.0.

Normalize date literals generated by WordPress 6.8 and later. WordPress 6.8 changed get_calendar() to generate date bounds with integer month components, producing literals such as 2026-2-01. MySQL interprets these values as dates, while SQLite compares temporal strings lexically. Normalizing the components preserves correct calendar queries.

Verification

CI passing with tests updated to use WordPress 7.0.

JanJakes added 3 commits July 14, 2026 11:41
Update the WordPress test environment and remove the Site Health failure that no longer occurs.

Track the three comment-check failures exposed by the driver's existing UPDATE row-count mismatch. Correct changed-row reporting is separate compatibility work.
WordPress 6.8 changed get_calendar() to generate date bounds with integer month components, producing literals such as '2026-2-01'. MySQL treats those values as dates, while SQLite compares the stored values as text. Normalize non-padded temporal components so calendar queries continue to work after moving the test environment from WordPress 6.7.2 to 7.0.1.
@JanJakes
JanJakes marked this pull request as ready for review July 14, 2026 10:22
@JanJakes
JanJakes requested a review from mho22 July 14, 2026 13:32

@mho22 mho22 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good to me!

@JanJakes
JanJakes merged commit 11c2143 into trunk Jul 14, 2026
23 checks passed
@JanJakes
JanJakes deleted the wp-7.0 branch July 14, 2026 14:39
batonac added a commit to Avunu/sqlite-database-integration that referenced this pull request Jul 17, 2026
Bring in the upstream 3.0.0-rc.7 release and reconcile it with the
Cloudflare D1 backend. The notable upstream changes are the driver API
simplification (WordPress#449), WordPress 7.0 compatibility (WordPress#450), and journal
mode preservation in the driver wrapper.

Reconciliation:

- Engine class: upstream renamed WP_PDO_MySQL_On_SQLite to
  WP_MySQL_On_SQLite (class-wp-pdo-mysql-on-sqlite.php ->
  class-wp-mysql-on-sqlite.php). The D1 connection injection is
  re-applied on top of the renamed, simplified API. Journal mode is
  preserved for D1 by reusing the injected connection directly rather
  than reading PRAGMA journal_mode off it.

- Driver test suites: upstream refactored the driver suites to exercise
  the WP_MySQL_On_SQLite PDO engine directly (was the WP_SQLite_Driver
  facade). The D1 backend switching is adapted accordingly:
  wp_sqlite_tests_create_pdo_engine() now exposes the raw SQLite handle,
  and the D1 skip-list keys follow the renamed WP_MySQL_On_SQLite_Tests
  class. WP_SQLite_Driver_No_UDF_Tests is renamed to
  WP_MySQL_On_SQLite_No_UDF_Tests for consistency, and the hardcoded
  test paths in the D1 and upstream-merge-check workflows are updated.

- D1 wpdb drop-in: WP_D1_DB now constructs WP_MySQL_On_SQLite directly,
  matching upstream's rewritten WP_SQLite_DB, which routes results
  through PDO statements instead of the legacy facade return values.

Verified with the default and D1 backend test suites and PHPCS.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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