-
Notifications
You must be signed in to change notification settings - Fork 65
Refine the 3.0 API surface #469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
JanJakes
wants to merge
10
commits into
trunk
Choose a base branch
from
removals
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3b36d8a
Remove obsolete database engine alias
JanJakes 8f95923
Remove obsolete crosscheck instrumentation
JanJakes 5c3a79e
Remove test-only driver proxies
JanJakes 8c5895f
Narrow the driver implementation API
JanJakes 341de66
Mark driver implementation APIs internal
JanJakes 9bdb5e3
Deprecate the legacy driver facade
JanJakes b25360b
Remove obsolete Performance Lab migration
JanJakes 7ac1bd4
Replace global PDO injection
JanJakes ad72b66
Rename the driver exception
JanJakes aabc865
Rename the statement implementation
JanJakes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/mysql-on-sqlite/src/mysql/native/class-wp-mysql-lexer.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,8 @@ | ||
| <?php | ||
|
|
||
| /** | ||
| * Native lexer facade used by the SQLite driver. | ||
| * | ||
| * @access private | ||
| */ | ||
| class WP_MySQL_Lexer extends WP_MySQL_Native_Lexer {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,12 @@ | |
| * we conditionally define traits with different APIs based on the PHP version. | ||
| */ | ||
| if ( PHP_VERSION_ID < 80000 ) { | ||
| trait WP_PDO_Proxy_Statement_PHP_Compat { | ||
| /** | ||
| * PHP compatibility methods for WP_MySQL_On_SQLite_Statement. | ||
| * | ||
| * @access private | ||
| */ | ||
| trait WP_MySQL_On_SQLite_Statement_PHP_Compat { | ||
| /** | ||
| * Set the default fetch mode for this statement. | ||
| * | ||
|
|
@@ -61,7 +66,12 @@ public function fetchAll( $mode = null, $class_name = null, $constructor_args = | |
| } | ||
| } | ||
| } else { | ||
| trait WP_PDO_Proxy_Statement_PHP_Compat { | ||
| /** | ||
| * PHP compatibility methods for WP_MySQL_On_SQLite_Statement. | ||
| * | ||
| * @access private | ||
| */ | ||
| trait WP_MySQL_On_SQLite_Statement_PHP_Compat { | ||
| /** | ||
| * Set the default fetch mode for this statement. | ||
| * | ||
|
|
@@ -88,10 +98,10 @@ public function fetchAll( $mode = PDO::FETCH_DEFAULT, ...$args ): array { | |
| } | ||
|
|
||
| /** | ||
| * PDOStatement implementation that operates on in-memory data. | ||
| * PDOStatement implementation for MySQL-on-SQLite query results. | ||
| * | ||
| * This class implements a complete PDOStatement interface on top of PHP arrays. | ||
| * It is used for result sets that are composed or transformed in the PHP layer. | ||
| * Delegates operations to the underlying SQLite statement while adapting | ||
| * MySQL-specific behavior such as affected row counts. | ||
| * | ||
| * PDO supports the following fetch modes: | ||
| * - PDO::FETCH_DEFAULT: current default fetch mode (available from PHP 8.0) | ||
|
|
@@ -108,8 +118,8 @@ public function fetchAll( $mode = PDO::FETCH_DEFAULT, ...$args ): array { | |
| * - PDO::FETCH_BOUND: bind values to PHP variables, can't be used with fetchAll() | ||
| * - PDO::FETCH_FUNC: custom function, only works with fetchAll(), can't be default [1 extra arg] | ||
| */ | ||
| class WP_PDO_Proxy_Statement extends PDOStatement { | ||
| use WP_PDO_Proxy_Statement_PHP_Compat; | ||
| class WP_MySQL_On_SQLite_Statement extends PDOStatement { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| use WP_MySQL_On_SQLite_Statement_PHP_Compat; | ||
|
|
||
| /** | ||
| * The original PDO statement. | ||
|
|
@@ -347,7 +357,7 @@ public function debugDumpParams(): ?bool { | |
| /** | ||
| * Fetch all remaining rows from the result set. | ||
| * | ||
| * This is used internally by the "WP_PDO_Proxy_Statement_PHP_Compat" trait, | ||
| * This is used internally by the "WP_MySQL_On_SQLite_Statement_PHP_Compat" trait, | ||
| * that is defined conditionally based on the current PHP version. | ||
| * | ||
| * @param int $mode The fetch mode to use. | ||
|
|
@@ -361,7 +371,7 @@ private function fetchAllRows( $mode = null, ...$args ): array { | |
| /** | ||
| * Set the default fetch mode for this statement. | ||
| * | ||
| * This is used internally by the "WP_PDO_Proxy_Statement_PHP_Compat" trait, | ||
| * This is used internally by the "WP_MySQL_On_SQLite_Statement_PHP_Compat" trait, | ||
| * that is defined conditionally based on the current PHP version. | ||
| * | ||
| * @param int $mode The fetch mode to set as the default. | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Searches: Veloria, GitHub.
This looks safe because Veloria finds only this plugin. GitHub results are primarily bundled copies.