Skip to content

Commit e8ef657

Browse files
committed
wip
1 parent 4e1c42f commit e8ef657

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/verify-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Extract version from "load.php"
1717
id: load_version
1818
run: |
19-
VERSION=$(grep "Version:" load.php | sed "s/.*Version: \([^ ]*\).*/\1/")
19+
VERSION=$(grep "Version:" packages/sqlite-database-integration/load.php | sed "s/.*Version: \([^ ]*\).*/\1/")
2020
echo "load_version=$VERSION" >> $GITHUB_OUTPUT
2121
2222
- name: Extract version from "version.php"

packages/sqlite-database-integration/wp-includes/sqlite/db.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
}
4949

5050
if ( defined( 'WP_SQLITE_AST_DRIVER' ) && WP_SQLITE_AST_DRIVER ) {
51-
require_once __DIR__ . '/../../wp-pdo-mysql-on-sqlite.php';
51+
require_once dirname( __DIR__, 4 ) . '/wp-pdo-mysql-on-sqlite.php';
5252
} else {
5353
require_once __DIR__ . '/php-polyfills.php';
5454
require_once __DIR__ . '/class-wp-sqlite-lexer.php';
@@ -81,7 +81,7 @@
8181
* that are present in the GitHub repository
8282
* but not the plugin published on WordPress.org.
8383
*/
84-
$crosscheck_tests_file_path = dirname( __DIR__, 2 ) . '/tests/class-wp-sqlite-crosscheck-db.php';
84+
$crosscheck_tests_file_path = __DIR__ . '/class-wp-sqlite-crosscheck-db.php';
8585
if ( defined( 'SQLITE_DEBUG_CROSSCHECK' ) && SQLITE_DEBUG_CROSSCHECK && file_exists( $crosscheck_tests_file_path ) ) {
8686
require_once $crosscheck_tests_file_path;
8787
$GLOBALS['wpdb'] = new WP_SQLite_Crosscheck_DB( $db_name );

packages/wp-mysql-on-sqlite/tests/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
require_once __DIR__ . '/wp-sqlite-schema.php';
4-
require_once __DIR__ . '/../load.php';
4+
require_once __DIR__ . '/../src/load.php';
55

66
// When on an older SQLite version, enable unsafe back compatibility.
77
$sqlite_version = ( new PDO( 'sqlite::memory:' ) )->query( 'SELECT SQLITE_VERSION();' )->fetch()[0];

packages/wp-mysql-proxy/tests/WP_MySQL_Proxy_PDO_Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class WP_MySQL_Proxy_PDO_Test extends WP_MySQL_Proxy_Test {
77
public function setUp(): void {
88
parent::setUp();
99

10-
$pdo_class = PHP_VERSION_ID >= 80400 ? PDO\SQLite::class : PDO::class;
10+
$pdo_class = PHP_VERSION_ID >= 80400 ? PDO\MySQL::class : PDO::class;
1111
$this->pdo = new $pdo_class(
1212
sprintf( 'mysql:host=127.0.0.1;port=%d', $this->port ),
1313
'user',

wp-setup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ EOF
5656
# 4. Add "db.php" to the "wp-content" directory.
5757
echo "Adding 'db.php' to the 'wp-content' directory..."
5858
rm -f "$WP_DIR"/src/wp-content/db.php
59-
cp "$DIR"/db.copy "$WP_DIR"/src/wp-content/db.php
60-
sed -i.bak "s#'{SQLITE_IMPLEMENTATION_FOLDER_PATH}'#__DIR__.'/plugins/sqlite-database-integration'#g" "$WP_DIR"/src/wp-content/db.php
61-
sed -i.bak "s#{SQLITE_PLUGIN}#$WP_DIR/src/wp-content/plugins/sqlite-database-integration/load.php#g" "$WP_DIR"/src/wp-content/db.php
59+
cp "$DIR"/packages/sqlite-database-integration/db.copy "$WP_DIR"/src/wp-content/db.php
60+
sed -i.bak "s#'{SQLITE_IMPLEMENTATION_FOLDER_PATH}'#__DIR__.'/plugins/sqlite-database-integration/packages/sqlite-database-integration'#g" "$WP_DIR"/src/wp-content/db.php
61+
sed -i.bak "s#{SQLITE_PLUGIN}#sqlite-database-integration/packages/sqlite-database-integration/load.php#g" "$WP_DIR"/src/wp-content/db.php
6262

6363
# 5. Rewrite helper class WpdbExposedMethodsForTesting to extend WP_SQLite_DB.
6464
echo "Rewriting helper class 'WpdbExposedMethodsForTesting' to extend WP_SQLite_DB..."

0 commit comments

Comments
 (0)