-
Notifications
You must be signed in to change notification settings - Fork 61
Add phpMyAdmin support #2834
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
Open
wojtekn
wants to merge
29
commits into
trunk
Choose a base branch
from
add-phpmyadmin-support
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.
Open
Add phpMyAdmin support #2834
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
28407da
Add phpMyAdmin data model and CLI server support
wojtekn 5464e71
Add phpMyAdmin support to site set command and desktop app bridge
wojtekn 82a027a
Add phpMyAdmin toggle in Debugging tab and button on Overview tab
wojtekn b3c5a01
Move phpMyAdmin button into Open in… grid; always show, disable when off
wojtekn 17e8534
Fix phpMyAdmin checkbox layout to match other debug options
wojtekn 51ef389
Add phpMyAdmin row to Debugging section in Settings tab
wojtekn 2b0193e
Patch @wp-playground/cli to allow --phpmyadmin with --skip-sqlite-setup
wojtekn 78f37ad
Fix phpMyAdmin not preserved during site restart via blueprint path
wojtekn 5e7c6ab
Fix enablePhpMyAdmin not persisted to disk in Studio appdata
wojtekn 6fb6b87
Update set.test.ts expected error message to include --phpmyadmin
wojtekn 5aa9b35
Update content-tab-settings test to expect 5 Disabled rows
wojtekn 5587906
Patch @wp-playground/tools DbiMysqli to use Studio's SQLite path
wojtekn f6e42bb
Bundle phpMyAdmin at build time for offline support
wojtekn c6fce03
Enable phpMyAdmin by default for new sites
wojtekn 9684620
Remove temporary offline mode debug logging
wojtekn 425fae2
Fix phpMyAdmin SQLite path in @wp-playground/tools CJS build
wojtekn 64af33b
Fix wp-files path resolution in dev mode
wojtekn 11cd965
Merge branch 'trunk' into add-phpmyadmin-support
wojtekn c5654b8
Apply DEFAULT_ENABLE_PHPMYADMIN fallback to existing sites
wojtekn 8f3bde6
Fix content-tab-settings test: set enablePhpMyAdmin: false in fixture
wojtekn b836d9b
Add e2e tests for phpMyAdmin button visibility and accessibility
wojtekn bb12204
Fix e2e phpMyAdmin tests: share session lifecycle across all describe…
wojtekn c6d8591
Merge branch 'trunk' into add-phpmyadmin-support
wojtekn 94bfcee
Fix path missed during solving conflict
wojtekn d9130d7
Remove phpMyAdmin controls making it always enabled for all sites
wojtekn c984719
More cleanup
wojtekn f35f597
Clean unnecessary change from CLI
wojtekn 93cd9d6
Update way of patching phpMyAdmin patch sqlite location
wojtekn dd6a99e
Merge branch 'trunk' into add-phpmyadmin-support
wojtekn 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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| diff --git a/node_modules/@wp-playground/tools/DbiMysqli-CmlcCdDi.js b/node_modules/@wp-playground/tools/DbiMysqli-CmlcCdDi.js | ||
| index f17cbe9..7319b2c 100644 | ||
| --- a/node_modules/@wp-playground/tools/DbiMysqli-CmlcCdDi.js | ||
| +++ b/node_modules/@wp-playground/tools/DbiMysqli-CmlcCdDi.js | ||
| @@ -22,8 +22,18 @@ use Throwable; | ||
| use WP_SQLite_Connection; | ||
| use WP_SQLite_Driver; | ||
|
|
||
| -// Load the SQLite driver. | ||
| -require_once '/internal/shared/sqlite-database-integration/wp-pdo-mysql-on-sqlite.php'; | ||
| +// Load the SQLite driver from the first available location. | ||
| +// The path varies depending on the environment (Playground, Studio, etc.). | ||
| +$sqlite_driver_locations = array( | ||
| + '/internal/shared/sqlite-database-integration/wp-pdo-mysql-on-sqlite.php', | ||
| + defined( 'WP_SQLITE_LOCATION' ) ? WP_SQLITE_LOCATION . '/wp-pdo-mysql-on-sqlite.php' : false, | ||
| +); | ||
| +foreach ($sqlite_driver_locations as $sqlite_driver_path) { | ||
| + if ($sqlite_driver_path && file_exists($sqlite_driver_path)) { | ||
| + require_once $sqlite_driver_path; | ||
| + break; | ||
| + } | ||
| +} | ||
|
|
||
| // Supress the following phpMyAdmin warning: | ||
| // "The mysqlnd extension is missing. Please check your PHP configuration." | ||
| diff --git a/node_modules/@wp-playground/tools/DbiMysqli-IfZRkV2V.cjs b/node_modules/@wp-playground/tools/DbiMysqli-IfZRkV2V.cjs | ||
| index 02572b2..c958d5d 100644 | ||
| --- a/node_modules/@wp-playground/tools/DbiMysqli-IfZRkV2V.cjs | ||
| +++ b/node_modules/@wp-playground/tools/DbiMysqli-IfZRkV2V.cjs | ||
| @@ -22,8 +22,18 @@ use Throwable; | ||
| use WP_SQLite_Connection; | ||
| use WP_SQLite_Driver; | ||
|
|
||
| -// Load the SQLite driver. | ||
| -require_once '/internal/shared/sqlite-database-integration/wp-pdo-mysql-on-sqlite.php'; | ||
| +// Load the SQLite driver from the first available location. | ||
| +// The path varies depending on the environment (Playground, Studio, etc.). | ||
| +$sqlite_driver_locations = array( | ||
| + '/internal/shared/sqlite-database-integration/wp-pdo-mysql-on-sqlite.php', | ||
| + defined( 'WP_SQLITE_LOCATION' ) ? WP_SQLITE_LOCATION . '/wp-pdo-mysql-on-sqlite.php' : false, | ||
| +); | ||
| +foreach ($sqlite_driver_locations as $sqlite_driver_path) { | ||
| + if ($sqlite_driver_path && file_exists($sqlite_driver_path)) { | ||
| + require_once $sqlite_driver_path; | ||
| + break; | ||
| + } | ||
| +} | ||
|
|
||
| // Supress the following phpMyAdmin warning: | ||
| // "The mysqlnd extension is missing. Please check your PHP configuration." |
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
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.
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.
This mimics logic from Playground: https://github.com/WordPress/wordpress-playground/blob/4f8b0717af51be37bd859a7c523e9433b46f4a37/packages/playground/tools/src/phpmyadmin/index.ts#L18