Skip to content

Commit

Permalink
Add back support for class-wpdb.php / wp-db.php for WP <6.1 (#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
srtfisher committed Jul 21, 2023
1 parent e833403 commit c8d5882
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v0.11.2 - 2023-07-21

- Add back-support for Wordpress 6.0 when testing.

## v0.11.1 - 2023-05-31

- Add support for using SQLite in tests (opt-in).

## v0.11.0 - 2023-05-30

### Added
Expand Down
8 changes: 7 additions & 1 deletion src/mantle/testing/install-wordpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@
require_once __DIR__ . '/preload.php';
require_once __DIR__ . '/wordpress-bootstrap.php';
require_once ABSPATH . '/wp-admin/includes/upgrade.php';
require_once ABSPATH . '/wp-includes/class-wpdb.php';

if ( file_exists( ABSPATH . '/wp-includes/class-wpdb.php' ) ) {
require_once ABSPATH . '/wp-includes/class-wpdb.php';
} else {
// Back-compat for WordPress < 6.1.0.
require_once ABSPATH . '/wp-includes/wp-db.php';
}

$multisite = ! empty( $argv[1] );

Expand Down

0 comments on commit c8d5882

Please sign in to comment.