File tree Expand file tree Collapse file tree
sqlite-database-integration/wp-includes/sqlite Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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"
Original file line number Diff line number Diff line change 4848}
4949
5050if ( 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 ' ;
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 ' ;
8585if ( 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 );
Original file line number Diff line number Diff line change 11<?php
22
33require_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 ];
Original file line number Diff line number Diff 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 ' ,
Original file line number Diff line number Diff line change 5656# 4. Add "db.php" to the "wp-content" directory.
5757echo " Adding 'db.php' to the 'wp-content' directory..."
5858rm -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.
6464echo " Rewriting helper class 'WpdbExposedMethodsForTesting' to extend WP_SQLite_DB..."
You can’t perform that action at this time.
0 commit comments