From b039fa3305be85da8af5a497c1f920c26e7c1553 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Sun, 22 Feb 2026 14:41:20 -0600 Subject: [PATCH 01/14] fix: switch to official phpmyadmin Docker image for arm64 support --- CHANGELOG.md | 1 + builders/phpmyadmin.js | 2 +- docs/config.md | 2 +- docs/index.md | 14 +++++++------- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 226b340..3028e55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }}) +* Switched to official `phpmyadmin` Docker image for arm64/Apple Silicon support [#61](https://github.com/lando/phpmyadmin/issues/61) * Updated `vite` from 5.4.20 to 5.4.21 * Updated `mdast-util-to-hast` from 13.2.0 to 13.2.1 * Updated `lodash-es` from 4.17.21 to 4.17.23 diff --git a/builders/phpmyadmin.js b/builders/phpmyadmin.js index 5a035f4..8bbcd5e 100644 --- a/builders/phpmyadmin.js +++ b/builders/phpmyadmin.js @@ -34,7 +34,7 @@ module.exports = { // Assemble the service config const pmaService = { - image: `phpmyadmin/phpmyadmin:${options.version}`, + image: `phpmyadmin:${options.version}`, environment: { MYSQL_ROOT_PASSWORD: '', PMA_HOSTS: options.hosts.join(','), diff --git a/docs/config.md b/docs/config.md index 92b5737..1ec5c8a 100644 --- a/docs/config.md +++ b/docs/config.md @@ -70,7 +70,7 @@ services: ## Advanced -There are also [several various envvars](https://hub.docker.com/r/phpmyadmin/phpmyadmin/) exposed by the underlying image we use that you can set to further customize how your PhpMyAdmin works. **These are not officially supported** so we *highly recommend* you do not alter them unless you know what you are doing. Even then, YMMV. +There are also [several various envvars](https://hub.docker.com/_/phpmyadmin) exposed by the underlying image we use that you can set to further customize how your PhpMyAdmin works. **These are not officially supported** so we *highly recommend* you do not alter them unless you know what you are doing. Even then, YMMV. That said, you will need to use a [service override](https://docs.lando.dev/services/lando-3.html#overrides) to take advantage of them as shown below: diff --git a/docs/index.md b/docs/index.md index 50877fe..39879da 100644 --- a/docs/index.md +++ b/docs/index.md @@ -18,17 +18,17 @@ services: ## Supported versions -* [5.2](https://hub.docker.com/r/phpmyadmin/phpmyadmin/) -* [5.1](https://hub.docker.com/r/phpmyadmin/phpmyadmin/) -* [5.0](https://hub.docker.com/r/phpmyadmin/phpmyadmin/) +* [5.2](https://hub.docker.com/_/phpmyadmin) +* [5.1](https://hub.docker.com/_/phpmyadmin) +* [5.0](https://hub.docker.com/_/phpmyadmin) * [custom](https://docs.lando.dev/services/lando-3.html#overrides) ## Legacy versions -* [4.9](https://hub.docker.com/r/phpmyadmin/phpmyadmin/) -* [4.8](https://hub.docker.com/r/phpmyadmin/phpmyadmin/) -* [4.7](https://hub.docker.com/r/phpmyadmin/phpmyadmin/) -* [4.6](https://hub.docker.com/r/phpmyadmin/phpmyadmin/) +* [4.9](https://hub.docker.com/_/phpmyadmin) +* [4.8](https://hub.docker.com/_/phpmyadmin) +* [4.7](https://hub.docker.com/_/phpmyadmin) +* [4.6](https://hub.docker.com/_/phpmyadmin) ## Patch versions From 1d79e0894f8ebd70436c6906c3de98e76ea3f0ff Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 22 Feb 2026 20:47:00 +0000 Subject: [PATCH 02/14] Fix: Use phpmyadmin/phpmyadmin image for legacy 4.x versions The official phpmyadmin Docker image only has 5.x tags. Legacy 4.x versions (4.9, 4.8, 4.7, 4.6) are only available on the deprecated phpmyadmin/phpmyadmin image. This change uses the appropriate image based on version to prevent Docker pull failures for legacy versions. Applied via @cursor push command --- builders/phpmyadmin.js | 2 +- docs/index.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/builders/phpmyadmin.js b/builders/phpmyadmin.js index 8bbcd5e..f1c196e 100644 --- a/builders/phpmyadmin.js +++ b/builders/phpmyadmin.js @@ -34,7 +34,7 @@ module.exports = { // Assemble the service config const pmaService = { - image: `phpmyadmin:${options.version}`, + image: semver.lt(`${options.version}.0`, '5.0.0') ? `phpmyadmin/phpmyadmin:${options.version}` : `phpmyadmin:${options.version}`, environment: { MYSQL_ROOT_PASSWORD: '', PMA_HOSTS: options.hosts.join(','), diff --git a/docs/index.md b/docs/index.md index 39879da..d4b884f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -25,10 +25,10 @@ services: ## Legacy versions -* [4.9](https://hub.docker.com/_/phpmyadmin) -* [4.8](https://hub.docker.com/_/phpmyadmin) -* [4.7](https://hub.docker.com/_/phpmyadmin) -* [4.6](https://hub.docker.com/_/phpmyadmin) +* [4.9](https://hub.docker.com/r/phpmyadmin/phpmyadmin) +* [4.8](https://hub.docker.com/r/phpmyadmin/phpmyadmin) +* [4.7](https://hub.docker.com/r/phpmyadmin/phpmyadmin) +* [4.6](https://hub.docker.com/r/phpmyadmin/phpmyadmin) ## Patch versions From 002accf8c57f7a732ea6b73b307d91572e2a75b6 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 22 Feb 2026 20:54:24 +0000 Subject: [PATCH 03/14] Fix phpMyAdmin version threshold to support 5.0/5.1 tags Change version threshold from 5.0.0 to 5.2.0 to ensure versions 5.0 and 5.1 use the deprecated phpmyadmin/phpmyadmin image where these tags exist, since the official phpmyadmin image only supports 5.2.x and higher. Applied via @cursor push command --- builders/phpmyadmin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builders/phpmyadmin.js b/builders/phpmyadmin.js index f1c196e..2c07d01 100644 --- a/builders/phpmyadmin.js +++ b/builders/phpmyadmin.js @@ -30,11 +30,11 @@ module.exports = { // Arrayify the hosts if needed if (!_.isArray(options.hosts)) options.hosts = [options.hosts]; // Switch to legacy command if needed - if (semver.lt(`${options.version}.0`, '5.0.0')) options.command = '/run.sh phpmyadmin'; + if (semver.lt(`${options.version}.0`, '5.2.0')) options.command = '/run.sh phpmyadmin'; // Assemble the service config const pmaService = { - image: semver.lt(`${options.version}.0`, '5.0.0') ? `phpmyadmin/phpmyadmin:${options.version}` : `phpmyadmin:${options.version}`, + image: semver.lt(`${options.version}.0`, '5.2.0') ? `phpmyadmin/phpmyadmin:${options.version}` : `phpmyadmin:${options.version}`, environment: { MYSQL_ROOT_PASSWORD: '', PMA_HOSTS: options.hosts.join(','), From e56a6270a45462fe4253ac1ef5647f88d594cca4 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Sun, 22 Feb 2026 15:00:15 -0600 Subject: [PATCH 04/14] fix: simplify image reference and fix lint error --- .gitignore | 1 + builders/phpmyadmin.js | 4 ++-- docs/index.md | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index ff68704..6c52b01 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ yarn.lock .stignore *.sync-conflict-* +phpmyadmin/ diff --git a/builders/phpmyadmin.js b/builders/phpmyadmin.js index 2c07d01..8bbcd5e 100644 --- a/builders/phpmyadmin.js +++ b/builders/phpmyadmin.js @@ -30,11 +30,11 @@ module.exports = { // Arrayify the hosts if needed if (!_.isArray(options.hosts)) options.hosts = [options.hosts]; // Switch to legacy command if needed - if (semver.lt(`${options.version}.0`, '5.2.0')) options.command = '/run.sh phpmyadmin'; + if (semver.lt(`${options.version}.0`, '5.0.0')) options.command = '/run.sh phpmyadmin'; // Assemble the service config const pmaService = { - image: semver.lt(`${options.version}.0`, '5.2.0') ? `phpmyadmin/phpmyadmin:${options.version}` : `phpmyadmin:${options.version}`, + image: `phpmyadmin:${options.version}`, environment: { MYSQL_ROOT_PASSWORD: '', PMA_HOSTS: options.hosts.join(','), diff --git a/docs/index.md b/docs/index.md index d4b884f..39879da 100644 --- a/docs/index.md +++ b/docs/index.md @@ -25,10 +25,10 @@ services: ## Legacy versions -* [4.9](https://hub.docker.com/r/phpmyadmin/phpmyadmin) -* [4.8](https://hub.docker.com/r/phpmyadmin/phpmyadmin) -* [4.7](https://hub.docker.com/r/phpmyadmin/phpmyadmin) -* [4.6](https://hub.docker.com/r/phpmyadmin/phpmyadmin) +* [4.9](https://hub.docker.com/_/phpmyadmin) +* [4.8](https://hub.docker.com/_/phpmyadmin) +* [4.7](https://hub.docker.com/_/phpmyadmin) +* [4.6](https://hub.docker.com/_/phpmyadmin) ## Patch versions From 0b0efb95b57ec5a69f72fd1bb7e1b1b381f8b087 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Sun, 22 Feb 2026 15:01:16 -0600 Subject: [PATCH 05/14] fix: add hub.docker.com to netlify link checker todoPatterns --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index 89ec7db..d45a379 100644 --- a/netlify.toml +++ b/netlify.toml @@ -10,7 +10,7 @@ [[context.deploy-preview.plugins]] package = "netlify-plugin-checklinks" [context.deploy-preview.plugins.inputs] - todoPatterns = [ "load", "CHANGELOG.html", "x.com", "twitter.com", "/v/" ] + todoPatterns = [ "load", "CHANGELOG.html", "x.com", "twitter.com", "/v/", "hub.docker.com" ] skipPatterns = [ ".rss", ".gif", ".jpg" ] checkExternal = true From 20418cc87a47112dc9df93899e3d27053e8c9fea Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Sun, 22 Feb 2026 15:02:57 -0600 Subject: [PATCH 06/14] fix: restore correct legacy command threshold to 5.2.0 --- builders/phpmyadmin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builders/phpmyadmin.js b/builders/phpmyadmin.js index 8bbcd5e..b56161a 100644 --- a/builders/phpmyadmin.js +++ b/builders/phpmyadmin.js @@ -30,7 +30,7 @@ module.exports = { // Arrayify the hosts if needed if (!_.isArray(options.hosts)) options.hosts = [options.hosts]; // Switch to legacy command if needed - if (semver.lt(`${options.version}.0`, '5.0.0')) options.command = '/run.sh phpmyadmin'; + if (semver.lt(`${options.version}.0`, '5.2.0')) options.command = '/run.sh phpmyadmin'; // Assemble the service config const pmaService = { From 65b0b8356c075bb6dbaf33a2b5e1a6925d99d57c Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Sun, 22 Feb 2026 15:19:14 -0600 Subject: [PATCH 07/14] fix: use legacy image for 4.x versions (official image only supports 5.x+) --- builders/phpmyadmin.js | 8 +++++++- docs/index.md | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/builders/phpmyadmin.js b/builders/phpmyadmin.js index b56161a..b598d27 100644 --- a/builders/phpmyadmin.js +++ b/builders/phpmyadmin.js @@ -32,9 +32,15 @@ module.exports = { // Switch to legacy command if needed if (semver.lt(`${options.version}.0`, '5.2.0')) options.command = '/run.sh phpmyadmin'; + // Use official image for 5.x+, legacy image for 4.x + const isLegacy = semver.lt(`${options.version}.0`, '5.0.0'); + const image = isLegacy + ? `phpmyadmin/phpmyadmin:${options.version}` + : `phpmyadmin:${options.version}`; + // Assemble the service config const pmaService = { - image: `phpmyadmin:${options.version}`, + image, environment: { MYSQL_ROOT_PASSWORD: '', PMA_HOSTS: options.hosts.join(','), diff --git a/docs/index.md b/docs/index.md index 39879da..d4b884f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -25,10 +25,10 @@ services: ## Legacy versions -* [4.9](https://hub.docker.com/_/phpmyadmin) -* [4.8](https://hub.docker.com/_/phpmyadmin) -* [4.7](https://hub.docker.com/_/phpmyadmin) -* [4.6](https://hub.docker.com/_/phpmyadmin) +* [4.9](https://hub.docker.com/r/phpmyadmin/phpmyadmin) +* [4.8](https://hub.docker.com/r/phpmyadmin/phpmyadmin) +* [4.7](https://hub.docker.com/r/phpmyadmin/phpmyadmin) +* [4.6](https://hub.docker.com/r/phpmyadmin/phpmyadmin) ## Patch versions From 250e46db2c32c58145f79515790b6735a896f221 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Sun, 22 Feb 2026 15:20:38 -0600 Subject: [PATCH 08/14] fix: correct legacy threshold to 5.0.0 (official image has 5.0+) --- builders/phpmyadmin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builders/phpmyadmin.js b/builders/phpmyadmin.js index b598d27..36f86ac 100644 --- a/builders/phpmyadmin.js +++ b/builders/phpmyadmin.js @@ -30,7 +30,7 @@ module.exports = { // Arrayify the hosts if needed if (!_.isArray(options.hosts)) options.hosts = [options.hosts]; // Switch to legacy command if needed - if (semver.lt(`${options.version}.0`, '5.2.0')) options.command = '/run.sh phpmyadmin'; + if (semver.lt(`${options.version}.0`, '5.0.0')) options.command = '/run.sh phpmyadmin'; // Use official image for 5.x+, legacy image for 4.x const isLegacy = semver.lt(`${options.version}.0`, '5.0.0'); From 6c9a9f2c3140307dfa6497ce3bde2886e911a002 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Sun, 22 Feb 2026 15:25:56 -0600 Subject: [PATCH 09/14] test: modernize examples with specific database versions --- .github/workflows/pr-phpmyadmin-tests.yml | 1 + examples/4.x/.lando.yml | 4 +- examples/4.x/README.md | 10 ++--- examples/4.x/package.json | 2 +- examples/5.x/.lando.yml | 5 ++- examples/5.x/README.md | 10 ++++- examples/5.x/package.json | 3 +- examples/mysql/.gitignore | 1 + examples/mysql/.lando.yml | 14 ++++++ examples/mysql/README.md | 52 +++++++++++++++++++++++ examples/mysql/package.json | 14 ++++++ 11 files changed, 103 insertions(+), 13 deletions(-) create mode 100644 examples/mysql/.gitignore create mode 100644 examples/mysql/.lando.yml create mode 100644 examples/mysql/README.md create mode 100644 examples/mysql/package.json diff --git a/.github/workflows/pr-phpmyadmin-tests.yml b/.github/workflows/pr-phpmyadmin-tests.yml index c68ed41..7ad0ee3 100644 --- a/.github/workflows/pr-phpmyadmin-tests.yml +++ b/.github/workflows/pr-phpmyadmin-tests.yml @@ -13,6 +13,7 @@ jobs: leia-test: - examples/4.x - examples/5.x + - examples/mysql lando-version: - 3-edge-slim os: diff --git a/examples/4.x/.lando.yml b/examples/4.x/.lando.yml index f5ae5f8..a7e3bd4 100644 --- a/examples/4.x/.lando.yml +++ b/examples/4.x/.lando.yml @@ -12,9 +12,9 @@ services: - chmod +x /app/.lando/pma-theme.sh - /app/.lando/pma-theme.sh database: - type: mariadb + type: mariadb:10.6 database2: - type: mariadb + type: mariadb:10.11 # This is important because it lets lando know to test against the plugin in this repo # DO NOT REMOVE THIS! diff --git a/examples/4.x/README.md b/examples/4.x/README.md index dd9d0e6..cca9350 100644 --- a/examples/4.x/README.md +++ b/examples/4.x/README.md @@ -28,17 +28,17 @@ Run the following commands to validate things are rolling as they should. ```bash # Should return 200 for the pma admin site -lando ssh -s pma -c "curl -I localhost | grep 200 | grep OK" +lando exec pma -- curl -I localhost | grep 200 | grep OK # Should have databases that work correctly -lando ssh -s database -c "mysql -umariadb -pmariadb database -e quit" -lando ssh -s database2 -c "mysql -umariadb -pmariadb database -e quit" +lando exec database -- mysql -umariadb -pmariadb database -e quit +lando exec database2 -- mysql -umariadb -pmariadb database -e quit # Should have our databases hooked up to PMA -lando ssh -s pma -c "env | grep PMA_HOSTS=database,database2" +lando exec pma -- env | grep PMA_HOSTS=database,database2 # Should have set a custom config file if specified -lando ssh -s pma -c "cat /etc/phpmyadmin/config.user.inc.php" | grep ThemeDefault | grep pmaterial +lando exec pma -- cat /etc/phpmyadmin/config.user.inc.php | grep ThemeDefault | grep pmaterial ``` Destroy tests diff --git a/examples/4.x/package.json b/examples/4.x/package.json index 8b4ca62..ff8c5f6 100644 --- a/examples/4.x/package.json +++ b/examples/4.x/package.json @@ -9,6 +9,6 @@ "author": "", "license": "ISC", "dependencies": { - "@lando/mariadb": "^1.0.0" + "@lando/mariadb": "^1.6.3" } } diff --git a/examples/5.x/.lando.yml b/examples/5.x/.lando.yml index 125d232..f89a961 100644 --- a/examples/5.x/.lando.yml +++ b/examples/5.x/.lando.yml @@ -24,12 +24,13 @@ services: - chmod +x /app/.lando/pma-theme.sh - /app/.lando/pma-theme.sh database: - type: mariadb + type: mariadb:11.4 database2: - type: mariadb + type: mysql:8.0 # This is important because it lets lando know to test against the plugin in this repo # DO NOT REMOVE THIS! plugins: "@lando/phpmyadmin": ./../../ "@lando/mariadb": ./node_modules/@lando/mariadb + "@lando/mysql": ./node_modules/@lando/mysql diff --git a/examples/5.x/README.md b/examples/5.x/README.md index 68a9201..dd335a0 100644 --- a/examples/5.x/README.md +++ b/examples/5.x/README.md @@ -32,15 +32,21 @@ lando exec defaults -- curl -I localhost | grep 200 | grep OK lando exec pma -- curl -I localhost | grep 200 | grep OK lando exec pma_theme -- curl -I localhost | grep 200 | grep OK -# Should have databases that work correctly +# Should have mariadb database that works correctly lando exec database -- mysql -umariadb -pmariadb database -e quit -lando exec database2 -- mysql -umariadb -pmariadb database -e quit + +# Should have mysql database that works correctly +lando exec database2 -- mysql -umysql -pmysql database -e quit # Should have our databases hooked up to PMA lando exec defaults -- env | grep PMA_HOSTS=database,database2 lando exec pma -- env | grep PMA_HOSTS=database,database2 lando exec pma_theme -- env | grep PMA_HOSTS=database,database2 +# Should be able to connect to both database hosts from PMA +lando exec pma -- curl -s localhost | grep -q "database" +lando exec pma -- curl -s localhost | grep -q "database2" + # Should be version 5.1.x lando exec defaults -- curl -s localhost | grep -oP '\K[^<]+' | tee >(cat 1>&2) | grep -q '5.1.' diff --git a/examples/5.x/package.json b/examples/5.x/package.json index 333a31e..826e2fc 100644 --- a/examples/5.x/package.json +++ b/examples/5.x/package.json @@ -9,6 +9,7 @@ "author": "", "license": "ISC", "dependencies": { - "@lando/mariadb": "^1.6.3" + "@lando/mariadb": "^1.6.3", + "@lando/mysql": "^1.5.0" } } diff --git a/examples/mysql/.gitignore b/examples/mysql/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/examples/mysql/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/examples/mysql/.lando.yml b/examples/mysql/.lando.yml new file mode 100644 index 0000000..4e4d39f --- /dev/null +++ b/examples/mysql/.lando.yml @@ -0,0 +1,14 @@ +name: lando-pma-mysql +services: + pma: + type: phpmyadmin:5.2 + hosts: + - database + database: + type: mysql:8.4 + +# This is important because it lets lando know to test against the plugin in this repo +# DO NOT REMOVE THIS! +plugins: + "@lando/phpmyadmin": ./../../ + "@lando/mysql": ./node_modules/@lando/mysql diff --git a/examples/mysql/README.md b/examples/mysql/README.md new file mode 100644 index 0000000..5515233 --- /dev/null +++ b/examples/mysql/README.md @@ -0,0 +1,52 @@ +PhpMyAdmin MySQL Example +======================== + +This example exists primarily to test phpMyAdmin with MySQL specifically: + +* [PhpMyAdmin Service](https://docs.devwithlando.io/tutorials/phpmyadmin.html) + +Start up tests +-------------- + +Run the following commands to get up and running with this example. + +```bash +# Should install Lando plugin dependency. +npm ci +``` + +```bash +# Should start up successfully +lando poweroff +lando start +``` + +Verification commands +--------------------- + +Run the following commands to validate things are rolling as they should. + +```bash +# Should return 200 for the pma admin site +lando exec pma -- curl -I localhost | grep 200 | grep OK + +# Should have mysql database that works correctly +lando exec database -- mysql -umysql -pmysql database -e quit + +# Should have our database hooked up to PMA +lando exec pma -- env | grep PMA_HOSTS=database + +# Should be version 5.2.x +lando exec pma -- curl -s localhost | grep -oP '\K[^<]+' | tee >(cat 1>&2) | grep -q '5.2.' +``` + +Destroy tests +------------- + +Run the following commands to trash this app like nothing ever happened. + +```bash +# Should be destroyed with success +lando destroy -y +lando poweroff +``` diff --git a/examples/mysql/package.json b/examples/mysql/package.json new file mode 100644 index 0000000..6badc33 --- /dev/null +++ b/examples/mysql/package.json @@ -0,0 +1,14 @@ +{ + "name": "mysql", + "version": "1.0.0", + "description": "PhpMyAdmin MySQL Example", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "@lando/mysql": "^1.5.0" + } +} From 9490c246cf87b47b6efd7de072cb974d4170f9f0 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Sun, 22 Feb 2026 15:27:05 -0600 Subject: [PATCH 10/14] chore: update @lando package deps and changelog --- CHANGELOG.md | 3 +++ examples/4.x/package.json | 2 +- examples/5.x/package.json | 4 ++-- examples/mysql/package.json | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3028e55..3530b39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }}) * Switched to official `phpmyadmin` Docker image for arm64/Apple Silicon support [#61](https://github.com/lando/phpmyadmin/issues/61) +* Modernized example tests with pinned database versions and added MySQL test coverage +* Updated `@lando/mariadb` test dependency to ^1.8.0 +* Updated `@lando/mysql` test dependency to ^1.6.0 * Updated `vite` from 5.4.20 to 5.4.21 * Updated `mdast-util-to-hast` from 13.2.0 to 13.2.1 * Updated `lodash-es` from 4.17.21 to 4.17.23 diff --git a/examples/4.x/package.json b/examples/4.x/package.json index ff8c5f6..4ade3b0 100644 --- a/examples/4.x/package.json +++ b/examples/4.x/package.json @@ -9,6 +9,6 @@ "author": "", "license": "ISC", "dependencies": { - "@lando/mariadb": "^1.6.3" + "@lando/mariadb": "^1.8.0" } } diff --git a/examples/5.x/package.json b/examples/5.x/package.json index 826e2fc..e4c398d 100644 --- a/examples/5.x/package.json +++ b/examples/5.x/package.json @@ -9,7 +9,7 @@ "author": "", "license": "ISC", "dependencies": { - "@lando/mariadb": "^1.6.3", - "@lando/mysql": "^1.5.0" + "@lando/mariadb": "^1.8.0", + "@lando/mysql": "^1.6.0" } } diff --git a/examples/mysql/package.json b/examples/mysql/package.json index 6badc33..877448a 100644 --- a/examples/mysql/package.json +++ b/examples/mysql/package.json @@ -9,6 +9,6 @@ "author": "", "license": "ISC", "dependencies": { - "@lando/mysql": "^1.5.0" + "@lando/mysql": "^1.6.0" } } From d0e97cb4f286e5459e2ff4bd3a501dcf290b78be Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 22 Feb 2026 21:56:24 +0000 Subject: [PATCH 11/14] Fix duplicated semver comparison by defining isLegacy once and reusing it Applied via @cursor push command --- builders/phpmyadmin.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/builders/phpmyadmin.js b/builders/phpmyadmin.js index 36f86ac..d63b27e 100644 --- a/builders/phpmyadmin.js +++ b/builders/phpmyadmin.js @@ -29,11 +29,14 @@ module.exports = { // Arrayify the hosts if needed if (!_.isArray(options.hosts)) options.hosts = [options.hosts]; + + // Determine if this is a legacy version (< 5.0.0) + const isLegacy = semver.lt(`${options.version}.0`, '5.0.0'); + // Switch to legacy command if needed - if (semver.lt(`${options.version}.0`, '5.0.0')) options.command = '/run.sh phpmyadmin'; + if (isLegacy) options.command = '/run.sh phpmyadmin'; // Use official image for 5.x+, legacy image for 4.x - const isLegacy = semver.lt(`${options.version}.0`, '5.0.0'); const image = isLegacy ? `phpmyadmin/phpmyadmin:${options.version}` : `phpmyadmin:${options.version}`; From 00ee91bf7c78f12d8b03877c9b29830485e20f00 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 22 Feb 2026 21:58:37 +0000 Subject: [PATCH 12/14] chore: update GitHub Actions runners to Node 20 and ubuntu-24.04 - Update all workflow files to use Node 20 instead of Node 18 - Update label-add-to-project.yml to use ubuntu-24.04 instead of ubuntu-latest - Fix trailing spaces lint errors in builders/phpmyadmin.js Co-authored-by: Aaron Feledy --- .github/workflows/label-add-to-project.yml | 2 +- .github/workflows/pr-docs-tests.yml | 2 +- .github/workflows/pr-linter.yml | 2 +- .github/workflows/pr-phpmyadmin-tests.yml | 2 +- .github/workflows/pr-unit-tests.yml | 2 +- builders/phpmyadmin.js | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/label-add-to-project.yml b/.github/workflows/label-add-to-project.yml index db11231..8e3e22e 100644 --- a/.github/workflows/label-add-to-project.yml +++ b/.github/workflows/label-add-to-project.yml @@ -8,7 +8,7 @@ on: jobs: add_to_project: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Add issue/PR to GitHub Project if: github.event.label.name == 'flag' diff --git a/.github/workflows/pr-docs-tests.yml b/.github/workflows/pr-docs-tests.yml index 2876d83..d0ea99c 100644 --- a/.github/workflows/pr-docs-tests.yml +++ b/.github/workflows/pr-docs-tests.yml @@ -11,7 +11,7 @@ jobs: os: - ubuntu-24.04 node-version: - - '18' + - '20' steps: # Install deps and cache - name: Checkout code diff --git a/.github/workflows/pr-linter.yml b/.github/workflows/pr-linter.yml index 4fa4963..37bc23b 100644 --- a/.github/workflows/pr-linter.yml +++ b/.github/workflows/pr-linter.yml @@ -11,7 +11,7 @@ jobs: os: - ubuntu-24.04 node-version: - - '18' + - '20' steps: # Install deps and cache - name: Checkout code diff --git a/.github/workflows/pr-phpmyadmin-tests.yml b/.github/workflows/pr-phpmyadmin-tests.yml index 7ad0ee3..2074a14 100644 --- a/.github/workflows/pr-phpmyadmin-tests.yml +++ b/.github/workflows/pr-phpmyadmin-tests.yml @@ -19,7 +19,7 @@ jobs: os: - ubuntu-24.04 node-version: - - '18' + - '20' steps: - name: Checkout code diff --git a/.github/workflows/pr-unit-tests.yml b/.github/workflows/pr-unit-tests.yml index a9d7b2d..9011b8f 100644 --- a/.github/workflows/pr-unit-tests.yml +++ b/.github/workflows/pr-unit-tests.yml @@ -13,7 +13,7 @@ jobs: - ubuntu-24.04 - macos-14 node-version: - - '18' + - '20' steps: # Install deps and cache - name: Checkout code diff --git a/builders/phpmyadmin.js b/builders/phpmyadmin.js index d63b27e..bb250ad 100644 --- a/builders/phpmyadmin.js +++ b/builders/phpmyadmin.js @@ -29,10 +29,10 @@ module.exports = { // Arrayify the hosts if needed if (!_.isArray(options.hosts)) options.hosts = [options.hosts]; - + // Determine if this is a legacy version (< 5.0.0) const isLegacy = semver.lt(`${options.version}.0`, '5.0.0'); - + // Switch to legacy command if needed if (isLegacy) options.command = '/run.sh phpmyadmin'; From 989808c1b9aa7aa2610127e88a874ca0450dcfa1 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Sun, 22 Feb 2026 16:03:39 -0600 Subject: [PATCH 13/14] fix: add @lando/mariadb and @lando/mysql as dependencies The leia tests use mariadb and mysql services but these plugins were missing from package.json. CI runs npm install --production which only installs dependencies, so these need to be regular deps (matching the pattern used by @lando/lamp and other plugins). --- package-lock.json | 42 ++++++++++++++++++++++++++++++++++++++++++ package.json | 2 ++ 2 files changed, 44 insertions(+) diff --git a/package-lock.json b/package-lock.json index f419eb8..1dd2c74 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,8 @@ "version": "1.5.0", "license": "MIT", "dependencies": { + "@lando/mariadb": "^1.8.0", + "@lando/mysql": "^1.6.0", "lodash": "^4.17.21", "semver": "^7.7.1" }, @@ -1478,6 +1480,46 @@ "node": ">=8" } }, + "node_modules/@lando/mariadb": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@lando/mariadb/-/mariadb-1.8.0.tgz", + "integrity": "sha512-+sSO7wR2OBF80sjN+tfuS7EHnoy0LNMmP/rLYAZcREHcTuGec5LP3eUQZCo91Qh6Vi31BVVKIOherYlR0zLg3Q==", + "bundleDependencies": [ + "lodash" + ], + "license": "MIT", + "dependencies": { + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@lando/mariadb/node_modules/lodash": { + "version": "4.17.21", + "inBundle": true, + "license": "MIT" + }, + "node_modules/@lando/mysql": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@lando/mysql/-/mysql-1.6.0.tgz", + "integrity": "sha512-5HXK9JgBFnoPQCHNn7BuMmBCtyhB0Da6ZQ02KnuFfcZ3koaZ/IKyp2KIf+2vzRzvfZxK+/er7RdMk+2dnBzUCQ==", + "bundleDependencies": [ + "lodash" + ], + "license": "MIT", + "dependencies": { + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@lando/mysql/node_modules/lodash": { + "version": "4.17.21", + "inBundle": true, + "license": "MIT" + }, "node_modules/@lando/vitepress-theme-default-plus": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@lando/vitepress-theme-default-plus/-/vitepress-theme-default-plus-1.1.1.tgz", diff --git a/package.json b/package.json index cc0b6f8..44b6dcb 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,8 @@ "test": "npm run lint && npm run test:unit" }, "dependencies": { + "@lando/mariadb": "^1.8.0", + "@lando/mysql": "^1.6.0", "lodash": "^4.17.21", "semver": "^7.7.1" }, From 4637de3d1bec3cfaa9ce073586752c96bc7224a3 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 22 Feb 2026 22:07:46 +0000 Subject: [PATCH 14/14] fix: move @lando/mariadb and @lando/mysql to devDependencies These packages are test dependencies used only in examples/, not production dependencies. Moving them prevents unnecessary transitive dependencies for consumers of @lando/phpmyadmin. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 44b6dcb..4f3774e 100644 --- a/package.json +++ b/package.json @@ -43,14 +43,14 @@ "test": "npm run lint && npm run test:unit" }, "dependencies": { - "@lando/mariadb": "^1.8.0", - "@lando/mysql": "^1.6.0", "lodash": "^4.17.21", "semver": "^7.7.1" }, "devDependencies": { "@babel/eslint-parser": "^7.16.0", "@lando/leia": "^1.0.0-beta.4", + "@lando/mariadb": "^1.8.0", + "@lando/mysql": "^1.6.0", "@lando/vitepress-theme-default-plus": "^1.1.1", "chai": "^4.3.4", "command-line-test": "^1.0.10",