File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 *
1818 * This class temporarily preserves the legacy constructor and result API while
1919 * consumers transition to the PDO-based WP_MySQL_On_SQLite API.
20+ *
21+ * @deprecated 3.0.0 Use WP_MySQL_On_SQLite instead.
2022 */
2123class WP_SQLite_Driver {
2224 /**
@@ -54,8 +56,9 @@ class WP_SQLite_Driver {
5456 *
5557 * Set up an SQLite connection and the MySQL-on-SQLite driver.
5658 *
57- * @param WP_SQLite_Connection $connection A SQLite database connection.
58- * @param string $database The database name.
59+ * @param WP_SQLite_Connection $connection A SQLite database connection.
60+ * @param string $database The database name.
61+ * @param int $mysql_version The emulated MySQL version as an integer.
5962 *
6063 * @throws WP_SQLite_Driver_Exception When the driver initialization fails.
6164 */
Original file line number Diff line number Diff line change @@ -35,6 +35,12 @@ function () {
3535 $ this ->assertTrue ( $ this ->driver ->is_sql_mode_active ( 'STRICT_TRANS_TABLES ' ) );
3636 }
3737
38+ public function test_is_formally_deprecated (): void {
39+ $ doc_comment = ( new ReflectionClass ( WP_SQLite_Driver::class ) )->getDocComment ();
40+
41+ $ this ->assertStringContainsString ( '@deprecated 3.0.0 Use WP_MySQL_On_SQLite instead. ' , $ doc_comment );
42+ }
43+
3844 public function test_preserves_legacy_query_results (): void {
3945 $ this ->assertSame ( 1 , $ this ->driver ->query ( "INSERT INTO t (value) VALUES ('first') " ) );
4046 $ this ->assertSame ( 1 , $ this ->driver ->get_insert_id () );
You can’t perform that action at this time.
0 commit comments